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
Created by yiming on 2017/6/9.
public interface BloggerService { public Blogger findBlogger(String userName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void init() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "private void strin() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private void init() {\n\n\n\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public int describeContents() { return 0; }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "@Override\n public void memoria() {\n \n }", "public void mo55254a() {\n }", "public void mo21877s() {\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void initialize() { \n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public void mo12930a() {\n }" ]
[ "0.59597", "0.5834634", "0.57531774", "0.57419735", "0.57419735", "0.5715082", "0.5672078", "0.56677437", "0.5663892", "0.5622021", "0.5593629", "0.55614334", "0.55515575", "0.5546259", "0.55262953", "0.55259466", "0.5521121", "0.55139416", "0.5508361", "0.5507325", "0.5486162", "0.5486162", "0.5486162", "0.5486162", "0.5486162", "0.54835963", "0.5481738", "0.547451", "0.54738206", "0.54672384", "0.5462091", "0.5452142", "0.5445025", "0.5438227", "0.5423418", "0.5419595", "0.5408198", "0.54007965", "0.5397825", "0.5384591", "0.53783286", "0.5373832", "0.53679305", "0.53679305", "0.53679305", "0.53646904", "0.53646904", "0.5364244", "0.53598714", "0.53586686", "0.53586686", "0.53586686", "0.53568614", "0.53538555", "0.5346896", "0.5346896", "0.5346896", "0.5346896", "0.5346896", "0.5346896", "0.5346896", "0.5346347", "0.5346347", "0.5339123", "0.5339123", "0.5339123", "0.53385115", "0.53385115", "0.53385115", "0.53385115", "0.53385115", "0.53385115", "0.5337639", "0.5335968", "0.5335968", "0.53350824", "0.532714", "0.53255415", "0.5308076", "0.5287281", "0.5283911", "0.5274069", "0.5271728", "0.5268051", "0.5267838", "0.5265503", "0.5263293", "0.5261228", "0.52542126", "0.5247332", "0.5245795", "0.52413976", "0.52389145", "0.52318007", "0.52192473", "0.51914567", "0.51890343", "0.5186675", "0.5186472", "0.51854914", "0.51716727" ]
0.0
-1
Created by acardenas on 3/9/14.
public interface AccountPayableService extends BaseService<AccountPayable, Integer> { public List<AccountPayable> getList(Event anEvent); }
{ "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}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void m50366E() {\n }", "@Override\n protected void init() {\n }", "public void mo38117a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void init() {\n\n\t}", "@Override\n public void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n void init() {\n }", "public void mo4359a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "private void kk12() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void initialize() { \n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}" ]
[ "0.6089011", "0.60022074", "0.590311", "0.5802413", "0.5772242", "0.5772242", "0.576551", "0.57585394", "0.57257986", "0.5720568", "0.5719632", "0.5716958", "0.5699132", "0.5697598", "0.568104", "0.568104", "0.568104", "0.568104", "0.568104", "0.566901", "0.5664961", "0.56638825", "0.5663861", "0.5648283", "0.5623774", "0.5623774", "0.5615096", "0.5596808", "0.55827975", "0.55821574", "0.5577089", "0.5573937", "0.5570217", "0.5563236", "0.55498636", "0.5546418", "0.5546418", "0.5546418", "0.5546418", "0.5546418", "0.5546418", "0.5540724", "0.5539397", "0.55258673", "0.5525431", "0.55165774", "0.55136347", "0.55136347", "0.55136347", "0.55111253", "0.55092436", "0.5508427", "0.5508427", "0.5508427", "0.5503366", "0.55000645", "0.5496889", "0.5496889", "0.5492309", "0.54916143", "0.54882985", "0.54865706", "0.5482868", "0.54771644", "0.5474596", "0.5474596", "0.5474596", "0.5473092", "0.5473092", "0.5461455", "0.5458111", "0.5454691", "0.545468", "0.54413587", "0.5438904", "0.5428422", "0.5426603", "0.5423436", "0.54162633", "0.5415493", "0.5405033", "0.5405033", "0.5401153", "0.5401153", "0.5397949", "0.5394719", "0.539187", "0.5380283", "0.53784806", "0.5342381", "0.53389657", "0.5322092", "0.5322092", "0.5322092", "0.5322092", "0.5322092", "0.5322092", "0.5322092", "0.53185976", "0.53080827", "0.5306614" ]
0.0
-1
This method shifts all of the elements to the left one index and moves the first element to the end.
public static int[] someFunction(int[] intArray) { if (intArray.length == 0) { return intArray; } int firstElement = intArray[0]; for (int i = 1; i < intArray.length; i++) { intArray[i - 1] = intArray[i]; } intArray[intArray.length - 1] = firstElement; return intArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void moveLeft(int index) {\n for (int i = index; i < dataSize; i++) {\n array[i] = array[i + 1];\n }\n\n array[dataSize] = 0;\n }", "public void leftRotateByOne(int[] data) {\n\t\tint temp = data[0]; // Storing first element in temp value\n\t\tfor (int i = 0; i < data.length - 1; i++) {\n\t\t\t// shift each element\n\t\t\tdata[i] = data[i + 1];\n\t\t}\n\t\t// store the last index by temp val\n\t\tdata[data.length - 1] = temp;\n\t}", "private void shiftElements() {\n RadarContent[] tempArr = new RadarContent[length - 1];\n for (int i = 0; i < length - 1; i++) {\n tempArr[i] = arrProfiles[i + 1];\n }\n arrProfiles = tempArr;\n length--;\n }", "@Override\n\tpublic void moveLeft()\n\t{\n\t\tif (!isAtStart()) right.push(left.pop());\n\n\t}", "private static void leftRotateByOne(int[] array) {\n int tmp = array[0];\n for (int i = 0; i < array.length - 1; i++) {\n array[i] = array[i + 1];\n }\n array[array.length - 1] = tmp;\n }", "public void shiftElements(E[] arr, int index) {\r\n\t\t\tif (arr[index] == null)\r\n\t\t\t\treturn;\r\n\t\t\tint firstIndexOfNull = -1;\r\n\t\t\tfor (int i = index; i < arr.length; i++) {\r\n\t\t\t\tif (arr[i] == null) {\r\n\t\t\t\t\tfirstIndexOfNull = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (firstIndexOfNull < index)\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\tfor (int i = firstIndexOfNull; i > index; i--) {\r\n\t\t\t\tarr[i] = arr[i - 1];\r\n\t\t\t}\r\n\t\t\tarr[index] = null;\r\n\t\t}", "public static void shift(){\n int[] x= {1, 5, 10, 7, -2};\n \n for (int i =0; i<x.length-1; i++){\n x[i]=x[i+1];\n }\n x[x.length-1]=0;\n for (int j=0; j<x.length; j++){\n System.out.println(x[j]);\n }\n\n\n\n }", "public void shiftLeft(int[] nums, int zeroIndex)\n {\n // shift everything 1 to the left\n for ( int i = zeroIndex; i < nums.length - 1; i++)\n {\n nums[i] = nums[i+1];\n }\n \n // put zero at last\n nums[nums.length-1] = 0;\n }", "public Dir moveLeft() {\n\t\t\tint newDir = (this.ordinal() + SIZE - 1) % SIZE;\n\t\t\treturn dirArray[newDir];\n\t\t}", "public void moveFirst() {\n\t\tcurrentElement = 0;\n\t}", "public void shiftLeft() {\n int currentPointer = this.registerPointer;\n\n if (currentPointer == 0)\n this.registerPointer = this.registerCapacity - 1;\n else\n this.registerPointer -= 1;\n }", "@Override\n\tpublic void moveToStart()\n\t{\n\t\twhile (!left.isEmpty())\n\t\t{\n\t\t\tright.push(left.pop());\n\t\t}\n\t}", "private void shiftFrontArray(int position) {\n\t\tif (position < 0 || position >= capacity) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Cannot shiftFront array with invalid position given.\");\n\t\t}\n\n\t\tif (size == capacity) {\n\t\t\treallocateDoubleCapacity();\n\t\t}\n\n\t\tfor (int i = size; i > position; i--) {\n\t\t\telements[i] = elements[i - 1];\n\t\t}\n\n\t\telements[position] = null;\n\t}", "private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }", "public void removeByLeftShift(int pos) {\r\n if (pos > 0 || pos < size - 1) {\r\n int nshift = size - pos - 1;\r\n int from = ((start + pos) + 1) % cir.length;\r\n int to = from - 1;\r\n if (to < 0) {\r\n to = cir.length - 1;\r\n }\r\n // int to=from--;\r\n for (int i = 0; i < nshift; i++) {\r\n cir[to % cir.length] = cir[from % cir.length];\r\n to = from;\r\n from++;\r\n }\r\n cir[(start + size - 1) % cir.length] = \"null\";\r\n // start++;\r\n size--;\r\n }\r\n }", "public void insertLeft( long j ) {\n if ( start == 0 ) {\n start = max;\n }\n Array[--start] = j;\n nItems++;\n }", "private <T> void shiftArrayElements(T[] orderedArray, int i) {\n\t\tfor (int j = orderedArray.length - 1; i < j; j--) {\r\n\t\t\torderedArray[j] = orderedArray[j - 1];\r\n\t\t}\r\n\t}", "public void shiftUp(int index) {\n\t\tint value = elements[index];\n\t\twhile (index != 0) {\n\t\t\tint parent = (index - 1) >>> 1;\n\t\t\tint parentValue = elements[parent];\n\t\t\tif (comparator.compare(parentValue, value) <= 0) {\n\t\t\t\telements[index] = value;\n\t\t\t\tat[value] = index;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telements[index] = parentValue;\n\t\t\tat[parentValue] = index;\n\t\t\tindex = parent;\n\t\t}\n\t\telements[0] = value;\n\t\tat[value] = 0;\n\t}", "private void moveRight(int index) {\n if (index != dataSize)\n for (int i = dataSize; i >= index; i--)\n array[i+1] = array[i];\n }", "@Test\n\tpublic void rotateArray_rotateLeftOneItem() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 1);\n\t\tassertThat(rotatedArray[0], equalTo(2));\n\t\tassertThat(rotatedArray[1], equalTo(3));\n\t\tassertThat(rotatedArray[2], equalTo(4));\n\t\tassertThat(rotatedArray[3], equalTo(5));\n\t\tassertThat(rotatedArray[4], equalTo(1));\n\t}", "private void shiftBackArray(int position) {\n\t\tif (position < 0 || position >= capacity) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Cannot shiftBack array with invalid position given.\");\n\t\t}\n\n\t\tfor (int i = position; i < size - 1; i++) {\n\t\t\telements[i] = elements[i + 1];\n\t\t}\n\n\t\telements[size - 1] = null;\n\t}", "public static <E> void leftShift (E[] array, int shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\tint length = array.length;\r\n\t\t\treverse(array, 0, length - 1);\r\n\t\t\treverse(array, 0, length - shift - 1);\r\n\t\t\treverse(array, length - shift, length - 1);\r\n\t\t} else return;\r\n\t}", "public static int[] rotateLeft(int[] arr) {\n int[] newArr=new int[arr.length];\n for (int i =0;i< arr.length;i++){\n if (!(i==0)){\n newArr[i-1]=arr[i];\n }\n else{\n newArr[arr.length-1]=arr[i];\n }\n }\n return newArr;\n }", "public void removeByLeftShift(int pos){\n int nshift=size-(pos);\n int to=(start+pos)%cir.length;\n int from=(to+1)%cir.length;\n for(int i=0;i<nshift;i++){\n cir[to]=cir[from];\n to=from;\n from=(from+1)%cir.length;\n \n }\n int index=(start+size-1)%cir.length;\n cir[index]=null;\n size--;\n \n }", "public void addFirst(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n]\n elements[j] = elements[j - 1]; // element shifts to right\n size++; // increment size\n elements[0] = t; // store element at index 0\n }", "private static int shiftLeftOneInPlace(int[] x, int carry)\n {\n int pos = x.length;\n while (--pos >= 0)\n {\n int val = x[pos];\n x[pos] = (val << 1) | carry;\n carry = val >>> 31;\n }\n return carry;\n }", "private void shiftAndCopyIfNeeded(int newSize, int pos) {\n\t\tif (array.length < newSize) {\n\t\t\t// create new array of desired size, at least newSize big\n\t\t\tObject[] newArray = new Object[newSize + EXTRA_SPACE];\n\t\t\t// copy all elements from array into newArray\n\t\t\tSystem.arraycopy(array, 0, newArray, 0, size);\n\t\t\t// use the newArray instead of the old \n\t\t\tarray = newArray;\n\t\t}\n\t\t// if there are elements above pos\n\t\tif (pos < size) {\n\t\t\t// shift content from pos and above\n\t\t\t// if newSize is greater than size, makes room for (newSize - size) elements at pos\n\t\t\t// in this case, make sure to fill the gap with new elements\n\t\t\t// if newSize is less than size, overwrites (newSize - size) elements below pos\n\t\t\tSystem.arraycopy(array, pos, array, newSize - (size - pos), size - pos);\n\t\t}\n\t\t// finally, use the new size\n\t\tsize = newSize;\n\t}", "public void insertByRightShift(Object elem, int pos) {\r\n if (pos > 0 || pos < size) {\r\n if (size == cir.length) {\r\n resizeStartUnchanged(cir.length + 3);\r\n }\r\n int nshift = size - pos;\r\n int from = ((start + size) - 1) % cir.length;\r\n int to = (from + 1) % cir.length;\r\n for (int i = 0; i < nshift; i++) {\r\n cir[to % cir.length] = cir[from % cir.length];\r\n to = from;\r\n from--;\r\n if (from < 0) {\r\n from = cir.length - 1;\r\n }\r\n }\r\n cir[(start + pos) % cir.length] = elem;\r\n // System.out.println(size);\r\n size++;\r\n }\r\n }", "public void insertByRightShift(Object elem, int pos){\n if(size==cir.length){\n resizeStartUnchanged(cir.length+3);\n }\n int nshift=size-pos;\n int from=(start+size-1)%cir.length;\n int to=(from+1)%cir.length;\n for(int i=0;i<nshift;i++){\n cir[to]=cir[from];\n to=from;\n from--;\n if(from==-1){\n from=cir.length-1;\n }\n }\n int index=(start+pos)%cir.length;\n cir[index]=elem;\n size++;\n }", "@Test\n\tpublic void rotateArrayUsingCalculatePositionAlgorithm_rotateLeftOneItem() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 1);\n\t\tassertThat(rotatedArray[0], equalTo(2));\n\t\tassertThat(rotatedArray[1], equalTo(3));\n\t\tassertThat(rotatedArray[2], equalTo(4));\n\t\tassertThat(rotatedArray[3], equalTo(5));\n\t\tassertThat(rotatedArray[4], equalTo(1));\n\t}", "public void moveLeft() {\r\n\t\tif (x > 0) x--; \r\n\t}", "public long removeLeft() {\n long temporary = Array[start++];\n if ( start == max ) {\n start = 0;\n }\n nItems--;\n return temporary;\n }", "public static <E> void rightShift (E[] array, int shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// save items displaced off of right end\r\n\t\t\tArrayList<E> temp = new ArrayList<E>();\r\n\t\t\tint length = array.length;\r\n\t\t\tfor (int i = length - shift ; i < length; i++) {\r\n\t\t\t\ttemp.add(array[i]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// copy in place\r\n\t\t\tfor (int i = length - 1; i > shift - 1; i--) {\r\n\t\t\t\tarray[i] = array[i - shift];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// copy displaced items to left end\r\n\t\t\tfor (int i = 0; i < shift; i++) {\r\n\t\t\t\tarray[i] = temp.get(i);\r\n\t\t\t}\r\n\t\t} else return;\r\n\t}", "private int[] leftrotate(int[] arr, int times) {\n assert (arr.length == 4);\n if (times % 4 == 0) {\n return arr;\n }\n while (times > 0) {\n int temp = arr[0];\n System.arraycopy(arr, 1, arr, 0, arr.length - 1);\n arr[arr.length - 1] = temp;\n --times;\n }\n return arr;\n }", "private int[][] shiftLeft(int[][] matrix, int row) {\r\n\t\tfor (int i = 0; i < row; i++) {\r\n\t\t\tint tmp = matrix[row][0];\r\n\t\t\tmatrix[row][0] = matrix[row][1];\r\n\t\t\tmatrix[row][1] = matrix[row][2];\r\n\t\t\tmatrix[row][2] = matrix[row][3];\r\n\t\t\tmatrix[row][3] = tmp;\r\n\t\t}\r\n\t\treturn matrix;\r\n\t}", "public int[] shitArrayValuesToFront(int[] arr){\n for(int i = 0; i < arr.length; i++){\n if(i == arr.length - 1){\n arr[i] = 0;\n }else{\n arr[i] = arr[i + 1];\n }\n }\n return arr;\n }", "static void move_1 (int[] nums) {\n\t\t\n\t\tint j = 0;\n\t\t\n\t\t// Copy all non 0 numbs to start of arry \n\t\t// j will keep count of nums of zeros \n\t\tfor(int i=0; i< nums.length; i++) {\n\t\t\t\n\t\t\tif(nums[i] != 0) {\n\t\t\t\tnums[j] = nums[i];\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// add j number of zeros to end of array\n\t\tfor(int i=j ; i<nums.length; i++) {\n\t\t\t\n\t\t\tnums[i] = 0;\n\t\t}\n\t\t\n\t}", "static void rvereseArray(int arr[], int start, int end)\r\n {\r\n int temp;\r\n while(start < end){\r\n \r\n temp = arr[start];\r\n arr[start] = arr[end];\r\n arr[end] = temp;\r\n //rvereseArray(arr, start+1, end-1);\r\n // move the left and right index pointers in toward the center\r\n start++;\r\n end--;\r\n }\r\n }", "static int[] rotLeft(int[] a, int d) {\n int temp = a[a.length - 1];\n for (int i = a.length - 1; i > 1; i--) {\n if (i > 2) {\n a[i - 2] = temp;\n temp = a[i - 3];\n } else {\n a[0] = a[a.length - 1];\n }\n }\n\n return a;\n }", "private int moveForward(int i, int s) {\n if (i + s >= items.length) {\n return ((i + s) - items.length);\n }\n return i + s;\n }", "public static void main(String[] args) {\n int[] list = {1, 2, 3, 4, 5};\n System.out.println(\"OldList = \" + Arrays.toString(list));\n ShiftArrayRight(list);\n System.out.println(\"NewList = \" + Arrays.toString(list));\n\n }", "public void moveShiftLeft();", "public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }", "private static void shiftRightOneInPlace(int start, int[] mag)\n {\n int magEnd = mag.length - 1;\n\n int m = mag[magEnd];\n\n for (int i = magEnd; i > start; i--)\n {\n int next = mag[i - 1];\n\n mag[i] = (m >>> 1) | (next << 31);\n m = next;\n }\n\n mag[start] >>>= 1;\n }", "private static int[] leftShift(int[] a, int len, int n) {\n int nInts = n >>> 5;\n int nBits = n&0x1F;\n int bitsInHighWord = bitLengthForInt(a[0]);\n\n // If shift can be done without recopy, do so\n if (n <= (32-bitsInHighWord)) {\n primitiveLeftShift(a, len, nBits);\n return a;\n } else { // Array must be resized\n if (nBits <= (32-bitsInHighWord)) {\n int result[] = new int[nInts+len];\n System.arraycopy(a, 0, result, 0, len);\n primitiveLeftShift(result, result.length, nBits);\n return result;\n } else {\n int result[] = new int[nInts+len+1];\n System.arraycopy(a, 0, result, 0, len);\n primitiveRightShift(result, result.length, 32 - nBits);\n return result;\n }\n }\n }", "public void addLeft(T obj) {\r\n if (offset == 0) {\r\n set(uc.getMem().ensureCapacity(objects, count + 2, increment));\r\n //shift them all up by 2 and\r\n ArrayUtils.shiftUp(objects, 2, offset, offset + count - 1, false);\r\n offset += 2;\r\n }\r\n objects[offset - 1] = obj;\r\n count++;\r\n }", "public void moveZeroes(int[] nums) {\n int current = 0, last = 0;\n int temp = 0;\n while(current < nums.length){\n if(nums[current] != 0){\n if(nums[last] != 0){\n last++;\n }\n else{\n if(current != last){\n nums[last] = nums[current];\n nums[current] = 0;\n last++;\n }\n }\n }\n current++;\n }\n}", "public void moveZeroes(int[] nums) \n {\n if ( nums == null || nums.length < 2 ) return;\n \n int pivot = nums.length - 1;\n int curr = 0;\n while ( curr < pivot )\n {\n if ( nums[curr] == 0 )\n {\n shiftLeft(nums, curr);\n pivot--;\n }\n else\n {\n curr++;\n }\n }\n }", "public void shiftRangeLeft() {\n shiftRange(false, 0.5);\n }", "public static List<Integer> rotateLeft(int d, List<Integer> arr) {\n // Write your code here\n List<Integer> resultList = arr.subList(d, arr.size());\n resultList.addAll(arr.subList(0, d));\n return resultList;\n }", "static int[] rotLeft(int[] a, int d) {\r\n // Gets length of input array\r\n int size = a.length;\r\n \r\n // Creates output array\r\n int[] result = new int[size];\r\n \r\n // We start cycling through the input array with index d instead of the very beginning\r\n int index = d;\r\n \r\n // Cycles through the input array\r\n for (int i = 0; i < size; i++) {\r\n // If the index is bigger than the size of the array, it starts again from 0 in order to not overflow\r\n if (index >= size) {\r\n index = 0;\r\n }\r\n result[i] = a[index]; // We save the current value in result\r\n index += 1; // We refresh the index\r\n }\r\n \r\n return result;\r\n}", "public static int[] rotateLeft(int[] array, int n) {\n\t\tif(n >= array.length) {\n\t\t\tn = n % array.length; \n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; ++i) {\n\t\t\t//hold the first element\n\t\t\tint placeholder = array[0];\n\t\t\tfor(int j = 0; j < array.length - 1; ++j) {\n\t\t\t\tarray[j] = array[j + 1];\n\t\t\t}\n\t\t\t//replace last element with first\n\t\t\tarray[array.length - 1] = placeholder;\n\t\t}\n\t\treturn array;\n\t}", "private void shiftPartialRowToBeginning() {\n if(true)\n throw new UnsupportedOperationException(\"Need to step through this method\");\n// // Get the length to shift from the beginning of the partial row.\n// int length = lastValidBytePosition_ - currentRowPosition_;\n//\n// // shift the data in the dataBufferStream\n// dataBufferStream_.reset();\n// if (dataBuffer_ != null) {\n// dataBufferStream_.write(dataBuffer_, currentRowPosition_, length);\n// }\n//\n// for (int i = 0; i < length; i++) {\n// dataBuffer_[i] = dataBuffer_[currentRowPosition_ + i];\n// }\n//\n// position_ = length - (lastValidBytePosition_ - position_);\n// lastValidBytePosition_ = length;\n }", "private int left(int index) {\r\n\t\treturn 2 * index + 1;\r\n\t}", "@Test\n\tpublic void rotateArray_rotateLeftTwoItems() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 2);\n\t\tassertThat(rotatedArray[0], equalTo(3));\n\t\tassertThat(rotatedArray[1], equalTo(4));\n\t\tassertThat(rotatedArray[2], equalTo(5));\n\t\tassertThat(rotatedArray[3], equalTo(1));\n\t\tassertThat(rotatedArray[4], equalTo(2));\n\t}", "public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic void shift() {\n\t\tint totalItems = 0;\n\t\tint highestSlot = 0;\n\t\tfor (int i = 0; i < summonedFamiliar.storeCapacity; i++) {\n\t\t\tif (burdenedItems[i] != 0) {\n\t\t\t\ttotalItems++;\n\t\t\t\tif (highestSlot <= i) {\n\t\t\t\t\thighestSlot = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i <= highestSlot; i++) {\n\t\t\tif (burdenedItems[i] == 0) {\n\t\t\t\tboolean stop = false;\n\t\t\t\tfor (int k = i; k <= highestSlot; k++) {\n\t\t\t\t\tif (burdenedItems[k] != 0 && !stop) {\n\t\t\t\t\t\tint spots = k - i;\n\t\t\t\t\t\tfor (int j = k; j <= highestSlot; j++) {\n\t\t\t\t\t\t\tburdenedItems[j - spots] = burdenedItems[j];\n\t\t\t\t\t\t\tstop = true;\n\t\t\t\t\t\t\tburdenedItems[j] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void moveLeft()\n {\n if (!this.search_zone.isLeftBorder(this.x_position))\n {\n this.x_position = (this.x_position - 1);\n }\n }", "static void primitiveLeftShift(int[] a, int len, int n) {\n if (len == 0 || n == 0)\n return;\n\n int n2 = 32 - n;\n for (int i=0, c=a[i], m=i+len-1; i < m; i++) {\n int b = c;\n c = a[i+1];\n a[i] = (b << n) | (c >>> n2);\n }\n a[len-1] <<= n;\n }", "@Test\n\tpublic void forwardCopy_test2() {\n\t\tSystem.out.println(\"copy前:\" + Arrays.toString(intArr));\t\n\t\tint index = 1;\n//\t\tArrayUtil.forwardCopy(intArr, index, 2);\n//\t\t//[2, 8, 3, 6, 0, 0, 0, 0]\n//\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\n//\t\tint len = intArr.length;\n//\t\tfor(int i = index; i< intArr.length - 1; i++){\n//\t\t\tintArr[i] = intArr[i+1];\n//\t\t}\n//\t\t//[2, 4, 3, 6, 0, 0, 0, 0]\n\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\t\n\t}", "public void shiftCompressedWordsLeft(final int startWord, final int shift) {\n\t\tSystem.arraycopy(this.buffer, startWord, this.buffer,\n\t\t\t\tstartWord - shift, actualsizeinwords - startWord);\n\n\t\t// zero remaining words\n\t\tfor (int i = actualsizeinwords - 1; i >= actualsizeinwords - shift; i--)\n\t\t\tthis.buffer[i] = 0;\n\n\t\tactualsizeinwords -= shift;\n\t\tif (startWord <= rlw.position)\n\t\t\trlw.position -= shift;\n\t}", "public static List<Integer> moveElementToEnd(List<Integer> array, int toMove) {\n\n int left = 0;\n int right = array.size()-1;\n while(left < right){\n while(array.get(right) == toMove){\n right--;\n }\n if(array.get(left) == toMove ){\n swap(array, left, right);\n }\n\n left++;\n }\n return array;\n }", "public static List<Integer> rotLeft(List<Integer> a, int d) {\n for(int count = 0; count < d; count++) {\n shiftElements(a);\n }\n return a;\n }", "public void removeByRightShift(int pos){\n int nshift=pos+1;\n int from=(start+pos-1)%cir.length;\n int to=(from+1)%cir.length;\n for(int i=0;i<nshift;i++){\n cir[to]=cir[from];\n to=from;\n from--;\n if(from==-1){from=cir.length-1;}\n }\n start++;\n size--;\n }", "private int[] shiftRightOne(int start, int[] mag)\n {\n int magLen = mag.length;\n\n int m = mag[magLen - 1];\n\n for (int i = magLen - 1; i >= start + 1; i--)\n {\n int next = mag[i - 1];\n\n mag[i] = (m >>> 1) | (next << 31);\n m = next;\n }\n\n mag[start] >>>= 1;\n\n return mag;\n }", "public void insertRight( long j ) {\n if ( end == max - 1 ) {\n end = -1;\n }\n Array[++end] = j;\n nItems++;\n }", "protected void refillLeft(){\n\t\tif(!shouldRepeat && isSrollingDisabled) return; //prevent next layout calls to override first init to scrolling disabled by falling to this branch\n\t\tif(getChildCount() == 0) return;\n\t\t\n\t\tfinal int leftScreenEdge = getScrollX();\n\t\t\n\t\tView child = getChildAt(0);\n\t\tint childLeft = child.getLeft();\n\t\tint currLayoutRight = childLeft - ((LoopLayoutParams)child.getLayoutParams()).leftMargin;\n\t\twhile(currLayoutRight > leftScreenEdge){\n\t\t\tmFirstItemPosition--;\n\t\t\tif(mFirstItemPosition < 0) mFirstItemPosition = mAdapter.getCount()-1;\n\t\t\t\n\t\t\tchild = mAdapter.getView(mFirstItemPosition, getCachedView(), this);\n Validate.notNull(child,\"Your adapter has returned null from getView.\");\n\t\t\tchild = addAndMeasureChildHorizontal(child, LAYOUT_MODE_TO_BEFORE);\n\t\t\tcurrLayoutRight = layoutChildHorizontalToBefore(child, currLayoutRight, (LoopLayoutParams) child.getLayoutParams());\n\t\t\tchildLeft = child.getLeft() - ((LoopLayoutParams)child.getLayoutParams()).leftMargin;\n\t\t\t//update left edge of children in container\n\t\t\tmLeftChildEdge = childLeft;\n\t\t\t\n\t\t\t//if selected view is going to screen, set selected state on him\n\t\t\tif(mFirstItemPosition == mSelectedPosition){\n\t\t\t\tchild.setSelected(true);\n\t\t\t}\n\t\t}\n\t}", "public void rotate() { // rotate the first element to the back of the list\n // TODO\n if ( tail != null){\n tail = tail.getNext();\n }\n\n }", "public void removeByRightShift(int pos) {\r\n if (pos > 0 || pos < size - 1) {\r\n int nshift = pos;\r\n int from = ((start + pos) - 1) % cir.length;\r\n int to = (from + 1) % cir.length;\r\n // int to=from--;\r\n for (int i = 0; i < nshift; i++) {\r\n cir[to % cir.length] = cir[from % cir.length];\r\n to = from;\r\n from--;\r\n if (from < 0) {\r\n from = cir.length - 1;\r\n }\r\n }\r\n cir[start] = \"null\";\r\n start++;\r\n size--;\r\n }\r\n }", "public Item popLeft(){\n if(isEmpty()) throw new NoSuchElementException(\"Underflow\");\n\n Item item = first.item;\n first = first.next;\n n--;\n return item;\n }", "void moveFront()\n\t{\n\t\tif (length != 0)\n\t\t {\n\t\t\tcursor = front;\n\t\t\tindex = 0; //cursor will be at the front\n\t\t\t\n\n\t\t}\n\t}", "static void leftRotate(int arr[], int d, int n) \n\t{\n\t\tint i, j;\n\t\tif (d == 0 || d == n)\n\t\t\treturn;\n\t\ti = d;\n\t\tj = n - d;\n\t\twhile (i != j) {\n\t\t\tif (i < j) /* A is shorter */\n\t\t\t{\n\t\t\t\tswap(arr, d - i, d + j - i, i);\n\t\t\t\tj -= i;\n\t\t\t} else /* B is shorter */\n\t\t\t{\n\t\t\t\tswap(arr, d - i, d, j);\n\t\t\t\ti -= j;\n\t\t\t}\n\t\t\t// printArray(arr, 7);\n\t\t}\n\t\t/* Finally, block swap A and B */\n\t\tswap(arr, d - i, d, i);\n\t}", "private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}", "@Override\n public void handle(Node[] array) {\n int shiftingIndex = head; // number of elements that the queue should be shifted\n for (int i = 0; i <= tail - head; i++) {\n // If it is the last element this swap should not happen, as it is empty due to the shift.\n array[i] = array[i + shiftingIndex];\n array[i + shiftingIndex] = null;\n }\n // The new tail will be the difference between the last tail and the last head.\n tail = tail - head;\n head = 0;\n }", "@Test\n\tpublic void rotateArrayUsingCalculatePositionAlgorithm_rotateLeftTwoItems() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 2);\n\t\tassertThat(rotatedArray[0], equalTo(3));\n\t\tassertThat(rotatedArray[1], equalTo(4));\n\t\tassertThat(rotatedArray[2], equalTo(5));\n\t\tassertThat(rotatedArray[3], equalTo(1));\n\t\tassertThat(rotatedArray[4], equalTo(2));\n\t}", "private void shiftPlayerPiecesLeftToRight(int rowNum) {\n for (int i = 0; i < playerPiecePositions.length; i++) {\n Position pos = playerPiecePositions[i];\n if (pos.getRowNum() == rowNum) {\n playerPiecePositions[i] = nextPositionLeftToRight(pos);\n playerPieces[i].addPreviousPlayerPosition(pos);\n }\n }\n }", "public void moveZeroes(int[] nums) {\n\n if (nums == null || nums.length == 0 || nums.length == 1) {\n return;\n }\n\n int pos = 0;\n\n int i = 0;\n while (i < nums.length) {\n if (nums[i] != 0) {\n nums[pos] = nums[i];\n if (pos != i) {\n nums[i] = 0;\n }\n pos++;\n }\n i++;\n }\n\n\n }", "private void shiftUp() {\n int index = this.size;\n\n while (hasParent(index) && (parent(index).compareTo(heap[index]) > 0)) {\n swap(index, parentIndex(index));\n index = parentIndex(index);\n }\n }", "static void rotateArrayOnce(int[] arr) {\n int temp = 0;\n for (int i = arr.length -1 ; i > 0; i++) {\n temp = arr[i];\n arr[i] = arr[i - 1];\n arr[i -1] = temp;\n }\n\n }", "public void compactLeft() {\n\t// Iteramos a través del tablero partiendo de la primera fila\n\t// y primera columna. Si esta contiene un 0 y la columna posterior\n\t// de la misma fila es distinta de 0, el valor se intercambia.\n\t// El proceso se repite hasta que todas las posiciones susceptibles\n\t// al cambio se hayan comprobado.\n\tfor (int i = 0; i < board.length; i++) {\n\t for (int j = 0; j < board.length - 1; j++) {\n\t\tif (board[i][j] == EMPTY && board[i][j + 1] != EMPTY) {\n\t\t board[i][j] = board[i][j + 1];\n\t\t board[i][j + 1] = EMPTY;\n\t\t compactLeft();\n\t\t}\n\t }\n\t}\n }", "private void shiftDown() {\n int index = 1;\n\n while (hasLeftChild(index)) {\n //compare chield Nodes\n int smallerChild = leftIndex(index);\n\n // shft down with smaller Node if any\n if (hasRightChild(index) && heap[leftIndex(index)].compareTo(heap[rightIndex(index)]) > 0) {\n smallerChild = rightIndex(index);\n }\n\n if (heap[index].compareTo(heap[smallerChild]) > 0) {\n swap(index, smallerChild);\n } else {\n //Nothing to do\n break;\n }\n index = smallerChild;\n }\n }", "public void moveLeft() {\n locX = locX - 1;\n }", "@Override\n public void addFirst(E e) throws IllegalStateException {\n checkSize();\n for (int j = size - 1; j >= 0; j--) {\n data[j + 1] = data[j];\n }\n data[0] = e;\n size++;\n }", "public void moveToFront() throws Exception{\n\t\t if(isEmpty())\n\t\t throw new Exception(\"cannot transfer last element to head\");\n\t\t \n\t\t if(head.next==null) return;\n\t\t \n\t\t Node<E> temp=head;\n\t\t while(temp.next.next!=null) temp=temp.next;\n\t\t Node<E> temp1=temp.next;\n\t\t temp.next=null;\n\t\t temp1.next=head;\n\t\t head=temp1;\n\t }", "static void moveZerosToEnd(int[] arr) {\n // Write your code here\n int n = arr.length;\n int count=0;\n for (int i = 0; i < n; i++)\n if (arr[i] != 0)\n arr[count++] = arr[i];\n while (count < n)\n arr[count++] = 0;\n }", "public void push_front(T element);", "static void primitiveRightShift(int[] a, int len, int n) {\n int n2 = 32 - n;\n for (int i=len-1, c=a[i]; i > 0; i--) {\n int b = c;\n c = a[i-1];\n a[i] = (c << n2) | (b >>> n);\n }\n a[0] >>>= n;\n }", "public static int[] moveZero(int[] nums) {\n int j = 0; // This pointer is similar to quick sort?\n for (int i = 0; i < nums.length; i++) {\n if (nums[i] != 0) {\n int tmp = nums[i];\n nums[i] = nums[j];\n nums[j] = tmp;\n j++;\n }\n System.out.println(Arrays.toString(nums));\n }\n return nums;\n }", "@Requires(\"cigar != null && indexOfIndel >= 0 && indexOfIndel < cigar.numCigarElements()\")\n @Ensures(\"result != null\")\n private static Cigar moveCigarLeft(Cigar cigar, int indexOfIndel) {\n // get the first few elements\n ArrayList<CigarElement> elements = new ArrayList<CigarElement>(cigar.numCigarElements());\n for (int i = 0; i < indexOfIndel - 1; i++)\n elements.add(cigar.getCigarElement(i));\n\n // get the indel element and move it left one base\n CigarElement ce = cigar.getCigarElement(indexOfIndel - 1);\n elements.add(new CigarElement(Math.max(ce.getLength() - 1, 0), ce.getOperator()));\n elements.add(cigar.getCigarElement(indexOfIndel));\n if (indexOfIndel + 1 < cigar.numCigarElements()) {\n ce = cigar.getCigarElement(indexOfIndel + 1);\n elements.add(new CigarElement(ce.getLength() + 1, ce.getOperator()));\n } else {\n elements.add(new CigarElement(1, CigarOperator.M));\n }\n\n // get the last few elements\n for (int i = indexOfIndel + 2; i < cigar.numCigarElements(); i++)\n elements.add(cigar.getCigarElement(i));\n return new Cigar(elements);\n }", "@Override\n public void unshift_native(ThreadContext tc) {\n if (start < 1) {\n int n = 8;\n int i;\n\n /* grow the array */\n int origElems = elems;\n set_size_internal(tc, elems + n);\n\n /* move elements and set start */\n memmove(slots, n, 0, origElems);\n start = n;\n elems = origElems;\n\n /* clear out beginning elements */\n for (i = 0; i < n; i++)\n slots[i] = 0.0;\n }\n\n /* Now do the unshift */\n start--;\n tc.native_type = ThreadContext.NATIVE_NUM;\n slots[start] = tc.native_n;\n elems++;\n }", "public static void main(String[] args) {\n\n\t\tint i[]= new int[4];\n\t\tint count =3;\n\t\t\n\t\ti[0] =20;\n\t\ti[1]=30;\n\t\ti[2]=40;\n\t\ti[3]=50;\n\t\t\n\t\tfor (int j=0; j<=count + 1; j++ ) {\n\t\t\t\n\t\t\t int temp= i[0];\n\t\t\t System.out.println(\"temp\" + temp);\n\t\t\tfor (int k=0; k<(i.length-1); k++) {\n\t\t\t\t\n\t\t\t\t i[k] =i [k + 1];\n\t\t\t\t// i[(i.length)-1] = temp;\n\t\t\t\t System.out.println(\"shifting \" + i[k]);\n\t\t\t}\n\t\t\t//System.out.println(i.length);\n\t\t\ti[(i.length)-1] = temp;\n\t\t\t//System.out.println(i[j]);\n\t\t}\n\t\t\n\t\tfor (int m=0; m<i.length-1; m++ ) {\n\t\tSystem.out.println(i[m]);\n\t\t}\n\t}", "private static void rearrange(int arr[], int n) {\n\n // Your code here\n int left = 0;\n int right = n - 1;\n boolean flag = true;\n int[] temp = arr.clone();\n for (int i = 0; i < n; i++) {\n if (flag) {\n arr[i] = temp[right--];\n } else {\n arr[i] = temp[left++];\n }\n flag = !flag;\n }\n }", "private void left(int pos) {\n while (pos < gapLeft) {\n gapLeft--;\n gapRight--;\n buffer[gapRight+1] = buffer[gapLeft];\n buffer[gapLeft] = '\\0';\n }\n }", "private static String[] shiftLeft(String[] window) {\n\t\tString[] newWindow = new String[(WINDOW_SIZE * 2) + 1];\n\t\t\n\t\t// Loop through old window and populate new\n\t\tfor(int i = 1; i < window.length; i++) {\n\t\t\tnewWindow[i-1] = window[i];\n\t\t}\n\n\t\treturn newWindow;\n\t}", "@Override\n public boolean shift(int positions) {\n T[] newArray = (T[]) new Object[array.length];\n if (positions > 0) {\n int j = 0;\n for (int i = positions; i < size - 1; i++) {\n newArray[j] = array[i];\n j++;\n }\n for (int i = 0; i < positions; i++) {\n newArray[j] = array[i];\n j++;\n }\n } else if (positions < 0) {\n int j = 0;\n for (int i = size + positions - 1; i < size - 1; i++) {\n newArray[j] = array[i];\n j++;\n }\n for (int i = 0; i < size + positions; i++) {\n newArray[j] = array[i];\n j++;\n }\n } else {\n return true;\n }\n this.array = newArray;\n return true;\n }", "public void moveHead() {\n if (this.head == ram.length - 1) {\n head = 0;\n } else {\n head += 1;\n }\n }", "@Override\n\tpublic void moveRight()\n\t{\n\t\tif (!isAtEnd()) left.push(right.pop());\n\t}", "public void shiftRows(int[][] arr) {\n for (int i = 1; i < arr.length; i++) {\n arr[i] = leftrotate(arr[i], i);\n }\n }", "private static int getLeft(int index) {\n\t\treturn (index + 1) * 2 - 1;\n\t}", "public void moveToStart() {\r\n\t\tcurr = head;\r\n\t}", "public int[] shift(int n) {\n\t\tif(n > 0){\r\n\t\t\tfor(int i = 0; i < n; i++){ \r\n\t int last = arr[arr.length-1]; \r\n\t for(int j = arr.length-1; j > 0; j--){ \r\n\t arr[j] = arr[j-1]; \r\n\t } \r\n\t arr[0] = last;\r\n\t }\r\n\t\t\treturn arr;\r\n\t\t}\r\n\t\t//shift left if negative\r\n\t\telse {\r\n\t\t\tint absVal = Math.abs(n);\r\n\t\t\t//This outer for loop helps repeat the number of shifts over and over again\r\n\t\t\tfor(int i = 0; i < absVal; i++){ \r\n\t\t\t\t//Storing the First element\r\n\t\t int first = arr[0];\r\n\t\t //This inner loop shifts only once\r\n\t\t for(int j = 0; j < arr.length-1; j++){ \r\n\t\t \tarr[j] = arr[j+1]; \r\n\t\t }\r\n\t\t arr[arr.length - 1] = first; \r\n\t\t }\r\n\t\t\t return arr;\r\n\t\t}\r\n\t}" ]
[ "0.74680364", "0.7020506", "0.7009168", "0.67683685", "0.66924536", "0.66294605", "0.65182304", "0.648625", "0.64765865", "0.6474443", "0.6457046", "0.64057183", "0.6388176", "0.6348071", "0.62134796", "0.62094975", "0.6144011", "0.6143506", "0.6132721", "0.6082404", "0.6077074", "0.60737175", "0.6004728", "0.5990703", "0.5949398", "0.59328276", "0.5886725", "0.5871789", "0.5871581", "0.5849617", "0.58471537", "0.584431", "0.5836819", "0.58310616", "0.58198756", "0.57901657", "0.57802767", "0.57637936", "0.5759261", "0.5747013", "0.57467383", "0.5746015", "0.57374173", "0.57268095", "0.5711546", "0.57086444", "0.56992406", "0.56896216", "0.56665176", "0.5663469", "0.56585085", "0.5655091", "0.5642644", "0.56415826", "0.56398714", "0.5629474", "0.5605711", "0.5599886", "0.55976343", "0.556947", "0.5567399", "0.5567183", "0.5532089", "0.5530095", "0.5518068", "0.5498731", "0.5488384", "0.5482931", "0.54750603", "0.5474268", "0.5458315", "0.54495144", "0.54194546", "0.54159963", "0.5408411", "0.5404233", "0.5398104", "0.53854513", "0.5375421", "0.53740907", "0.53621143", "0.53582096", "0.5351054", "0.5338034", "0.53119725", "0.53108525", "0.53097075", "0.5307595", "0.53057784", "0.5304977", "0.52982634", "0.5289219", "0.52870375", "0.5279691", "0.5273709", "0.5272001", "0.52587247", "0.52553904", "0.5252043", "0.5245808", "0.52407587" ]
0.0
-1
Convert a program AST to IR tree
public static void program(CommonTree ast, IRTree irt) { statements(ast, irt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void genAst();", "public interface Program extends AstItem {\n}", "public Node program() {\r\n\r\n this.CheckError(\"PROGRAM\");\r\n\r\n\r\n Node n_program = new Node(\"program\");\r\n n_program.setParent(null);\r\n System.out.println(\"read node from app: \"+n_program.getData());\r\n System.out.println(\" :parent: \"+n_program.getParent());\r\n\r\n Node n_declarations = n_program.setChildren(\"decl list\");\r\n System.out.println(\"read node from app :data: \"+n_declarations.getData());\r\n System.out.println(\" :parent: \"+n_declarations.getParent().getData());\r\n\r\n this.declaration(n_declarations);\r\n\r\n this.CheckError(\"BEGIN\");\r\n\r\n Node n_statementSequence = n_program.setChildren(\"stmt list\");\r\n this.statementSequence(n_statementSequence);\r\n\r\n this.CheckError(\"END\");\r\n\r\n System.out.println(\":::: Parsing Successful Hamid ::::\");\r\n\r\n return n_program;\r\n //////////////////////////////////////////// writeout PROGRAM treee -----------------\r\n //////////////////////////////////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////////////////////////////\r\n ///////////output test generator\r\n /////////////////////////////////////////////////////////////////////////////////\r\n\r\n\r\n /*Node iteration = n_program;\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\"|\");\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n iteration = n_program.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\" \");\r\n iteration = n_program.getChildren(1);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println(\"\");\r\n System.out.print(\" \");\r\n Node iteration0= iteration.getChildren(0);\r\n for (int i=0; i<iteration0.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration1= iteration.getChildren(1);\r\n for (int i=0; i<iteration1.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration2= iteration.getChildren(2);\r\n for (int i=0; i<iteration2.childrenSize();i++){\r\n System.out.print(\"| \"+iteration2.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration3= iteration.getChildren(3);\r\n for (int i=0; i<iteration3.childrenSize();i++){\r\n System.out.print(\"| \"+iteration3.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration4= iteration.getChildren(4);\r\n for (int i=0; i<iteration4.childrenSize();i++){\r\n System.out.print(\"| \"+iteration4.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" w\\n\");\r\n System.out.print(\" \");\r\n Node iteration0w= iteration2.getChildren(0);\r\n for (int i=0; i<iteration0w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n Node iteration1w= iteration2.getChildren(1);\r\n for (int i=0; i<iteration1w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n iteration= iteration0w.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }*/\r\n\r\n }", "@Override\n\tpublic void accept(ASTVisitor v) {\n\t\tv.visitProgram(this);\n\t}", "public interface AST {\n \n /**\n * Returns the label or tag for this AST node.\n */\n public int getNodeLabel ();\n \n /**\n * Returns the textual value of this AST node.\n */\n public String getNodeValue ();\n \n /**\n * Returns a list of child nodes, or null if there are no child nodes. The value returned is a shallow copy\n * which can be manipulated by the caller.\n */\n public List<AST> getChildNodes ();\n \n /**\n * Returns the position of the node in the original source(s).\n */\n public CodePosition getCodePosition ();\n \n}", "public String toProgram()\n\t{\n\t\tString prog = \"\";\n\t\tif(this.type == nodetype.root)\n\t\t{\n\t\t\tfor(ParseTreeNode node:this.children)\n\t\t\t{\n\t\t\t\tprog+= node.toProgram()+\"+\";\n\t\t\t}\n\t\t\tif(prog.length() > 0)\n\t\t\t{\n\t\t\t\tprog = prog.substring(0,prog.length()-1);\n\t\t\t}\n\t\t}\n\t\telse if(this.type == nodetype.segment)\n\t\t{\n\t\t\tif(this.children.size()==0)\n\t\t\t{\n\t\t\t\tprog = this.value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprog = String.format(\"substr(value,%s,%s)\", this.children.get(0).value,this.children.get(1).value);\n\t\t\t}\n\t\t}\n\t\treturn prog;\n\t}", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "public interface Expression {\n \n enum ExpressivoGrammar {ROOT, SUM, PRODUCT, TOKEN, PRIMITIVE_1, PRIMITIVE_2, \n NUMBER, INT, DECIMAL, WHITESPACE, VARIABLE};\n \n public static Expression buildAST(ParseTree<ExpressivoGrammar> concreteSymbolTree) {\n \n if (concreteSymbolTree.getName() == ExpressivoGrammar.DECIMAL) {\n /* reached a double terminal */\n return new Num(Double.parseDouble(concreteSymbolTree.getContents())); \n }\n\n else if (concreteSymbolTree.getName() == ExpressivoGrammar.INT) {\n /* reached an int terminal */\n return new Num(Integer.parseInt(concreteSymbolTree.getContents()));\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.VARIABLE) {\n /* reached a terminal */\n return new Var(concreteSymbolTree.getContents());\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.ROOT || \n concreteSymbolTree.getName() == ExpressivoGrammar.TOKEN || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_1 || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_2 || \n concreteSymbolTree.getName() == ExpressivoGrammar.NUMBER) {\n \n /* non-terminals with only one child */\n for (ParseTree<ExpressivoGrammar> child: concreteSymbolTree.children()) {\n if (child.getName() != ExpressivoGrammar.WHITESPACE) \n return buildAST(child);\n }\n \n // should never reach here\n throw new IllegalArgumentException(\"error in parsing\");\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.SUM || concreteSymbolTree.getName() == ExpressivoGrammar.PRODUCT) {\n /* a sum or product node can have one or more children that need to be accumulated together */\n return accumulator(concreteSymbolTree, concreteSymbolTree.getName()); \n }\n \n else {\n throw new IllegalArgumentException(\"error in input: should never reach here\");\n }\n \n }\n \n /**\n * (1) Create parser using lib6005.parser from grammar file\n * (2) Parse string input into CST\n * (3) Build AST from this CST using buildAST()\n * @param input\n * @return Expression (AST)\n */\n public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }\n \n // helper methods\n public static Expression accumulator(ParseTree<ExpressivoGrammar> tree, ExpressivoGrammar grammarObj) {\n Expression expr = null;\n boolean first = true;\n List<ParseTree<ExpressivoGrammar>> children = tree.children();\n int len = children.size();\n for (int i = len-1; i >= 0; i--) {\n /* the first child */\n ParseTree<ExpressivoGrammar> child = children.get(i);\n if (first) {\n expr = buildAST(child);\n first = false;\n }\n \n /* accumulate this by creating a new binaryOp object with\n * expr as the leftOp and the result as rightOp\n **/\n \n else if (child.getName() == ExpressivoGrammar.WHITESPACE) continue;\n else {\n if (grammarObj == ExpressivoGrammar.SUM)\n expr = new Sum(buildAST(child), expr);\n else\n expr = new Product(buildAST(child), expr);\n }\n }\n \n return expr;\n \n }\n \n // ----------------- problems 3-4 -----------------\n \n public static Expression create(Expression leftExpr, Expression rightExpr, char op) {\n if (op == '+')\n return Sum.createSum(leftExpr, rightExpr);\n else\n return Product.createProduct(leftExpr, rightExpr);\n }\n\n public Expression differentiate(Var x);\n \n public Expression simplify(Map<String, Double> env);\n\n}", "Program program() throws SyntaxException {\n\t\tif(t.kind == IDENTIFIER){\n\t\t\tToken name = t, firstToken = t;\n\t\t\tconsume();\n\t\t\tArrayList<ASTNode> decsAndStatements = new ArrayList<>();\n\n\t\t\twhile (t.kind == KW_int || t.kind == KW_boolean || t.kind == KW_image\n\t\t\t\t\t|| t.kind == KW_url || t.kind == KW_file || t.kind == IDENTIFIER){\n\n\t\t\t\tif (t.kind == KW_int || t.kind == KW_boolean || t.kind == KW_image\n\t\t\t\t\t\t|| t.kind == KW_url || t.kind == KW_file){\n\t\t\t\t\tdecsAndStatements.add(declaration());\n\t\t\t\t}\n\t\t\t\telse if (t.kind == IDENTIFIER){\n\t\t\t\t\tdecsAndStatements.add(statement());\n\t\t\t\t}\n\t\t\t\tmatch(SEMI);\n\t\t\t}\n\n\t\t\treturn new Program(firstToken, name, decsAndStatements);\n\t\t}\n\t\telse {\n\t\t throw new SyntaxException(t, \"Input not valid. \\nProgram should start with an IDENTIFIER.\");\n }\n\t}", "public static void expression(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == REALNUM) {\n constant(ast, irt1);\n irt.setOp(\"CONST\");\n irt.addSub(irt1);\n }\n else if(tt == PLUS || tt == MINUS || tt == TIMES || tt == DIVIDE)\n {\n //do something\n irt.setOp(\"BINOP\");\n IRTree irt2 = new IRTree();\n expression((CommonTree)ast.getChild(0), irt1);\n expression((CommonTree)ast.getChild(1), irt2);\n\tif(tt == PLUS)\n \t\t irt.addSub(new IRTree(\"+\")); \n\telse if(tt == MINUS)\n\t\tirt.addSub(new IRTree(\"-\"));\n\telse if(tt == TIMES)\n\t\tirt.addSub(new IRTree(\"*\"));\n\telse if(tt == DIVIDE)\n\t\tirt.addSub(new IRTree(\"/\"));\n irt.addSub(irt1);\n irt.addSub(irt2);\n }\n else\n\tSystem.out.println(\"unrecognised type \" + tt);\n }", "public static void main(String[] args) throws IOException {\n\r\n ParserMain Parse = new ParserMain(args);\r\n Node n_program = Parse.program();\r\n\tSystem.out.println(\"\\ninside parser: parsing end, pass tree ro type checking\\n\");\r\n CodeGener cg= new CodeGener(n_program,args[0]); ////////////////////////////////////////////////////////////////////////////////////kavita\r\n h_typeCheckingClass tp = new h_typeCheckingClass(n_program);\r\n Node result = tp.starttype(n_program);\r\n\tSystem.out.println(\"\\ninside parser: TYPE checking end, pass tree to WRITING AST\\n\");\r\n AST2word ast=new AST2word();\r\n ast.read(result, args);\r\n\r\n\r\n\r\n\r\n }", "public static void imprimirAST(NodoBase raiz){\n\t\t sangria+=2;\n\t\t while (raiz != null) {\n\t\t printSpaces();\n\t\t if (raiz instanceof NodoIf)\n\t\t \tSystem.out.println(\"If\");\n\t\t else if (raiz instanceof NodoRepeat)\n\t\t \tSystem.out.println(\"Repeat\");\n else if (raiz instanceof NodoFor)\n System.out.println(\"For\");\n else if (raiz instanceof NodoDeclaracion)\n System.out.println(\"Declaracion\");\n\t\t else if (raiz instanceof NodoLeer) \n\t\t \tSystem.out.println(\"Lectura: \"+((NodoLeer)raiz).getIdentificador());\n\t\t else if (raiz instanceof NodoEscribir)\n\t\t \tSystem.out.println(\"Escribir\");\n else if (raiz instanceof NodoEstructura)\n System.out.println(\"Estructura\");\n else if (raiz instanceof NodoFuncionRetorna){\n System.out.println(\"Funcion con Retorno\"); }\n else if (raiz instanceof NodoFuncionSinRetorna)\n System.out.println(\"Funcion sin Retorno\");\n else if (raiz instanceof NodoParametro)\n System.out.println(\"Parametro\");\n\t\t else \n if (raiz instanceof NodoAsignacion)\n {\n if(((NodoAsignacion)raiz).getPosicion()!=null) //vector\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador()+\"[\"+((NodoAsignacion)raiz).getPosicion()+\"]\"); \n else\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador());\n }\n else if (raiz instanceof NodoCall)\n {\n if(((NodoCall)raiz).getArgumentos()!=null) //vector\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()); \n else\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()+\"(\"+\")\");\n }\n else if (raiz instanceof NodoOperacion\n\t\t \t\t|| raiz instanceof NodoValor\n\t\t \t\t|| raiz instanceof NodoIdentificador )\n\t\t \timprimirNodo(raiz);\n \n else if (raiz instanceof NodoVariable)\n {\n if(((NodoVariable)raiz).getNumero()!=null)\n System.out.println(((NodoVariable)raiz).getIdentificador()+\"[\"+((NodoVariable)raiz).getNumero()+\"]\");\n else\n System.out.println(((NodoVariable)raiz).getIdentificador());\n }\n\t\t else System.out.println(\"Tipo de nodo desconocido\");\n\t\t \n\t\t \n /* Hago el recorrido recursivo */\n \n if (raiz instanceof NodoEstructura){\n printSpaces();\n System.out.println(\"**Funcion**\");\n imprimirAST(((NodoEstructura)raiz).getFuncion());\n printSpaces();\n System.out.println(\"**Main**\");\n imprimirAST(((NodoEstructura)raiz).getBloque());\n }\n \n if (raiz instanceof NodoFuncionRetorna){\n printSpaces();\n System.out.println(\"**Funcion con Retorno**\");\n imprimirAST(((NodoFuncionRetorna)raiz).getTipo());\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionRetorna)raiz).getSecuencias());\n \n printSpaces();\n System.out.println(\"retorno\");\n imprimirAST(((NodoFuncionRetorna)raiz).getExpresion());\n }\n \n if (raiz instanceof NodoFuncionSinRetorna){\n printSpaces();\n System.out.println(\"**Funcion sin Retorno**\");\n System.out.println(\"VOID\");\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionSinRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionSinRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getSecuencias());\n \n }\n \n if (raiz instanceof NodoParametro){\n printSpaces();\n System.out.println(\"**Parametros**\");\n imprimirAST(((NodoParametro)raiz).getTipo());\n \n System.out.println(\"\\tID, \"+((NodoParametro)raiz).getIdentificador());\n }\n \n if (raiz instanceof NodoCall){\n printSpaces();\n if(((NodoCall)raiz).getArgumentos()!=null)\n System.out.println(\"**argumentos**\");\n imprimirAST(((NodoCall)raiz).getArgumentos());\n }\n \n if (raiz instanceof NodoDeclaracion){\n printSpaces();\n System.out.println(\"**Declaracion**\");\n imprimirAST(((NodoDeclaracion)raiz).getTipo());\n imprimirAST(((NodoDeclaracion)raiz).getLis_asig());\n }\n \n if (raiz instanceof NodoIf){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getPrueba());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Then IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getParteThen());\n\t\t \tif(((NodoIf)raiz).getParteElse()!=null){\n\t\t \t\tprintSpaces();\n\t\t \t\tSystem.out.println(\"**Else IF**\");\n\t\t \t\timprimirAST(((NodoIf)raiz).getParteElse());\n\t\t \t}\n\t\t }\n\t\t else if (raiz instanceof NodoRepeat){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Cuerpo REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getCuerpo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getPrueba());\n\t\t }\n else if (raiz instanceof NodoFor){\n printSpaces();\n System.out.println(\"**Asignacion For**\");\n imprimirAST(((NodoFor)raiz).getAsignacion());\n printSpaces();\n System.out.println(\"**Comprobacion FOR**\");\n imprimirAST(((NodoFor)raiz).getPrueba());\n printSpaces();\n System.out.println(\"**Acumulador FOR**\");\n imprimirAST(((NodoFor)raiz).getAcumulador());\n printSpaces();\n System.out.println(\"**Cuerpo FOR**\");\n imprimirAST(((NodoFor)raiz).getCuerpo());\n \n }\n\t\t else \n \n if (raiz instanceof NodoAsignacion)\n\t\t \timprimirAST(((NodoAsignacion)raiz).getExpresion());\n\t\t else \n \n if (raiz instanceof NodoEscribir)\n\t\t \timprimirAST(((NodoEscribir)raiz).getExpresion());\n\t\t else \n \n \n if (raiz instanceof NodoOperacion){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Izquierda Operacion**\");\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpIzquierdo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Derecha Operacion**\");\t\t \t\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpDerecho());\n\t\t }\n\t\t raiz = raiz.getHermanoDerecha();\n\t\t }\n\t\t sangria-=2;\n\t\t}", "public void printAst(){\n explore(ctx);\n }", "public CodeTree toCodeTree() {\n List<Node> nodes = new ArrayList<Node>();\n for (int i = max(codeLengths); i >= 0; i--) { // Descend through code lengths\n List<Node> newNodes = new ArrayList<Node>();\n\n // Add leaves for symbols with positive code length i\n if (i > 0) {\n for (int j = 0; j < codeLengths.length; j++) {\n if (codeLengths[j] == i)\n newNodes.add(new Leaf(j)); //Isidedame ASCII reiksmes ilgiausio kodo\n }\n }\n\n // Merge pairs of nodes from the previous deeper layer\n for (int j = 0; j < nodes.size(); j += 2) {\n newNodes.add(new InternalNode(nodes.get(j), nodes.get(j + 1))); //Sujungia lapus i InternalNodes\n }\n nodes = newNodes;\n }\n return new CodeTree((InternalNode)nodes.get(0), codeLengths.length);\n }", "public static void main(String [] args) {\n List<Ast.Param> pl = new ArrayList<Ast.Param>(); // empty param list\n List<Ast.VarDecl> vl = new ArrayList<Ast.VarDecl>(); // empty var list\n List<Ast.Stmt> sl = new ArrayList<Ast.Stmt>(); // empty stmt list\n\n // Construct a print stmt and add it to stmt list\n Ast.Exp arg = new Ast.StrLit(\"Hello World!\"); // create an arg\n Ast.Stmt s = new Ast.Print(arg); // create a print stmt\n sl.add(s); // add stmt to list\n \n // Construct a MethodDecl ---\n // Ast.MethodDecl(Ast.Type rt, String m, List<Ast.Param> pl, \n // List<Ast.VarDecl> vl, List<Ast.Stmt> sl)\n Ast.MethodDecl md = new Ast.MethodDecl(null, \t// null represents 'void'\n\t\t\t\t\t \"main\",\t// method's name\n\t\t\t\t\t pl, \t\t// formal params\n\t\t\t\t\t vl, \t\t// local var decls\n\t\t\t\t\t sl); \t// method body\n List<Ast.MethodDecl> ml = new ArrayList<Ast.MethodDecl>();\n ml.add(md);\n\n // Construct a ClassDecl ---\n // Ast.ClassDecl(String nm, String pnm, \n // List<Ast.VarDecl> vl, List<Ast.MethodDecl> ml)\n Ast.ClassDecl cd = new Ast.ClassDecl(\"Hello\",\t// class name\n\t\t\t\t\t null, \t\t// parent's name\n\t\t\t\t\t vl, \t\t// field decls \n\t\t\t\t\t ml); \t\t// method decls\n List<Ast.ClassDecl> cl = new ArrayList<Ast.ClassDecl>();\n cl.add(cd);\n\n // Construct a Program ---\n // Ast.Program(List<Ast.ClassDecl> cl)\n Ast.Program p = new Ast.Program(cl); \t// create the whole AST\n System.out.print(p); \t\t\t// dump out the AST\n }", "public Program(Circuit c, Node tree) {\n\t\tthis.circuit = c;\n\t\tthis.tree = tree;\n\t}", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "public void preprocessTree( AST_Program root ) throws Exception {\n\n root.setSource( root.getAspectName() );\n }", "Program program() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tToken progName = match(IDENTIFIER);\r\n\t\tBlock block = block();\r\n\t\treturn new Program (first, progName, block);\r\n\t}", "private CompilationObject compile(AbstractSyntaxTree ast, String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue,\n Supplier< Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n HashMap<String, ProcessNode> processNodeMap = new HashMap<>();\n // HashMap<String, ProcessNode> dependencyMap = new HashMap<>();\n\n //System.out.println(\"\\nCOMPILER \"+ast.myString()+\" symb \"+symb.get()+\"\\n\");\n for (ProcessNode node : ast.getProcesses()) {\n //messageQueue.add(new LogMessage(\"Compile starting \"+node.getIdentifier()+\" s \"+symb.get()));\n //System.out.println(\"**COMPILER** Compiler Start node = \"+ node.myString());\n processNodeMap.put(node.getIdentifier(), (ProcessNode) node.copy());\n // dependencyMap.put(node.getIdentifier(), node);\n }\n\n AbstractSyntaxTree symbAST = ast.copy(); // to be used to build symbolic models\n //??????\n\n //System.out.println(\"symb \"+symb.get());\n if (!symb.get()) {\n ast = processAtomicAST(ast, z3Context, messageQueue);\n } else {\n //expander.expand(ast, messageQueue, z3Context); // use for error detection\n ast = symbAST;\n //ast = expander.expand(ast, messageQueue, z3Context);\n //System.out.println(\" COMPILER Before ReferenceReplacer \"+ast.processes2String());\n //ast = replacer.replaceReferences(ast, messageQueue);\n // If we replace the references then we lose the assignment information\n //System.out.println(\" COMPILER After ReferenceReplacer \"+ast.processes2String());\n\n }\n //\n //\n // ??????\n //store alphabet\n Set<String> alpha = ast.getAlphabet().stream().map(x -> x.getAction()).collect(Collectors.toSet());\n //System.out.println(\"Compiler alph = \"+alpha);\n\n //Having built the final AST now build the processes\n /*System.out.println(\"**COMPILER** Entering interpreter with ast for processes -> Types \"+\n ast.getProcesses().stream().map(x->\"\\n\"+x.getIdentifier()+\"->\"+x.getType())\n .reduce(\"\",(x,y)->x+\" \"+y)); */\n Interpreter.ProcessMapFull pmf = interpreter.interpret(ast,\n messageQueue, z3Context, alpha, symb.get());\n // Optional<Map<String, ProcessModel>> processMap = interpreter.interpret(ast,\n // messageQueue, z3Context, alpha, symb.get());\n\n //System.out.println(\" **COMPILER** before operation evaluation \"+processMap.keySet());\n List<OperationResult> opResults = new ArrayList<>();\n EquationEvaluator.EquationReturn eqResults = new EquationEvaluator.EquationReturn();\n if (pmf.getIsFull()) {\n\n //System.out.println(\" isPresent \"+pmf.getProcessMap().size()+\" \"+ast.getProcesses().size());\n // if (ast.getProcesses().size() <= processMap.get().size()) {\n //System.out.println(\"equal size\"); // not sure why <= and not ==\n opResults = evaluator.evaluateOperations(\n ast.getOperations(), pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(), code, z3Context, messageQueue, alpha);\n //System.out.println(\" **COMPILER** before equation evaluation \"+processMap.keySet());\n\n // HEAVY LIFTING need thread pool\n this.eqEvaluator = new EquationEvaluator(); // need to reset equationEvaluator else !!!!\n eqResults = eqEvaluator.evaluateEquations(\n pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(),\n ast.getEquations(), // one entry per equation\n z3Context, messageQueue, alpha);\n }\n\n\n //System.out.println(\"Compiler built pn \"+ pmf.getProcessMap().size());\n return new CompilationObject(pmf.getProcessMap(), opResults, eqResults.getResults());\n }", "@Override\n\tpublic Void visit(Program program) {\n\t\tprintIndent(\"program\");\n indent++;\n for (var stmt : program.stmts) {\n \tstmt.accept(this);\n }\n indent--;\n\t\treturn null;\n\t}", "public static void statement(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == WRITELN)\n {\n String a = String.valueOf(Memory.allocateString(\"\\n\"));\n irt.setOp(\"WRS\");\n irt.addSub(new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(a))));\n }\n else if (tt == WRITE)\n {\n ast1 = (CommonTree)ast.getChild(0);\n String type = arg(ast1, irt1);\n if (type.equals(\"real\")) {\n irt.setOp(\"WRR\");\n irt.addSub(irt1);\n }\n else {\n irt.setOp(\"WRS\");\n irt.addSub(irt1);\n }\n }\n else if(tt == ASSIGN)\n {\n //try deailng with assign here\n irt.setOp(\"ASSIGN\");\n IRTree iHold = new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(String.valueOf(Memory.allocateReal(ast.getChild(0).getText())))));\n System.out.println(\"var name = \" + ast.getChild(0).getText());\n irt.addSub(iHold);\n expression((CommonTree)ast.getChild(1), irt1);\n irt.addSub(irt1);\n }\n else if(tt == MEM)\n {\n System.out.println(\"GOT MEM TYPE\");\n }\n else {\n error(tt);\n }\n }", "public interface AstFactory\n{\n\tIdNode IdNode(Token t, String text);\n\tExtIdNode ExtIdNode(Token t, String text);\n\n\tAmbigNameNode AmbigNameNode(Token t, String text);\t // Deprecate? Never need to make ambigname \"manually\" via af? (constructed only by ScribbleParser)\n\tDataParamNode DataParamNode(Token t, String text);\n\tOpNode OpNode(Token t, String text);\n\tRecVarNode RecVarNode(Token t, String text);\n\tRoleNode RoleNode(Token t, String text);\n\tSigParamNode SigParamNode(Token t, String text);\n\n\tDataNameNode DataNameNode(Token t, List<IdNode> elems);\n\tGProtoNameNode GProtoNameNode(Token t, List<IdNode> elems);\n\tLProtoNameNode LProtoNameNode(Token t, List<IdNode> elems);\n\tModuleNameNode ModuleNameNode(Token t, List<IdNode> elems);\n\tSigNameNode SigNameNode(Token t, List<IdNode> elems);\n\t\n\tModule Module(Token t, ModuleDecl mdecl,\n\t\t\tList<? extends ImportDecl<?>> imports,\n\t\t\tList<? extends NonProtoDecl<?>> nonprotos,\n\t\t\tList<? extends ProtoDecl<?>> protos);\n\n\tModuleDecl ModuleDecl(Token t, ModuleNameNode fullname);\n\tImportModule ImportModule(Token t, ModuleNameNode modname,\n\t\t\tModuleNameNode alias); // alias == null for no alias (child not added)\n\n\tDataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);\n\tSigDecl SigDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, SigNameNode name);\n\tGProtoDecl GProtoDecl(Token t, ProtoModList mods, GProtoHeader header,\n\t\t\tGProtoDef def);\n\n\t// TODO: refactor to use ProtoModList, etc.\n\tProtoModList ProtoModList(Token t, List<ProtoModNode> mods);\n\tAuxMod AuxMod(Token t);\n\tExplicitMod ExplicitMod(Token t);\n\n\tGProtoHeader GProtocolHeader(Token t, GProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tRoleDeclList RoleDeclList(Token t, List<RoleDecl> ds);\n\tRoleDecl RoleDecl(Token t, RoleNode r);\n\tNonRoleParamDeclList NonRoleParamDeclList(Token t, \n\t\t\tList<NonRoleParamDecl<? extends NonRoleParamKind>> ds);\n\tDataParamDecl DataParamDecl(Token t, DataParamNode p);\n\tSigParamDecl SigParamDecl(Token t, SigParamNode p);\n\n\tGProtoDef GProtoDef(Token t, GProtoBlock block);\n\tGProtoBlock GProtoBlock(Token t, GInteractionSeq seq);\n\tGInteractionSeq GInteractionSeq(Token t, List<GSessionNode> elems); // CHECKME: ? extends GSessionNode ? -- and similar others?\n\n\tSigLitNode SigLitNode(Token t, OpNode op, PayElemList pay);\n\tPayElemList PayElemList(Token t, List<PayElem<?>> elems);\n\t<K extends PayElemKind> UnaryPayElem<K> UnaryPayElem(Token t, \n\t\t\tPayElemNameNode<K> name);\n\tGDelegPayElem GDelegPayElem(Token t, GProtoNameNode name, RoleNode r);\n\n\tGMsgTransfer GMsgTransfer(Token t, RoleNode src, MsgNode msg,\n\t\t\tList<RoleNode> dsts);\n\tGConnect GConnect(Token t, RoleNode src, MsgNode msg, RoleNode dst);\n\tGDisconnect GDisconnect(Token t, RoleNode left, RoleNode right);\n\tGWrap GWrap(Token t, RoleNode client, RoleNode server);\n\n\tGContinue GContinue(Token t, RecVarNode rv);\n\tGDo GDo(Token t, GProtoNameNode proto, NonRoleArgList args, RoleArgList rs);\n\n\tRoleArgList RoleArgList(Token t, List<RoleArg> rs);\n\tRoleArg RoleArg(Token t, RoleNode r);\n\tNonRoleArgList NonRoleArgList(Token t, List<NonRoleArg> args);\n\tNonRoleArg NonRoleArg(Token t, NonRoleArgNode arg);\n\n\tGChoice GChoice(Token t, RoleNode subj, List<GProtoBlock> blocks);\n\tGRecursion GRecursion(Token t, RecVarNode rv, GProtoBlock block);\n\n\t/*LProtoDecl LProtoDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def); // Not currently used -- local protos not yet parsed, only projected*/\n\n\tLProjectionDecl LProjectionDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def, GProtoNameNode fullname,\n\t\t\tRoleNode self); // del extends that of LProtoDecl\n\n\tLProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tLSelfDecl LSelfDecl(Token t, RoleNode r);\n\n\tLProtoDef LProtoDef(Token t, LProtoBlock block);\n\tLProtoBlock LProtoBlock(Token t, LInteractionSeq seq);\n\tLInteractionSeq LInteractionSeq(Token t, List<LSessionNode> elems);\n\n\t// Following take \"self\" param in case of parsed Token (not actually supported yet)\n\tLSend LSend(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLRecv LRecv(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLAcc LAcc(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLReq LReq(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLDisconnect LDisconnect(Token t, RoleNode self, RoleNode peer); \n\tLClientWrap LClientWrap(Token t, RoleNode client, RoleNode server);\n\tLServerWrap LServerWrap(Token t, RoleNode client, RoleNode server);\n\n\tLContinue LContinue(Token t, RecVarNode rv); \n\tLDo LDo(Token t, LProtoNameNode proto, NonRoleArgList as, RoleArgList rs);\n\n\tLChoice LChoice(Token t, RoleNode subj, List<LProtoBlock> blocks);\n\tLRecursion LRecursion(Token t, RecVarNode rv, LProtoBlock block);\n}", "public static void main(String[] args) {\n String filename = \"\";\n Node root,standard_root;\n CseElement result;\n HashMap<Integer,ArrayList<CseElement>> control_structures;\n //Initialize variable DEBUG. True when debugging.\n boolean DEBUG = false;\n ArrayList<Node> outputs;\n //Get the filename from argument\n if(DEBUG == false & args.length ==0){\n System.out.println(\"Filename expected!..\");\n }\n else{\n filename = args[0];\n \n \n //Create the AST tree from user input file\n outputs = IOEditor.getList(filename);\n root = Tree.createTree(outputs);\n if(DEBUG == true){\n //Print and check the AST when debugging\n Tree.print(root);\n System.out.println(\"\\n\"); \n }\n //Get the Standaraize tree.\n standard_root = Tree.getST(root);\n if(DEBUG == true){\n //Print and check the standarize tree when debugging\n Tree.print(standard_root);\n }\n //Create the control structures for rpal code\n control_structures = Tree.preOrderTraversal(root);\n if(DEBUG == true){\n //Print and check the control structures when debugging\n System.out.println(control_structures);\n System.out.println(\"\");\n }\n // Evaluate the RPAL code using CSE machine\n CseMachine cm = new CseMachine(control_structures);\n try {\n //Get the resulted output\n result = cm.apply(DEBUG);\n if(result == null){\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(\"Final Result:- No return value\");\n }\n }\n else if(\"env\".equals(result.type)){\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(\"Final Result:- No return value\");\n }\n }\n else{\n if(DEBUG == true){\n //Check the result when debugging\n System.out.println(result.type +\" \"+result.value);\n }\n }\n } catch (Exception ex) {\n System.out.println(\"\\n\\n\"+ex+\"\\n\\n\");\n Logger.getLogger(Rpal.class.getName()).log(Level.SEVERE, null, ex);\n }\n } \n }", "Program createProgram();", "Program createProgram();", "Program createProgram();", "public void flattenASTChangesToString(){\n\t\tthis.codeBlob = getCodeString();\n\t\tthis.compUnit = null;\n\t\tthis.rewriter = null;\n\t}", "public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }", "public AST(RuleContext ctx){\n this.ctx = ctx;\n }", "public String toStringAST()\r\n/* 75: */ {\r\n/* 76: 94 */ StringBuilder s = new StringBuilder();\r\n/* 77: */ \r\n/* 78: 96 */ s.append('{');\r\n/* 79: 97 */ int count = getChildCount();\r\n/* 80: 98 */ for (int c = 0; c < count; c++)\r\n/* 81: */ {\r\n/* 82: 99 */ if (c > 0) {\r\n/* 83:100 */ s.append(',');\r\n/* 84: */ }\r\n/* 85:102 */ s.append(getChild(c).toStringAST());\r\n/* 86: */ }\r\n/* 87:104 */ s.append('}');\r\n/* 88:105 */ return s.toString();\r\n/* 89: */ }", "public interface ASTPath\n{\n\tvoid debugSelf(IndentPrinter destination);\n\tvoid setParent(ASTChildList.ListKey key, ASTParent newParent);\n\tvoid compileSelf(LangCompiler compiler);\n\tASTBase getDeclaration();\n\tString getName();\n\tString getEnd();\n\tSpiritType getExpressionType();\n\n}", "public TreeNode createTree(IGPProgram a_prog)\n throws InvalidConfigurationException {\n if (a_prog == null) {\n return null;\n }\n ProgramChromosome master = new ProgramChromosome(m_conf);\n master.setIndividual(a_prog);\n TreeNode tree;\n if (a_prog.size() > 1) {\n Class[] types = new Class[a_prog.size()];\n for (int i = 0; i < a_prog.size(); i++) {\n types[i] = CommandGene.VoidClass; //this is arbitrary\n }\n master.setGene(0, new SubProgram(m_conf, types));\n int index = 1;\n for (int i = 0; i < a_prog.size(); i++) {\n ProgramChromosome child = a_prog.getChromosome(i);\n for (int j = 0; j < child.size(); j++) {\n master.setGene(index++, child.getGene(j));\n }\n }\n master.redepth();\n tree = new JGAPTreeNode(master, 0);\n }\n else {\n tree = new JGAPTreeNode(a_prog.getChromosome(0), 0);\n }\n return tree;\n }", "public interface IProgram {\n\n\t/**\n\t * Returns filename of the program. This is name of file that was\n\t * initially added to the database.\n\t * @return filename of the program.\n\t */\n\tpublic String getFilename();\n\n\t/**\n\t * Returns a sequence of bytes that forms source file in UTF-8 encoding. \n\t * @return a sequence of bytes that forms source file in UTF-8 encoding. \n\t */\n\tpublic byte[] getSource();\n\n\t/**\n\t * Returns list of tokens (unmodifiable).\n\t * \n\t * @return list of tokens (unmodifiable).\n\t */\n\tpublic List<IToken> getTokens();\n\n\t/**\n\t * Returns author of the program.\n\t * \n\t * @return author of the program.\n\t */\n\tpublic IAuthor getAuthor();\n\n}", "public interface Program {\n\n static EvalResult newEvalResult(Val val, EvalDetails evalDetails) {\n return new EvalResult(val, evalDetails);\n }\n\n /**\n * Eval returns the result of an evaluation of the Ast and environment against the input vars.\n *\n * <p>The vars value may either be an `interpreter.Activation` or a `map[string]interface{}`.\n *\n * <p>If the `OptTrackState` or `OptExhaustiveEval` flags are used, the `details` response will be\n * non-nil. Given this caveat on `details`, the return state from evaluation will be:\n *\n * <ul>\n * <li>`val`, `details`, `nil` - Successful evaluation of a non-error result.\n * <li>`val`, `details`, `err` - Successful evaluation to an error result.\n * <li>`nil`, `details`, `err` - Unsuccessful evaluation.\n * </ul>\n *\n * <p>An unsuccessful evaluation is typically the result of a series of incompatible `EnvOption`\n * or `ProgramOption` values used in the creation of the evaluation environment or executable\n * program.\n */\n EvalResult eval(Object vars);\n\n final class EvalResult {\n private final Val val;\n private final EvalDetails evalDetails;\n\n private EvalResult(Val val, EvalDetails evalDetails) {\n this.val = val;\n this.evalDetails = evalDetails;\n }\n\n public Val getVal() {\n return val;\n }\n\n public EvalDetails getEvalDetails() {\n return evalDetails;\n }\n }\n}", "public static ASTProgram parseValidProgram(String text)\n {\n ASTProgram program = null;\n try {\n program = (new MyDecafParser()).parse(\n (new MyDecafLexer()).lex(text));\n } catch (IOException ex) {\n assertTrue(false);\n } catch (InvalidTokenException ex) {\n assertTrue(false);\n } catch (InvalidSyntaxException ex) {\n assertTrue(false);\n }\n return program;\n }", "public ProgramModule getRootModule(String treeName);", "public interface Program {\n\n\t/**\n\t * The name of the string class\n\t */\n\tpublic static final String STRING_CLASS = \"String\";\n\n\t/**\n\t * The name of the object class\n\t */\n\tpublic static final String OBJECT_CLASS = \"Object\";\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllCodeMembers();\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze, excluding ones from the String and Object classes.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllSubmittedCodeMembers();\n}", "public ProgramModule getModule(String treeName, String name);", "@Override\n\tpublic String visitProgram(ProgramContext ctx) {\n\t\tfor(int i=0; i< ctx.getChildCount();i++)\n\t\t visit(ctx.getChild(i));\n\t\treturn sb.toString();\n\t}", "public ProgramModule getRootModule(long treeID);", "public static void printProgram(ParseTree parseTree)\r\n {\r\n printProg(parseTree);\r\n }", "Program parse() throws SyntaxException {\n\t\tProgram p = null;\n\t\tp = program();\n\t\tmatchEOF();\n\t\treturn p;\n\t}", "public void processTreeTypes(@NonNull CompilationUnit ast) {\n\t\tVariableTypeMap variables = new VariableTypeMap();\n\t\tthis.variableMaps.clear();\n\n\t\tthis.variableMaps.push(variables);\n\t\tLabelPass labels = new LabelPass(variables);\n\t\tlabels.processLabels(ast);\n\n\t\tthis.processTypes(ast);\n\t}", "public static Statement build(LinkedListTree ast) {\n\t\tswitch (ast.getType()) {\n\t\t\tcase AS3Parser.BLOCK:\n\t\t\t\treturn new ASTStatementList(ast);\n\t\t\tcase AS3Parser.DO:\n\t\t\t\treturn new ASTASDoWhileStatement(ast);\n\t\t\tcase AS3Parser.EXPR_STMNT:\n\t\t\t\treturn new ASTASExpressionStatement(ast);\n\t\t\tcase AS3Parser.FOR_EACH:\n\t\t\t\treturn new ASTASForEachInStatement(ast);\n\t\t\tcase AS3Parser.FOR_IN:\n\t\t\t\treturn new ASTASForInStatement(ast);\n\t\t\tcase AS3Parser.FOR:\n\t\t\t\treturn new ASTASForStatement(ast);\n\t\t\tcase AS3Parser.IF:\n\t\t\t\treturn new ASTASIfStatement(ast);\n\t\t\tcase AS3Parser.SWITCH:\n\t\t\t\treturn new ASTASSwitchStatement(ast);\n\t\t\tcase AS3Parser.CONST:\n\t\t\tcase AS3Parser.VAR:\n\t\t\t\treturn new ASTASDeclarationStatement(ast);\n\t\t\tcase AS3Parser.WHILE:\n\t\t\t\treturn new ASTASWhileStatement(ast);\n\t\t\tcase AS3Parser.WITH:\n\t\t\t\treturn new ASTASWithStatement(ast);\n\t\t\tcase AS3Parser.RETURN:\n\t\t\t\treturn new ASTASReturnStatement(ast);\n\t\t\tcase AS3Parser.SUPER:\n\t\t\t\treturn new ASTASSuperStatement(ast);\n\t\t\tcase AS3Parser.BREAK:\n\t\t\t\treturn new ASTASBreakStatement(ast);\n\t\t\tcase AS3Parser.TRY:\n\t\t\t\treturn new ASTASTryStatement(ast);\n\t\t\tcase AS3Parser.DEFAULT_XML_NAMESPACE:\n\t\t\t\treturn new ASTASDefaultXMLNamespaceStatement(ast);\n\t\t\tcase AS3Parser.CONTINUE:\n\t\t\t\treturn new ASTASContinueStatement(ast);\n\t\t\tcase AS3Parser.THROW:\n\t\t\t\treturn new ASTASThrowStatement(ast);\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(\"Unsupported statement node type: \"+ASTUtils.tokenName(ast)+\" in \"+ActionScriptFactory.str(ASTUtils.stringifyNode(ast)));\n\t\t}\n\t}", "public interface TreeInterface extends SymmetricDigraphInterface {\r\n /** Return parent of a tree node.\r\n * @precondition nonNull(node)\r\n */\r\n public IRNode getParent(IRNode node);\r\n\r\n /** The location is a value used by an IRSequence\r\n * to locate an element. For IRArray, it is an integer.\r\n * @precondition nonNull(node)\r\n */\r\n public IRLocation getLocation(IRNode node);\r\n\r\n /** Return the root of a subtree.\r\n */\r\n public IRNode getRoot(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with leaves and working toward the node given.\r\n * A postorder traversal.\r\n */\r\n public Iteratable<IRNode> bottomUp(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with this node and working toward the leaves.\r\n * A preorder traversal.\r\n */\r\n public Iteratable<IRNode> topDown(IRNode subtree);\r\n}", "public static void main(String[] args) throws Exception {\n if(args.length < 2) {\n System.out.println(\"Not enough parameters! java -jar programAnalysis.jar <Analysis> <Input file> \");\n return;\n }\n\n // Parse the analysis input\n String analysisString = args[0];\n\n // Get Analysis from factory\n GeneralAnalysisFactory analysisFactory = new GeneralAnalysisFactory();\n GeneralAnalysis analysis = analysisFactory.getInstance(analysisString);\n\n TheLangLexer lex = new TheLangLexer(new ANTLRFileStream(args[1]));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TheLangParser parser = new TheLangParser(tokens);\n ProgramGeneralAnalysisListener listener = new ProgramGeneralAnalysisListener(analysis);\n parser.addParseListener(listener);\n\n try {\n TheLangParser.ProgramContext parserResult = parser.program();\n\n BaseMutableTreeNode rootTree = listener.getRootTree();\n FlowGraph graph = new FlowGraph();\n\n Enumeration en = rootTree.preorderEnumeration();\n int i = 1;\n while (en.hasMoreElements()) {\n\n // Unfortunately the enumeration isn't genericised so we need to downcast\n // when calling nextElement():\n BaseMutableTreeNode node = (BaseMutableTreeNode) en.nextElement();\n ParserRuleContext object = (ParserRuleContext) node.getUserObject();\n\n if(BaseStatement.class.isAssignableFrom(node.getClass())) {\n BaseStatement statement = (BaseStatement) node;\n graph.processStatement(statement);\n\n System.out.println(\"label-\" + i++ + \": \" + object.getText());\n }\n\n }\n\n analysis.doAnalysis(graph);\n\n System.out.println(analysis.printResult());\n\n// CommonTree t = (CommonTree) parserResult.getTree();\n// CommonTree t2 = (CommonTree) t.getChild(0);\n// int startToken = t2.getTokenStartIndex();\n// int stopToken = t2.getTokenStopIndex();\n// CommonToken token = (CommonToken) t2.getToken();\n// System.out.println(token.getText());\n//\n// if (parserResult != null) {\n// CommonTree tree = (CommonTree) parserResult.tree;\n// System.out.println(tree.toStringTree());\n// }\n } catch (RecognitionException e) {\n e.printStackTrace();\n }\n\n }", "public static void parseAST(Node astNode) {\n\n int childrenNum = astNode.getChildCount();\n for (int i = 0; i < childrenNum; i++) {\n Node child = astNode.getChild(i);\n String astNodeType = child.getClass().getName();\n\n if (astNodeType.contains(\"Text\")) {\n if (child.getValue().contains(\"\\n\")) {\n lineNum++;\n }\n }\n if (astNodeType.contains(\"Element\")) {\n String localName = ((Element) child).getLocalName();\n if (localName.equals(\"decl_stmt\")) {\n String type = ((Element) child).getChildElements().get(0).getChildElements(\"type\", \"http://www.sdml.info/srcML/src\").get(0).getValue();\n String name = ((Element) child).getChildElements().get(0).getChildElements(\"name\", \"http://www.sdml.info/srcML/src\").get(0).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (localName.equals(\"function_decl\")) {\n String type = ((Element) child).getChildElements().get(0).getValue();\n String name = ((Element) child).getChildElements().get(1).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (localName.equals(\"function\")) {\n String type = ((Element) child).getChildElements().get(0).getValue();\n String name = ((Element) child).getChildElements().get(1).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(child);\n } else if (localName.equals(\"block\")) {\n parseAST(child);\n } else if (localName.equals(\"expr_stmt\")) {\n Element exprChild = ((Element) ((Element) child).getChildElements().get(0).getChild(0));\n String exprType = exprChild.getLocalName();\n if (exprType.equals(\"name\")) {\n String name = exprChild.getValue();\n String type = \"\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (exprType.equals(\"call\")) {\n String name = exprChild.getChild(0).getValue();\n String type = \"call\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(exprChild);\n }\n } else if (localName.equals(\"call\")) {\n String name = child.getChild(0).getValue();\n String type = \"call\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(child);\n } else if (localName.equals(\"argument\")) {\n Element c = ((Element) ((Element) child).getChildElements().get(0).getChild(0));\n if (c.getLocalName().equals(\"name\")) {\n String name = c.getValue();\n String type = \"\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else {\n parseAST(child);\n }\n\n\n } else if (!entity.getTerminal().contains(localName)) {\n parseAST(child);\n }\n\n }\n }\n\n }", "@Override\n\tpublic void visit(Program program) {\n\t\t\n\t\tHashMap<AstNode,ArrayList<SymbolTable>> classAst=new HashMap<AstNode,ArrayList<SymbolTable>>();\n\t\tHashMap<String,ArrayList<SymbolTable>> classNames=new HashMap<String,ArrayList<SymbolTable>>();\n\t\t\n\t\tMainClass myMainClass=program.mainClass();\n\t\tif(myMainClass!=null) {\n\t\t\tprogram.mainClass().accept(this);\n\t\t\tclassNames.put(myMainClass.name(), new ArrayList<SymbolTable>(Arrays.asList(this.currentSymbolTableVar,this.currentSymbolTableMeth)));\n\t\t}\n\t\t\n\t\tfor (ClassDecl cls : program.classDecls()) {\t\n\t\t\t\n\t\t\tSymbolTable currVar=new SymbolTable();\n\t\t\tSymbolTable currMeth=new SymbolTable();\n\t\t\n\t\t\tthis.currentSymbolTableVar=currVar;\n\t\t\tcurrVar.setParentSymbolTable(this.ParentSymbolTableVar);\n\t\t\tthis.currentSymbolTableMeth=currMeth;\n\t\t\tcurrMeth.setParentSymbolTable(this.ParentSymbolTableMeth);\n\t\t\t\n\t\t\tclassAst.put(cls,new ArrayList<SymbolTable>(Arrays.asList(this.currentSymbolTableVar,this.currentSymbolTableMeth))); /*prepare hashmaps for setSymbolTableClassHirerachy() call*/\n\t\t\tclassNames.put(cls.name(),new ArrayList<SymbolTable>(Arrays.asList(this.currentSymbolTableVar,this.currentSymbolTableMeth)));\n\t\t\tmyVariables.put(cls, this.currentSymbolTableVar);\n\t\t\tmyMethods.put(cls, this.currentSymbolTableMeth);\n\t\t\tcls.accept(this);\n\t\t}\n\t\t\n\t\tsetSymbolTableClassHirerachy(program,classAst,classNames);\n\t}", "public void prog() {\r\n \t\r\n // First parse declarations\r\n decls();\r\n // Next parse expression\r\n ArrayList<Integer> values = new ArrayList<Integer>(); \r\n values = exprs(values);\r\n for(int i = 0; i < values.size(); i++) {\r\n \tSystem.out.print(values.get(i) + \" \");\r\n }\r\n System.out.println();\r\n \r\n \r\n //int value = expr();\r\n // Finally parse the end of file character\r\n match(TokenType.END_OF_FILE);\r\n //System.out.println(\"Value of expression is: \" + value);\r\n }", "public interface ParseNodeVisitor {\r\n // non-leaf nodes: visitEnter and visitLeave\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Constructs larger than statements\r\n void visitEnter(ParseNode node);\r\n\r\n void visitLeave(ParseNode node);\r\n\r\n void visitEnter(ProgramNode node);\r\n\r\n void visitLeave(ProgramNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Function Node\r\n void visitEnter(GlobalDefinitionNode node);\r\n\r\n void visitLeave(GlobalDefinitionNode node);\r\n\r\n void visitEnter(FunctionDefinitionNode node);\r\n\r\n void visitLeave(FunctionDefinitionNode node);\r\n\r\n void visitEnter(LambdaNode node);\r\n\r\n void visitLeave(LambdaNode node);\r\n\r\n void visitEnter(LambdaParamTypeNode node);\r\n\r\n void visitLeave(LambdaParamTypeNode node);\r\n\r\n void visitEnter(ParameterListNode node);\r\n\r\n void visitLeave(ParameterListNode node);\r\n\r\n void visitEnter(ParameterSpecificationNode node);\r\n\r\n void visitLeave(ParameterSpecificationNode node);\r\n\r\n void visitEnter(FunctionInvocationNode node);\r\n\r\n void visitLeave(FunctionInvocationNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Statement Node\r\n void visitEnter(BlockStatementNode node);\r\n\r\n void visitLeave(BlockStatementNode node);\r\n\r\n void visitEnter(PrintStatementNode node);\r\n\r\n void visitLeave(PrintStatementNode node);\r\n\r\n void visitEnter(DeclarationNode node);\r\n\r\n void visitLeave(DeclarationNode node);\r\n\r\n void visitEnter(AssignmentStatementNode node);\r\n\r\n void visitLeave(AssignmentStatementNode node);\r\n\r\n void visitEnter(IfStatementNode node);\r\n\r\n void visitLeave(IfStatementNode node);\r\n\r\n void visitEnter(WhileStatementNode node);\r\n\r\n void visitLeave(WhileStatementNode node);\r\n\r\n void visitEnter(ReleaseStatementNode node);\r\n\r\n void visitLeave(ReleaseStatementNode node);\r\n\r\n void visitEnter(ReturnStatementNode node);\r\n\r\n void visitLeave(ReturnStatementNode node);\r\n\r\n void visitEnter(CallStatementNode node);\r\n\r\n void visitLeave(CallStatementNode node);\r\n\r\n void visitEnter(BreakStatementNode node);\r\n\r\n void visitLeave(BreakStatementNode node);\r\n\r\n void visitEnter(ContinueStatementNode node);\r\n\r\n void visitLeave(ContinueStatementNode node);\r\n \r\n void visitEnter(ForStatementNode node);\r\n\r\n void visitLeave(ForStatementNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Expression Node\r\n void visitEnter(BinaryOperatorNode node);\r\n\r\n void visitLeave(BinaryOperatorNode node);\r\n\r\n void visitEnter(UnaryOperatorNode node);\r\n\r\n void visitLeave(UnaryOperatorNode node);\r\n\r\n void visitEnter(TypeCastingNode node);\r\n\r\n void visitLeave(TypeCastingNode node);\r\n\r\n void visitEnter(ExpressionListNode node);\r\n\r\n void visitLeave(ExpressionListNode node);\r\n\r\n void visitEnter(NewArrayTypeLengthNode node);\r\n\r\n void visitLeave(NewArrayTypeLengthNode node);\r\n\r\n void visitEnter(TypeNode node);\r\n\r\n void visitLeave(TypeNode node);\r\n\r\n void visitEnter(TypeListNode node);\r\n\r\n void visitLeave(TypeListNode node);\r\n \r\n void visitEnter(LambdaTypeNode node);\r\n\r\n void visitLeave(LambdaTypeNode node);\r\n \r\n void visitEnter(ArrayIndexingNode node);\r\n\r\n void visitLeave(ArrayIndexingNode node);\r\n\r\n // leaf nodes: visitLeaf only\r\n void visit(BooleanConstantNode node);\r\n\r\n void visit(TypeCastedToNode node);\r\n\r\n void visit(ErrorNode node);\r\n\r\n void visit(IdentifierNode node);\r\n\r\n void visit(IntegerConstantNode node);\r\n\r\n void visit(FloatingConstantNode node);\r\n\r\n void visit(CharConstantNode node);\r\n\r\n void visit(StringConstantNode node);\r\n\r\n void visit(NewlineNode node);\r\n\r\n void visit(TabNode node);\r\n\r\n void visit(SpaceNode node);\r\n\r\n public static class Default implements ParseNodeVisitor {\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Constructs larger than statements\r\n\r\n public void defaultVisit(ParseNode node) {}\r\n\r\n public void defaultVisitEnter(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void defaultVisitLeave(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void defaultVisitForLeaf(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void visitEnter(ParseNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParseNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ProgramNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ProgramNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Function Node\r\n public void visitEnter(GlobalDefinitionNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(GlobalDefinitionNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(FunctionDefinitionNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(FunctionDefinitionNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(LambdaNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(LambdaParamTypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaParamTypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ParameterListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParameterListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ParameterSpecificationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParameterSpecificationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(FunctionInvocationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(FunctionInvocationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Statements\r\n\r\n /*\r\n * Statements -> BlockStatement PrintStatement Declaration AssignmentStatement IfStatement\r\n * WhileStatement ReleaseStatement ReturnStatement CallStatement BreakStatement\r\n * ContinueStatement\r\n */\r\n\r\n ///////////////////////////////////////////////////////////\r\n // BlockStatement\r\n public void visitEnter(BlockStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BlockStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // PrintStatement\r\n public void visitEnter(PrintStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(PrintStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // DeclarationStatement\r\n public void visitEnter(DeclarationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(DeclarationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // AssignmentStatement\r\n public void visitEnter(AssignmentStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(AssignmentStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // IfStatement\r\n public void visitEnter(IfStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(IfStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // WhileStatement\r\n public void visitEnter(WhileStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(WhileStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ReleaseStatement\r\n public void visitEnter(ReleaseStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ReleaseStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ReturnStatement\r\n public void visitEnter(ReturnStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ReturnStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // CallStatement\r\n public void visitEnter(CallStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(CallStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // BreakStatement\r\n public void visitEnter(BreakStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BreakStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ContinueStatement\r\n public void visitEnter(ContinueStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ContinueStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n ///////////////////////////////////////////////////////////\r\n // ForStatement\r\n public void visitEnter(ForStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ForStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // ExpressionNode\r\n\r\n public void visitEnter(BinaryOperatorNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BinaryOperatorNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(UnaryOperatorNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(UnaryOperatorNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(TypeCastingNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeCastingNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ExpressionListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ExpressionListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(NewArrayTypeLengthNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(NewArrayTypeLengthNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitLeave(ArrayIndexingNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ArrayIndexingNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitEnter(TypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n public void visitEnter(LambdaTypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaTypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n public void visitEnter(TypeListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Leaf nodes\r\n public void visit(IdentifierNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(TypeCastedToNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(BooleanConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(ErrorNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(IntegerConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(FloatingConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(CharConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(StringConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(NewlineNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(TabNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(SpaceNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n }\r\n}", "public static void pruebaVisitor(String path) {\n\t\ttry {\n\t\t\t/*in = new FileInputStream(f);\n\t\t\tfinal CSharpLexer lexer = new CSharpLexer(CharStreams.fromStream(in, StandardCharsets.UTF_8));\n\t\t\t\n\t // create an instance of myWeb\n\t\t\tCSharpParser parser = new CSharpParser(new CommonTokenStream(lexer));\n\t\t\t\t\n\t\t\tSystem.out.println(\" parser -> \" + parser.toString());\n\t\t\tParseTree tree = parser.compilation_unit();*/\n\t\t\t\n\t\t\tCSharpArchIdFactory factory = CSharpArchIdFactory.eINSTANCE;\n\t\t\tModel model = factory.createModel();\n\t\t\tmodel.setName(\"CSharpModel\");\n\t\t\tprocessFiles(path, model, \"eShopOnWeb-master\");\n\t\t\t\n\t\t\tSystem.out.println(\" modelo -> \" + model);\n\t\t\tResource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;\n\t Map<String, Object> m = reg.getExtensionToFactoryMap();\n\t m.put(\"model\", new XMIResourceFactoryImpl());\n\n\t // Obtain a new resource set\n\t ResourceSet resSet = new ResourceSetImpl();\n\n\t // create a resource\n\t Resource resource = resSet.createResource(URI\n\t .createURI(\"CSharpArchId.model\"));\n\t // Get the first model element and cast it to the right type, in my\n\t // example everything is hierarchical included in this first node\n\t resource.getContents().add(model);\n\t resource.save(Collections.EMPTY_MAP);\n\t \n\t EPLHandler handler = new EPLHandler(null);\n\t //handler.execute(null);\n\t \n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public ProgramParser(ProgramParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 14; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "private UnifiedAst precompile(PrecompilationContext precompilationContext)\n\t\t\tthrows UnableToCompleteException {\n\t\ttry {\n\t\t\t// (0) Assert preconditions\n\t\t\tif (precompilationContext.getEntryPoints().length\n\t\t\t\t\t+ precompilationContext\n\t\t\t\t\t\t\t.getAdditionalRootTypes().length == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"entry point(s) required\");\n\t\t\t}\n\t\t\tboolean singlePermutation = precompilationContext\n\t\t\t\t\t.getPermutations().length == 1;\n\t\t\tPrecompilationMetricsArtifact precompilationMetrics = precompilationContext\n\t\t\t\t\t.getPrecompilationMetricsArtifact();\n\t\t\t/*\n\t\t\t * Do not introduce any new pass here unless it is logically a part\n\t\t\t * of one of the 6 defined stages and is physically located in that\n\t\t\t * stage.\n\t\t\t */\n\t\t\t// (1) Initialize local state\n\t\t\tjprogram = new JProgram(compilerContext.getMinimalRebuildCache());\n\t\t\t// Synchronize JTypeOracle with compile optimization behavior.\n\t\t\tjprogram.typeOracle.setOptimize(options\n\t\t\t\t\t.getOptimizationLevel() > OptionOptimize.OPTIMIZE_LEVEL_DRAFT);\n\t\t\tjsProgram = new JsProgram();\n\t\t\t// (2) Construct and unify the unresolved Java AST\n\t\t\tCompilationState compilationState = constructJavaAst(\n\t\t\t\t\tprecompilationContext);\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tJsniRestrictionChecker.exec(logger, jprogram);\n\t\t\tJsInteropRestrictionChecker.exec(logger, jprogram,\n\t\t\t\t\tgetMinimalRebuildCache());\n\t\t\tlogTypeOracleMetrics(precompilationMetrics, compilationState);\n\t\t\tMemory.maybeDumpMemory(\"AstOnly\");\n\t\t\tAstDumper.maybeDumpAST(jprogram);\n\t\t\t// TODO(stalcup): is in wrong place, move to optimization stage\n\t\t\tConfigurationProperties configurationProperties = new ConfigurationProperties(\n\t\t\t\t\tmodule);\n\t\t\tEnumNameObfuscator.exec(jprogram, logger, configurationProperties,\n\t\t\t\t\toptions);\n\t\t\t// (3) Normalize the unresolved Java AST\n\t\t\t// Replace default methods by static implementations.\n\t\t\tDevirtualizeDefaultMethodForwarding.exec(jprogram);\n\t\t\t// Replace calls to native overrides of object methods.\n\t\t\tReplaceCallsToNativeJavaLangObjectOverrides.exec(jprogram);\n\t\t\tFixAssignmentsToUnboxOrCast.exec(jprogram);\n\t\t\tif (options.isEnableAssertions()) {\n\t\t\t\tAssertionNormalizer.exec(jprogram);\n\t\t\t} else {\n\t\t\t\tAssertionRemover.exec(jprogram);\n\t\t\t}\n\t\t\tif (module != null && options.isRunAsyncEnabled()) {\n\t\t\t\tReplaceRunAsyncs.exec(logger, jprogram);\n\t\t\t\tConfigurationProperties config = new ConfigurationProperties(\n\t\t\t\t\t\tmodule);\n\t\t\t\tCodeSplitters.pickInitialLoadSequence(logger, jprogram, config);\n\t\t\t}\n\t\t\tImplementClassLiteralsAsFields.exec(jprogram, shouldOptimize());\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tlogAstTypeMetrics(precompilationMetrics);\n\t\t\t// (4) Construct and return a value.\n\t\t\tEvent createUnifiedAstEvent = SpeedTracerLogger\n\t\t\t\t\t.start(CompilerEventType.CREATE_UNIFIED_AST);\n\t\t\tUnifiedAst result = new UnifiedAst(options,\n\t\t\t\t\tnew AST(jprogram, jsProgram), singlePermutation,\n\t\t\t\t\tRecordRebinds.exec(jprogram));\n\t\t\tcreateUnifiedAstEvent.end();\n\t\t\treturn result;\n\t\t} catch (Throwable e) {\n\t\t\tthrow CompilationProblemReporter.logAndTranslateException(logger,\n\t\t\t\t\te);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\t//Scanner scanner = new Scanner(System.in);\r\n\t\t\tSyntax syntax = new Syntax();\r\n\t\t\tsyntax.addTerminal(\"PLUS\", TokenType.OPERATOR, OperatorType.PLUS);\r\n\t\t\tsyntax.addTerminal(\"MINUS\", TokenType.OPERATOR, OperatorType.MINUS);\r\n\t\t\tsyntax.addTerminal(\"TIMES\", TokenType.OPERATOR, OperatorType.TIMES);\r\n\t\t\tsyntax.addTerminal(\"DIVIDE\", TokenType.OPERATOR, OperatorType.DIVIDE);\r\n\t\t\tsyntax.addTerminal(\"LPA\", TokenType.OPERATOR, OperatorType.LPARAN);\r\n\t\t\tsyntax.addTerminal(\"RPA\", TokenType.OPERATOR, OperatorType.RPARAN);\r\n\t\t\tsyntax.addTerminal(\"SYMBOL\", TokenType.ID, \"i\");\r\n\t\t\tsyntax.addNonTerminal(\"E\");\r\n\t\t\tsyntax.addNonTerminal(\"T\");\r\n\t\t\tsyntax.addNonTerminal(\"F\");\r\n\t\t\tsyntax.addErrorHandler(\"sample\", null);\r\n\t\t\t//syntax.infer(\"E -> T `PLUS`<+> E | T `MINUS`<-> E | T\");\r\n\t\t\t//syntax.infer(\"T -> F `TIMES`<*> T | F `DIVIDE`</> T | F\");\r\n\t\t\t//syntax.infer(\"F -> `LPA`<(> E `RPA`<)> | `SYMBOL`<i>\");\r\n\t\t\tsyntax.infer(\"E -> E @PLUS<+> T\");\r\n\t\t\tsyntax.infer(\"E -> E @MINUS<-> T\");\r\n\t\t\tsyntax.infer(\"E -> T\");\r\n\t\t\tsyntax.infer(\"T -> T @TIMES<*> F\");\r\n\t\t\tsyntax.infer(\"T -> T @DIVIDE</> F\");\r\n\t\t\tsyntax.infer(\"T -> F\");\r\n\t\t\tsyntax.infer(\"F -> @LPA<(> E @RPA<)>\");\r\n\t\t\tsyntax.infer(\"F -> @SYMBOL<i>\");\r\n\t\t\tsyntax.initialize(\"E\");\r\n\t\t\tSystem.out.println(syntax.toString());\r\n\t\t\tSystem.out.println(syntax.getNGAString());\r\n\t\t\tSystem.out.println(syntax.getNPAString());\r\n\t\t\t//scanner.close();\r\n\t\t} catch (RegexException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SyntaxException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage() + \" \" + e.getInfo());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public Program parse() throws SyntaxException {\n\t\tProgram p = program();\n\t\tmatchEOF();\n\t\treturn p;\n\t}", "ASTBinOp parse_impl(Exec E) {\n AST l = E.parse();\n AST r = E.parse();\n E.eatEnd(); // eat ending ')'\n ASTBinOp res = (ASTBinOp) clone();\n res._asts = new AST[]{l,r};\n return res;\n }", "uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode getAstRoot();", "@jdk.Supported\npublic interface Tree {\n\n /**\n * Enumerates all kinds of trees.\n */\n @jdk.Supported\n public enum Kind {\n\n /**\n * Used for instance of {@link ExtendedASTAnnotationTree}\n * representing AST-level tree annotation \"@@\"\n */\n AST_ANNOTATION(null, \"ASTAnnotation\"), // ExtendedASTAnnotationTree.class ... break API compatility with visitor ...\n\n ANNOTATED_TYPE(AnnotatedTypeTree.class, \"AnnotatedType\", \"AtType\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing declaration annotations.\n */\n ANNOTATION(AnnotationTree.class, \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing type annotations.\n */\n TYPE_ANNOTATION(AnnotationTree.class, \"TypeAnnotation\", \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link ArrayAccessTree}.\n */\n ARRAY_ACCESS(ArrayAccessTree.class, \"ArrayAccess\"),\n\n /**\n * Used for instances of {@link ArrayTypeTree}.\n */\n ARRAY_TYPE(ArrayTypeTree.class, \"ArrayType\"),\n\n /**\n * Used for instances of {@link AssertTree}.\n */\n ASSERT(AssertTree.class, \"Assert\", \"assert\"),\n\n /**\n * Used for instances of {@link AssignmentTree}.\n */\n ASSIGNMENT(AssignmentTree.class, \"Assign\", \"Eq\", \"=\"),\n\n /**\n * Used for instances of {@link BlockTree}.\n */\n BLOCK(BlockTree.class, \"Block\", \"{}\"),\n\n /**\n * Used for instances of {@link BreakTree}.\n */\n BREAK(BreakTree.class, \"Break\", \"break\"),\n\n /**\n * Used for instances of {@link CaseTree}.\n */\n CASE(CaseTree.class, \"Case\", \"case\"),\n\n /**\n * Used for instances of {@link CatchTree}.\n */\n CATCH(CatchTree.class, \"Catch\", \"catch\"),\n\n /**\n * Used for instances of {@link ClassTree} representing classes.\n */\n CLASS(ClassTree.class, \"Class\", \"class\"),\n\n /**\n * Used for instances of {@link CompilationUnitTree}.\n */\n COMPILATION_UNIT(CompilationUnitTree.class, \"CompilationUnit\", \"cu\"),\n\n /**\n * Used for instances of {@link ConditionalExpressionTree}.\n */\n CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class, \"ConditionalExpression\", \"?\"),\n\n /**\n * Used for instances of {@link ContinueTree}.\n */\n CONTINUE(ContinueTree.class, \"Continue\", \"continue\"),\n\n /**\n * Used for instances of {@link DoWhileLoopTree}.\n */\n DO_WHILE_LOOP(DoWhileLoopTree.class, \"DoWhile\", \"do\"),\n\n /**\n * Used for instances of {@link EnhancedForLoopTree}.\n */\n ENHANCED_FOR_LOOP(EnhancedForLoopTree.class, \"EnhancedForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link ExpressionStatementTree}.\n */\n EXPRESSION_STATEMENT(ExpressionStatementTree.class, \"ExpressionStatement\", \"expr;\", \"e;\"),\n\n /**\n * Used for instances of {@link MemberSelectTree}.\n */\n MEMBER_SELECT(MemberSelectTree.class, \"MemberSelect\", \".\"),\n\n /**\n * Used for instances of {@link MemberReferenceTree}.\n */\n MEMBER_REFERENCE(MemberReferenceTree.class, \"MemberReference\", \"#\"),\n\n /**\n * Used for instances of {@link ForLoopTree}.\n */\n FOR_LOOP(ForLoopTree.class, \"ForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link IdentifierTree}.\n */\n IDENTIFIER(IdentifierTree.class, \"Identifier\", \"id\", \"name\"),\n\n /**\n * Used for instances of {@link IfTree}.\n */\n IF(IfTree.class, \"If\", \"if\"),\n\n /**\n * Used for instances of {@link ImportTree}.\n */\n IMPORT(ImportTree.class, \"Import\", \"import\"),\n\n /**\n * Used for instances of {@link InstanceOfTree}.\n */\n INSTANCE_OF(InstanceOfTree.class, \"InstanceOf\", \"instanceof\"),\n\n /**\n * Used for instances of {@link LabeledStatementTree}.\n */\n LABELED_STATEMENT(LabeledStatementTree.class, \"LabeledStatement\", \"label\"),\n\n /**\n * Used for instances of {@link MethodTree}.\n */\n METHOD(MethodTree.class, \"Method\", \"method\"),\n\n /**\n * Used for instances of {@link MethodInvocationTree}.\n */\n METHOD_INVOCATION(MethodInvocationTree.class, \"MethodInvocation\", \"invoke\", \"call\"),\n\n /**\n * Used for instances of {@link ModifiersTree}.\n */\n MODIFIERS(ModifiersTree.class, \"Modifiers\"),\n\n /**\n * Used for instances of {@link NewArrayTree}.\n */\n NEW_ARRAY(NewArrayTree.class, \"NewArray\", \"new\"),\n\n /**\n * Used for instances of {@link NewClassTree}.\n */\n NEW_CLASS(NewClassTree.class, \"NewClass\", \"new\"),\n\n /**\n * Used for instances of {@link LambdaExpressionTree}.\n */\n LAMBDA_EXPRESSION(LambdaExpressionTree.class, \"Lambda\", \"lambda\"),\n\n /**\n * Used for instances of {@link ParenthesizedTree}.\n */\n PARENTHESIZED(ParenthesizedTree.class, \"Parenthesized\"), // should not use prefix with \"(e)\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link PrimitiveTypeTree}.\n */\n PRIMITIVE_TYPE(PrimitiveTypeTree.class, \"PrimitiveType\", \"type\"),\n\n /**\n * Used for instances of {@link ReturnTree}.\n */\n RETURN(ReturnTree.class, \"Return\", \"return\"),\n\n /**\n * Used for instances of {@link EmptyStatementTree}.\n */\n EMPTY_STATEMENT(EmptyStatementTree.class, \"EmptyStatement\", \"empty\"),\n\n /**\n * Used for instances of {@link SwitchTree}.\n */\n SWITCH(SwitchTree.class, \"Switch\", \"switch\"),\n\n /**\n * Used for instances of {@link SynchronizedTree}.\n */\n SYNCHRONIZED(SynchronizedTree.class, \"Synchronized\", \"synchronized\"),\n\n /**\n * Used for instances of {@link ThrowTree}.\n */\n THROW(ThrowTree.class, \"Throw\", \"throw\"),\n\n /**\n * Used for instances of {@link TryTree}.\n */\n TRY(TryTree.class, \"Try\", \"try\"),\n\n /**\n * Used for instances of {@link ParameterizedTypeTree}.\n */\n PARAMETERIZED_TYPE(ParameterizedTypeTree.class, \"ParameterizedType\", \"type<>\", \"type\"),\n\n /**\n * Used for instances of {@link UnionTypeTree}.\n */\n UNION_TYPE(UnionTypeTree.class, \"UnionType\", \"union\", \"|\", \"uniontype\", \"type\"),\n\n /**\n * Used for instances of {@link IntersectionTypeTree}.\n */\n INTERSECTION_TYPE(IntersectionTypeTree.class, \"IntersectionType\", \"intersectiontype\", \"type\"),\n\n /**\n * Used for instances of {@link TypeCastTree}.\n */\n TYPE_CAST(TypeCastTree.class, \"TypeCast\", \"cast\"), // should not use prefix with \"()\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link TypeParameterTree}.\n */\n TYPE_PARAMETER(TypeParameterTree.class, \"TypeParameter\", \"type\"),\n\n /**\n * Used for instances of {@link VariableTree}.\n */\n VARIABLE(VariableTree.class, \"Variable\", \"var\", \"vardecl\"),\n\n /**\n * Used for instances of {@link WhileLoopTree}.\n */\n WHILE_LOOP(WhileLoopTree.class, \"WhileLoop\", \"while\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * increment operator {@code ++}.\n */\n POSTFIX_INCREMENT(UnaryTree.class, \"PostfixIncrement\", \"e++\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * decrement operator {@code --}.\n */\n POSTFIX_DECREMENT(UnaryTree.class, \"PostfixDecrement\", \"e--\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * increment operator {@code ++}.\n */\n PREFIX_INCREMENT(UnaryTree.class, \"PrefixIncrement\", \"++e\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * decrement operator {@code --}.\n */\n PREFIX_DECREMENT(UnaryTree.class, \"PrefixDecrement\", \"--e\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary plus\n * operator {@code +}.\n */\n UNARY_PLUS(UnaryTree.class, \"UnaryPlus\", \"+e\", \"+\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary minus\n * operator {@code -}.\n */\n UNARY_MINUS(UnaryTree.class, \"UnaryMinus\", \"-e\", \"-\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing bitwise\n * complement operator {@code ~}.\n */\n BITWISE_COMPLEMENT(UnaryTree.class, \"BitwiseComplement\", \"~\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing logical\n * complement operator {@code !}.\n */\n LOGICAL_COMPLEMENT(UnaryTree.class, \"LogicalComlement\", \"!\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * multiplication {@code *}.\n */\n MULTIPLY(BinaryTree.class, \"Multiply\", \"mult\", \"*\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * division {@code /}.\n */\n DIVIDE(BinaryTree.class, \"Divide\", \"div\", \"/\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * remainder {@code %}.\n */\n REMAINDER(BinaryTree.class, \"Remainder\", \"rem\", \"%\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * addition or string concatenation {@code +}.\n */\n PLUS(BinaryTree.class, \"BinaryPlus\", \"e+e\", \"+\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * subtraction {@code -}.\n */\n MINUS(BinaryTree.class, \"BinaryMinus\", \"e-e\", \"-\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * left shift {@code <<}.\n */\n LEFT_SHIFT(BinaryTree.class, \"LeftShift\", \"<<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * right shift {@code >>}.\n */\n RIGHT_SHIFT(BinaryTree.class, \"RightShift\", \">>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * unsigned right shift {@code >>>}.\n */\n UNSIGNED_RIGHT_SHIFT(BinaryTree.class, \"UnsignedRightShift\", \">>>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than {@code <}.\n */\n LESS_THAN(BinaryTree.class, \"LessThan\", \"lt\", \"<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than {@code >}.\n */\n GREATER_THAN(BinaryTree.class, \"GreaterThan\", \"gt\", \">\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than-equal {@code <=}.\n */\n LESS_THAN_EQUAL(BinaryTree.class, \"LessThanEqual\", \"le\", \"<=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than-equal {@code >=}.\n */\n GREATER_THAN_EQUAL(BinaryTree.class, \"GreaterThanEqual\", \"ge\", \">=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * equal-to {@code ==}.\n */\n EQUAL_TO(BinaryTree.class, \"Equals\", \"equals\", \"==\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * not-equal-to {@code !=}.\n */\n NOT_EQUAL_TO(BinaryTree.class, \"NotEquals\", \"notequals\", \"!=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"and\" {@code &}.\n */\n AND(BinaryTree.class, \"And\", \"and\", \"&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"xor\" {@code ^}.\n */\n XOR(BinaryTree.class, \"Xor\", \"xor\", \"^\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"or\" {@code |}.\n */\n OR(BinaryTree.class, \"Or\", \"or\", \"|\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-and {@code &&}.\n */\n CONDITIONAL_AND(BinaryTree.class, \"ConditionalAnd\", \"&&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-or {@code ||}.\n */\n CONDITIONAL_OR(BinaryTree.class, \"ConditionalOr\", \"||\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * multiplication assignment {@code *=}.\n */\n MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class, \"MultiplyAssignment\", \"*=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * division assignment {@code /=}.\n */\n DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class, \"DivideAssignment\", \"/=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * remainder assignment {@code %=}.\n */\n REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class, \"RemainderAssignment\", \"%=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * addition or string concatenation assignment {@code +=}.\n */\n PLUS_ASSIGNMENT(CompoundAssignmentTree.class, \"PLusAssignment\", \"+=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * subtraction assignment {@code -=}.\n */\n MINUS_ASSIGNMENT(CompoundAssignmentTree.class, \"MinusAssignment\", \"-=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * left shift assignment {@code <<=}.\n */\n LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"LeftShiftAssignment\", \"<<=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * right shift assignment {@code >>=}.\n */\n RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"RightShiftAssignment\", \">>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * unsigned right shift assignment {@code >>>=}.\n */\n UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"UnsignedRightShiftAssignment\", \">>>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"and\" assignment {@code &=}.\n */\n AND_ASSIGNMENT(CompoundAssignmentTree.class, \"AndAssignment\", \"&=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"xor\" assignment {@code ^=}.\n */\n XOR_ASSIGNMENT(CompoundAssignmentTree.class, \"XorAssignment\", \"^=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"or\" assignment {@code |=}.\n */\n OR_ASSIGNMENT(CompoundAssignmentTree.class, \"OrAssignment\", \"|=\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code int}.\n */\n INT_LITERAL(LiteralTree.class, \"IntLiteral\", \"int\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code long}.\n */\n LONG_LITERAL(LiteralTree.class, \"LongLiteral\", \"long\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code float}.\n */\n FLOAT_LITERAL(LiteralTree.class, \"FloatLiteral\", \"float\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code double}.\n */\n DOUBLE_LITERAL(LiteralTree.class, \"DoubleLiteral\", \"double\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a boolean literal expression of type {@code boolean}.\n */\n BOOLEAN_LITERAL(LiteralTree.class, \"BooleanLiteral\", \"boolean\", \"bool\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a character literal expression of type {@code char}.\n */\n CHAR_LITERAL(LiteralTree.class, \"CharLiteral\", \"char\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a string literal expression of type {@link String}.\n */\n STRING_LITERAL(LiteralTree.class, \"StringLiteral\", \"string\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * the use of {@code null}.\n */\n NULL_LITERAL(LiteralTree.class, \"NullLiteral\", \"null\", \"literal\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an unbounded wildcard type argument.\n */\n UNBOUNDED_WILDCARD(WildcardTree.class, \"UnboundedWildcard\", \"?\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an extends bounded wildcard type argument.\n */\n EXTENDS_WILDCARD(WildcardTree.class, \"ExtendsWildcard\", \"?extends\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * a super bounded wildcard type argument.\n */\n SUPER_WILDCARD(WildcardTree.class, \"SuperWildcard\", \"?super\"),\n\n /**\n * Used for instances of {@link ErroneousTree}.\n */\n ERRONEOUS(ErroneousTree.class, \"Erroneous\", \"ERROR\", \"error\"),\n\n /**\n * Used for instances of {@link ClassTree} representing interfaces.\n */\n INTERFACE(ClassTree.class, \"Interface\", \"interface\"),\n\n /**\n * Used for instances of {@link ClassTree} representing enums.\n */\n ENUM(ClassTree.class, \"Enum\", \"enum\"),\n\n /**\n * Used for instances of {@link ClassTree} representing annotation types.\n */\n ANNOTATION_TYPE(ClassTree.class, \"AnnotationType\", \"At\"),\n\n /**\n * An implementation-reserved node. This is the not the node\n * you are looking for.\n */\n OTHER(null, \"Other\");\n\n\n\t\tKind(Class<? extends Tree> intf, String displayName, String... prefixAliases) {\n associatedInterface = intf;\n this.displayName = displayName;\n this.preferredPrefix = (displayName != null)? displayName : toString();\n this.preferredPrefixLowerCase = preferredPrefix.toLowerCase();\n if (prefixAliases == null) prefixAliases = new String[0];\n this.prefixAliases = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(prefixAliases)));\n Set<String> tmpPrefixAliasesLowerCase = new HashSet<String>();\n for(String e : prefixAliases) {\n \ttmpPrefixAliasesLowerCase.add(e.toLowerCase());\n }\n this.prefixAliasesLowerCase = Collections.unmodifiableSet(tmpPrefixAliasesLowerCase);\n }\n\n private final Class<? extends Tree> associatedInterface;\n \n private final String displayName;\n \n private final String preferredPrefix;\n\n private final String preferredPrefixLowerCase;\n\n private final Set<String> prefixAliases;\n \n private final Set<String> prefixAliasesLowerCase;\n\n\n public Class<? extends Tree> asInterface() {\n return associatedInterface;\n }\n\n public String getDisplayName() {\n\t\t\treturn displayName;\n\t\t}\n\n\t\tpublic String preferredPrefix() {\n \treturn preferredPrefix;\n }\n\n public boolean hasAliasPrefix(String prefix) {\n \treturn prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefix(String prefix) {\n \tif (prefix == null) return false;\n \treturn preferredPrefix.equals(prefix)\n \t\t\t|| prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefixIgnoreCase(String prefix) {\n \tif (prefix == null) return false;\n \tString prefixLowerCase = prefix.toLowerCase();\n \treturn preferredPrefixLowerCase.equals(prefixLowerCase)\n \t\t\t|| prefixAliasesLowerCase.contains(prefixLowerCase);\n }\n\n }\n\n /**\n * Gets the kind of this tree.\n *\n * @return the kind of this tree.\n */\n Kind getKind();\n\n /**\n * Accept method used to implement the visitor pattern. The\n * visitor pattern is used to implement operations on trees.\n *\n * @param <R> result type of this operation.\n * @param <D> type of additional data.\n */\n <R,D> R accept(TreeVisitor<R,D> visitor, D data);\n\n /**\n * @since jdk1.8-ARN\n */\n List<? extends ASTExtensionTree> getASTExtensions();\n\n /**\n * @since jdk1.8-ARN\n */\n List<ASTAnnotationTree> getASTAnnotations();\n \n \n}", "public static void main(String[] args) {\n\t\tNode root = null;\r\n\t\tboolean print=false; //是否打印错误信息\r\n\t\ttry {\r\n\t\t\troot = new MiniJavaParser(System.in).Goal();\r\n\t\t\t//System.out.println(\"Program parsed successfully\");\r\n\t\t}\r\n\t\tcatch (ParseException e) {\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\t// 建立符号表,判断是否重定义,是否有循环继承,是否有重载\r\n\t\tSymbolTableVisitor stv = new SymbolTableVisitor();\r\n\t\troot.accept(stv,null);\r\n\t\tif (stv.error.size()!=0) {\r\n\t\t\tSystem.out.println(\"Type error\");\r\n\t\t\t\r\n\t\t\tif (print){\r\n\t\t\t\tfor (int i=0;i<stv.error.size();i++){\r\n\t\t\t\t\tSystem.out.println(stv.error.get(i));\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t\t// 类型检查,检查各种类型是否匹配\r\n\t\tTypeCheckVisitor tcv = new TypeCheckVisitor(stv);\r\n\t\troot.accept(tcv,null);\r\n\t\tif (tcv.error.size()!=0) {\r\n\t\t\tSystem.out.println(\"Type error\");\r\n\t\t\t\r\n\t\t\tif (print){\r\n\t\t\t\tfor (int i=0;i<tcv.error.size();i++){\r\n\t\t\t\t\tSystem.out.println(tcv.error.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.exit(1);\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"Program type checked successfully\");\r\n\t\t}\r\n\t\t\r\n\t\t//生成Piglet代码\r\n\t\tPigletGenerateVisitor pg=new PigletGenerateVisitor(stv);\r\n\t\troot.accept(pg,null);\r\n\t}", "@Override\r\n\tpublic Object visitProgram (Program program, Object arg) throws Exception {\r\n\t\tfor (ASTNode node: program.decOrStatement()) {\r\n\t\t\tnode.visit(this, arg);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Type visit(Program n) {\n\t\tn.m.accept(this);\n\t\tfor (int i = 0; i < n.cl.size(); i++) {\n\t\t\tn.cl.elementAt(i).accept(this);\n\t\t}\n\t\treturn null;\n\t}", "public static void main(String[] args)\n {\n BinaryTreeNode root= generateATree();\n String parseResult=root.parse();\n System.out.println(parseResult);\n }", "private ASTNode buildAST(String contents) throws JavaModelException {\n\t\treturn buildAST(contents, this.workingCopy);\n\t}", "public ProgramNode(String aName, DeclarationsNode globals, SubProgramDeclarationsNode functions, CompoundStatementNode main, Scope scope) {\n\t\tthis.name = aName;\n\t\tglobalVariables = globals;\n\t\tthis.functions = functions;\n\t\tthis.main = main;\n\t\tsymbolTable = scope;\n\t}", "public static Map<JsName, String> exec(JProgram jprogram, JsProgram program) {\n StringVisitor v = new StringVisitor(jprogram, program.getScope());\n v.accept(program);\n\n Map<Integer, SortedSet<JsStringLiteral>> bins = new HashMap<Integer, SortedSet<JsStringLiteral>>();\n for (int i = 0, j = program.getFragmentCount(); i < j; i++) {\n bins.put(i, new TreeSet<JsStringLiteral>(LITERAL_COMPARATOR));\n }\n for (Map.Entry<JsStringLiteral, Integer> entry : v.fragmentAssignment.entrySet()) {\n SortedSet<JsStringLiteral> set = bins.get(entry.getValue());\n assert set != null;\n set.add(entry.getKey());\n }\n\n for (Map.Entry<Integer, SortedSet<JsStringLiteral>> entry : bins.entrySet()) {\n createVars(program, program.getFragmentBlock(entry.getKey()),\n entry.getValue(), v.toCreate);\n }\n\n return reverse(v.toCreate);\n }", "public interface Node {\n Oper oper();\n CNFOrdinal toCNF();\n}", "public static void loadProgram() throws Exception{\n\t\t\n\t\tInteger instructionNumber = 0; \n\t\t\n\t\ttry {\n\t\t\tScanner scanner = new Scanner(new File(ramProgram));\n\t\t\twhile (scanner.hasNext()){\n\t\t\t\tString next = scanner.nextLine();\n\t\t\t\tnext = next.trim();\n\t\t\t\tString [] array = next.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t\tif (next.startsWith(\"#\") || next.isEmpty()){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tif (array[0].endsWith(\":\")){\n\t\t\t\t\t\ttagList.add(new Tag(array[0], instructionNumber));\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch (array.length){\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la etiqueta:\" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[1], \"\", getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[1], array[2], getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la instrucción: \" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch (array.length){\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[0], \"\", getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tprogramMemory.add(new Instruction(array[0], array[1], getLine(next)));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Exception(\"Error en la instrucción: \" + array[0] + \". Línea: \" + getLine(next));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tinstructionNumber++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tscanner.close();\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\n\t\t}\n\t}", "@Test\n public void testAstGeneration() {\n System.out.println(\"AbsolutePathNode - testAstGeneration\");\n final AbsolutePathNode literal = new AbsolutePathNode();\n final String inputRuleset = literal.toRulenode();\n System.out.printf(\"Input Ruleset: %s\\n\", inputRuleset);\n final ANTLRInputStream inStream = new ANTLRInputStream(inputRuleset);\n final HCleanLexer lexer = new HCleanLexer(inStream);\n final CommonTokenStream tokenStream = new CommonTokenStream(lexer);\n final HCleanParser parser = new HCleanParser(tokenStream);\n final ParseTreeWalker walker = new ParseTreeWalker();\n final RuleListener listener = new RuleListener();\n final ParseTree parseTree = parser.absolutePath();\n walker.walk(listener, parseTree);\n final String outputRuleSet = listener.peekStack().toRulenode();\n System.out.printf(\"Expected: %s\\n\", inputRuleset);\n System.out.printf(\" Result: %s\\n\", outputRuleSet);\n assertEquals(inputRuleset, outputRuleSet);\n }", "private void compile(SSAProgram prog, String methodName, SSAStatement s) {\n // recommended for debuggability:\n sb.append(\" # \");\n if (s.getRegister() >= 0)\n sb.append(reg(s));\n sb.append(\": \");\n sb.append(s.toString());\n sb.append(\"\\n\");\n\n SSAStatement left, right;\n String special;\n StringBuilder built = new StringBuilder();\n\n left = s.getLeft();\n right = s.getRight();\n\n switch (s.getOp()) {\n // FILLIN (this is the actual code generator!)\n case Unify:\n case Alias:\n break; // Do nothing\n case Parameter:\n int paramPos = (Integer)s.getSpecial();\n if(paramPos > 3) {\n built.append(\" lw $\" + reg(s) + \", \" + (paramPos-3)*wordSize + \"($fp)\\n\"); \n }\n break; \n case Int:\n int intValue = (Integer)s.getSpecial();\n built.append(\" li $\" + reg(s) + \", \" + intValue + \"\\n\");\n break;\n case Print:\n callerSave(-1);\n built.append(crstores);\n built.append(moveRegister(\"a0\", reg(left)));\n built.append(\" jal minijavaPrint\\n\");\n built.append(crloads);\n break;\n case Boolean:\n boolean boolValue = (Boolean)s.getSpecial();\n if(boolValue) {\n built.append(\" li $\" + reg(s) + \", \" + 1 + \"\\n\");\n } else {\n built.append(\" move $\" + reg(s) + \", $zero\\n\");\n }\n break;\n case This:\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n break;\n case Arg:\n int argPos = (Integer)s.getSpecial();\n if(argPos > 3) {\n built.append(\" sw $\" + reg(left) + \", \" + (argPos-4)*wordSize + \"($sp)\\n\"); \n } else {\n built.append(moveRegister(reg(s) ,reg(left)));\n }\n break;\n case Null:\n built.append(\" move $\" + reg(s) + \", $zero\\n\");\n break;\n case NewObj:\n callerSave(freeReg(s));\n built.append(crstores);\n special = (String)s.getSpecial();\n built.append(\" la $a0, mj__v_\" + special + \"\\n\");\n built.append(\" li $a1, \" + objectSize(prog, prog.getClass(special)) + \"\\n\");\n built.append(\" jal minijavaNew\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case NewIntArray:\n callerSave(freeReg(s));\n built.append(crstores);\n built.append(moveRegister(\"a0\", reg(left)));\n built.append(\" jal minijavaNewArray\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case Label:\n special = (String)s.getSpecial();\n built.append(\" .\" + special + \":\\n\");\n break;\n case Goto:\n special = (String)s.getSpecial();\n built.append(\" j .\" + special + \"\\n\");\n break;\n case Branch:\n special = (String)s.getSpecial();\n built.append(\" bne $\" + reg(left) + \", $zero .\" + special +\"\\n\");\n break;\n case NBranch:\n // could change to beqz\n special = (String)s.getSpecial();\n built.append(\" beq $\" + reg(left) + \", $zero, .\" + special +\"\\n\");\n break;\n case Call:\n String clasName = left.getType().toString();\n SSACall call = (SSACall)s.getSpecial();\n String funcName = call.getMethod();\n Vtable vtab = getVtable(prog, prog.getClass(clasName));\n int methodOffset = vtab.methodOffsets.get(funcName);\n callerSave(freeReg(s));\n built.append(crstores);\n built.append(\" move $v0, $\" + reg(left) + \"\\n\");\n built.append(\" lw $v1, ($v0)\\n\");\n built.append(\" lw $v1, \" + (methodOffset*wordSize) + \"($v1)\\n\");\n built.append(\" jal $v1\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case Return:\n built.append(\" move $v0, $\" + reg(left) + \"\\n\");\n built.append(\" j .ret_\" + methodName + \"\\n\");\n break;\n case Member:\n special = (String)s.getSpecial();\n String clname = left.getType().toString();\n int memOffset;\n if(clname.equals(\"int[]\")) {\n memOffset = 0;\n } else {\n memOffset = fieldOffset(prog, prog.getClass(clname), special);\n }\n if(memOffset == 0) {\n built.append(\" lw $\" + reg(s) + \", ($\" + reg(left) + \")\\n\");\n } else {\n built.append(\" lw $\" + reg(s) + \", \" + (wordSize*memOffset) + \"($\" + reg(left) + \")\\n\");\n }\n break;\n case Index:\n built.append(\" mul $v1, $\" + reg(right) + \", 4\\n\");\n built.append(\" add $v1, $v1, 4\\n\");\n built.append(\" add $v1, $v1, $\" + reg(left) + \"\\n\");\n built.append(\" lw $\" + reg(s) + \", ($v1)\\n\");\n break;\n case VarAssg:\n built.append(moveRegister(reg(s), reg(left)));\n break;\n case MemberAssg:\n special = (String)s.getSpecial();\n String className = left.getType().toString();\n int memSOffset = fieldOffset(prog, prog.getClass(className), special);\n built.append(\" sw $\" + reg(right) + \", \" + (memSOffset*wordSize) + \"($\" + reg(left) + \")\\n\");\n built.append(moveRegister(reg(s), reg(right)));\n break;\n case IndexAssg:\n SSAStatement index = (SSAStatement)s.getSpecial();\n built.append(\" mul $v1, $\" + reg(index) + \", 4\\n\");\n built.append(\" add $v1, $v1, 4\\n\");\n built.append(\" add $v1, $v1, $\" + reg(left) + \"\\n\");\n built.append(\" sw $\" + reg(right) + \", ($v1)\\n\");\n built.append(moveRegister(reg(s), reg(right)));\n break;\n case Not:\n built.append(\" seq $\" + reg(s) + \", $zero , $\" + reg(left) + \"\\n\");\n break;\n case Eq:\n built.append(\" seq $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Ne:\n built.append(\" sne $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Lt:\n built.append(\" slt $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Le:\n built.append(\" sle $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Gt:\n built.append(\" sgt $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Ge:\n built.append(\" sge $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case And:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n built.append(\" seq $\" + reg(s) + \", $\" + reg(s) + \", 2\\n\");\n break;\n case Or:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n built.append(\" sgt $\" + reg(s) + \", $\" + reg(s) + \", 0\\n\");\n break;\n case Plus:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Minus:\n built.append(\" sub $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Mul:\n built.append(\" mul $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Div: \n // can change this to one liner after verifying it works\n built.append(\" div $\" + reg(s) + \", $\"+ reg(left) + \", $\" + reg(right) + \"\\n\");\n //built.append(\" mflo $\" + reg(s) + \"\\n\");\n break; \n case Mod:\n // can change to one liner\n //built.append(\" div $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n //built.append(\" mfhi $\" + reg(s) + \"\\n\");\n built.append(\" rem $\" + reg(s) + \", $\"+ reg(left) + \", $\" + reg(right) + \"\\n\");\n \n break;\n case Store:\n int storeVal = (Integer)s.getSpecial();\n built.append(\" sw $\" + reg(left) + \", -\" + (storeVal+1)*wordSize + \"($fp)\\n\");\n break;\n case Load:\n int loadVal = (Integer)s.getSpecial();\n built.append(\" lw $\" + reg(s) + \", -\" + (loadVal+1)*wordSize + \"($fp)\\n\");\n break;\n default:\n throw new Error(\"Implement MIPS compiler for \" + s.getOp() + \"!\");\n }\n\n sb.append(built);\n }", "private Node newInstrumentationNode(NodeTraversal traversal, Node node, String fnName) {\n\n String type = \"Type.FUNCTION\";\n\n String encodedParam = parameterMapping.getEncodedParam(traversal.getSourceName(), fnName, type);\n\n Node innerProp = IR.getprop(IR.name(MODULE_RENAMING), IR.string(INSTRUMENT_CODE_INSTANCE));\n Node outerProp = IR.getprop(innerProp, IR.string(INSTRUMENT_CODE_FUNCTION_NAME));\n Node functionCall = IR.call(outerProp, IR.string(encodedParam), IR.number(node.getLineno()));\n Node exprNode = IR.exprResult(functionCall);\n\n return exprNode.useSourceInfoIfMissingFromForTree(node);\n }", "public abstract void inferirSituacao(HermesInterpreterTO to);", "public static void main(String[] args) {\n CharStream stream;\n if(args.length == 1){\n try {\n stream = new ANTLRFileStream(args[0]);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler o ficheiro \\\"\" + args[0] + \"\\\".\");\n e.printStackTrace();\n return;\n }\n } else{\n try {\n stream = new ANTLRInputStream(System.in);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler do stdin.\");\n e.printStackTrace();\n return;\n }\n }\n\n System.out.println(stream.toString());\n\n LissLexer lexer = new LissLexer(stream);\n TokenStream token = new CommonTokenStream(lexer);\n LissParser parser = new LissParser(token);\n\n //create identifier table\n SymbolTable idT = new SymbolTable();\n ErrorTable e = new ErrorTable();\n Mips m = new Mips();\n parser.liss(idT, e, m);\n\n System.out.println(idT.toString());\n\n /*long total_memory = Runtime.getRuntime().totalMemory(); // Total available now (bytes)\n long free_memory = Runtime.getRuntime().freeMemory(); // Free memory now (bytes)\n long max_memory = Runtime.getRuntime().maxMemory(); // (bytes)\n long mb= (2^20);\n\n System.out.println(\"TOTAL_MEMORY: \"+total_memory +\" B\");\n System.out.println(\"FREE_MEMORY: \"+(free_memory)+\" B\");\n System.out.println(\"MAX_MEMORY: \"+(max_memory)+\" B\\n\");\n\n System.out.println(\"TOTAL_MEMORY: \"+total_memory/mb +\" MB\");\n System.out.println(\"FREE_MEMORY: \"+(free_memory/mb)+\" MB\");\n System.out.println(\"MAX_MEMORY: \"+(max_memory/mb)+\" MB\");*/\n\n }", "public String translate(Program p)\r\n\t{\r\n\t\tString headers= \"#include \\\"lcpl_runtime.h\\\" \\n\";\r\n\t\t\r\n\t\t/* static data : strings used in the program */\r\n\t\tString stringConstants;\r\n\t\t_GlobalStringRuntime gsr = new _GlobalStringRuntime();\r\n\t\tgsr.searchProgramForStrings(p);\r\n\t\tstringConstants = gsr.getStringCode();\r\n\t\t\r\n\t\t/* object layouts: pointer to RTTI followed by attributes */\r\n\t\tString objectLayouts;\r\n\t\t_Object_Layout ol = new _Object_Layout();\r\n\t\tol.generateObjectLayoutCode(p);\r\n\t\tobjectLayouts =ol.getObjLayoutCode();\r\n\t\t\r\n\t\t/* static data : class names, as strings */\r\n\t\tString classNames;\r\n\t\t_ClassName cn = new _ClassName();\r\n\t\tcn.generateClassNames(p);\r\n\t\tclassNames = cn.getClassNameCode();\r\n\t\t\r\n\t\t/* constructors */\r\n\t\tString constructorDeclarations;\r\n\t\t_ConstructDeclarations cd = new _ConstructDeclarations();\r\n\t\tcd.generateConstructDecl(p);\r\n\t\tconstructorDeclarations = cd.getConstructDeclCode();\r\n\t\t\r\n\t\t/* declaration of methods */\r\n\t\tString methodDeclarations;\r\n\t\t_MethodDeclarations md = new _MethodDeclarations();\r\n\t\tmd.generateMethodDeclCode(p);\r\n\t\tmethodDeclarations = md.getMethodDeclCode();\r\n\t\t\r\n\t\t/* runtime type information (RTTI) - class name, class size, parent class, vtable */\r\n\t\tString vtables;\r\n\t\t_RTTI_Layout rtti = new _RTTI_Layout();\r\n\t\trtti.generateLayoutCode(p);\r\n\t\tvtables = rtti.getLayoutCode();\r\n\t\t\r\n\t\t/* definitions of methods in the program, including constructors */\r\n\t\tString constructors;\r\n\t\t//\"void Main_init(struct TMain *self){ IO_init((struct TIO*)self); } \\n\";\r\n\t\t_ClassInit ci = new _ClassInit(rtti.vt, gsr.getLiterals());\r\n\t\tci.generateMethodsCode(p, rtti.getSortedClassesList());\r\n\t\tconstructors = ci.getInitMethodsCode();\r\n\t\t\r\n\t\tString startup= \"void startup(void) { struct TMain *main=__lcpl_new(&RMain); M4_Main_main(main); } \\n\";\r\n\t\tSystem.out.println(headers+stringConstants+objectLayouts+classNames+constructorDeclarations+methodDeclarations+vtables+constructors+startup);\r\n\t\t//System.out.println(stringConstants);\r\n\t\t/*\r\n\t\tSystem.out.println(\"=======headers========\");\r\n\t\tSystem.out.println(headers);\r\n\t\tSystem.out.println(\"=======stringConstanf========\");\r\n\t\tSystem.out.println(stringConstants);\r\n\t\tSystem.out.println(\"=======objectLayou========\");\r\n\t\tSystem.out.println(objectLayouts);\r\n\t\tSystem.out.println(\"=======classnames========\");\r\n\t\tSystem.out.println(classNames);\r\n\t\tSystem.out.println(\"=======constructDecl========\");\r\n\t\tSystem.out.println(constructorDeclarations);\r\n\t\tSystem.out.println(\"=======methodDecl========\");\r\n\t\tSystem.out.println(methodDeclarations);\r\n\t\tSystem.out.println(\"=======vtables========\");\r\n\t\tSystem.out.println(vtables);\r\n\t\tSystem.out.println(\"=======constructors========\");\r\n\t\tSystem.out.println(constructors);\r\n\t\tSystem.out.println(\"=======startup========\");\r\n\t\tSystem.out.println(startup);*/\r\n\t\treturn headers+stringConstants+objectLayouts+classNames+constructorDeclarations+methodDeclarations+vtables+constructors+startup;\r\n\t\t\r\n\t}", "@Override\n\tpublic String toMips(Scope symbolTable, String indent) {\n\t\t//first set up labels\n\t\tmakeLabels(\"\", symbolTable);\n\n\t\t//init builder\n\t\tStringBuilder build = new StringBuilder(indent).append(\"#ProgramNode\\n\");\n\n\t\t//data section, error messages\t//TODO add globals here\n\t\tbuild.append(indent).append(\".data\\n\");\n\t\tbuild.append(indent).append(Constant.ARRAY_OUT_OF_BOUNDS_MSG_LABEL).append(\": .asciiz \\\"You may not access an index in an array out of it's range.\\\\nPrepare to die.\\\"\\n\");\n\n\t\t//text section\n\t\tbuild.append(indent).append(\".text\\n\");\n\n\t\t//main function start\n\t\tbuild.append(indent).append(\"main:\\n\");\n\n\t\t//add in global variables:\n\t\tbuild.append(globalVariables.toMips(symbolTable, indent + '\\t'));\n\n\t\t//add in main function\n\t\tbuild.append(main.toMips(symbolTable, indent + '\\t'));\n\n\t\t//load end of program\n\t\tbuild.append(indent).append(\"li $v0, 10\\n\");\n\t\tbuild.append(indent).append(\"syscall\\n\");\n\n\t\t//put in functions\n\t\tbuild.append(functions.toMips(symbolTable, indent + '\\t'));\n\n\t\t//error messages\n\t\tbuild.append(indent).append(\"#ERRORs\\n\");\n\t\tbuild.append(indent).append(Constant.ARRAY_OUT_OF_BOUNDS_LABEL).append(\":\\n\");\n\t\tbuild.append(indent).append(\"la $a0, \").append(Constant.ARRAY_OUT_OF_BOUNDS_MSG_LABEL).append(\"\\n\");\n\t\tbuild.append(indent).append(\"li $v0, 4\\n\");\n\t\tbuild.append(indent).append(\"syscall\\n\");\n\t\tbuild.append(indent).append(\"li $v0, 17\\n\");\n\t\tbuild.append(indent).append(\"li $a0, \").append(Constant.ARRAY_OUT_OF_BOUNDS_ERROR_CODE).append(\"\\n\");\n\t\tbuild.append(indent).append(\"syscall\\n\");\n\n\t\t//then return\n\t\treturn build.toString();\n\t}", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\t// Scanner scanner = new Scanner(System.in);\r\n\t\t\t//Grammar grammar = new Grammar(\"(i * i) * (i + i) - i\");\r\n\t\t\tGrammar grammar = new Grammar(\"i + i * i\");\r\n\t\t\tgrammar.addTerminal(\"SYMBOL\", TokenType.ID, \"i\");\r\n\t\t\tgrammar.addTerminal(\"PLUS\", TokenType.OPERATOR, OperatorType.PLUS);\r\n\t\t\tgrammar.addTerminal(\"MINUS\", TokenType.OPERATOR, OperatorType.MINUS);\r\n\t\t\tgrammar.addTerminal(\"TIMES\", TokenType.OPERATOR, OperatorType.TIMES);\r\n\t\t\tgrammar.addTerminal(\"DIVIDE\", TokenType.OPERATOR,\r\n\t\t\t\t\tOperatorType.DIVIDE);\r\n\t\t\tgrammar.addTerminal(\"LPA\", TokenType.OPERATOR, OperatorType.LPARAN);\r\n\t\t\tgrammar.addTerminal(\"RPA\", TokenType.OPERATOR, OperatorType.RPARAN);\r\n\t\t\tgrammar.setEpsilonName(\"epsilon\");\r\n\t\t\tString[] nons = new String[] {\r\n\t\t\t\t\t\"E\", \"E1\", \"T\", \"T1\", \"F\", \"A\", \"M\"\r\n\t\t\t};\r\n\t\t\tfor (String non : nons){\r\n\t\t\t\tgrammar.addNonTerminal(non);\r\n\t\t\t}\r\n\t\t\tgrammar.infer(\"E -> T E1\");\r\n\t\t\tgrammar.infer(\"E1 -> A T E1 | @epsilon\");\r\n\t\t\tgrammar.infer(\"T -> F T1\");\r\n\t\t\tgrammar.infer(\"T1 -> M F T1 | @epsilon\");\r\n\t\t\tgrammar.infer(\"F -> @LPA E @RPA | @SYMBOL\");\r\n\t\t\tgrammar.infer(\"A -> @PLUS | @MINUS\");\r\n\t\t\tgrammar.infer(\"M -> @TIMES | @DIVIDE\");\r\n\t\t\tgrammar.initialize(\"E\");\r\n\t\t\tSystem.out.println(grammar.toString());\r\n\t\t\tSystem.out.println(grammar.getPredictionString());\r\n\t\t\tgrammar.run();\r\n\t\t\tSystem.out.println(grammar.getTokenString());\r\n\t\t\t// scanner.close();\r\n\t\t} catch (RegexException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SyntaxException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage() + \" \"\r\n\t\t\t\t\t+ e.getInfo());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (GrammarException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage() + \" \"\r\n\t\t\t\t\t+ e.getInfo());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private String node(String name) { return prefix + \"AST\" + name + \"Node\"; }", "public void testTypeASTMapper() {\n MyTAST tast = MyTAST.parameterization(0,\n MyTAST.arrayOf(1,\n MyTAST.arrayOf(2,\n MyTAST.parameterization(3,\n new MyTAST(4)\n )\n )\n ),\n MyTAST.parameterization(5,\n new MyTAST(6),\n MyTAST.arrayOf(7,\n new MyTAST(8)),\n new MyTAST(9),\n new MyTAST(10)\n )\n );\n\n // Pretend myField represents a field of the type represented by tast\n // We have to do this because clients are no longer allowed to create\n // AElements directly; instead, they must vivify.\n ATypeElement<SimpleAnnotation> myAField =\n new AScene<SimpleAnnotation>(SimpleAnnotationFactory.saf)\n .classes.vivify(\"someclass\").fields.vivify(\"somefield\");\n // load it with annotations we can check against IDs\n myAField.tlAnnotationsHere.add(makeTLIdAnno(0));\n assignId(myAField, 1, 0, 0);\n assignId(myAField, 2, 0, 1);\n assignId(myAField, 3, 0);\n assignId(myAField, 4, 0, 0, 0);\n assignId(myAField, 5, 1);\n assignId(myAField, 6, 1, 0);\n assignId(myAField, 7, 1, 1, 0);\n assignId(myAField, 8, 1, 1);\n assignId(myAField, 9, 1, 2);\n // to test vivification, we don't assign 10\n \n // now visit and make sure the ID numbers match up\n MyTASTMapper mapper = new MyTASTMapper();\n mapper.traverse(tast, myAField);\n \n for (int i = 0; i < 11; i++)\n assertTrue(mapper.saw[i]);\n // make sure it vivified #10 and our annotation stuck\n AElement<SimpleAnnotation> e10 = myAField.innerTypes.get(\n new InnerTypeLocation(Arrays.asList(1, 3)));\n assertNotNull(e10);\n int e10aid = (Integer) e10.lookupAnnotation(\"IdAnno\")\n .getFieldValue(\"id\");\n assertEquals(e10aid, 10);\n }", "public ProgramInfo(Node program) throws XPathExpressionException, FileNotFoundException\n\t{\n\t\tXPathFactory factory = XPathFactory.newInstance();\n\t\tXPath xpath = factory.newXPath();\n\t\t\n\t\tNode n = (Node)xpath.evaluate(\"name\", program, XPathConstants.NODE);\n\t\tname = n.getTextContent();\n\t\t\n\t\tn = (Node)xpath.evaluate(\"classpath\", program, XPathConstants.NODE);\n\t\tif (n != null)\n\t\t\tclasspath = n.getTextContent();\n\n\t\tn = (Node)xpath.evaluate(\"securityPolicyFile\", program, XPathConstants.NODE);\n\t\tif (n != null)\n\t\t{\n\t\t\tsecurityPolicyFile = n.getTextContent();\n\t\t\tFile spf = new File(securityPolicyFile);\n\t\t\tif (!spf.exists())\n\t\t\t{\n\t\t\t\tthrow new FileNotFoundException(\"Security policy file \" + securityPolicyFile + \" does not exist\");\n\t\t\t}\n\t\t}\n\n\t\tNodeList nl = (NodeList)xpath.evaluate(\"class\", program, XPathConstants.NODESET);\n\t\tclasses = new AssignmentClasses[nl.getLength()];\n\t\tfor (int i = 0; i < nl.getLength(); i++)\n\t\t{\n\t\t\tString className = nl.item(i).getTextContent();\n\t\t\tNode showClassAttribute = nl.item(i).getAttributes().getNamedItem(\"showClass\");\n\t\t\tboolean showClass = false;\n\t\t\tif (showClassAttribute != null)\n\t\t\t{\n\t\t\t\tshowClass = showClassAttribute.getTextContent().equalsIgnoreCase(\"yes\");\n\t\t\t}\n\t\t\tclasses[i] = new AssignmentClasses(className, showClass);\n\t\t}\n\n\t\t// Get list of files to copy into place, if any.\n\t\tnl = (NodeList)xpath.evaluate(\"copyFile\", program, XPathConstants.NODESET);\n\t\tfilesToCopy = new CopyFile[nl.getLength()];\n\t\tfor (int i = 0; i < nl.getLength(); i++)\n\t\t{\n\t\t\tString srcPath = (String)xpath.evaluate(\"srcPath\", nl.item(i), XPathConstants.STRING);\n\t\t\tString destBase = (String)xpath.evaluate(\"destBase\", nl.item(i), XPathConstants.STRING);\n\t\t\tif (srcPath != null && destBase != null)\n\t\t\t{\n\t\t\t\tFile srcPathFile = new File(srcPath);\n\t\t\t\tif (!srcPathFile.exists())\n\t\t\t\t{\n\t\t\t\t\tthrow new FileNotFoundException(\"copyFile/srcPath \" + srcPath + \" does not exist\");\n\t\t\t\t}\n\t\t\t\tfilesToCopy[i] = new CopyFile(srcPathFile, destBase);\n\t\t\t}\n\t\t}\n\n\t\tnl = (NodeList)xpath.evaluate(\"runConfiguration\", program, XPathConstants.NODESET);\n\t\trunConfigurations = new RunConfiguration[nl.getLength()];\n\t\tfor (int i = 0; i < nl.getLength(); i++)\n\t\t{\n\t\t\trunConfigurations[i] = new RunConfiguration(nl.item(i));\n\t\t}\n\t}", "public Program program() {\n\n if (lexer.token != Symbol.PROGRAM) {\n error.signal(\"Missing PROGRAM keyword\");\n }\n\n lexer.nextToken();\n\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Missing PROGRAM identifier\");\n }\n\n Ident id = new Ident(lexer.getStringValue());\n\n lexer.nextToken();\n\n if (lexer.token != Symbol.BEGIN) {\n error.signal(\"Missing BEGIN keyword to PROGRAM\");\n }\n\n lexer.nextToken();\n\n ProgramBody pgm = pgm_body(); \n \n if (lexer.token != Symbol.END) {\n error.signal(\"Missing END keyword to PROGRAM\");\n }\n\n if(symbolTable.getFunction(\"main\") == null)\n error.show(\"The program must have a main function\");\n \n lexer.nextToken();\n\n return new Program(id, pgm);\n }", "@Override ASTRunif parse_impl(Exec E) {\n AST ary = E.parse();\n // parse the seed\n _seed = (long) E.parse().treeWalk(new Env(new HashSet<Key>())).popDbl();\n E.eatEnd(); // eat the ending ')'\n ASTRunif res = (ASTRunif) clone();\n res._asts = new AST[]{ary};\n return res;\n }", "private ParseTree parse(String testProgram, String parseOption) {\n CharStream input = new ANTLRInputStream(testProgram);\n Lexer lexer = new LanguageLexer(input);\n TokenStream tokens = new CommonTokenStream(lexer);\n LanguageParser parser = new LanguageParser(tokens);\n\n ParseTree result = null;\n if(parseOption.equals(\"program\")) {\n result = parser.program();\n } else if (parseOption.equals(\"stat\")) {\n result = parser.stat();\n } else { // Parse Expression.\n result = parser.expr();\n }\n\n return result;\n }", "AstToLejosJavaVisitor(String programName, EV3BrickConfiguration brickConfiguration, Set<EV3Sensors> usedSensors, int indentation) {\n this.programName = programName;\n this.brickConfiguration = brickConfiguration;\n this.indentation = indentation;\n this.usedSensors = usedSensors;\n }", "public final ANTLRv3Parser.rewrite_tree_return rewrite_tree() throws RecognitionException {\r\n ANTLRv3Parser.rewrite_tree_return retval = new ANTLRv3Parser.rewrite_tree_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token string_literal171=null;\r\n Token char_literal174=null;\r\n ANTLRv3Parser.rewrite_tree_atom_return rewrite_tree_atom172 =null;\r\n\r\n ANTLRv3Parser.rewrite_tree_element_return rewrite_tree_element173 =null;\r\n\r\n\r\n CommonTree string_literal171_tree=null;\r\n CommonTree char_literal174_tree=null;\r\n RewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\r\n RewriteRuleTokenStream stream_TREE_BEGIN=new RewriteRuleTokenStream(adaptor,\"token TREE_BEGIN\");\r\n RewriteRuleSubtreeStream stream_rewrite_tree_element=new RewriteRuleSubtreeStream(adaptor,\"rule rewrite_tree_element\");\r\n RewriteRuleSubtreeStream stream_rewrite_tree_atom=new RewriteRuleSubtreeStream(adaptor,\"rule rewrite_tree_atom\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:409:2: ( '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' -> ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:409:4: '^(' rewrite_tree_atom ( rewrite_tree_element )* ')'\r\n {\r\n string_literal171=(Token)match(input,TREE_BEGIN,FOLLOW_TREE_BEGIN_in_rewrite_tree2972); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_TREE_BEGIN.add(string_literal171);\r\n\r\n\r\n pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree2974);\r\n rewrite_tree_atom172=rewrite_tree_atom();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_rewrite_tree_atom.add(rewrite_tree_atom172.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:409:27: ( rewrite_tree_element )*\r\n loop79:\r\n do {\r\n int alt79=2;\r\n int LA79_0 = input.LA(1);\r\n\r\n if ( (LA79_0==ACTION||LA79_0==CHAR_LITERAL||LA79_0==RULE_REF||LA79_0==STRING_LITERAL||(LA79_0 >= TOKEN_REF && LA79_0 <= TREE_BEGIN)||(LA79_0 >= 67 && LA79_0 <= 68)) ) {\r\n alt79=1;\r\n }\r\n\r\n\r\n switch (alt79) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:409:27: rewrite_tree_element\r\n \t {\r\n \t pushFollow(FOLLOW_rewrite_tree_element_in_rewrite_tree2976);\r\n \t rewrite_tree_element173=rewrite_tree_element();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_rewrite_tree_element.add(rewrite_tree_element173.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop79;\r\n }\r\n } while (true);\r\n\r\n\r\n char_literal174=(Token)match(input,69,FOLLOW_69_in_rewrite_tree2979); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_69.add(char_literal174);\r\n\r\n\r\n // AST REWRITE\r\n // elements: rewrite_tree_element, rewrite_tree_atom\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 410:3: -> ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:410:6: ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(TREE_BEGIN, \"TREE_BEGIN\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_rewrite_tree_atom.nextTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:410:37: ( rewrite_tree_element )*\r\n while ( stream_rewrite_tree_element.hasNext() ) {\r\n adaptor.addChild(root_1, stream_rewrite_tree_element.nextTree());\r\n\r\n }\r\n stream_rewrite_tree_element.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public void rewrite(){\n\t\t//SROEL2DatalogRewriter rewriter = new SROEL2DatalogRewriter();\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\t//Rewriting for global context.\n\t\tRLGlobal2DatalogRewriter globalrewriter = new RLGlobal2DatalogRewriter();\n\t\tdatalogGlobal = globalrewriter.rewrite(inputCKR.getGlobalOntology());\n\t\t//System.out.println(\"Rewriting program for global context complete.\");\n\t\t\n\t\t//Computation of set of contexts and associations to modules\n\t\tcomputeSets(datalogGlobal);\n\t\t//System.out.println(\"Set of contexts and modules associations computed.\");\n\t\t\n\t\t//Computation of local contexts knowledge bases.\n\t\tcomputeLocalKB();\n\t\t\n\t\t//Rewriting for local contexts knowledge bases.\n\t\tRLLocal2DatalogRewriter localrewriter = new RLLocal2DatalogRewriter();\n\t\t\n\t\tdatalogLocal = new LinkedList<DLProgram>();\n\t\tfor (String c : contextsSet) {\n\t\t\t//System.out.println(\"Rewriting program for \" + c.replaceAll(\"\\\"\", \"\"));\n\t\t\tlocalrewriter.setContextID(c.replaceAll(\"\\\"\", \"\"));\n\t\t\tdatalogLocal.add(localrewriter.rewrite(contextsOntologies.get(c)));\n\t\t}\n\t\t\n\t\t//for (OWLOntology o : inputCKR.getLocalOntology()) {\n\t\t//\tlocalrewriter.setLocalID(\"c\");\n\t\t//\t//o.getOWLOntologyManager().addAxioms(o, inputCKR.getGlobalOntology().getAxioms());\n\t\t//\t\n\t\t//\tdatalogLocal.add(localrewriter.rewrite(o));\n\t\t//\t//System.out.println(datalogLocal.getLast().getStatements().size());\n\t\t//}\n\t\t\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\trewritingTime = endTime - startTime;\n\n\t\t//System.out.println(\"Rewriting completed in \" + rewritingTime + \" ms.\");\n\t\t//System.out.println(datalogGlobal.getStatements().size());\n\t\t\n\t\t//Compute CKR Program.\n\t\tdatalogCKR = new DLProgram();\n\t\n\t\tdatalogCKR.addAll(datalogGlobal.getStatements());\n\t\tfor (DLProgram dlProgram : datalogLocal) {\n\t\t\tdatalogCKR.addAll(dlProgram.getStatements());\t\n\t\t}\n\t\t//Add local inference rules.\n\t\tdatalogCKR.addAll(DeductionRuleset.getPloc());\n\t\t//Add local propagation rules.\n\t\tdatalogCKR.addAll(DeductionRuleset.getPd());\n\t\t\n\t\t//StringReader reader = new StringReader(\"hasModule(X,Y) :- triple(X, \\\"hasModule\\\", Y, \\\"g\\\").\");\n\t\t//DLProgramParser dlProgramParser = new DLProgramParser(reader);\n\t\t//try {\n\t\t//\tdatalogCKR.addAll(dlProgramParser.program().getStatements());\n\t\t//} catch (ParseException e) {\n\t\t//\te.printStackTrace();\n\t\t//}\n\t}", "public static void printProg(ParseTree parseTree)\r\n {\r\n if ((parseTree.getNodeType() != TreeNode.NodeType.PROG))\r\n throw new AssertionError(\"Node must be an PROG\");\r\n\r\n System.out.print(\"program \\n\");\r\n indentLevel += 1;\r\n parseTree.moveToChild(0);\r\n printDeclSeq(parseTree);\r\n parseTree.moveToParent();\r\n\r\n indent();\r\n System.out.print(\"begin\\n\");\r\n indentLevel += 1;\r\n\r\n parseTree.moveToChild(1);\r\n printStmtSeq(parseTree);\r\n parseTree.moveToParent();\r\n\r\n indentLevel -= 1;\r\n indent();\r\n System.out.print(\"end\\n\");\r\n }", "public Tree<String> parse(Tree<State> tree) {\n\t\tTree<String> parsed = null;\n\t\ttry { // do NOT expect it to crash\n\t\t\tviterbiParse(tree);\n\t\t\tparsed = StateTreeList.stateTreeToStringTree(tree, Inferencer.grammar.numberer);\n\t\t\tparsed = Inferencer.extractBestMaxRuleParse(chart, parsed.getYield());\n\t\t} catch (Exception e) {\n\t\t\tparsed = new Tree<String>(Inferencer.DUMMY_TAG);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn parsed;\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 237,\n FQN=\"llvm::Module::getContext\", NM=\"_ZNK4llvm6Module10getContextEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module10getContextEv\")\n //</editor-fold>\n public LLVMContext /*&*/ getContext() /*const*/ {\n return Context;\n }", "public final AliaChecker.program_return program() throws RecognitionException {\n\t\tAliaChecker.program_return retval = new AliaChecker.program_return();\n\t\tretval.start = input.LT(1);\n\n\t\tCommonTree root_0 = null;\n\n\t\tCommonTree _first_0 = null;\n\t\tCommonTree _last = null;\n\n\n\t\tTreeRuleReturnScope statement1 =null;\n\n\t\tRewriteRuleSubtreeStream stream_statement=new RewriteRuleSubtreeStream(adaptor,\"rule statement\");\n\n\t\ttry {\n\t\t\t// src\\\\alia\\\\AliaChecker.g:36:5: ( ( statement )+ -> LOCALSIZE[getLocalSize()] ( statement )+ )\n\t\t\t// src\\\\alia\\\\AliaChecker.g:36:9: ( statement )+\n\t\t\t{\n\t\t\t symTab.openScope(); \n\t\t\t// src\\\\alia\\\\AliaChecker.g:37:6: ( statement )+\n\t\t\tint cnt1=0;\n\t\t\tloop1:\n\t\t\twhile (true) {\n\t\t\t\tint alt1=2;\n\t\t\t\tint LA1_0 = input.LA(1);\n\t\t\t\tif ( ((LA1_0 >= AND && LA1_0 <= BECOMES)||(LA1_0 >= CHAR_EXPR && LA1_0 <= COLON)||(LA1_0 >= COMPOUND && LA1_0 <= CONST)||LA1_0==DIV||LA1_0==EQ||LA1_0==FALSE||(LA1_0 >= GE && LA1_0 <= GT)||(LA1_0 >= IDENTIFIER && LA1_0 <= IF)||LA1_0==LE||(LA1_0 >= LT && LA1_0 <= MOD)||(LA1_0 >= NOT && LA1_0 <= PRINT)||LA1_0==READ||(LA1_0 >= TIMES && LA1_0 <= TRUE)||LA1_0==WHILE) ) {\n\t\t\t\t\talt1=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt1) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:37:7: statement\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_statement_in_program160);\n\t\t\t\t\tstatement1=statement();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_statement.add(statement1.getTree());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tif ( cnt1 >= 1 ) break loop1;\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(1, input);\n\t\t\t\t\tthrow eee;\n\t\t\t\t}\n\t\t\t\tcnt1++;\n\t\t\t}\n\n\t\t\t symTab.closeScope(); \n\t\t\t// AST REWRITE\n\t\t\t// elements: statement\n\t\t\t// token labels: \n\t\t\t// rule labels: retval\n\t\t\t// token list labels: \n\t\t\t// rule list labels: \n\t\t\t// wildcard labels: \n\t\t\tretval.tree = root_0;\n\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t// 39:6: -> LOCALSIZE[getLocalSize()] ( statement )+\n\t\t\t{\n\t\t\t\tadaptor.addChild(root_0, (CommonTree)adaptor.create(LOCALSIZE, getLocalSize()));\n\t\t\t\tif ( !(stream_statement.hasNext()) ) {\n\t\t\t\t\tthrow new RewriteEarlyExitException();\n\t\t\t\t}\n\t\t\t\twhile ( stream_statement.hasNext() ) {\n\t\t\t\t\tadaptor.addChild(root_0, stream_statement.nextTree());\n\t\t\t\t}\n\t\t\t\tstream_statement.reset();\n\n\t\t\t}\n\n\n\t\t\tretval.tree = root_0;\n\n\t\t\t}\n\n\t\t\tretval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\n\t\t}\n\t\t \n\t\t catch (RecognitionException e) { \n\t\t \tif(!e.getMessage().equals(\"\")) {\n\t\t\t\t\tSystem.err.println(\"Exception!:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow (new AliaException(\"\"));\n\t\t } \n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public RelNode genScriptPlan(\n HiveParserASTNode trfm, HiveParserQB qb, List<RexNode> operands, RelNode input)\n throws SemanticException {\n boolean isAllRexRef = operands.stream().allMatch(node -> node instanceof RexInputRef);\n int[] transformFieldIndices;\n if (!isAllRexRef) {\n input =\n LogicalProject.create(\n input, Collections.emptyList(), operands, (List<String>) null);\n transformFieldIndices = IntStream.range(0, operands.size()).toArray();\n HiveParserRowResolver rowResolver = new HiveParserRowResolver();\n // record the column info for the project node\n for (int i = 0; i < operands.size(); i++) {\n ColumnInfo oColInfo =\n new ColumnInfo(\n getColumnInternalName(i),\n HiveParserTypeConverter.convert(operands.get(i).getType()),\n null,\n false);\n rowResolver.put(null, getColumnInternalName(i), oColInfo);\n }\n relToRowResolver.put(input, rowResolver);\n } else {\n transformFieldIndices =\n operands.stream()\n .flatMapToInt(node -> IntStream.of(((RexInputRef) node).getIndex()))\n .toArray();\n }\n\n ArrayList<ColumnInfo> inputSchema = relToRowResolver.get(input).getColumnInfos();\n\n // If there is no \"AS\" clause, the output schema will be \"key,value\"\n ArrayList<ColumnInfo> outputCols = new ArrayList<>();\n int inputSerDeNum = 1, inputRecordWriterNum = 2;\n int outputSerDeNum = 4, outputRecordReaderNum = 5;\n int outputColsNum = 6;\n boolean outputColNames = false, outputColSchemas = false;\n int execPos = 3;\n boolean defaultOutputCols = false;\n\n // Go over all the children\n if (trfm.getChildCount() > outputColsNum) {\n HiveParserASTNode outCols = (HiveParserASTNode) trfm.getChild(outputColsNum);\n if (outCols.getType() == HiveASTParser.TOK_ALIASLIST) {\n outputColNames = true;\n } else if (outCols.getType() == HiveASTParser.TOK_TABCOLLIST) {\n outputColSchemas = true;\n }\n }\n\n // If column type is not specified, use a string\n if (!outputColNames && !outputColSchemas) {\n // output schema will be \"key, value\"\n String[] outputAlias = new String[] {\"key\", \"value\"};\n for (int i = 0; i < outputAlias.length; i++) {\n String intName = getColumnInternalName(i);\n ColumnInfo colInfo =\n new ColumnInfo(intName, TypeInfoFactory.stringTypeInfo, null, false);\n colInfo.setAlias(outputAlias[i]);\n outputCols.add(colInfo);\n }\n defaultOutputCols = true;\n } else {\n // column name or type is specified\n HiveParserASTNode collist = (HiveParserASTNode) trfm.getChild(outputColsNum);\n int ccount = collist.getChildCount();\n Set<String> colAliasNamesDuplicateCheck = new HashSet<>();\n for (int i = 0; i < ccount; i++) {\n ColumnInfo colInfo =\n getColumnInfoInScriptTransform(\n (HiveParserASTNode) collist.getChild(i),\n outputColSchemas,\n i,\n colAliasNamesDuplicateCheck);\n outputCols.add(colInfo);\n }\n }\n\n // input schema info\n StringBuilder inpColumns = new StringBuilder();\n StringBuilder inpColumnTypes = new StringBuilder();\n for (int i = 0; i < transformFieldIndices.length; i++) {\n if (i != 0) {\n inpColumns.append(\",\");\n inpColumnTypes.append(\",\");\n }\n inpColumns.append(inputSchema.get(transformFieldIndices[i]).getInternalName());\n inpColumnTypes.append(\n inputSchema.get(transformFieldIndices[i]).getType().getTypeName());\n }\n\n // output schema info\n StringBuilder outColumns = new StringBuilder();\n StringBuilder outColumnTypes = new StringBuilder();\n List<RelDataType> outDataTypes = new ArrayList<>();\n List<String> outColNames = new ArrayList<>();\n HiveParserRowResolver scriptRR = new HiveParserRowResolver();\n RelDataTypeFactory dtFactory = cluster.getRexBuilder().getTypeFactory();\n for (int i = 0; i < outputCols.size(); i++) {\n if (i != 0) {\n outColumns.append(\",\");\n outColumnTypes.append(\",\");\n }\n\n outColumns.append(outputCols.get(i).getInternalName());\n outColumnTypes.append(outputCols.get(i).getType().getTypeName());\n\n scriptRR.put(\n qb.getParseInfo().getAlias(), outputCols.get(i).getAlias(), outputCols.get(i));\n\n outDataTypes.add(HiveParserUtils.toRelDataType(outputCols.get(i).getType(), dtFactory));\n outColNames.add(outputCols.get(i).getInternalName());\n }\n\n String serdeName = LazySimpleSerDe.class.getName();\n int fieldSeparator = Utilities.tabCode;\n if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVESCRIPTESCAPE)) {\n fieldSeparator = Utilities.ctrlaCode;\n }\n\n // Input and Output Serdes\n HiveParserBaseSemanticAnalyzer.SerDeClassProps inSerDeClassProps;\n if (trfm.getChild(inputSerDeNum).getChildCount() > 0) {\n // use user specified serialize class and properties\n HiveParserASTNode inputSerDeNode = (HiveParserASTNode) trfm.getChild(inputSerDeNum);\n inSerDeClassProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.analyzeSerDeInfo(\n (HiveParserASTNode) inputSerDeNode.getChild(0),\n inpColumns.toString(),\n inpColumnTypes.toString(),\n false);\n } else {\n // use default serialize class and properties\n Map<String, String> inSerdeProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.getDefaultSerDeProps(\n serdeName,\n String.valueOf(fieldSeparator),\n inpColumns.toString(),\n inpColumnTypes.toString(),\n false,\n true);\n inSerDeClassProps =\n new HiveParserBaseSemanticAnalyzer.SerDeClassProps(serdeName, inSerdeProps);\n }\n HiveParserBaseSemanticAnalyzer.SerDeClassProps outSerDeClassProps;\n if (trfm.getChild(outputSerDeNum).getChildCount() > 0) {\n // use user specified deserialize class and properties\n HiveParserASTNode outSerDeNode = (HiveParserASTNode) trfm.getChild(outputSerDeNum);\n outSerDeClassProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.analyzeSerDeInfo(\n (HiveParserASTNode) outSerDeNode.getChild(0),\n outColumns.toString(),\n outColumnTypes.toString(),\n false);\n } else {\n // use default deserialize class and properties\n Map<String, String> outSerdeProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.getDefaultSerDeProps(\n serdeName,\n String.valueOf(fieldSeparator),\n outColumns.toString(),\n outColumnTypes.toString(),\n defaultOutputCols,\n true);\n outSerDeClassProps =\n new HiveParserBaseSemanticAnalyzer.SerDeClassProps(serdeName, outSerdeProps);\n }\n\n // script input record writer\n Tree recordWriterASTNode = trfm.getChild(inputRecordWriterNum);\n String inRecordWriter =\n recordWriterASTNode.getChildCount() == 0\n ? TextRecordWriter.class.getName()\n : unescapeSQLString(recordWriterASTNode.getChild(0).getText());\n\n // script output record readers\n Tree recordReaderASTNode = trfm.getChild(outputRecordReaderNum);\n String outRecordReader =\n recordReaderASTNode.getChildCount() == 0\n ? TextRecordReader.class.getName()\n : unescapeSQLString(recordReaderASTNode.getChild(0).getText());\n\n RelDataType rowDataType = dtFactory.createStructType(outDataTypes, outColNames);\n\n String script = unescapeSQLString(trfm.getChild(execPos).getText());\n\n ScriptTransformIOInfo inputOutSchema =\n new ScriptTransformIOInfo(\n inSerDeClassProps.getSerdeClassName(),\n inSerDeClassProps.getProperties(),\n outSerDeClassProps.getSerdeClassName(),\n outSerDeClassProps.getProperties(),\n inRecordWriter,\n outRecordReader,\n new JobConfWrapper(new JobConf(hiveConf)));\n\n LogicalScriptTransform scriptTransform =\n LogicalScriptTransform.create(\n input, transformFieldIndices, script, inputOutSchema, rowDataType);\n\n relToHiveColNameCalcitePosMap.put(scriptTransform, buildHiveToCalciteColumnMap(scriptRR));\n relToRowResolver.put(scriptTransform, scriptRR);\n\n // todo\n // Add URI entity for transform script. script assumed t be local unless downloadable\n return scriptTransform;\n }", "public final ANTLRv3Parser.rewrite_tree_atom_return rewrite_tree_atom() throws RecognitionException {\r\n ANTLRv3Parser.rewrite_tree_atom_return retval = new ANTLRv3Parser.rewrite_tree_atom_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token d=null;\r\n Token CHAR_LITERAL162=null;\r\n Token TOKEN_REF163=null;\r\n Token ARG_ACTION164=null;\r\n Token RULE_REF165=null;\r\n Token STRING_LITERAL166=null;\r\n Token ACTION168=null;\r\n ANTLRv3Parser.id_return id167 =null;\r\n\r\n\r\n CommonTree d_tree=null;\r\n CommonTree CHAR_LITERAL162_tree=null;\r\n CommonTree TOKEN_REF163_tree=null;\r\n CommonTree ARG_ACTION164_tree=null;\r\n CommonTree RULE_REF165_tree=null;\r\n CommonTree STRING_LITERAL166_tree=null;\r\n CommonTree ACTION168_tree=null;\r\n RewriteRuleTokenStream stream_67=new RewriteRuleTokenStream(adaptor,\"token 67\");\r\n RewriteRuleTokenStream stream_TOKEN_REF=new RewriteRuleTokenStream(adaptor,\"token TOKEN_REF\");\r\n RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,\"token ARG_ACTION\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:389:5: ( CHAR_LITERAL | TOKEN_REF ( ARG_ACTION )? -> ^( TOKEN_REF ( ARG_ACTION )? ) | RULE_REF | STRING_LITERAL |d= '$' id -> LABEL[$d,$id.text] | ACTION )\r\n int alt78=6;\r\n switch ( input.LA(1) ) {\r\n case CHAR_LITERAL:\r\n {\r\n alt78=1;\r\n }\r\n break;\r\n case TOKEN_REF:\r\n {\r\n alt78=2;\r\n }\r\n break;\r\n case RULE_REF:\r\n {\r\n alt78=3;\r\n }\r\n break;\r\n case STRING_LITERAL:\r\n {\r\n alt78=4;\r\n }\r\n break;\r\n case 67:\r\n {\r\n alt78=5;\r\n }\r\n break;\r\n case ACTION:\r\n {\r\n alt78=6;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 78, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt78) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:389:9: CHAR_LITERAL\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n CHAR_LITERAL162=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_rewrite_tree_atom2870); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n CHAR_LITERAL162_tree = \r\n (CommonTree)adaptor.create(CHAR_LITERAL162)\r\n ;\r\n adaptor.addChild(root_0, CHAR_LITERAL162_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:6: TOKEN_REF ( ARG_ACTION )?\r\n {\r\n TOKEN_REF163=(Token)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_rewrite_tree_atom2877); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_TOKEN_REF.add(TOKEN_REF163);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:16: ( ARG_ACTION )?\r\n int alt77=2;\r\n int LA77_0 = input.LA(1);\r\n\r\n if ( (LA77_0==ARG_ACTION) ) {\r\n alt77=1;\r\n }\r\n switch (alt77) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:16: ARG_ACTION\r\n {\r\n ARG_ACTION164=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rewrite_tree_atom2879); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(ARG_ACTION164);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: ARG_ACTION, TOKEN_REF\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 390:28: -> ^( TOKEN_REF ( ARG_ACTION )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:31: ^( TOKEN_REF ( ARG_ACTION )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_TOKEN_REF.nextNode()\r\n , root_1);\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:43: ( ARG_ACTION )?\r\n if ( stream_ARG_ACTION.hasNext() ) {\r\n adaptor.addChild(root_1, \r\n stream_ARG_ACTION.nextNode()\r\n );\r\n\r\n }\r\n stream_ARG_ACTION.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n break;\r\n case 3 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:391:9: RULE_REF\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n RULE_REF165=(Token)match(input,RULE_REF,FOLLOW_RULE_REF_in_rewrite_tree_atom2900); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n RULE_REF165_tree = \r\n (CommonTree)adaptor.create(RULE_REF165)\r\n ;\r\n adaptor.addChild(root_0, RULE_REF165_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 4 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:392:6: STRING_LITERAL\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n STRING_LITERAL166=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2907); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n STRING_LITERAL166_tree = \r\n (CommonTree)adaptor.create(STRING_LITERAL166)\r\n ;\r\n adaptor.addChild(root_0, STRING_LITERAL166_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 5 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:393:6: d= '$' id\r\n {\r\n d=(Token)match(input,67,FOLLOW_67_in_rewrite_tree_atom2916); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_67.add(d);\r\n\r\n\r\n pushFollow(FOLLOW_id_in_rewrite_tree_atom2918);\r\n id167=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id167.getTree());\r\n\r\n // AST REWRITE\r\n // elements: \r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 393:15: -> LABEL[$d,$id.text]\r\n {\r\n adaptor.addChild(root_0, \r\n (CommonTree)adaptor.create(LABEL, d, (id167!=null?input.toString(id167.start,id167.stop):null))\r\n );\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n break;\r\n case 6 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:394:4: ACTION\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n ACTION168=(Token)match(input,ACTION,FOLLOW_ACTION_in_rewrite_tree_atom2929); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n ACTION168_tree = \r\n (CommonTree)adaptor.create(ACTION168)\r\n ;\r\n adaptor.addChild(root_0, ACTION168_tree);\r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "private void executeBinaryExpression(Tree tree) {\n ProgramState.Pop unstackBinary = programState.unstackValue(2);\n programState = unstackBinary.state;\n SymbolicValue symbolicValue = constraintManager.createSymbolicValue(tree);\n symbolicValue.computedFrom(unstackBinary.values);\n programState = programState.stackValue(symbolicValue);\n }", "@Override\n\tprotected String toMips(Scope symbolTable, String indent) {\n\t\tStringBuilder build = new StringBuilder(indent).append(\"#SubProgramHeadNode\\n\");\n\n\t\t//load ptr to previous stack's head to pick up values\n\t\tbuild.append(indent).append(\"lw $t0, 8($sp)\\n\");\n\t\tbuild.append(indent).append(\"lw $t0, ($t0)\\n\");\n\n\t\t//iterate across arguments\n\t\tfor (int i = 0; i < arguments.length; i++) {\n\t\t\tbuild.append(indent).append(\"lw $t1, \").append((i + 1) * 4).append(\"($t0)\\t#get loaded value from stack\\n\");\n\t\t\tbuild.append(indent).append(\"sw $t1, \").append(symbolTable.getMemoryOffset(arguments[i])).append(\"($sp)\\t#save word in correct spot (hopefully?)\\n\");\t//This is done in SubProgramNode constructor\n\t\t}\n\n\t\treturn build.toString();\n\t}", "public static void main(String[] args) throws IOException {\n InputStream is = ClassLoader.getSystemResourceAsStream(\"graph.gr\");\n \n //Loading the DSL script into the ANTLR stream.\n CharStream cs = new ANTLRInputStream(is);\n \n // generate lexer from input stream from dsl statements.\n GraphLexer lexer = new GraphLexer(cs);\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n \n // generate parser tree from lexer tokens stream.\n GraphParser parser = new GraphParser(tokens);\n \n //Semantic model to be populated\n Graph g = new Graph();\n GraphDslListener dslRuleListener = new GraphDslListener(g, parser);\n \n //Adding the listener to facilitate walking through parse tree. \n parser.addParseListener(dslRuleListener);\n \n //invoking the parser. \n parser.graph();\n \n Graph.printGraph(g);\n }", "static public void main(String argv[]) {\n for (String s : argv) {\n if (s.equals(\"-a\")) {\n SHOW_TREE = true;\n }\n else if (s.equals(\"-s\")) {\n SHOW_SYM_TABLES = true;\n }\n else if (s.equals(\"-c\")) {\n GENERATE_CODE = true;\n }\n //Check if the string ends with '.cm'\n else if (s.length() > 3 && s.substring(s.length()-3).equals(\".cm\")) { \n // If it does, make that the input file\n INPUT_FILE = s;\n }\n }\n\n if (INPUT_FILE == null) {\n System.out.println(\"No input file provided or incorrect file extension (must be .cm). Exiting...\");\n System.exit(-1);\n }\n\n // Retrieve the actual file name from between the path and the extension\n // E.g. tests/sort.cm gives a result of 'sort'\n int nameStartIndex = INPUT_FILE.lastIndexOf('/');\n int nameEndIndex = INPUT_FILE.lastIndexOf('.');\n FILE_NAME = INPUT_FILE.substring(nameStartIndex + 1, nameEndIndex);\n \n /* Start the parser */\n try {\n // Save original stdout to switch back to it as needed\n PrintStream console = System.out;\n\n if (!SHOW_SYM_TABLES && !SHOW_TREE && !GENERATE_CODE) {\n System.out.println(\"Showing errors only.\");\n System.out.println(\"Use [-a] flag to print the abstract syntax tree\" + \"\\n\" \n + \"Use [-s] flag to print the symbol table\" + \"\\n\"\n + \"Use [-c] to generate assembly code (.tm)\"); \n } \n\n parser p = new parser(new Lexer(new FileReader(INPUT_FILE)));\n // implement \"-a\", \"-s\", \"-c\" options\n Absyn result = (Absyn)(p.parse().value); \n \n if (result != null) {\n \n // If the '-a' flag is set, print the abstract syntax tree to a .abs file\n if (SHOW_TREE) {\n System.out.println(\"Abstract syntax tree written to '\" + FILE_NAME + \".abs'\");\n\n //Redirect stdout\n File absFile = new File(FILE_NAME + \".abs\");\n FileOutputStream absFos = new FileOutputStream(absFile);\n PrintStream absPS = new PrintStream(absFos);\n System.setOut(absPS);\n\n // Print abstract syntax tree to FILE_NAME.abs in current directory\n ShowTreeVisitor visitor = new ShowTreeVisitor();\n result.accept(visitor, 0, false); \n\n //Reset stdout\n System.setOut(console);\n }\n if (SHOW_SYM_TABLES) {\n //Redirect stdout to a .sym file \n File symFile = new File(FILE_NAME + \".sym\");\n FileOutputStream symFos = new FileOutputStream(symFile);\n PrintStream symPS = new PrintStream(symFos);\n System.setOut(symPS);\n } \n else {\n //Toss stdout output into the void while doing semantic analysis\n System.setOut(new PrintStream(OutputStream.nullOutputStream()));\n } \n\n // Perform semantic analysis\n SemanticAnalyzer analyzerVisitor = new SemanticAnalyzer();\n result.accept(analyzerVisitor, 0, false);\n\n //Restore stdout\n System.setOut(console);\n\n if (SHOW_SYM_TABLES) {\n //Print after having reported any errors\n System.out.println(\"Symbol table written to '\" + FILE_NAME + \".sym'\");\n }\n\n //Only generate code if the flag is set\n if (GENERATE_CODE) {\n\n //First, confirm that there are no syntax or semantic errors\n //HAS_ERRORS is true if there are any syntax errors or semantic errors, and false if both are error free\n HAS_ERRORS = (p.errorFound || analyzerVisitor.errorFound);\n\n if (HAS_ERRORS) {\n System.out.println(\"Cannot generate code while there are errors. Exiting...\");\n }\n else {\n //No syntax or semantic errors, proceed with code generation\n System.out.println(\"Assembly code written to '\" + FILE_NAME + \".tm'\");\n\n //Redirect stdout to .tm file\n File tmFile = new File(FILE_NAME + \".tm\");\n FileOutputStream tmFos = new FileOutputStream(tmFile);\n PrintStream tmPS = new PrintStream(tmFos);\n System.setOut(tmPS);\n\n //Perform code generation\n CodeGenerator generatorVisitor = new CodeGenerator();\n //result.accept(generatorVisitor, 0, false);\n generatorVisitor.visit(result, FILE_NAME + \".tm\");\n \n } \n }\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Could not find file '\" + INPUT_FILE + \"'. Check your spelling, and ensure it exists. Exiting...\");\n System.exit(-1); \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }", "public List<AssertionFailure> go() throws IOException,\r\n RecognitionException, CheckerExpception, InterruptedException,\r\n SMTSolverTimeoutException, UnknownResultException {\n Program p = SimpleCParserUtil.createAST(inputFile);\r\n\r\n // Add blocks to make things simpler\r\n // E.g. if(c) stmt; becomes if(c) {stmt;} else {}\r\n p = (Program) new MakeBlockVisitor().visit(p);\r\n\r\n // Do basic checks\r\n // E.g. Variables declared before use\r\n // no duplicate local variables\r\n Checker checker = new Checker();\r\n boolean success = checker.check(p);\r\n if (!success) {\r\n throw new CheckerExpception(checker.getCheckerError());\r\n }\r\n\r\n // Checks whether abstract loop abstraction is turned on\r\n if (clArgs.abstractLoops) {\r\n p = (Program) new LoopAbstractionVisitor().visit(p);\r\n } else {\r\n p = (Program) new LoopUnwinderVisitor(clArgs.unwindingAssertions,\r\n clArgs.unwindDepth).visit(p);\r\n }\r\n\r\n // Carries out predication on the program\r\n p = (Program) new PredicationVisitor().visit(p);\r\n\r\n // Carries out ssa renaming on the program\r\n p = (Program) new SSAVisitor().visit(p);\r\n\r\n // Output the program as text after being transformed (for debugging)\r\n // Comment the code below to hide the output\r\n String programText = new PrinterVisitor().visit(p);\r\n System.out.println(programText);\r\n\r\n // Collect the constraint expressions and variable names\r\n CollectConstraintsVisitor collectConstraintsVisitor = new CollectConstraintsVisitor();\r\n collectConstraintsVisitor.visit(p);\r\n\r\n // Stores the assertion failures\r\n List<AssertionFailure> assertionFailures = new ArrayList<AssertionFailure>();\r\n\r\n // Stop here if there are no assertions (properties) to check\r\n if (collectConstraintsVisitor.propertyExprs.size() == 0) {\r\n System.out.println(\"No asserts! Stopping.\");\r\n return assertionFailures;\r\n }\r\n\r\n // Convert constraints to SMTLIB string\r\n SMTLIBConverter converter = new SMTLIBConverter(collectConstraintsVisitor.variableNames,\r\n collectConstraintsVisitor.transitionExprs, collectConstraintsVisitor.propertyExprs);\r\n String smtQuery = converter.getQuery();\r\n\r\n // Submit query to SMT solver\r\n SMTQuery query = new SMTQuery(smtQuery, clArgs.timeout * 1000);\r\n String queryResult = query.go();\r\n if (queryResult == null) {\r\n throw new SMTSolverTimeoutException(\"Timeout!\");\r\n }\r\n System.out.println(\"--SMT COMPLETE--\");\r\n\r\n // Report the assertions that can be violated\r\n handleAssertionFailures(assertionFailures, collectConstraintsVisitor, queryResult);\r\n\r\n return assertionFailures;\r\n }", "@Override\n public CodeFragment visitStatements(AlangParser.StatementsContext ctx) {\n /* add library functions */\n Function f1 = new Function(\"citajcislo\", Types.LLVMCISLO);\n Function f2 = new Function(\"vypiscislo\", Types.LLVMVOID);\n f2.addArgumentLLVMType(Types.LLVMCISLO);\n Function f3 = new Function(\"vypiscisloln\", Types.LLVMVOID);\n f3.addArgumentLLVMType(Types.LLVMCISLO);\n Function f4 = new Function(\"citajznak\", Types.LLVMZNAK);\n Function f5 = new Function(\"vypisznak\", Types.LLVMVOID);\n f5.addArgumentLLVMType(Types.LLVMZNAK);\n Function f6 = new Function(\"vypisznakln\", Types.LLVMVOID);\n f6.addArgumentLLVMType(Types.LLVMZNAK);\n\n this.functions.put(\"citajcislo\", f1);\n this.functions.put(\"vypiscislo\", f2);\n this.functions.put(\"vypiscisloln\", f3);\n this.functions.put(\"citajznak\", f4);\n this.functions.put(\"vypisznak\", f5);\n this.functions.put(\"vypisznakln\", f6);\n\n ST template = this.group.getInstanceOf(\"statements\");\n\n int n = ctx.statement().size();\n for (int i = 0; i < n; i++) {\n CodeFragment statCodeFragment = visit(ctx.statement(i));\n String code = statCodeFragment.toString();\n if (!code.equals(\"\"))\n template.add(\"code\", code);\n }\n template.add(\"globals\", this.generateGlobalVariables());\n\n /* generate global strings */\n for (int i = 0; i < this.globalStrings.size(); i++) {\n template.add(\"globals\", this.globalStrings.get(i) + \"\\n\");\n }\n\n /* MAIN function errors */\n if (!this.functions.containsKey(\"MAIN\")) {\n this.addError(\"MAIN function not found\");\n return new CodeFragment(\"\");\n } else if (this.functions.get(\"MAIN\").args.size() != 0) {\n this.addError(\"MAIN function cannot take arguments\");\n return new CodeFragment(\"\");\n }\n\n return new CodeFragment(template.render());\n }", "public interface Backend {\n\n\t/**\n\t * The predefined size of a program's working memory array.\n\t */\n\tpublic int MEM_SIZE = 9001;\n\n\t/**\n\t * Performs code generation for the AST specified.\n\t * \n\t * @param root of AST\n\t */\n\tpublic void work(RootNode root) throws Exception;\n}", "public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }", "public void toGrammar() {\n System.out.println(\"<binary_expression> -> <arithmeitc_expression> <arithmetic_op> <arithmetic_expression>\");\n left.toGrammar();\n operator.toGrammar();\n right.toGrammar();\n prefix();\n }" ]
[ "0.6482662", "0.6102592", "0.60817695", "0.60712785", "0.58736026", "0.5791096", "0.5557203", "0.55508393", "0.5482783", "0.54262114", "0.5407695", "0.5396229", "0.53498197", "0.5308729", "0.52960944", "0.52756625", "0.5245263", "0.52404374", "0.5240072", "0.52129567", "0.5207649", "0.51823556", "0.51726145", "0.5151571", "0.51258755", "0.51258755", "0.51258755", "0.5120141", "0.5116875", "0.51004714", "0.5066453", "0.50488144", "0.50404173", "0.50401956", "0.5026721", "0.49936357", "0.495735", "0.494968", "0.49329236", "0.49268642", "0.49038166", "0.48996544", "0.48924696", "0.48828697", "0.48652765", "0.48444942", "0.48427314", "0.48238283", "0.481291", "0.4810185", "0.47846544", "0.47688422", "0.47548398", "0.47518885", "0.47376102", "0.47223553", "0.47188744", "0.46811053", "0.46788713", "0.46719265", "0.46663743", "0.465742", "0.46551958", "0.4637172", "0.46236694", "0.45881844", "0.45860004", "0.4581214", "0.45781744", "0.45776084", "0.45691583", "0.45521098", "0.4535688", "0.4525714", "0.45224574", "0.45173153", "0.45039853", "0.45038807", "0.44990203", "0.44976398", "0.44958803", "0.4486935", "0.44775945", "0.44708464", "0.44608784", "0.44589728", "0.44461226", "0.44370788", "0.44361573", "0.4435805", "0.443457", "0.442486", "0.44216657", "0.44030428", "0.43922934", "0.43902948", "0.43883732", "0.43826464", "0.4365753", "0.43641582" ]
0.6512757
0
Convert a compoundstatement AST to IR tree
public static void statements(CommonTree ast, IRTree irt) { Token t = ast.getToken(); int tt = t.getType(); if (tt == BEGIN) { int n = ast.getChildCount(); if (n == 0) { irt.setOp("NOOP"); } else { CommonTree ast1 = (CommonTree)ast.getChild(0); statements1(ast, 0, n-1, irt); } } else { error(tt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Statement build(LinkedListTree ast) {\n\t\tswitch (ast.getType()) {\n\t\t\tcase AS3Parser.BLOCK:\n\t\t\t\treturn new ASTStatementList(ast);\n\t\t\tcase AS3Parser.DO:\n\t\t\t\treturn new ASTASDoWhileStatement(ast);\n\t\t\tcase AS3Parser.EXPR_STMNT:\n\t\t\t\treturn new ASTASExpressionStatement(ast);\n\t\t\tcase AS3Parser.FOR_EACH:\n\t\t\t\treturn new ASTASForEachInStatement(ast);\n\t\t\tcase AS3Parser.FOR_IN:\n\t\t\t\treturn new ASTASForInStatement(ast);\n\t\t\tcase AS3Parser.FOR:\n\t\t\t\treturn new ASTASForStatement(ast);\n\t\t\tcase AS3Parser.IF:\n\t\t\t\treturn new ASTASIfStatement(ast);\n\t\t\tcase AS3Parser.SWITCH:\n\t\t\t\treturn new ASTASSwitchStatement(ast);\n\t\t\tcase AS3Parser.CONST:\n\t\t\tcase AS3Parser.VAR:\n\t\t\t\treturn new ASTASDeclarationStatement(ast);\n\t\t\tcase AS3Parser.WHILE:\n\t\t\t\treturn new ASTASWhileStatement(ast);\n\t\t\tcase AS3Parser.WITH:\n\t\t\t\treturn new ASTASWithStatement(ast);\n\t\t\tcase AS3Parser.RETURN:\n\t\t\t\treturn new ASTASReturnStatement(ast);\n\t\t\tcase AS3Parser.SUPER:\n\t\t\t\treturn new ASTASSuperStatement(ast);\n\t\t\tcase AS3Parser.BREAK:\n\t\t\t\treturn new ASTASBreakStatement(ast);\n\t\t\tcase AS3Parser.TRY:\n\t\t\t\treturn new ASTASTryStatement(ast);\n\t\t\tcase AS3Parser.DEFAULT_XML_NAMESPACE:\n\t\t\t\treturn new ASTASDefaultXMLNamespaceStatement(ast);\n\t\t\tcase AS3Parser.CONTINUE:\n\t\t\t\treturn new ASTASContinueStatement(ast);\n\t\t\tcase AS3Parser.THROW:\n\t\t\t\treturn new ASTASThrowStatement(ast);\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(\"Unsupported statement node type: \"+ASTUtils.tokenName(ast)+\" in \"+ActionScriptFactory.str(ASTUtils.stringifyNode(ast)));\n\t\t}\n\t}", "CompoundStatement createCompoundStatement();", "public String toStringAST()\r\n/* 75: */ {\r\n/* 76: 94 */ StringBuilder s = new StringBuilder();\r\n/* 77: */ \r\n/* 78: 96 */ s.append('{');\r\n/* 79: 97 */ int count = getChildCount();\r\n/* 80: 98 */ for (int c = 0; c < count; c++)\r\n/* 81: */ {\r\n/* 82: 99 */ if (c > 0) {\r\n/* 83:100 */ s.append(',');\r\n/* 84: */ }\r\n/* 85:102 */ s.append(getChild(c).toStringAST());\r\n/* 86: */ }\r\n/* 87:104 */ s.append('}');\r\n/* 88:105 */ return s.toString();\r\n/* 89: */ }", "public static void parseAST(Node astNode) {\n\n int childrenNum = astNode.getChildCount();\n for (int i = 0; i < childrenNum; i++) {\n Node child = astNode.getChild(i);\n String astNodeType = child.getClass().getName();\n\n if (astNodeType.contains(\"Text\")) {\n if (child.getValue().contains(\"\\n\")) {\n lineNum++;\n }\n }\n if (astNodeType.contains(\"Element\")) {\n String localName = ((Element) child).getLocalName();\n if (localName.equals(\"decl_stmt\")) {\n String type = ((Element) child).getChildElements().get(0).getChildElements(\"type\", \"http://www.sdml.info/srcML/src\").get(0).getValue();\n String name = ((Element) child).getChildElements().get(0).getChildElements(\"name\", \"http://www.sdml.info/srcML/src\").get(0).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (localName.equals(\"function_decl\")) {\n String type = ((Element) child).getChildElements().get(0).getValue();\n String name = ((Element) child).getChildElements().get(1).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (localName.equals(\"function\")) {\n String type = ((Element) child).getChildElements().get(0).getValue();\n String name = ((Element) child).getChildElements().get(1).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(child);\n } else if (localName.equals(\"block\")) {\n parseAST(child);\n } else if (localName.equals(\"expr_stmt\")) {\n Element exprChild = ((Element) ((Element) child).getChildElements().get(0).getChild(0));\n String exprType = exprChild.getLocalName();\n if (exprType.equals(\"name\")) {\n String name = exprChild.getValue();\n String type = \"\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (exprType.equals(\"call\")) {\n String name = exprChild.getChild(0).getValue();\n String type = \"call\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(exprChild);\n }\n } else if (localName.equals(\"call\")) {\n String name = child.getChild(0).getValue();\n String type = \"call\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(child);\n } else if (localName.equals(\"argument\")) {\n Element c = ((Element) ((Element) child).getChildElements().get(0).getChild(0));\n if (c.getLocalName().equals(\"name\")) {\n String name = c.getValue();\n String type = \"\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else {\n parseAST(child);\n }\n\n\n } else if (!entity.getTerminal().contains(localName)) {\n parseAST(child);\n }\n\n }\n }\n\n }", "public static void statement(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == WRITELN)\n {\n String a = String.valueOf(Memory.allocateString(\"\\n\"));\n irt.setOp(\"WRS\");\n irt.addSub(new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(a))));\n }\n else if (tt == WRITE)\n {\n ast1 = (CommonTree)ast.getChild(0);\n String type = arg(ast1, irt1);\n if (type.equals(\"real\")) {\n irt.setOp(\"WRR\");\n irt.addSub(irt1);\n }\n else {\n irt.setOp(\"WRS\");\n irt.addSub(irt1);\n }\n }\n else if(tt == ASSIGN)\n {\n //try deailng with assign here\n irt.setOp(\"ASSIGN\");\n IRTree iHold = new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(String.valueOf(Memory.allocateReal(ast.getChild(0).getText())))));\n System.out.println(\"var name = \" + ast.getChild(0).getText());\n irt.addSub(iHold);\n expression((CommonTree)ast.getChild(1), irt1);\n irt.addSub(irt1);\n }\n else if(tt == MEM)\n {\n System.out.println(\"GOT MEM TYPE\");\n }\n else {\n error(tt);\n }\n }", "public final PythonParser.compound_stmt_return compound_stmt() throws RecognitionException {\n PythonParser.compound_stmt_return retval = new PythonParser.compound_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n PythonParser.if_stmt_return if_stmt129 = null;\n\n PythonParser.while_stmt_return while_stmt130 = null;\n\n PythonParser.for_stmt_return for_stmt131 = null;\n\n PythonParser.try_stmt_return try_stmt132 = null;\n\n PythonParser.with_stmt_return with_stmt133 = null;\n\n PythonParser.funcdef_return funcdef134 = null;\n\n PythonParser.classdef_return classdef135 = null;\n\n\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:876:5: ( if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | ( ( decorators )? DEF )=> funcdef | classdef )\n int alt63=7;\n int LA63_0 = input.LA(1);\n\n if ( (LA63_0==IF) ) {\n alt63=1;\n }\n else if ( (LA63_0==WHILE) ) {\n alt63=2;\n }\n else if ( (LA63_0==FOR) ) {\n alt63=3;\n }\n else if ( (LA63_0==TRY) ) {\n alt63=4;\n }\n else if ( (LA63_0==WITH) ) {\n alt63=5;\n }\n else if ( (LA63_0==AT) ) {\n int LA63_6 = input.LA(2);\n\n if ( (synpred6_Python()) ) {\n alt63=6;\n }\n else if ( (true) ) {\n alt63=7;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 63, 6, input);\n\n throw nvae;\n }\n }\n else if ( (LA63_0==DEF) && (synpred6_Python())) {\n alt63=6;\n }\n else if ( (LA63_0==CLASS) ) {\n alt63=7;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 63, 0, input);\n\n throw nvae;\n }\n switch (alt63) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:876:7: if_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_if_stmt_in_compound_stmt3414);\n if_stmt129=if_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, if_stmt129.getTree());\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:877:7: while_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_while_stmt_in_compound_stmt3422);\n while_stmt130=while_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, while_stmt130.getTree());\n\n }\n break;\n case 3 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:878:7: for_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_for_stmt_in_compound_stmt3430);\n for_stmt131=for_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, for_stmt131.getTree());\n\n }\n break;\n case 4 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:879:7: try_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_try_stmt_in_compound_stmt3438);\n try_stmt132=try_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, try_stmt132.getTree());\n\n }\n break;\n case 5 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:880:7: with_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_with_stmt_in_compound_stmt3446);\n with_stmt133=with_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, with_stmt133.getTree());\n\n }\n break;\n case 6 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:881:7: ( ( decorators )? DEF )=> funcdef\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_funcdef_in_compound_stmt3463);\n funcdef134=funcdef();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, funcdef134.getTree());\n\n }\n break;\n case 7 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:882:7: classdef\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_classdef_in_compound_stmt3471);\n classdef135=classdef();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, classdef135.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "private Stmt compoundStmt() {\n if (lexer.token == Symbol.IF) {\n return iftStmt();\n } else if (lexer.token == Symbol.WHILE) {\n return whileStmt();\n }\n return forStmt();\n }", "public interface Expression {\n \n enum ExpressivoGrammar {ROOT, SUM, PRODUCT, TOKEN, PRIMITIVE_1, PRIMITIVE_2, \n NUMBER, INT, DECIMAL, WHITESPACE, VARIABLE};\n \n public static Expression buildAST(ParseTree<ExpressivoGrammar> concreteSymbolTree) {\n \n if (concreteSymbolTree.getName() == ExpressivoGrammar.DECIMAL) {\n /* reached a double terminal */\n return new Num(Double.parseDouble(concreteSymbolTree.getContents())); \n }\n\n else if (concreteSymbolTree.getName() == ExpressivoGrammar.INT) {\n /* reached an int terminal */\n return new Num(Integer.parseInt(concreteSymbolTree.getContents()));\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.VARIABLE) {\n /* reached a terminal */\n return new Var(concreteSymbolTree.getContents());\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.ROOT || \n concreteSymbolTree.getName() == ExpressivoGrammar.TOKEN || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_1 || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_2 || \n concreteSymbolTree.getName() == ExpressivoGrammar.NUMBER) {\n \n /* non-terminals with only one child */\n for (ParseTree<ExpressivoGrammar> child: concreteSymbolTree.children()) {\n if (child.getName() != ExpressivoGrammar.WHITESPACE) \n return buildAST(child);\n }\n \n // should never reach here\n throw new IllegalArgumentException(\"error in parsing\");\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.SUM || concreteSymbolTree.getName() == ExpressivoGrammar.PRODUCT) {\n /* a sum or product node can have one or more children that need to be accumulated together */\n return accumulator(concreteSymbolTree, concreteSymbolTree.getName()); \n }\n \n else {\n throw new IllegalArgumentException(\"error in input: should never reach here\");\n }\n \n }\n \n /**\n * (1) Create parser using lib6005.parser from grammar file\n * (2) Parse string input into CST\n * (3) Build AST from this CST using buildAST()\n * @param input\n * @return Expression (AST)\n */\n public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }\n \n // helper methods\n public static Expression accumulator(ParseTree<ExpressivoGrammar> tree, ExpressivoGrammar grammarObj) {\n Expression expr = null;\n boolean first = true;\n List<ParseTree<ExpressivoGrammar>> children = tree.children();\n int len = children.size();\n for (int i = len-1; i >= 0; i--) {\n /* the first child */\n ParseTree<ExpressivoGrammar> child = children.get(i);\n if (first) {\n expr = buildAST(child);\n first = false;\n }\n \n /* accumulate this by creating a new binaryOp object with\n * expr as the leftOp and the result as rightOp\n **/\n \n else if (child.getName() == ExpressivoGrammar.WHITESPACE) continue;\n else {\n if (grammarObj == ExpressivoGrammar.SUM)\n expr = new Sum(buildAST(child), expr);\n else\n expr = new Product(buildAST(child), expr);\n }\n }\n \n return expr;\n \n }\n \n // ----------------- problems 3-4 -----------------\n \n public static Expression create(Expression leftExpr, Expression rightExpr, char op) {\n if (op == '+')\n return Sum.createSum(leftExpr, rightExpr);\n else\n return Product.createProduct(leftExpr, rightExpr);\n }\n\n public Expression differentiate(Var x);\n \n public Expression simplify(Map<String, Double> env);\n\n}", "public interface AST {\n \n /**\n * Returns the label or tag for this AST node.\n */\n public int getNodeLabel ();\n \n /**\n * Returns the textual value of this AST node.\n */\n public String getNodeValue ();\n \n /**\n * Returns a list of child nodes, or null if there are no child nodes. The value returned is a shallow copy\n * which can be manipulated by the caller.\n */\n public List<AST> getChildNodes ();\n \n /**\n * Returns the position of the node in the original source(s).\n */\n public CodePosition getCodePosition ();\n \n}", "public static void expression(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == REALNUM) {\n constant(ast, irt1);\n irt.setOp(\"CONST\");\n irt.addSub(irt1);\n }\n else if(tt == PLUS || tt == MINUS || tt == TIMES || tt == DIVIDE)\n {\n //do something\n irt.setOp(\"BINOP\");\n IRTree irt2 = new IRTree();\n expression((CommonTree)ast.getChild(0), irt1);\n expression((CommonTree)ast.getChild(1), irt2);\n\tif(tt == PLUS)\n \t\t irt.addSub(new IRTree(\"+\")); \n\telse if(tt == MINUS)\n\t\tirt.addSub(new IRTree(\"-\"));\n\telse if(tt == TIMES)\n\t\tirt.addSub(new IRTree(\"*\"));\n\telse if(tt == DIVIDE)\n\t\tirt.addSub(new IRTree(\"/\"));\n irt.addSub(irt1);\n irt.addSub(irt2);\n }\n else\n\tSystem.out.println(\"unrecognised type \" + tt);\n }", "ASTBinOp parse_impl(Exec E) {\n AST l = E.parse();\n AST r = E.parse();\n E.eatEnd(); // eat ending ')'\n ASTBinOp res = (ASTBinOp) clone();\n res._asts = new AST[]{l,r};\n return res;\n }", "public final PythonParser.stmt_return stmt() throws RecognitionException {\n PythonParser.stmt_return retval = new PythonParser.stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n PythonParser.simple_stmt_return simple_stmt56 = null;\n\n PythonParser.compound_stmt_return compound_stmt57 = null;\n\n\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:546:5: ( simple_stmt | compound_stmt )\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( (LA26_0==NAME||(LA26_0>=ASSERT && LA26_0<=BREAK)||LA26_0==CONTINUE||LA26_0==DELETE||LA26_0==EXEC||LA26_0==FROM||LA26_0==GLOBAL||LA26_0==IMPORT||(LA26_0>=LAMBDA && LA26_0<=NOT)||(LA26_0>=PASS && LA26_0<=RETURN)||LA26_0==YIELD||LA26_0==LPAREN||(LA26_0>=PLUS && LA26_0<=MINUS)||(LA26_0>=TILDE && LA26_0<=LBRACK)||LA26_0==LCURLY||(LA26_0>=BACKQUOTE && LA26_0<=STRING)) ) {\n alt26=1;\n }\n else if ( (LA26_0==CLASS||LA26_0==DEF||LA26_0==FOR||LA26_0==IF||(LA26_0>=TRY && LA26_0<=WITH)||LA26_0==AT) ) {\n alt26=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 26, 0, input);\n\n throw nvae;\n }\n switch (alt26) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:546:7: simple_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_simple_stmt_in_stmt1386);\n simple_stmt56=simple_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, simple_stmt56.getTree());\n if ( state.backtracking==0 ) {\n\n retval.stypes = (simple_stmt56!=null?simple_stmt56.stypes:null);\n \n }\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:550:7: compound_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_compound_stmt_in_stmt1402);\n compound_stmt57=compound_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, compound_stmt57.getTree());\n if ( state.backtracking==0 ) {\n\n retval.stypes = new ArrayList();\n retval.stypes.add((compound_stmt57!=null?((PythonTree)compound_stmt57.tree):null));\n \n }\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public static void program(CommonTree ast, IRTree irt)\n {\n statements(ast, irt);\n }", "void visitCompoundValue(CompoundValue value);", "public String convertStatement (String oraStatement);", "public String convertStatement (String oraStatement);", "void genAst();", "private ParseTree parseStatement() {\n return parseSourceElement();\n }", "public Element compileStatements() throws CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\n\t\tboolean end = false;\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\tElement statementsParent = document.createElement(\"statements\");\n\n\t\tdo {\n\t\t\tif (token.equals(\"let\")) {\n\t\t\t\tele = compileLet();\n\t\t\t} else if (token.equals(\"do\")) {\n\t\t\t\tele = compileDo();\n\t\t\t} else if (token.equals(\"if\")) {\n\t\t\t\tele = compileIf();\n\t\t\t} else if (token.equals(\"while\")) {\n\t\t\t\tele = compileWhile();\n\t\t\t} else if (token.equals(\"return\")) {\n\t\t\t\tele = compileReturn();\n\t\t\t}\n\t\t\tif (ele != null)\n\t\t\t\tstatementsParent.appendChild(ele);\n\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\tif (!token.matches(\"let|if|while|do|return\"))\n\t\t\t\tend = true;\n\t\t} while (!end);\n\n\t\treturn statementsParent;\n\t}", "public ASTNode visitStatement(StatementContext ctx) {\n ASTStmt stmt = (ASTStmt)visit(ctx.stmt());\n return new ASTStmtUnit(ctx, stmt);\n }", "private ParseTree parseStatementStandard() {\n switch (peekType()) {\n case OPEN_CURLY:\n return parseBlock();\n case CONST:\n case VAR:\n return parseVariableStatement();\n case SEMI_COLON:\n return parseEmptyStatement();\n case IF:\n return parseIfStatement();\n case DO:\n return parseDoWhileStatement();\n case WHILE:\n return parseWhileStatement();\n case FOR:\n return parseForStatement();\n case CONTINUE:\n return parseContinueStatement();\n case BREAK:\n return parseBreakStatement();\n case RETURN:\n return parseReturnStatement();\n case WITH:\n return parseWithStatement();\n case SWITCH:\n return parseSwitchStatement();\n case THROW:\n return parseThrowStatement();\n case TRY:\n return parseTryStatement();\n case DEBUGGER:\n return parseDebuggerStatement();\n default:\n if (peekLabelledStatement()) {\n return parseLabelledStatement();\n }\n return parseExpressionStatement();\n }\n }", "protected abstract String assemble(Statement statement);", "public interface Compound extends Clause {}", "public static void imprimirAST(NodoBase raiz){\n\t\t sangria+=2;\n\t\t while (raiz != null) {\n\t\t printSpaces();\n\t\t if (raiz instanceof NodoIf)\n\t\t \tSystem.out.println(\"If\");\n\t\t else if (raiz instanceof NodoRepeat)\n\t\t \tSystem.out.println(\"Repeat\");\n else if (raiz instanceof NodoFor)\n System.out.println(\"For\");\n else if (raiz instanceof NodoDeclaracion)\n System.out.println(\"Declaracion\");\n\t\t else if (raiz instanceof NodoLeer) \n\t\t \tSystem.out.println(\"Lectura: \"+((NodoLeer)raiz).getIdentificador());\n\t\t else if (raiz instanceof NodoEscribir)\n\t\t \tSystem.out.println(\"Escribir\");\n else if (raiz instanceof NodoEstructura)\n System.out.println(\"Estructura\");\n else if (raiz instanceof NodoFuncionRetorna){\n System.out.println(\"Funcion con Retorno\"); }\n else if (raiz instanceof NodoFuncionSinRetorna)\n System.out.println(\"Funcion sin Retorno\");\n else if (raiz instanceof NodoParametro)\n System.out.println(\"Parametro\");\n\t\t else \n if (raiz instanceof NodoAsignacion)\n {\n if(((NodoAsignacion)raiz).getPosicion()!=null) //vector\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador()+\"[\"+((NodoAsignacion)raiz).getPosicion()+\"]\"); \n else\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador());\n }\n else if (raiz instanceof NodoCall)\n {\n if(((NodoCall)raiz).getArgumentos()!=null) //vector\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()); \n else\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()+\"(\"+\")\");\n }\n else if (raiz instanceof NodoOperacion\n\t\t \t\t|| raiz instanceof NodoValor\n\t\t \t\t|| raiz instanceof NodoIdentificador )\n\t\t \timprimirNodo(raiz);\n \n else if (raiz instanceof NodoVariable)\n {\n if(((NodoVariable)raiz).getNumero()!=null)\n System.out.println(((NodoVariable)raiz).getIdentificador()+\"[\"+((NodoVariable)raiz).getNumero()+\"]\");\n else\n System.out.println(((NodoVariable)raiz).getIdentificador());\n }\n\t\t else System.out.println(\"Tipo de nodo desconocido\");\n\t\t \n\t\t \n /* Hago el recorrido recursivo */\n \n if (raiz instanceof NodoEstructura){\n printSpaces();\n System.out.println(\"**Funcion**\");\n imprimirAST(((NodoEstructura)raiz).getFuncion());\n printSpaces();\n System.out.println(\"**Main**\");\n imprimirAST(((NodoEstructura)raiz).getBloque());\n }\n \n if (raiz instanceof NodoFuncionRetorna){\n printSpaces();\n System.out.println(\"**Funcion con Retorno**\");\n imprimirAST(((NodoFuncionRetorna)raiz).getTipo());\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionRetorna)raiz).getSecuencias());\n \n printSpaces();\n System.out.println(\"retorno\");\n imprimirAST(((NodoFuncionRetorna)raiz).getExpresion());\n }\n \n if (raiz instanceof NodoFuncionSinRetorna){\n printSpaces();\n System.out.println(\"**Funcion sin Retorno**\");\n System.out.println(\"VOID\");\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionSinRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionSinRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getSecuencias());\n \n }\n \n if (raiz instanceof NodoParametro){\n printSpaces();\n System.out.println(\"**Parametros**\");\n imprimirAST(((NodoParametro)raiz).getTipo());\n \n System.out.println(\"\\tID, \"+((NodoParametro)raiz).getIdentificador());\n }\n \n if (raiz instanceof NodoCall){\n printSpaces();\n if(((NodoCall)raiz).getArgumentos()!=null)\n System.out.println(\"**argumentos**\");\n imprimirAST(((NodoCall)raiz).getArgumentos());\n }\n \n if (raiz instanceof NodoDeclaracion){\n printSpaces();\n System.out.println(\"**Declaracion**\");\n imprimirAST(((NodoDeclaracion)raiz).getTipo());\n imprimirAST(((NodoDeclaracion)raiz).getLis_asig());\n }\n \n if (raiz instanceof NodoIf){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getPrueba());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Then IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getParteThen());\n\t\t \tif(((NodoIf)raiz).getParteElse()!=null){\n\t\t \t\tprintSpaces();\n\t\t \t\tSystem.out.println(\"**Else IF**\");\n\t\t \t\timprimirAST(((NodoIf)raiz).getParteElse());\n\t\t \t}\n\t\t }\n\t\t else if (raiz instanceof NodoRepeat){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Cuerpo REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getCuerpo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getPrueba());\n\t\t }\n else if (raiz instanceof NodoFor){\n printSpaces();\n System.out.println(\"**Asignacion For**\");\n imprimirAST(((NodoFor)raiz).getAsignacion());\n printSpaces();\n System.out.println(\"**Comprobacion FOR**\");\n imprimirAST(((NodoFor)raiz).getPrueba());\n printSpaces();\n System.out.println(\"**Acumulador FOR**\");\n imprimirAST(((NodoFor)raiz).getAcumulador());\n printSpaces();\n System.out.println(\"**Cuerpo FOR**\");\n imprimirAST(((NodoFor)raiz).getCuerpo());\n \n }\n\t\t else \n \n if (raiz instanceof NodoAsignacion)\n\t\t \timprimirAST(((NodoAsignacion)raiz).getExpresion());\n\t\t else \n \n if (raiz instanceof NodoEscribir)\n\t\t \timprimirAST(((NodoEscribir)raiz).getExpresion());\n\t\t else \n \n \n if (raiz instanceof NodoOperacion){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Izquierda Operacion**\");\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpIzquierdo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Derecha Operacion**\");\t\t \t\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpDerecho());\n\t\t }\n\t\t raiz = raiz.getHermanoDerecha();\n\t\t }\n\t\t sangria-=2;\n\t\t}", "@Test\n void testExample1() {\n List<Token> input = Arrays.asList(\n new Token(Token.Type.IDENTIFIER, \"LET\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \":\", -1),\n new Token(Token.Type.IDENTIFIER, \"INTEGER\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"WHILE\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"!=\", -1),\n new Token(Token.Type.INTEGER, \"10\", -1),\n new Token(Token.Type.IDENTIFIER, \"DO\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"PRINT\", -1),\n new Token(Token.Type.OPERATOR, \"(\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \")\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"+\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"END\", -1)\n );\n Ast.Source expected = new Ast.Source(Arrays.asList(\n new Ast.Statement.Declaration(\"first\", \"INTEGER\",\n Optional.of(new Ast.Expression.Literal(BigInteger.valueOf(1)))),\n new Ast.Statement.While(\n new Ast.Expression.Binary(\"!=\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(10))\n ),\n Arrays.asList(\n new Ast.Statement.Expression(\n new Ast.Expression.Function(\"PRINT\", Arrays.asList(\n new Ast.Expression.Variable(\"first\"))\n )\n ),\n new Ast.Statement.Assignment(\"first\",\n new Ast.Expression.Binary(\"+\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(1))\n )\n )\n )\n )\n ));\n test(input, expected, Parser::parseSource);\n }", "public StatementParse reconstructTree(ArrayList<StatementParse> expression){\n // an empty expression will not trigger this method\n // first element is always an integer\n StatementParse left_node = expression.get(0);\n\n for (int i = 1; i < expression.size(); i++){\n StatementParse right_node = expression.get(i);\n if (right_node instanceof IntegerParse && ((IntegerParse) right_node).getValue() == 0){\n continue;\n }\n StatementParse top;\n if (right_node.isNegative()){\n top = new StatementParse(\"-\");\n } else {\n top = new StatementParse(\"+\");\n }\n top.getChildren().add(left_node);\n top.getChildren().add(right_node);\n left_node = top;\n }\n return left_node;\n }", "private void parseSimpleStatement() {\n Operand operand = parseDesignator();\n\n if (nextToken.kind == Token.ASSIGN) {\n check(Token.ASSIGN);\n if (operand.kind != Operand.KIND_ELEMENT\n && operand.kind != Operand.KIND_FIELD\n && operand.kind != Operand.KIND_LOCAL\n && operand.kind != Operand.KIND_STATIC) {\n error(\"Illegal left-hand side operand in assignment\");\n }\n\n Struct type = parseExpr().type;\n if (!(type.assignableTo(operand.type))) {\n error(\"Incompatible types in assignment\");\n }\n\n code.store(operand);\n } else {\n if (operand.kind != Operand.KIND_METHOD) {\n error(\"Designator isn't a valid method\");\n }\n parseActPars(operand.object);\n\n code.put(Code.OP_CALL);\n code.put2(operand.address);\n if (operand.kind == Operand.KIND_METHOD\n && operand.type != SymbolTable.STRUCT_NONE) {\n code.put(Code.OP_POP);\n }\n }\n check(Token.SEMICOLON);\n }", "@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }", "ForStatement(AST ast) {\n super(ast); }", "private void executeBinaryExpression(Tree tree) {\n ProgramState.Pop unstackBinary = programState.unstackValue(2);\n programState = unstackBinary.state;\n SymbolicValue symbolicValue = constraintManager.createSymbolicValue(tree);\n symbolicValue.computedFrom(unstackBinary.values);\n programState = programState.stackValue(symbolicValue);\n }", "public static CompilationUnit parse(ICompilationUnit unit) {\n\t\t// create a AST of the source code\n\t\tASTParser parser = ASTParser.newParser(AST.JLS4);\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setSource(unit);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\tparser.setStatementsRecovery(true);\n\t\treturn (CompilationUnit) parser.createAST(null);\n\t}", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "private ASTNode buildAST(String contents) throws JavaModelException {\n\t\treturn buildAST(contents, this.workingCopy);\n\t}", "public abstract Statement createRootStatement(CodeLocation codeLoc, List<Annotation> annotations, Statement ... s);", "public static Expr parse(String str) {\r\n\t\tExprBinary at = new ExprBinary(null, null); // the root of the tree\r\n\t\tStringBuilder opstore = new StringBuilder(); // stores operator characters\r\n\t\tStringBuilder adder = new StringBuilder(); // stores value characters\r\n\t\tboolean text = false; // whether inside of a string\r\n\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tboolean add = (c != '\\\\'); // whether to add the char to adder. ignore escape char\r\n\t\t\tboolean leftSide = (opstore.length() == 0); // whether on the left side of the binary expression (before the operator)\r\n\t\t\tString adderStr = adder.toString();\r\n\t\t\tString opStr = opstore.toString();\r\n\r\n\t\t\tif (c == '\"') { // string\r\n\t\t\t\tif (i == 0 || str.charAt(i - 1) != '\\\\') {\r\n\t\t\t\t\ttext = !text; // ignore string contents\r\n\t\t\t\t}\r\n\t\t\t} else if (!text) {\r\n\t\t\t\tif (c == ' ') {\r\n\t\t\t\t\tadd = false; // ignore spaces\r\n\t\t\t\t} else if (c == '(') { // grouping or function\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tString contents = str.substring(i + 1, closeIndex);\r\n\t\t\t\t\tExpr group; // the expression denoted by the parentheses group\r\n\r\n\t\t\t\t\tif (i > 0 && (!isReserved(str.charAt(i - 1)) || str.charAt(i - 1) == ')')) { // function\r\n\t\t\t\t\t\tif (adderStr.isEmpty()) { // function reference call ... func()()\r\n\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(null, contents); // a reference call is only a parameter group, null name\r\n\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t} else { // function call\r\n\t\t\t\t\t\t\tif (adderStr.startsWith(\".\")) { // function sub call ... func().subfunc()\r\n\t\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t\t} else { // standalone function ... func()\r\n\t\t\t\t\t\t\t\tif (Character.toString(adderStr.charAt(0)).equals(Operator.REF.op)) { // @func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprFuncRef(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\t} else { // func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprCall(adderStr, contents);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // parenthetical grouping\r\n\t\t\t\t\t\tchar cc = (adderStr.length() == 1 ? adderStr.charAt(0) : 0); // operator before parenthesis ... !()\r\n\t\t\t\t\t\tif (isReserved(cc)) { // operation on the group\r\n\t\t\t\t\t\t\tgroup = new ExprUnary(Operator.get(Character.toString(cc)), parse(contents));\r\n\t\t\t\t\t\t} else { // ignore character, not an operator\r\n\t\t\t\t\t\t\tgroup = parse(contents);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add to tree\r\n\t\t\t\t\tif (leftSide) at.setLeft(group);\r\n\t\t\t\t\telse at.setRight(group);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (c == '{') { // array initializer ... {}\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tExpr arr = new ExprArray(str.substring(i + 1, closeIndex), adderStr);\r\n\r\n\t\t\t\t\tif (adderStr.length() == 1 && isReserved(adderStr.charAt(0))) {\r\n\t\t\t\t\t\t// unary op done on array initializer ... !{}\r\n\t\t\t\t\t\tarr = new ExprUnary(Operator.get(Character.toString(adderStr.charAt(0))), arr);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (leftSide) at.setLeft(arr);\r\n\t\t\t\t\telse at.setRight(arr);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (isOp(c)) { // operator\r\n\t\t\t\t\t// add value used in operation to tree\r\n\t\t\t\t\tif (!adderStr.isEmpty()) {\r\n\t\t\t\t\t\tif (leftSide) { // ex: adderStr + ___\r\n\t\t\t\t\t\t\tat.setLeft(parseValue(adderStr));\r\n\t\t\t\t\t\t} else { // ex: (___ + adderStr) + ___\r\n\t\t\t\t\t\t\tat.setRight(parseValue(adderStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opStr.equals(\"\") || (i > 0 && isOp(str.charAt(i - 1)))) { // accumulate operator from adjacent operator characters (ex: != consists of ! and =)\r\n\t\t\t\t\t\tif (!(adderStr.isEmpty() && (opStr + c).equals(\"-\")) && (Operator.get(opStr + c) != null || (opStr.isEmpty() && isOp(c)))) {// if the operator exists, then it is an operator character\r\n\t\t\t\t\t\t\tif (opStr.equals(\"-\") && c == '-') { // this and the above line handle negatives and double negatives\r\n\t\t\t\t\t\t\t\topStr = \"+\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topStr += c;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // existing operator operation must be added to tree ... in \"(a + b) * c\", \"(a+b)\" must be abstracted-out so we get \"x * c\"\r\n\t\t\t\t\t\tint endIndex = i + 1; // end index of operator\r\n\r\n\t\t\t\t\t\t// get entire operator if operator is more than 1 character long\r\n\t\t\t\t\t\tfor (int i2 = endIndex; i2 < str.length(); i2++) {\r\n\t\t\t\t\t\t\tif (isOp(str.charAt(i2))) endIndex++;\r\n\t\t\t\t\t\t\telse break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOperator nextOp = Operator.get(str.substring(i, endIndex)); // second (right-most) operator\r\n\t\t\t\t\t\tat.op = Operator.get(opStr); // first (left-most) operator\r\n\r\n\t\t\t\t\t\t// group values in operation by operator precedence\r\n\t\t\t\t\t\tint p1 = precedence(nextOp); // right-most op\r\n\t\t\t\t\t\tint p2 = precedence(at.op); // left-most op\r\n\r\n\t\t\t\t\t\tif (p1 > p2) { // group around the right-most op\r\n\t\t\t\t\t\t\tExprBinary right = new ExprBinary(at, nextOp);\r\n\t\t\t\t\t\t\tright.setLeft(at.right());\r\n\r\n\t\t\t\t\t\t\tat.setRight(right);\r\n\t\t\t\t\t\t\tat = right;\r\n\r\n\t\t\t\t\t\t} else if (p1 < p2) { // group around the left-most op\r\n\t\t\t\t\t\t\tExprBinary last = at;\r\n\t\t\t\t\t\t\tExprBinary match = at.parent();\r\n\r\n\t\t\t\t\t\t\t// correctly add to the binary tree based on precedence of operators\r\n\t\t\t\t\t\t\twhile (match instanceof ExprBinary && p1 < (p2 = precedence(((ExprBinary) match).op))) {\r\n\t\t\t\t\t\t\t\tlast = match;\r\n\t\t\t\t\t\t\t\tmatch = match.parent();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tExprBinary tr = new ExprBinary(match, nextOp);\r\n\t\t\t\t\t\t\ttr.setLeft(last);\r\n\r\n\t\t\t\t\t\t\tif (match != null) {\r\n\t\t\t\t\t\t\t\tif (last == match.right()) match.setRight(tr);\r\n\t\t\t\t\t\t\t\telse match.setLeft(tr);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tat = tr;\r\n\r\n\t\t\t\t\t\t} else { // group from left to right (equal operator precedence)\r\n\t\t\t\t\t\t\tExprBinary left = new ExprBinary(at, at.op); // group existing values into left node, add right to open right node spot\r\n\t\t\t\t\t\t\tleft.setLeft(at.left());\r\n\t\t\t\t\t\t\tleft.setRight(at.right());\r\n\r\n\t\t\t\t\t\t\tat.op = nextOp;\r\n\t\t\t\t\t\t\tat.setLeft(left);\r\n\t\t\t\t\t\t\tat.setRight(null);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\topStr = nextOp.op;\r\n\t\t\t\t\t\ti = endIndex - 1;\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// store valid value characters\r\n\t\t\tif (add) {\r\n\t\t\t\tadder.append(c);\r\n\r\n\t\t\t\t// if this is the last character, then add the stored value to the tree.\r\n\t\t\t\t// otherwise, would be incorrectly ignored because there is no next operator\r\n\t\t\t\tif (i + 1 == str.length()) {\r\n\t\t\t\t\tif (opstore.length() == 0) {\r\n\t\t\t\t\t\tat.setLeft(parseValue(adder.toString()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tat.setRight(parseValue(adder.toString()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// initialize binary tree operator if not done so already\r\n\t\tif (at.op == null) {\r\n\t\t\tat.op = Operator.get(opstore.toString());\r\n\t\t}\r\n\r\n\t\t// after traversing the tree to some point, we need to get back to root so we can return the entire tree\r\n\t\twhile (at.parent() != null) {\r\n\t\t\tat = (ExprBinary) at.parent();\r\n\t\t}\r\n\r\n\t\t// the expression may not actually be a binary operation\r\n\t\tif (at.op == null && at.right() == NULL) {\r\n\t\t\tif (at.left() == NULL) return NULL; // the expression is empty\r\n\t\t\treturn at.left(); // the expression is a single value/unary-operation\r\n\t\t}\r\n\r\n\t\treturn at;\r\n\t}", "@Test\n public void ensureCompileTreeWorksAsIntended() throws Exception {\n String formula = \"#euro{2$+25$}\";\n CommonTree ast = new MonetaryExpressionCompiler().compileTree(formula);\n boolean verdict = ast.toStringTree().equals(\"(euro (+ ($ 2) ($ 25)))\");\n assertEquals(true, verdict);\n }", "public T caseCompoundExpr(CompoundExpr object)\n {\n return null;\n }", "public abstract void parseStatements(\n\t\tParser parser,\n\t\tCompilationUnitDeclaration unit);", "public void flattenASTChangesToString(){\n\t\tthis.codeBlob = getCodeString();\n\t\tthis.compUnit = null;\n\t\tthis.rewriter = null;\n\t}", "@Override\n public CodeFragment visitStatements(AlangParser.StatementsContext ctx) {\n /* add library functions */\n Function f1 = new Function(\"citajcislo\", Types.LLVMCISLO);\n Function f2 = new Function(\"vypiscislo\", Types.LLVMVOID);\n f2.addArgumentLLVMType(Types.LLVMCISLO);\n Function f3 = new Function(\"vypiscisloln\", Types.LLVMVOID);\n f3.addArgumentLLVMType(Types.LLVMCISLO);\n Function f4 = new Function(\"citajznak\", Types.LLVMZNAK);\n Function f5 = new Function(\"vypisznak\", Types.LLVMVOID);\n f5.addArgumentLLVMType(Types.LLVMZNAK);\n Function f6 = new Function(\"vypisznakln\", Types.LLVMVOID);\n f6.addArgumentLLVMType(Types.LLVMZNAK);\n\n this.functions.put(\"citajcislo\", f1);\n this.functions.put(\"vypiscislo\", f2);\n this.functions.put(\"vypiscisloln\", f3);\n this.functions.put(\"citajznak\", f4);\n this.functions.put(\"vypisznak\", f5);\n this.functions.put(\"vypisznakln\", f6);\n\n ST template = this.group.getInstanceOf(\"statements\");\n\n int n = ctx.statement().size();\n for (int i = 0; i < n; i++) {\n CodeFragment statCodeFragment = visit(ctx.statement(i));\n String code = statCodeFragment.toString();\n if (!code.equals(\"\"))\n template.add(\"code\", code);\n }\n template.add(\"globals\", this.generateGlobalVariables());\n\n /* generate global strings */\n for (int i = 0; i < this.globalStrings.size(); i++) {\n template.add(\"globals\", this.globalStrings.get(i) + \"\\n\");\n }\n\n /* MAIN function errors */\n if (!this.functions.containsKey(\"MAIN\")) {\n this.addError(\"MAIN function not found\");\n return new CodeFragment(\"\");\n } else if (this.functions.get(\"MAIN\").args.size() != 0) {\n this.addError(\"MAIN function cannot take arguments\");\n return new CodeFragment(\"\");\n }\n\n return new CodeFragment(template.render());\n }", "public final AstValidator.statement_return statement() throws RecognitionException {\n AstValidator.statement_return retval = new AstValidator.statement_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n AstValidator.general_statement_return general_statement3 =null;\n\n AstValidator.split_statement_return split_statement4 =null;\n\n AstValidator.realias_statement_return realias_statement5 =null;\n\n AstValidator.register_statement_return register_statement6 =null;\n\n AstValidator.assert_statement_return assert_statement7 =null;\n\n\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:116:11: ( general_statement | split_statement | realias_statement | register_statement | assert_statement )\n int alt2=5;\n switch ( input.LA(1) ) {\n case STATEMENT:\n {\n alt2=1;\n }\n break;\n case SPLIT:\n {\n alt2=2;\n }\n break;\n case REALIAS:\n {\n alt2=3;\n }\n break;\n case REGISTER:\n {\n alt2=4;\n }\n break;\n case ASSERT:\n {\n alt2=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 2, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt2) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:116:13: general_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_general_statement_in_statement94);\n general_statement3=general_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, general_statement3.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 2 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:117:13: split_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_split_statement_in_statement108);\n split_statement4=split_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, split_statement4.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 3 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:118:13: realias_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_realias_statement_in_statement122);\n realias_statement5=realias_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, realias_statement5.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 4 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:119:13: register_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_register_statement_in_statement136);\n register_statement6=register_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, register_statement6.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 5 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:120:13: assert_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_assert_statement_in_statement150);\n assert_statement7=assert_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, assert_statement7.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "ParenthesisExpr createParenthesisExpr();", "public CodeTree toCodeTree() {\n List<Node> nodes = new ArrayList<Node>();\n for (int i = max(codeLengths); i >= 0; i--) { // Descend through code lengths\n List<Node> newNodes = new ArrayList<Node>();\n\n // Add leaves for symbols with positive code length i\n if (i > 0) {\n for (int j = 0; j < codeLengths.length; j++) {\n if (codeLengths[j] == i)\n newNodes.add(new Leaf(j)); //Isidedame ASCII reiksmes ilgiausio kodo\n }\n }\n\n // Merge pairs of nodes from the previous deeper layer\n for (int j = 0; j < nodes.size(); j += 2) {\n newNodes.add(new InternalNode(nodes.get(j), nodes.get(j + 1))); //Sujungia lapus i InternalNodes\n }\n nodes = newNodes;\n }\n return new CodeTree((InternalNode)nodes.get(0), codeLengths.length);\n }", "private BaleElement.Branch createOuterBranch(BaleAstNode sn)\n{\n switch (sn.getNodeType()) {\n case FILE :\n\t return new BaleElement.CompilationUnitNode(for_document,cur_parent);\n case CLASS :\n\t return new BaleElement.ClassNode(for_document,cur_parent);\n case METHOD :\n\t return new BaleElement.MethodNode(for_document,cur_parent);\n case FIELD :\n\t return new BaleElement.FieldNode(for_document,cur_parent);\n case ANNOTATION :\n\t return new BaleElement.AnnotationNode(for_document,cur_parent);\n case STATEMENT :\n\t return new BaleElement.SplitStatementNode(for_document,cur_parent);\n case EXPRESSION :\n\t return new BaleElement.SplitExpressionNode(for_document,cur_parent);\n case BLOCK :\n\t return new BaleElement.BlockNode(for_document,cur_parent);\n case SWITCH_BLOCK :\n\t return new BaleElement.SwitchBlockNode(for_document,cur_parent);\n case INITIALIZER :\n\t return new BaleElement.InitializerNode(for_document,cur_parent);\n case SET :\n\t // return new BaleElement.DeclSet(for_document,cur_parent);\n\t break;\n default:\n\t break;\n }\n return null;\n}", "private void createEOG(Statement statement) {\n if (statement == null)\n return; // For null statements, and to avoid null checks in every ifelse branch\n this.intermediateNodes.add(statement);\n if (statement instanceof CallExpression) {\n CallExpression callExpression = (CallExpression) statement;\n\n // Todo add call as throwexpression to outer scope of call can throw (which is trivial to find\n // out for java, but impossible for c++)\n\n // evaluate base first, if there is one\n if (callExpression instanceof MemberCallExpression\n && ((MemberCallExpression) callExpression).getBase() instanceof Statement) {\n createEOG((Statement) ((MemberCallExpression) callExpression).getBase());\n }\n\n // first the arguments\n for (Expression arg : callExpression.getArguments()) {\n createEOG(arg);\n }\n\n // then the call itself\n pushToEOG(statement);\n\n // look, whether the function is known to us\n /*\n\n State state = State.getInstance();\n\n todo Reconsider if this is the right thing to do \"Do we want to expressionRefersToDeclaration to the call target?\n todo We might not resolve the appropriate function\". In addition the Return may better expressionRefersToDeclaration to the block\n todo root node instead of just leading to nowhere.\n functionDeclaration = state.findMethod(callExpression);\n if (functionDeclaration != null) {\n // expressionRefersToDeclaration call to function\n State.getInstance().addEOGEdge(callExpression, functionDeclaration);\n\n // expressionRefersToDeclaration all return statements of function to statement after call expression\n State.getInstance().setCurrentEOGs(functionDeclaration.getReturnStatements());\n }*/\n\n } else if (statement instanceof MemberExpression) {\n // analyze the base\n if (((MemberExpression) statement).getBase() instanceof Statement) {\n createEOG((Statement) ((MemberExpression) statement).getBase());\n }\n\n // analyze the member\n if (((MemberExpression) statement).getMember() instanceof Statement) {\n createEOG((Statement) ((MemberExpression) statement).getMember());\n }\n\n pushToEOG(statement);\n\n } else if (statement instanceof ArraySubscriptionExpression) {\n ArraySubscriptionExpression arraySubs = (ArraySubscriptionExpression) statement;\n\n // Connect according to evaluation order, first the array reference, then the contained index.\n createEOG(arraySubs.getArrayExpression());\n createEOG(arraySubs.getSubscriptExpression());\n\n pushToEOG(statement);\n\n } else if (statement instanceof ArrayCreationExpression) {\n ArrayCreationExpression arrayCreate = (ArrayCreationExpression) statement;\n\n for (Expression dimension : arrayCreate.getDimensions())\n if (dimension != null) createEOG(dimension);\n createEOG(arrayCreate.getInitializer());\n\n pushToEOG(statement);\n\n } else if (statement instanceof DeclarationStatement) {\n // loop through declarations\n for (Declaration declaration : ((DeclarationStatement) statement).getDeclarations()) {\n if (declaration instanceof VariableDeclaration) {\n // analyze the initializers if there is one\n handleDeclaration(declaration);\n }\n }\n\n // push statement itself\n pushToEOG(statement);\n } else if (statement instanceof ReturnStatement) {\n // analyze the return value\n createEOG(((ReturnStatement) statement).getReturnValue());\n\n // push the statement itself\n pushToEOG(statement);\n\n // reset the state afterwards, we're done with this function\n currentEOG.clear();\n\n } else if (statement instanceof BinaryOperator) {\n\n BinaryOperator binOp = (BinaryOperator) statement;\n createEOG(binOp.getLhs());\n createEOG(binOp.getRhs());\n\n // push the statement itself\n pushToEOG(statement);\n\n } else if (statement instanceof UnaryOperator) {\n\n Expression input = ((UnaryOperator) statement).getInput();\n createEOG(input);\n if (((UnaryOperator) statement).getOperatorCode().equals(\"throw\")) {\n Type throwType;\n Scope catchingScope =\n lang.getScopeManager()\n .getFirstScopeThat(\n scope -> scope instanceof TryScope || scope instanceof FunctionScope);\n\n if (input != null) {\n throwType = input.getType();\n } else {\n // do not check via instanceof, since we do not want to allow subclasses of\n // DeclarationScope here\n Scope decl =\n lang.getScopeManager()\n .getFirstScopeThat(scope -> scope.getClass().equals(DeclarationScope.class));\n if (decl != null\n && decl.getAstNode() instanceof CatchClause\n && ((CatchClause) decl.getAstNode()).getParameter() != null) {\n throwType = ((CatchClause) decl.getAstNode()).getParameter().getType();\n } else {\n LOGGER.info(\"Unknown throw type, potentially throw; in a method\");\n throwType = new Type(\"UKNOWN_THROW_TYPE\");\n }\n }\n\n pushToEOG(statement);\n if (catchingScope instanceof TryScope) {\n ((TryScope) catchingScope)\n .getCatchesOrRelays()\n .put(throwType, new ArrayList<>(this.currentEOG));\n } else if (catchingScope instanceof FunctionScope) {\n ((FunctionScope) catchingScope)\n .getCatchesOrRelays()\n .put(throwType, new ArrayList<>(this.currentEOG));\n }\n currentEOG.clear();\n } else {\n pushToEOG(statement);\n }\n } else if (statement instanceof CompoundStatement) {\n lang.getScopeManager().enterScope(statement);\n // analyze the contained statements\n for (Statement child : ((CompoundStatement) statement).getStatements()) {\n createEOG(child);\n }\n lang.getScopeManager().leaveScope(statement);\n pushToEOG(statement);\n } else if (statement instanceof CompoundStatementExpression) {\n createEOG(((CompoundStatementExpression) statement).getStatement());\n pushToEOG(statement);\n } else if (statement instanceof IfStatement) {\n IfStatement ifs = (IfStatement) statement;\n List<Node> openBranchNodes = new ArrayList<>();\n lang.getScopeManager().enterScope(statement);\n createEOG(ifs.getInitializerStatement());\n handleDeclaration(ifs.getConditionDeclaration());\n createEOG(ifs.getCondition());\n List<Node> openConditionEOGs = new ArrayList<>(currentEOG);\n createEOG(ifs.getThenStatement());\n openBranchNodes.addAll(currentEOG);\n\n if (ifs.getElseStatement() != null) {\n setCurrentEOGs(openConditionEOGs);\n createEOG(ifs.getElseStatement());\n openBranchNodes.addAll(currentEOG);\n } else openBranchNodes.addAll(openConditionEOGs);\n\n lang.getScopeManager().leaveScope(statement);\n\n setCurrentEOGs(openBranchNodes);\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof AssertStatement) {\n AssertStatement ifs = (AssertStatement) statement;\n createEOG(ifs.getCondition());\n List<Node> openConditionEOGs = new ArrayList<>(currentEOG);\n createEOG(ifs.getMessage());\n setCurrentEOGs(openConditionEOGs);\n pushToEOG(statement);\n } else if (statement instanceof WhileStatement) {\n\n lang.getScopeManager().enterScope(statement);\n WhileStatement whs = (WhileStatement) statement;\n\n handleDeclaration(whs.getConditionDeclaration());\n\n createEOG(whs.getCondition());\n List<Node> tmpEOGNodes = new ArrayList<>(currentEOG);\n createEOG(whs.getStatement());\n connectCurrentToLoopStart();\n\n // Replace current EOG nodes without triggering post setEOG ... processing\n currentEOG.clear();\n exitLoop(statement, (LoopScope) lang.getScopeManager().leaveScope(statement));\n\n currentEOG.addAll(tmpEOGNodes);\n\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof DoStatement) {\n lang.getScopeManager().enterScope(statement);\n DoStatement dos = (DoStatement) statement;\n\n createEOG(dos.getStatement());\n\n createEOG(dos.getCondition());\n connectCurrentToLoopStart();\n exitLoop(statement, (LoopScope) lang.getScopeManager().leaveScope(statement));\n\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof ForStatement) {\n lang.getScopeManager().enterScope(statement);\n ForStatement forStmt = (ForStatement) statement;\n\n createEOG(forStmt.getInitializerStatement());\n handleDeclaration(forStmt.getConditionDeclaration());\n createEOG(forStmt.getCondition());\n\n List<Node> tmpEOGNodes = new ArrayList<>(currentEOG);\n\n createEOG(forStmt.getStatement());\n createEOG(forStmt.getIterationExpression());\n\n connectCurrentToLoopStart();\n currentEOG.clear();\n exitLoop(statement, (LoopScope) lang.getScopeManager().leaveScope(statement));\n\n currentEOG.addAll(tmpEOGNodes);\n\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof ForEachStatement) {\n lang.getScopeManager().enterScope(statement);\n ForEachStatement forStmt = (ForEachStatement) statement;\n\n createEOG(forStmt.getIterable());\n handleDeclaration(forStmt.getVariable());\n\n List<Node> tmpEOGNodes = new ArrayList<>(currentEOG);\n\n createEOG(forStmt.getStatement());\n\n connectCurrentToLoopStart();\n currentEOG.clear();\n exitLoop(statement, (LoopScope) lang.getScopeManager().leaveScope(statement));\n\n currentEOG.addAll(tmpEOGNodes);\n\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof TryStatement) {\n lang.getScopeManager().enterScope(statement);\n TryScope tryScope = (TryScope) lang.getScopeManager().getCurrentScope();\n TryStatement tryStmt = (TryStatement) statement;\n\n if (tryStmt.getResources() != null) tryStmt.getResources().forEach(this::createEOG);\n createEOG(tryStmt.getTryBlock());\n\n List<Node> tmpEOGNodes = new ArrayList<>(currentEOG);\n\n Map<Type, List<Node>> catchesOrRelays = tryScope.getCatchesOrRelays();\n\n for (CatchClause catchClause : tryStmt.getCatchClauses()) {\n currentEOG.clear();\n // Try to catch all internally thrown exceptions under the catching clause and remove caught\n // ones\n HashSet<Type> toRemove = new HashSet<>();\n for (Map.Entry entry : catchesOrRelays.entrySet()) {\n Type throwType = (Type) entry.getKey();\n List<Node> eogEdges = (List<Node>) entry.getValue();\n if (catchClause.getParameter() == null) { // e.g. catch (...)\n currentEOG.addAll(eogEdges);\n } else if (TypeManager.getInstance()\n .isSupertypeOf(catchClause.getParameter().getType(), throwType)) {\n currentEOG.addAll(eogEdges);\n toRemove.add(throwType);\n }\n }\n toRemove.forEach(catchesOrRelays::remove);\n\n createEOG(catchClause.getBody());\n tmpEOGNodes.addAll(currentEOG);\n }\n boolean canTerminateExceptionfree =\n tmpEOGNodes.stream().anyMatch(EvaluationOrderGraphPass::reachableFromValidEOGRoot);\n\n currentEOG.clear();\n currentEOG.addAll(tmpEOGNodes);\n // connect all try-block, catch-clause and uncought throws eog points to finally start if\n // finally exists\n if (tryStmt.getFinallyBlock() != null) {\n // extends current EOG by all value EOG from open throws\n currentEOG.addAll(\n catchesOrRelays.entrySet().stream()\n .flatMap(entry -> entry.getValue().stream())\n .collect(Collectors.toList()));\n createEOG(tryStmt.getFinallyBlock());\n\n // all current-eog edges , result of finally execution as value List of uncought\n // catchesOrRelaysThrows\n for (Map.Entry entry : catchesOrRelays.entrySet()) {\n ((List) entry.getValue()).clear();\n ((List) entry.getValue()).addAll(this.currentEOG);\n }\n }\n // Forwards all open and uncought throwing nodes to the outer scope that may handle them\n Scope outerScope =\n lang.getScopeManager()\n .getFirstScopeThat(\n lang.getScopeManager().getCurrentScope().getParent(),\n scope -> scope instanceof TryScope || scope instanceof FunctionScope);\n Map outerCatchesOrRelays =\n outerScope instanceof TryScope\n ? ((TryScope) outerScope).getCatchesOrRelays()\n : ((FunctionScope) outerScope).getCatchesOrRelays();\n for (Map.Entry entry : catchesOrRelays.entrySet()) {\n List<Node> catches =\n (List<Node>) outerCatchesOrRelays.getOrDefault(entry.getKey(), new ArrayList<Node>());\n catches.addAll((List<Node>) entry.getValue());\n outerCatchesOrRelays.put(entry.getKey(), catches);\n }\n\n lang.getScopeManager().leaveScope(statement);\n // To Avoid edges out of the finally block to the next regular statement.\n if (!canTerminateExceptionfree) {\n currentEOG.clear();\n }\n\n pushToEOG(statement);\n } else if (statement instanceof ContinueStatement) {\n pushToEOG(statement);\n\n lang.getScopeManager().addContinueStatment((ContinueStatement) statement);\n\n currentEOG.clear();\n\n } else if (statement instanceof DeleteExpression) {\n\n createEOG(((DeleteExpression) statement).getOperand());\n pushToEOG(statement);\n\n } else if (statement instanceof BreakStatement) {\n pushToEOG(statement);\n\n lang.getScopeManager().addBreakStatment((BreakStatement) statement);\n\n currentEOG.clear();\n\n } else if (statement instanceof SwitchStatement) {\n\n SwitchStatement switchStatement = (SwitchStatement) statement;\n\n lang.getScopeManager().enterScope(statement);\n\n createEOG(switchStatement.getInitializerStatement());\n\n handleDeclaration(switchStatement.getSelectorDeclaration());\n\n createEOG(switchStatement.selector);\n\n CompoundStatement compound;\n List<Node> tmp = new ArrayList<>(currentEOG);\n if (switchStatement.getStatement() instanceof DoStatement) {\n createEOG(switchStatement.getStatement());\n compound =\n (CompoundStatement) ((DoStatement) switchStatement.getStatement()).getStatement();\n } else {\n compound = (CompoundStatement) switchStatement.getStatement();\n }\n currentEOG = new ArrayList<>();\n\n for (Statement subStatement : compound.getStatements()) {\n if (subStatement instanceof CaseStatement || subStatement instanceof DefaultStatement)\n currentEOG.addAll(tmp);\n createEOG(subStatement);\n }\n pushToEOG(compound);\n\n SwitchScope switchScope = (SwitchScope) lang.getScopeManager().leaveScope(switchStatement);\n this.currentEOG.addAll(switchScope.getBreakStatements());\n\n pushToEOG(statement);\n } else if (statement instanceof LabelStatement) {\n lang.getScopeManager().addLabelStatement((LabelStatement) statement);\n createEOG(((LabelStatement) statement).getSubStatement());\n } else if (statement instanceof GotoStatement) {\n GotoStatement gotoStatement = (GotoStatement) statement;\n pushToEOG(gotoStatement);\n if (gotoStatement.getTargetLabel() != null)\n lang.registerObjectListener(\n gotoStatement.getTargetLabel(), (from, to) -> addEOGEdge(gotoStatement, (Node) to));\n currentEOG.clear();\n } else if (statement instanceof CaseStatement) {\n createEOG(((CaseStatement) statement).getCaseExpression());\n pushToEOG(statement);\n } else if (statement instanceof SynchronizedStatement) {\n createEOG(((SynchronizedStatement) statement).getExpression());\n createEOG(((SynchronizedStatement) statement).getBlockStatement());\n pushToEOG(statement);\n } else if (statement instanceof EmptyStatement) {\n pushToEOG(statement);\n } else if (statement instanceof Literal) {\n pushToEOG(statement);\n } else if (statement instanceof DefaultStatement) {\n pushToEOG(statement);\n } else if (statement instanceof TypeIdExpression) {\n pushToEOG(statement);\n } else if (statement instanceof NewExpression) {\n NewExpression newStmt = (NewExpression) statement;\n createEOG(newStmt.getInitializer());\n\n pushToEOG(statement);\n } else if (statement instanceof CastExpression) {\n CastExpression castExpr = (CastExpression) statement;\n createEOG(castExpr.getExpression());\n pushToEOG(castExpr);\n } else if (statement instanceof ExpressionList) {\n ExpressionList exprList = (ExpressionList) statement;\n for (Statement expr : exprList.getExpressions()) createEOG(expr);\n\n pushToEOG(statement);\n } else if (statement instanceof ConditionalExpression) {\n ConditionalExpression condExpr = (ConditionalExpression) statement;\n\n List<Node> openBranchNodes = new ArrayList<>();\n createEOG(condExpr.getCondition());\n List<Node> openConditionEOGs = new ArrayList<>(currentEOG);\n createEOG(condExpr.getThenExpr());\n openBranchNodes.addAll(currentEOG);\n\n setCurrentEOGs(openConditionEOGs);\n createEOG(condExpr.getElseExpr());\n openBranchNodes.addAll(currentEOG);\n\n setCurrentEOGs(openBranchNodes);\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof InitializerListExpression) {\n InitializerListExpression initList = (InitializerListExpression) statement;\n\n // first the arguments\n for (Expression inits : initList.getInitializers()) {\n createEOG(inits);\n }\n\n pushToEOG(statement);\n } else if (statement instanceof ConstructExpression) {\n ConstructExpression constructExpr = (ConstructExpression) statement;\n\n // first the arguments\n for (Expression arg : constructExpr.getArguments()) {\n createEOG(arg);\n }\n\n pushToEOG(statement);\n } else if (statement instanceof DeclaredReferenceExpression) {\n pushToEOG(statement);\n } else {\n // In this case the ast -> cpg translation has to implement the cpg node creation\n pushToEOG(statement);\n }\n }", "public interface BranchNode extends StatementNode\n{\n\t/**\n\t * Set the branching condition.\n\t * \n\t * @param condition\n\t * the condition of the branch.\n\t */\n\tpublic void setCondition(ExpressionNode condition);\n\n\t/**\n\t * Get the branching condition.\n\t * \n\t * @return the condition of the branch.\n\t */\n\tpublic ExpressionNode getCondition();\n\n\t/**\n\t * Set the statement that is executed when the condition evaluates to true.\n\t * \n\t * @param statement\n\t * The statement to execute when the condition evaluates to true.\n\t */\n\tpublic void setStatementNodeOnTrue(StatementNode statement);\n\n\t/**\n\t * The statement that is executed when the condition evaluates to true.\n\t * \n\t * @return The statement to execute when the condition evaluates to true.\n\t */\n\tpublic StatementNode getStatementNodeOnTrue();\n\n\t/**\n\t * Set the statement that is executed when the condition evaluates to false.\n\t * This is the else statement. If there is no else set to null.\n\t * \n\t * @param statement\n\t * The statement to execute when the condition evaluates to false or\n\t * null if no else branch is needed.\n\t */\n\tpublic void setStatementNodeOnFalse(StatementNode statement);\n\n\t/**\n\t * The statement that is executed when the condition is false. This is the else\n\t * branch. If no else branch exists this will return null.\n\t * \n\t * @return The statement to execute when the condition evaluates to false.\n\t */\n\tpublic StatementNode getStatementNodeOnFalse();\n}", "NewAnonymousClassExpression(AST ast) {\r\n\t\tsuper(ast);\r\n\t}", "public AST(RuleContext ctx){\n this.ctx = ctx;\n }", "public void statement(Node n_parent) {\r\n System.out.println(\":: statement:\"+n_parent.getData());\r\n if(token.get(lookAheadPossition).contains(\"ident(\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_assignment = n_parent.setChildren(\":=\");\r\n this.assignment(n_assignment);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"IF\")) {\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_ifStatement = n_parent.setChildren(\"if\");\r\n this.ifStatement(n_ifStatement);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"WHILE\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_whileStatement = n_parent.setChildren(\"while\");\r\n this.whileStatement(n_whileStatement);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"WRITEINT\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_writeInt = n_parent.setChildren(\"writeInt\");\r\n this.writeInt(n_writeInt);\r\n }\r\n }", "public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n // System.out.println(\"BEGIN\");\n n.f1.accept(this);\n n.f2.accept(this);\n \t\n String s = (String) n.f3.accept(this);\n current_temp =s;\n n.f4.accept(this);\n //System.out.println(\"END\");\n return (R)s;\n }", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "public static void main(String [] args) {\n List<Ast.Param> pl = new ArrayList<Ast.Param>(); // empty param list\n List<Ast.VarDecl> vl = new ArrayList<Ast.VarDecl>(); // empty var list\n List<Ast.Stmt> sl = new ArrayList<Ast.Stmt>(); // empty stmt list\n\n // Construct a print stmt and add it to stmt list\n Ast.Exp arg = new Ast.StrLit(\"Hello World!\"); // create an arg\n Ast.Stmt s = new Ast.Print(arg); // create a print stmt\n sl.add(s); // add stmt to list\n \n // Construct a MethodDecl ---\n // Ast.MethodDecl(Ast.Type rt, String m, List<Ast.Param> pl, \n // List<Ast.VarDecl> vl, List<Ast.Stmt> sl)\n Ast.MethodDecl md = new Ast.MethodDecl(null, \t// null represents 'void'\n\t\t\t\t\t \"main\",\t// method's name\n\t\t\t\t\t pl, \t\t// formal params\n\t\t\t\t\t vl, \t\t// local var decls\n\t\t\t\t\t sl); \t// method body\n List<Ast.MethodDecl> ml = new ArrayList<Ast.MethodDecl>();\n ml.add(md);\n\n // Construct a ClassDecl ---\n // Ast.ClassDecl(String nm, String pnm, \n // List<Ast.VarDecl> vl, List<Ast.MethodDecl> ml)\n Ast.ClassDecl cd = new Ast.ClassDecl(\"Hello\",\t// class name\n\t\t\t\t\t null, \t\t// parent's name\n\t\t\t\t\t vl, \t\t// field decls \n\t\t\t\t\t ml); \t\t// method decls\n List<Ast.ClassDecl> cl = new ArrayList<Ast.ClassDecl>();\n cl.add(cd);\n\n // Construct a Program ---\n // Ast.Program(List<Ast.ClassDecl> cl)\n Ast.Program p = new Ast.Program(cl); \t// create the whole AST\n System.out.print(p); \t\t\t// dump out the AST\n }", "void compileStatements() {\n tagBracketPrinter(STAT_TAG, OPEN_TAG_BRACKET);\n try {\n compileStatementHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(STAT_TAG, CLOSE_TAG_BRACKET);\n }", "public final Statement statement() throws RecognitionException {\n\t\tStatement s = null;\n\n\n\t\tToken OPENPAREN7=null;\n\t\tToken OPENPAREN8=null;\n\t\tToken OPENPAREN9=null;\n\t\tToken RETURN10=null;\n\t\tExpr e =null;\n\t\tBlock b1 =null;\n\t\tBlock b2 =null;\n\t\tBlock b =null;\n\t\tId i =null;\n\t\tArrayRef ar =null;\n\t\tExpr e2 =null;\n\n\t\ttry {\n\t\t\t// ul.g:106:32: ( SEMI |e= expr SEMI | IF OPENPAREN e= expr CLOSEPAREN b1= block ELSE b2= block | IF OPENPAREN e= expr CLOSEPAREN b= block | WHILE OPENPAREN e= expr CLOSEPAREN b= block | PRINT e= expr SEMI | PRINTLN e= expr SEMI | RETURN (e= expr )? SEMI |i= id '=' e= expr SEMI |ar= arrayRef '=' e2= expr SEMI )\n\t\t\tint alt9=10;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase SEMI:\n\t\t\t\t{\n\t\t\t\talt9=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ID:\n\t\t\t\t{\n\t\t\t\tint LA9_2 = input.LA(2);\n\t\t\t\tif ( (synpred13_ul()) ) {\n\t\t\t\t\talt9=2;\n\t\t\t\t}\n\t\t\t\telse if ( (synpred21_ul()) ) {\n\t\t\t\t\talt9=9;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt9=10;\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CHARCONST:\n\t\t\tcase FALSE:\n\t\t\tcase FLOATCONST:\n\t\t\tcase INTCONST:\n\t\t\tcase OPENPAREN:\n\t\t\tcase STRCONST:\n\t\t\tcase TRUE:\n\t\t\t\t{\n\t\t\t\talt9=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase IF:\n\t\t\t\t{\n\t\t\t\tint LA9_10 = input.LA(2);\n\t\t\t\tif ( (synpred14_ul()) ) {\n\t\t\t\t\talt9=3;\n\t\t\t\t}\n\t\t\t\telse if ( (synpred15_ul()) ) {\n\t\t\t\t\talt9=4;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return s;}\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 9, 10, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase WHILE:\n\t\t\t\t{\n\t\t\t\talt9=5;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PRINT:\n\t\t\t\t{\n\t\t\t\talt9=6;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PRINTLN:\n\t\t\t\t{\n\t\t\t\talt9=7;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RETURN:\n\t\t\t\t{\n\t\t\t\talt9=8;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (state.backtracking>0) {state.failed=true; return s;}\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 9, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt9) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:107:2: SEMI\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement379); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new Statement();}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// ul.g:108:4: e= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement390);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement392); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new ExprStatement(e, e.line, e.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// ul.g:109:4: IF OPENPAREN e= expr CLOSEPAREN b1= block ELSE b2= block\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,IF,FOLLOW_IF_in_statement398); if (state.failed) return s;\n\t\t\t\t\tOPENPAREN7=(Token)match(input,OPENPAREN,FOLLOW_OPENPAREN_in_statement400); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement406);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,CLOSEPAREN,FOLLOW_CLOSEPAREN_in_statement408); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_block_in_statement414);\n\t\t\t\t\tb1=block();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,ELSE,FOLLOW_ELSE_in_statement416); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_block_in_statement422);\n\t\t\t\t\tb2=block();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new IfElseStatement(e, b1, b2, (OPENPAREN7!=null?OPENPAREN7.getLine():0), OPENPAREN7.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\t\t// ul.g:110:4: IF OPENPAREN e= expr CLOSEPAREN b= block\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,IF,FOLLOW_IF_in_statement428); if (state.failed) return s;\n\t\t\t\t\tOPENPAREN8=(Token)match(input,OPENPAREN,FOLLOW_OPENPAREN_in_statement430); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement436);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,CLOSEPAREN,FOLLOW_CLOSEPAREN_in_statement438); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_block_in_statement444);\n\t\t\t\t\tb=block();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new IfStatement(e, b, (OPENPAREN8!=null?OPENPAREN8.getLine():0), OPENPAREN8.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5 :\n\t\t\t\t\t// ul.g:111:4: WHILE OPENPAREN e= expr CLOSEPAREN b= block\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,WHILE,FOLLOW_WHILE_in_statement450); if (state.failed) return s;\n\t\t\t\t\tOPENPAREN9=(Token)match(input,OPENPAREN,FOLLOW_OPENPAREN_in_statement452); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement458);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,CLOSEPAREN,FOLLOW_CLOSEPAREN_in_statement460); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_block_in_statement466);\n\t\t\t\t\tb=block();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new WhileStatement(e, b, (OPENPAREN9!=null?OPENPAREN9.getLine():0), OPENPAREN9.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6 :\n\t\t\t\t\t// ul.g:112:4: PRINT e= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,PRINT,FOLLOW_PRINT_in_statement472); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement478);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement480); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new PrintStatement(e, e.line, e.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7 :\n\t\t\t\t\t// ul.g:113:4: PRINTLN e= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,PRINTLN,FOLLOW_PRINTLN_in_statement486); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement492);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement494); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new PrintLnStatement(e, e.line, e.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8 :\n\t\t\t\t\t// ul.g:114:4: RETURN (e= expr )? SEMI\n\t\t\t\t\t{\n\t\t\t\t\tRETURN10=(Token)match(input,RETURN,FOLLOW_RETURN_in_statement500); if (state.failed) return s;\n\t\t\t\t\t// ul.g:114:11: (e= expr )?\n\t\t\t\t\tint alt8=2;\n\t\t\t\t\tint LA8_0 = input.LA(1);\n\t\t\t\t\tif ( (LA8_0==CHARCONST||LA8_0==FALSE||(LA8_0 >= FLOATCONST && LA8_0 <= ID)||LA8_0==INTCONST||LA8_0==OPENPAREN||LA8_0==STRCONST||LA8_0==TRUE) ) {\n\t\t\t\t\t\talt8=1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt8) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:114:12: e= expr\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement507);\n\t\t\t\t\t\t\te=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\t\t\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement511); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new ReturnStatement(e, (RETURN10!=null?RETURN10.getLine():0), RETURN10.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9 :\n\t\t\t\t\t// ul.g:115:4: i= id '=' e= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_id_in_statement521);\n\t\t\t\t\ti=id();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,36,FOLLOW_36_in_statement523); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement529);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement531); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new AssignmentStatement(i, e, i.line, i.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10 :\n\t\t\t\t\t// ul.g:119:4: ar= arrayRef '=' e2= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_arrayRef_in_statement544);\n\t\t\t\t\tar=arrayRef();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,36,FOLLOW_36_in_statement546); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement552);\n\t\t\t\t\te2=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement554); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new ArrayAssignment(ar, e2, ar.line, ar.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn s;\n\t}", "public interface Node {\n Oper oper();\n CNFOrdinal toCNF();\n}", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "public interface ASTPath\n{\n\tvoid debugSelf(IndentPrinter destination);\n\tvoid setParent(ASTChildList.ListKey key, ASTParent newParent);\n\tvoid compileSelf(LangCompiler compiler);\n\tASTBase getDeclaration();\n\tString getName();\n\tString getEnd();\n\tSpiritType getExpressionType();\n\n}", "ASTNode rebuild() {\n ASTNode child = null;\n switch (this.type) {\n case \"else if statement\":\n child = children.get(0);\n break;\n\n default:\n }\n\n return this;\n }", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "public node simplify() {\n node n = null;\n Object[] o = children().toArray();\n int l = o.length;\n if ( l == 1 )\n return (node) o[0];\n\n node orr = (node) o[0];\n node atmost1 = (node) o[0];\n\n for ( int i=1; i<l; i++ ) {\n orr = new or( orr, (node) o[i] );\n atmost1 = new atmostone( atmost1, (node) o[i] );\n }\n node result = (new and(orr, atmost1)).simplify();\n return result;\n }", "public List<AST> getChildNodes ();", "public static <V> Phrase<V> jaxbToAst(Block block, AbstractJaxb2Ast<V> helper) {\n\n List<Value> values;\n Phrase<V> leftt;\n Phrase<V> rightt;\n switch ( block.getType() ) {\n case BlocklyConstants.TEXT_APPEND:\n values = helper.extractValues(block, (short) 2);\n leftt = helper.extractValue(values, new ExprParam(BlocklyConstants.VAR, BlocklyType.STRING));\n rightt = helper.extractValue(values, new ExprParam(BlocklyConstants.TEXT, BlocklyType.STRING));\n return ExprStmt\n .make(\n Binary\n .make(\n Binary.Op.TEXT_APPEND,\n helper.convertPhraseToExpr(leftt),\n helper.convertPhraseToExpr(rightt),\n \"\",\n helper.extractBlockProperties(block),\n helper.extractComment(block)));\n case BlocklyConstants.ROB_MATH_CHANGE:\n case BlocklyConstants.MATH_CHANGE:\n values = helper.extractValues(block, (short) 2);\n leftt = helper.extractValue(values, new ExprParam(BlocklyConstants.VAR, BlocklyType.STRING));\n rightt = helper.extractValue(values, new ExprParam(BlocklyConstants.DELTA, BlocklyType.NUMBER_INT));\n return ExprStmt\n .make(\n Binary\n .make(\n Binary.Op.MATH_CHANGE,\n helper.convertPhraseToExpr(leftt),\n helper.convertPhraseToExpr(rightt),\n \"\",\n helper.extractBlockProperties(block),\n helper.extractComment(block)));\n\n case BlocklyConstants.MATH_MODULO:\n return helper\n .blockToBinaryExpr(\n block,\n new ExprParam(BlocklyConstants.DIVIDEND, BlocklyType.NUMBER_INT),\n new ExprParam(BlocklyConstants.DIVISOR, BlocklyType.NUMBER_INT),\n BlocklyConstants.MOD);\n\n case BlocklyConstants.MATH_ARITHMETIC:\n String opp = helper.extractOperation(block, BlocklyConstants.OP);\n if ( opp.equals(BlocklyConstants.POWER) ) {\n ArrayList<ExprParam> exprParams = new ArrayList<>();\n exprParams.add(new ExprParam(BlocklyConstants.A, BlocklyType.NUMBER_INT));\n exprParams.add(new ExprParam(BlocklyConstants.B, BlocklyType.NUMBER_INT));\n List<Expr<V>> params = helper.extractExprParameters(block, exprParams);\n return MathPowerFunct.make(FunctionNames.POWER, params, helper.extractBlockProperties(block), helper.extractComment(block));\n }\n default:\n return helper\n .blockToBinaryExpr(\n block,\n new ExprParam(BlocklyConstants.A, BlocklyType.NUMBER_INT),\n new ExprParam(BlocklyConstants.B, BlocklyType.NUMBER_INT),\n BlocklyConstants.OP);\n\n }\n }", "public final JavaliParser.expr_return expr() throws RecognitionException {\n\t\tJavaliParser.expr_return retval = new JavaliParser.expr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tParserRuleReturnScope leftExpr =null;\n\t\tParserRuleReturnScope op =null;\n\t\tParserRuleReturnScope rightExpr =null;\n\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_compOp=new RewriteRuleSubtreeStream(adaptor,\"rule compOp\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:2: (leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) ) )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:4: leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1531);\n\t\t\tleftExpr=simpleExpr();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_simpleExpr.add(leftExpr.getTree());\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:428:3: ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\tint alt25=2;\n\t\t\tint LA25_0 = input.LA(1);\n\t\t\tif ( (LA25_0==70||LA25_0==73||LA25_0==77) ) {\n\t\t\t\talt25=1;\n\t\t\t}\n\t\t\telse if ( (LA25_0==66||(LA25_0 >= 78 && LA25_0 <= 79)||(LA25_0 >= 81 && LA25_0 <= 83)) ) {\n\t\t\t\talt25=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 25, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt25) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:429:4: \n\t\t\t\t\t{\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: leftExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 429:4: -> $leftExpr\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, stream_leftExpr.nextTree());\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:430:5: op= compOp rightExpr= simpleExpr\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_compOp_in_expr1552);\n\t\t\t\t\top=compOp();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_compOp.add(op.getTree());\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1556);\n\t\t\t\t\trightExpr=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(rightExpr.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: compOp, leftExpr, rightExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval, rightExpr\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_rightExpr=new RewriteRuleSubtreeStream(adaptor,\"rule rightExpr\",rightExpr!=null?rightExpr.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 431:4: -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:431:7: ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(BinaryOp, (op!=null?(op.start):null), \"BinaryOp\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_leftExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_compOp.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_rightExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public BinaryTree(String expression) {\n \tString[] arr = expression.split(\" \");\n \troot = parse(arr);\n }", "public final void rule__AstStatementBlock__StatementsAssignment_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24996:1: ( ( ruleAstStatement ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24997:1: ( ruleAstStatement )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24997:1: ( ruleAstStatement )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24998:1: ruleAstStatement\n {\n before(grammarAccess.getAstStatementBlockAccess().getStatementsAstStatementParserRuleCall_3_0()); \n pushFollow(FOLLOW_ruleAstStatement_in_rule__AstStatementBlock__StatementsAssignment_350210);\n ruleAstStatement();\n\n state._fsp--;\n\n after(grammarAccess.getAstStatementBlockAccess().getStatementsAstStatementParserRuleCall_3_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private Type traverseTree(Node parsedTree) {\n Expression exp = new Expression(Type.EMPTY, Type.EMPTY, Connector.empty); // Creation of a new expression with empty fields\n\n\t\t// Determines the type from left to right of the given expression\n for (Node child : parsedTree.getChildren()) {\n \texp = evalExpressionAndSetLeft(addChildToExpression(child, exp));\n }\n return exp.getLeftExpressionType();\n }", "public static Temp evalExpression(CommonTree tree){\n\t\t// leaf node, int/float/id\n\n\t\tif (tree.getChildCount() == 0){\n\t\t\tTemp temp = new Temp(temperaryNum++,tree.getType(),tree.getText());\n\t\t\tif (tree.getType() == LittleParser.INTLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREI\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse if(tree.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREF\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse{ // look up the variable in the symbol table to set type, use var_name instead of $Tx and recycle $Tx\n\t\t\t\ttemp.setType(allTables.lookupType(temp.getValue().trim()));\n\t\t\t\ttemp.setName(tree.getText());\n\t\t\t\ttemperaryNum--;\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\t\t// Not a leaf node, evaluate children expressions\n\t\telse{\n\t\t\t// test for function call\n\t\t\tif (tree.getType() == LittleParser.FUNC_CALL){\n\t\t\t\t// add IR for evaluating the function and return temperary for return value\n\t\t\t\t// after it has been popped off the stack\n\t\t\t\treturn evalFunction(tree);\n\t\t\t}\n\t\t\t//\t\t\tif (tree.getChild(0).getChildCount() == 0 && tree.getChild(1).getChildCount() == 0){\n\t\t\t//\t\t\t\tif ()\n\t\t\t//\t\t\t}\n\t\t\tTemp left = evalExpression((CommonTree) tree.getChild(0));\n\t\t\tTemp right = evalExpression((CommonTree) tree.getChild(1));\n\n\t\t\tTemp temp = new Temp(temperaryNum++,left.getType(), \"EXP\");\n\t\t\tif (tree.getText().contains(\"+\")){ // add\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t} //both parameters\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"-\")){ // subtract\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"*\")){ // multiply\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{ // divide\n\t\t\t\tif (right.getType() == LittleParser.INTLITERAL && left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (right.getType() == LittleParser.FLOATLITERAL || left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\n\t}", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations, Variable assign, Value ... v);", "public void toGrammar() {\n System.out.println(\"<binary_expression> -> <arithmeitc_expression> <arithmetic_op> <arithmetic_expression>\");\n left.toGrammar();\n operator.toGrammar();\n right.toGrammar();\n prefix();\n }", "private StatementNode parseStatementFor() {\n\t\tToken tokenFor = tokenReader.getCurrent();\n\t\ttokenReader.moveNext();\n\t\t\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.ROUNDBR_OPEN);\n\t\t\n\t\tToken identifier1 = tokenReader.matchTokenAndMoveOn(TokenType.IDENTIFIER);\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.ASSIGN);\n\t\tStatementNode stm1 = new AssignNode(identifier1, parserExpression.parse());\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.SEMICOLONS);\n\t\t\n\t\tExpressionNode condition = parserExpression.parse();\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.SEMICOLONS);\n\t\t\n\t\tToken identifier2 = tokenReader.matchTokenAndMoveOn(TokenType.IDENTIFIER);\n\t\tStatementNode stm2 = parseStatementIdentifier(identifier2);\n\t\t\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.ROUNDBR_CLOSE);\n\t\t\n\t\tBlockNode bodyNode = this.parse(BlockNode.BlockType.BLOCK);\n\t\treturn new ForNode(tokenFor, stm1, condition, stm2, bodyNode);\n\t}", "@Override\n\tpublic String visitArExpr(ArExprContext ctx) {\n\t\tint chNo=ctx.children.size();\n\t\tif(chNo == 3){\n\t\t\tParseTree cur = ctx.getChild(1);\n\t\t\tif(cur==ctx.MULT() || cur==ctx.DIV()|| cur==ctx.PLUS() || cur==ctx.MINUS()){\n\t\t\t\tString left = visit(ctx.getChild(0));\n\t\t\t\tString right = visit(ctx.getChild(2));\n\t\t\t\tif(!(right.equals(left) && right.equals(\"int\")) ){throw new RuntimeException(\"Arithmetic operations only with integers\");}\n\t\t\t\treturn(\"int\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn(visit(cur));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tParseTree cur=ctx.getChild(0);\n\t\t\tif (cur instanceof TerminalNode) {\t\t\t\t\n\t\t\t\tif (cur==ctx.INTEG()) return \"int\";\n\t\t\t\telse if (cur==ctx.CH()) return \"char\";\n\t\t\t\telse if(cur==ctx.ID()){\n\t\t\t\t\tString key=visitTerminal((TerminalNode)cur);\n\t\t\t\t\tRecord id= table.lookup(key);\n\t\t\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\t\t\treturn id.getReturnType();\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t}else {\n\t\t\t\tString type=visit(ctx.getChild(0));\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public interface IStmt {\n\n String toStr();\n PrgState execute(PrgState state) throws StmtException;\n\n}", "@Override\r\n\tpublic void visit(BinaryExpression binaryExpression) {\n\r\n\t}", "public Element compileIf() throws CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\t\n\t\t//Unique labels for jumping around\n\t\tString elseLabel = label();\n\t\tString endLabel = label();\n\n\t\tElement ifParent = document.createElement(\"ifStatement\");\n\n\t\t// if\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// (\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// expression\n\t\tjTokenizer.advance();\n\t\tifParent.appendChild(compileExpression());\n\n\t\t// )\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\t\t\n\t\t//If condition fails, go to else part of the block\n\t\twriter.writeArithmetic(\"not\");\n\t\twriter.writeIf(elseLabel);\n\n\t\t// {\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// statement inside the if block\n\t\tjTokenizer.advance();\n\t\tifParent.appendChild(compileStatements());\n\n\t\t// }\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// if done, go to end\n\t\twriter.writeGoto(endLabel);\n\t\t\n\t\t// Else statements start here\n\t\twriter.writeLabel(elseLabel);\n\n\t\t// else\n\n\t\t// Interesting coding challenge. I had to look ahead by one token to\n\t\t// check if there was an else block, but if it didn't exists, I would be\n\t\t// one token ahead of the XML.\n\t\t// Built a clone of the present tokenizer and used it to look ahead,\n\t\t// if an else exists, advance the main tokenizer as well\n\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\tclone.advance();\n\n\t\ttoken = clone.returnTokenVal();\n\t\tif (token.equals(\"else\")) {\n\n\t\t\t// else\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// {\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// statements inside the else block\n\t\t\tjTokenizer.advance();\n\t\t\tifParent.appendChild(compileStatements());\n\n\t\t\t// }\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// End of if-else block\n\t\t\twriter.writeLabel(endLabel);\n\n\t\t\treturn ifParent;\n\t\t} \n\t\telse {\n\n\t\t\t// End of if block\n\n\t\t\twriter.writeLabel(endLabel);\n\t\t\treturn ifParent;\n\t\t}\n\t}", "public void processStatement(BaseStatement statement) {\n\n labels.addAll(statement.produceLabels());\n\n // Only produce Init if it is the first statement\n if(((BaseMutableTreeNode)statement.getParent()).getChildBefore(statement) == null) {\n init = statement.produceInit();\n }\n\n // Only produce Init if it is the first statement\n if(((BaseMutableTreeNode)statement.getParent()).getChildAfter(statement) == null) {\n finals = statement.produceFinals();\n }\n\n boolean isAssigningInitFlow = false;\n if(flow.edgeSet().size() == 0) {\n isAssigningInitFlow = true;\n }\n flow = statement.produceFlows(flow);\n if(isAssigningInitFlow) {\n Set<DefaultEdge> edgeSet = flow.edgeSet();\n initEdge = edgeSet.iterator().next();\n }\n\n statements.add(statement);\n }", "private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n return new TreeNode(expr); // you fill this in\n } else {\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n for (int k = 1; k < expr.length() - 1; k++) {\n // you supply the missing code\n \tif (nesting == 0) {\n \t\tif (expr.charAt(k) == '+' || expr.charAt(k) == '*') {\n \t\t\topPos = k;\n \t\t}\n \t}\n \tif (expr.charAt(k) == '(') {\n \t\tnesting++;\n \t} else if (expr.charAt(k) == ')') {\n \t\tnesting--;\n \t}\n }\n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op, exprTreeHelper(opnd1), exprTreeHelper(opnd2)); // you fill this in\n }\n }", "public interface ParseNodeVisitor {\r\n // non-leaf nodes: visitEnter and visitLeave\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Constructs larger than statements\r\n void visitEnter(ParseNode node);\r\n\r\n void visitLeave(ParseNode node);\r\n\r\n void visitEnter(ProgramNode node);\r\n\r\n void visitLeave(ProgramNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Function Node\r\n void visitEnter(GlobalDefinitionNode node);\r\n\r\n void visitLeave(GlobalDefinitionNode node);\r\n\r\n void visitEnter(FunctionDefinitionNode node);\r\n\r\n void visitLeave(FunctionDefinitionNode node);\r\n\r\n void visitEnter(LambdaNode node);\r\n\r\n void visitLeave(LambdaNode node);\r\n\r\n void visitEnter(LambdaParamTypeNode node);\r\n\r\n void visitLeave(LambdaParamTypeNode node);\r\n\r\n void visitEnter(ParameterListNode node);\r\n\r\n void visitLeave(ParameterListNode node);\r\n\r\n void visitEnter(ParameterSpecificationNode node);\r\n\r\n void visitLeave(ParameterSpecificationNode node);\r\n\r\n void visitEnter(FunctionInvocationNode node);\r\n\r\n void visitLeave(FunctionInvocationNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Statement Node\r\n void visitEnter(BlockStatementNode node);\r\n\r\n void visitLeave(BlockStatementNode node);\r\n\r\n void visitEnter(PrintStatementNode node);\r\n\r\n void visitLeave(PrintStatementNode node);\r\n\r\n void visitEnter(DeclarationNode node);\r\n\r\n void visitLeave(DeclarationNode node);\r\n\r\n void visitEnter(AssignmentStatementNode node);\r\n\r\n void visitLeave(AssignmentStatementNode node);\r\n\r\n void visitEnter(IfStatementNode node);\r\n\r\n void visitLeave(IfStatementNode node);\r\n\r\n void visitEnter(WhileStatementNode node);\r\n\r\n void visitLeave(WhileStatementNode node);\r\n\r\n void visitEnter(ReleaseStatementNode node);\r\n\r\n void visitLeave(ReleaseStatementNode node);\r\n\r\n void visitEnter(ReturnStatementNode node);\r\n\r\n void visitLeave(ReturnStatementNode node);\r\n\r\n void visitEnter(CallStatementNode node);\r\n\r\n void visitLeave(CallStatementNode node);\r\n\r\n void visitEnter(BreakStatementNode node);\r\n\r\n void visitLeave(BreakStatementNode node);\r\n\r\n void visitEnter(ContinueStatementNode node);\r\n\r\n void visitLeave(ContinueStatementNode node);\r\n \r\n void visitEnter(ForStatementNode node);\r\n\r\n void visitLeave(ForStatementNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Expression Node\r\n void visitEnter(BinaryOperatorNode node);\r\n\r\n void visitLeave(BinaryOperatorNode node);\r\n\r\n void visitEnter(UnaryOperatorNode node);\r\n\r\n void visitLeave(UnaryOperatorNode node);\r\n\r\n void visitEnter(TypeCastingNode node);\r\n\r\n void visitLeave(TypeCastingNode node);\r\n\r\n void visitEnter(ExpressionListNode node);\r\n\r\n void visitLeave(ExpressionListNode node);\r\n\r\n void visitEnter(NewArrayTypeLengthNode node);\r\n\r\n void visitLeave(NewArrayTypeLengthNode node);\r\n\r\n void visitEnter(TypeNode node);\r\n\r\n void visitLeave(TypeNode node);\r\n\r\n void visitEnter(TypeListNode node);\r\n\r\n void visitLeave(TypeListNode node);\r\n \r\n void visitEnter(LambdaTypeNode node);\r\n\r\n void visitLeave(LambdaTypeNode node);\r\n \r\n void visitEnter(ArrayIndexingNode node);\r\n\r\n void visitLeave(ArrayIndexingNode node);\r\n\r\n // leaf nodes: visitLeaf only\r\n void visit(BooleanConstantNode node);\r\n\r\n void visit(TypeCastedToNode node);\r\n\r\n void visit(ErrorNode node);\r\n\r\n void visit(IdentifierNode node);\r\n\r\n void visit(IntegerConstantNode node);\r\n\r\n void visit(FloatingConstantNode node);\r\n\r\n void visit(CharConstantNode node);\r\n\r\n void visit(StringConstantNode node);\r\n\r\n void visit(NewlineNode node);\r\n\r\n void visit(TabNode node);\r\n\r\n void visit(SpaceNode node);\r\n\r\n public static class Default implements ParseNodeVisitor {\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Constructs larger than statements\r\n\r\n public void defaultVisit(ParseNode node) {}\r\n\r\n public void defaultVisitEnter(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void defaultVisitLeave(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void defaultVisitForLeaf(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void visitEnter(ParseNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParseNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ProgramNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ProgramNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Function Node\r\n public void visitEnter(GlobalDefinitionNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(GlobalDefinitionNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(FunctionDefinitionNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(FunctionDefinitionNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(LambdaNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(LambdaParamTypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaParamTypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ParameterListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParameterListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ParameterSpecificationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParameterSpecificationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(FunctionInvocationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(FunctionInvocationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Statements\r\n\r\n /*\r\n * Statements -> BlockStatement PrintStatement Declaration AssignmentStatement IfStatement\r\n * WhileStatement ReleaseStatement ReturnStatement CallStatement BreakStatement\r\n * ContinueStatement\r\n */\r\n\r\n ///////////////////////////////////////////////////////////\r\n // BlockStatement\r\n public void visitEnter(BlockStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BlockStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // PrintStatement\r\n public void visitEnter(PrintStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(PrintStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // DeclarationStatement\r\n public void visitEnter(DeclarationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(DeclarationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // AssignmentStatement\r\n public void visitEnter(AssignmentStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(AssignmentStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // IfStatement\r\n public void visitEnter(IfStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(IfStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // WhileStatement\r\n public void visitEnter(WhileStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(WhileStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ReleaseStatement\r\n public void visitEnter(ReleaseStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ReleaseStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ReturnStatement\r\n public void visitEnter(ReturnStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ReturnStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // CallStatement\r\n public void visitEnter(CallStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(CallStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // BreakStatement\r\n public void visitEnter(BreakStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BreakStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ContinueStatement\r\n public void visitEnter(ContinueStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ContinueStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n ///////////////////////////////////////////////////////////\r\n // ForStatement\r\n public void visitEnter(ForStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ForStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // ExpressionNode\r\n\r\n public void visitEnter(BinaryOperatorNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BinaryOperatorNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(UnaryOperatorNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(UnaryOperatorNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(TypeCastingNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeCastingNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ExpressionListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ExpressionListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(NewArrayTypeLengthNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(NewArrayTypeLengthNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitLeave(ArrayIndexingNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ArrayIndexingNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitEnter(TypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n public void visitEnter(LambdaTypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaTypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n public void visitEnter(TypeListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Leaf nodes\r\n public void visit(IdentifierNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(TypeCastedToNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(BooleanConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(ErrorNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(IntegerConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(FloatingConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(CharConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(StringConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(NewlineNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(TabNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(SpaceNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n }\r\n}", "public interface\n BBlockNodeIterator\n{\n\n /** next\n * Get the next node in this basic block.\n * By repetitively invoking \"next\", all nodes in the basic block\n * are traversed.\n **/\n public IR\n next();\n\n /** hasNext\n * @return true if there is next node remaining in the basic block.\n **/\n public boolean\n hasNext();\n\n//##62 public IR // Get the node that is an instance of Stmt\n//##62 nextStmt(); //##60\n\n//##62 public boolean\n//##62 hasNextStmt();\n\n /** getNextExecutableNode\n * Get the node that refer/set data or change control flow directly.\n * The iterator skips such non-executable nodes as\n * labelNode, blockNode, listNode, stmtNode,\n * ifNode, forNode, whileNode, untilNode, switchNode,\n * progNode, subpDefNode, labelDefNode, infNode, subpNode,\n * typeNode, labeledStmtNode with non-null Stmt body, nullNode\n * and get executable statement body or expression\n * under the skipped node.\n * If a labeled statement has null statement body,\n * it is not skipped.\n **/\n public HIR\n getNextExecutableNode();\n\n}", "public ArrayList<StatementParse> collapseExpression(ArrayList<StatementParse> expression){\n int index = 0;\n for (int i = 0; i < expression.size(); i++){\n if (expression.get(i) instanceof IntegerParse) {\n index = i;\n break;\n }\n // when all nodes are not constant\n if (i == expression.size() - 1){\n index = expression.size();\n }\n }\n\n int result = 0;\n for (int i = index; i < expression.size(); i++){\n StatementParse child = expression.get(i);\n if (child.isNegative()){\n result = result - ((IntegerParse) child).getValue();\n } else {\n result = result + ((IntegerParse) child).getValue();\n }\n }\n ArrayList<StatementParse> converted = new ArrayList<>(expression.subList(0, index));\n // collapse 0\n if (result == 0) return converted;\n // if result is negative, flip the sign\n IntegerParse integer;\n if (result < 0){\n result = - result;\n integer = new IntegerParse(result);\n integer.setNegative(true);\n } else {\n integer = new IntegerParse(result);\n }\n converted.add(integer);\n return converted;\n }", "StatementBlock createStatementBlock();", "@Override\r\n\tpublic void visit(InstrumentStatement instrumentStatement) {\n\t\t\r\n\t}", "@Generated(value={\"edu.jhu.cs.bsj.compiler.utils.generator.SourceGenerator\"})\npublic interface ExpressionNode extends Node, VariableInitializerNode\n{\n /**\n * Generates a deep copy of this node.\n * @param factory The node factory to use to create the deep copy.\n * @return The resulting deep copy node.\n */\n @Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);\n \n}", "Expr expr();", "ASTNode clone0(AST target) {\r\n\t\tNewAnonymousClassExpression result = new NewAnonymousClassExpression(target);\r\n\t\tresult.setSourceRange(this.getStartPosition(), this.getLength());\r\n\tresult.setExpression((Expression) ASTNode.copySubtree(target, getExpression()));\r\n\t\tresult.newArguments.addAll(ASTNode.copySubtrees(target, newArguments()));\r\n\t\tresult.constructorArguments.addAll(ASTNode.copySubtrees(target, constructorArguments()));\r\n\t\tresult.baseClasses.addAll(ASTNode.copySubtrees(target, baseClasses()));\r\n\t\tresult.declarations.addAll(ASTNode.copySubtrees(target, declarations()));\r\n\t\treturn result;\r\n\t}", "public static void main(String[] args){\r\n\r\n IStmt lab2ex1 = new CompStmt(new AssignStmt(\"v\", new ConstExp(2)), new PrintStmt(new VarExp(\"v\")));\r\n\r\n /*\r\n * lab2ex2\r\n * a = 2 + 3 * 5;\r\n * b = a + 1;\r\n * print(b)\r\n *\r\n * */\r\n\r\n IStmt lab2ex2 = new CompStmt(new AssignStmt(\"a\", new ArithExp('+', new ConstExp(2), new ArithExp('*', new ConstExp(3), new ConstExp(5)))), new CompStmt(new AssignStmt(\"b\", new ArithExp('+', new VarExp(\"a\"), new ConstExp(1))), new PrintStmt(new VarExp(\"b\"))));\r\n\r\n /*\r\n * lab2ex3\r\n * a = 2 - 2;\r\n * if a then v = 2 else v = 3\r\n * print(v)\r\n *\r\n * */\r\n\r\n IStmt lab2ex3 = new CompStmt(new AssignStmt(\"a\", new ArithExp('-', new ConstExp(2), new ConstExp(2))), new CompStmt(new IfStmt(new VarExp(\"a\"), new AssignStmt(\"v\", new ConstExp(2)), new AssignStmt(\"v\", new ConstExp(3))), new PrintStmt(new VarExp(\"v\"))));\r\n\r\n /*\r\n * lab3ex1\r\n * openRFile(var_f, \"test.in\");\r\n * readFile(var_f, var_c); print(var_c);\r\n * if var_c then readFile(var_f, var_c); print(var_c)\r\n * else print(0)\r\n * closeRFile(var_f)\r\n *\r\n * */\r\n\r\n IStmt lab3ex1 = new CompStmt(new OpenRFileStmt(\"var_f\", \"test1.in\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"var_c\")),\r\n new CompStmt(\r\n new IfStmt(\r\n new VarExp(\"var_c\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new PrintStmt(new VarExp(\"var_c\"))\r\n ),\r\n new PrintStmt(new ConstExp(0))\r\n ),\r\n new CloseRFileStmt(new VarExp(\"var_f\"))\r\n )\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * lab3ex2\r\n * openRFile(var_f + 2, var_c); print(var_c);\r\n * (if var_c then readFile(var_f, var_c); print(var_c)\r\n * else print(0));\r\n * closeRFile(var_f)\r\n *\r\n */\r\n\r\n IStmt lab3ex2 = new CompStmt(new OpenRFileStmt(\"var_f\", \"test.in\"),\r\n new CompStmt(\r\n new ReadFileStmt(new ArithExp('+', new VarExp(\"var_f\"), new ConstExp(2)), \"var_c\"),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"var_c\")),\r\n new CompStmt(\r\n new IfStmt(\r\n new VarExp(\"var_c\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new PrintStmt(new VarExp(\"var_c\"))\r\n ),\r\n new PrintStmt(new ConstExp(0))\r\n ),\r\n new CloseRFileStmt(new VarExp(\"var_f\"))\r\n )\r\n )\r\n )\r\n );\r\n\r\n\r\n /*\r\n * v = 10; new(v, 20); new(a, 22); wH(a, 30); print(a); print(rH(a)); a = 0;\r\n *\r\n * */\r\n\r\n IStmt lab4ex1 = new CompStmt(new AssignStmt(\"v\", new ConstExp(10)),\r\n new CompStmt(\r\n new NewStmt(\"v\", new ConstExp(20)),\r\n new CompStmt(\r\n new NewStmt(\"a\", new ConstExp(22)),\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"a\")),\r\n new CompStmt(\r\n new PrintStmt(new ReadHeapExp(\"a\")),\r\n new AssignStmt(\"a\", new ConstExp(0))\r\n )\r\n )\r\n )\r\n )\r\n )\r\n );\r\n\r\n\r\n /**\r\n *\r\n * Lab5ex1: 10 + (2 < 6) = 11\r\n *\r\n * */\r\n\r\n\r\n IStmt lab5ex1 = new CompStmt(new AssignStmt(\"P\", new ArithExp('+', new ConstExp(10),\r\n new BooleanExp(new ConstExp(2), new ConstExp(6), \"<\"))),\r\n new PrintStmt(new VarExp(\"P\")));\r\n\r\n\r\n /*\r\n *\r\n * Lab5ex2: (10 + 2) < 6\r\n *\r\n * **/\r\n\r\n IStmt lab5ex2 = new CompStmt(new AssignStmt(\"Q\", new BooleanExp(new ArithExp('+',\r\n new ConstExp(10), new ConstExp(2)), new ConstExp(6), \"<\")),\r\n new PrintStmt(new VarExp(\"Q\")));\r\n\r\n\r\n /*\r\n *\r\n * v = 6;\r\n * (while (v - 4) print(v); v = v - 1)\r\n * print(v)\r\n *\r\n ***/\r\n\r\n AssignStmt as = new AssignStmt(\"v\", new ConstExp(6));\r\n IStmt auxlab5ex3 = new CompStmt(new WhileStmt(new BooleanExp(new VarExp(\"v\"),\r\n new ConstExp(4), \">=\"), new CompStmt(new PrintStmt(new VarExp(\"v\")),\r\n new AssignStmt(\"v\", new ArithExp('-', new VarExp(\"v\"), new ConstExp(1))))),\r\n new PrintStmt(new VarExp(\"v\")));\r\n\r\n IStmt lab5ex3 = new CompStmt(as, auxlab5ex3);\r\n\r\n\r\n /**\r\n *\r\n * la6ex1\r\n * v = 10; new(a, 22);\r\n * fork(wH(a, 30); v = 32; print(v); print(rH(a)));\r\n * print(v); print(rH(a))\r\n *\r\n * */\r\n\r\n IStmt lab6ex1 = new CompStmt(\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(10)),\r\n new NewStmt(\"a\", new ConstExp(22))\r\n ),\r\n new CompStmt(\r\n new ForkStmt(\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(32)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n )\r\n ),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n );\r\n\r\n IStmt lab6ex2 = new CompStmt(\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(10)),\r\n new NewStmt(\"a\", new ConstExp(22))\r\n ),\r\n new CompStmt(\r\n new ForkStmt(\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(32)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n )\r\n ),\r\n new ForkStmt(new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\")))\r\n )\r\n )\r\n );\r\n\r\n\r\n\r\n TextMenu menu = new TextMenu(new MyDictionary<String, Command>(new HashMap<String, Command>()));\r\n menu.addCommand(new ExitCommand(\"0\", \"Exit\"));\r\n menu.addCommand(new RunExample(\"1\", lab2ex1.toString(), getNewController(lab2ex1)));\r\n menu.addCommand(new RunExample(\"2\", lab2ex2.toString(), getNewController(lab2ex2)));\r\n menu.addCommand(new RunExample(\"3\", lab2ex3.toString(), getNewController(lab2ex3)));\r\n menu.addCommand(new RunExample(\"4\", lab3ex1.toString(), getNewController(lab3ex1)));\r\n menu.addCommand(new RunExample(\"5\", lab3ex2.toString(), getNewController(lab3ex2)));\r\n menu.addCommand(new RunExample(\"6\", lab4ex1.toString(), getNewController(lab4ex1)));\r\n menu.addCommand(new RunExample(\"7\", lab5ex1.toString(), getNewController(lab5ex1)));\r\n menu.addCommand(new RunExample(\"8\", lab5ex2.toString(), getNewController(lab5ex2)));\r\n menu.addCommand(new RunExample(\"9\", lab5ex3.toString(), getNewController(lab5ex3)));\r\n menu.addCommand(new RunExample(\"10\", lab6ex1.toString(), getNewController(lab6ex1)));\r\n menu.addCommand(new RunExample(\"11\", lab6ex2.toString(), getNewController(lab6ex2)));\r\n\r\n menu.show();\r\n }", "@Override\n public NodeType ExecuteOperation()\n {\n //if the first child is an operator\n if(this.childNodes[0].isOperator==true)\n {\n BasicOperator basicOperator=(BasicOperator)this.childNodes[0]; \n if(basicOperator.operands==1)\n {\n UnaryOperator unaryOperator=(UnaryOperator)childNodes[0];\n return unaryOperator.PerformOperation(childNodes[1]);\n }\n else if(basicOperator.operands==2)\n {\n BinaryOperator binaryOperator=(BinaryOperator)childNodes[0];\n return binaryOperator.PerformOperation(childNodes[1], childNodes[2]);\n }\n else if(basicOperator.operands==3)\n {\n TernaryOperator ternaryOperator=(TernaryOperator)childNodes[0];\n return ternaryOperator.PerformOperation(childNodes[1], childNodes[2], childNodes[3]);\n }\n }\n //if not an operator\n else\n {\n return this.childNodes[0].ExecuteOperation();\n }\n return null;\n }", "private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n \n \treturn new TreeNode(expr); // you fill this in\n } else{\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n char myChar='\\0';\n \n for (int k = 1; k < expr.length() - 1; k++) {\n myChar = expr.charAt(k);\n \tif(myChar == '('){\n \tnesting++;\n }\n if(myChar==')'){\n \tnesting--;\n }\n if(nesting == 0){\n \tif(myChar == '+' || myChar == '*'){\n \t\topPos = k;\n \t break;\t\n \t}\n }\n }\n \n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op,exprTreeHelper(opnd1),exprTreeHelper(opnd2));\n \n }\n }", "public Tipo visitBlock(DECAFParser.BlockContext ctx){\r\n\t\tTipo res=super.visitBlock(ctx);\r\n\t\tposition=tablaSimbolos.exit();\r\n\t\tif(ctx.children.size()==0){\r\n\t\t\ttablaSimbolos.addError(\"Missing instructions inside { }\");\r\n\t\t\treturn tablaSimbolos.incorrect();\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public final ANTLRv3Parser.rewrite_tree_block_return rewrite_tree_block() throws RecognitionException {\r\n ANTLRv3Parser.rewrite_tree_block_return retval = new ANTLRv3Parser.rewrite_tree_block_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token lp=null;\r\n Token char_literal154=null;\r\n ANTLRv3Parser.rewrite_tree_alternative_return rewrite_tree_alternative153 =null;\r\n\r\n\r\n CommonTree lp_tree=null;\r\n CommonTree char_literal154_tree=null;\r\n RewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\r\n RewriteRuleTokenStream stream_68=new RewriteRuleTokenStream(adaptor,\"token 68\");\r\n RewriteRuleSubtreeStream stream_rewrite_tree_alternative=new RewriteRuleSubtreeStream(adaptor,\"rule rewrite_tree_alternative\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:368:5: (lp= '(' rewrite_tree_alternative ')' -> ^( BLOCK[$lp,\\\"BLOCK\\\"] rewrite_tree_alternative EOB[$lp,\\\"EOB\\\"] ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:368:9: lp= '(' rewrite_tree_alternative ')'\r\n {\r\n lp=(Token)match(input,68,FOLLOW_68_in_rewrite_tree_block2695); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_68.add(lp);\r\n\r\n\r\n pushFollow(FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2697);\r\n rewrite_tree_alternative153=rewrite_tree_alternative();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_rewrite_tree_alternative.add(rewrite_tree_alternative153.getTree());\r\n\r\n char_literal154=(Token)match(input,69,FOLLOW_69_in_rewrite_tree_block2699); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_69.add(char_literal154);\r\n\r\n\r\n // AST REWRITE\r\n // elements: rewrite_tree_alternative\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 369:6: -> ^( BLOCK[$lp,\\\"BLOCK\\\"] rewrite_tree_alternative EOB[$lp,\\\"EOB\\\"] )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:369:9: ^( BLOCK[$lp,\\\"BLOCK\\\"] rewrite_tree_alternative EOB[$lp,\\\"EOB\\\"] )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(BLOCK, lp, \"BLOCK\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_rewrite_tree_alternative.nextTree());\r\n\r\n adaptor.addChild(root_1, \r\n (CommonTree)adaptor.create(EOB, lp, \"EOB\")\r\n );\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public void visit(ExpressionStatement expressionStatement) {\n\t}", "@Test\r\n public void basicArithmeticTest() {\n SSAgen out = new SSAgen();\r\n out.add_block(0); // Only one basic block - linear flow of execution\r\n // var x = 3, var y = 5;\r\n out.addConstant(new Result(Result.kind.Constant, 3));\r\n out.addConstant(new Result(Result.kind.Constant, 5));\r\n // assign variables x and y to prior constant - job of parser, but emulated here\r\n Result x = new Result(Result.kind.Variable, 0);\r\n Result y = new Result(Result.kind.Variable, 1);\r\n // addition, sub, mul, div\r\n out.add_instruction(0, x, y);\r\n out.add_instruction(1, x, y);\r\n out.add_instruction(2, x, y);\r\n out.add_instruction(3, x, y);\r\n\r\n Instruction curInst;\r\n String [] correct = {\"const #3\\n\", \"const #5\\n\", \"add (0) (1)\\n\", \"sub (0) (1)\\n\", \"mul (0) (1)\\n\", \"div (0) (1)\\n\"};\r\n for (int i = 0; i < 6; ++i) {\r\n curInst = out.current_block.getInstruction(i);\r\n assertEquals(curInst.getInstrString(), correct[i]);\r\n }\r\n }", "ASTNode clone(AST target) {\n ForStatement result = new ForStatement(target);\n result.setLeadingComment(getLeadingComment());\n result.initializers().addAll(ASTNode.copySubtrees(target, initializers()));\n result.setExpression(\n (Expression) ASTNode.copySubtree(target, getExpression()));\n result.updaters().addAll(ASTNode.copySubtrees(target, updaters()));\n result.setBody(\n (Statement) ASTNode.copySubtree(target, getBody()));\n return result; }", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "SimpleLiteral createSimpleLiteral();", "public interface TreeInterface extends SymmetricDigraphInterface {\r\n /** Return parent of a tree node.\r\n * @precondition nonNull(node)\r\n */\r\n public IRNode getParent(IRNode node);\r\n\r\n /** The location is a value used by an IRSequence\r\n * to locate an element. For IRArray, it is an integer.\r\n * @precondition nonNull(node)\r\n */\r\n public IRLocation getLocation(IRNode node);\r\n\r\n /** Return the root of a subtree.\r\n */\r\n public IRNode getRoot(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with leaves and working toward the node given.\r\n * A postorder traversal.\r\n */\r\n public Iteratable<IRNode> bottomUp(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with this node and working toward the leaves.\r\n * A preorder traversal.\r\n */\r\n public Iteratable<IRNode> topDown(IRNode subtree);\r\n}", "public void visit(Literal literal) {}", "@Override\n\t\t\tpublic Ast binaryOp(BinaryOp ast, Void arg) {\n\t\t\t\tsuper.binaryOp(ast, arg);\n\n\t\t\t\ttry {\n\t\t\t\t\tExpr left = ast.left();\n\t\t\t\t\tExpr right = ast.right();\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase B_TIMES:\n\t\t\t\t\t\tintValue = asInt(left) * asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_DIV:\n\t\t\t\t\t\tintValue = asInt(left) / asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MOD:\n\t\t\t\t\t\tintValue = asInt(left) % asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_PLUS:\n\t\t\t\t\t\tintValue = asInt(left) + asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MINUS:\n\t\t\t\t\t\tintValue = asInt(left) - asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_AND:\n\t\t\t\t\t\tboolValue = asBool(left) && asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_OR:\n\t\t\t\t\t\tboolValue = asBool(left) || asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) < asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) <= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) > asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) >= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_NOT_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tif (boolValue != null)\n\t\t\t\t\t\t\tboolValue = !boolValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException exc) {\n\t\t\t\t\t// non-constant operands: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t} catch (ArithmeticException exc) {\n\t\t\t\t\t// division by zero etc: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}", "public ArrayList<Binding> unifies(AST ast, ArrayList<Binding> bindings){\n ArrayList<Binding> full_bindings = new ArrayList<Binding>();\n ArrayList<Binding> left_bindings = left.unifies(ast, bindings); \n //go through rhs and try to generate the new bindings\n for(Binding b : left_bindings){\n //pass in the binding\n //System.out.println(b.toString());\n //System.out.println(right.formatString());\n AST newQuery = right.apply(b);\n //System.out.println(newQuery.toString());\n\n ArrayList<Binding> resultBindings = null;\n if(newQuery instanceof Conjunct || newQuery instanceof Disjunct){\n resultBindings = Database.getInstance().query(newQuery, true);\n } else {\n resultBindings = Database.getInstance().query(newQuery);\n }\n \n for(Binding r : resultBindings)\n {\n //System.out.println(\"Mergings Bindings:\");\n //System.out.println(b.toString());\n //System.out.println(\"-and-\");\n //System.out.println(r.toString());\n //System.out.println(\">>\");\n //System.out.println(b.merge(r).toString() + \"\\n\");\n full_bindings.add(b.merge(r));\n }\n }\n return full_bindings;\n }", "public String visit(BracketExpression n, LLVMRedux argu) throws Exception {\n\n\n return n.f1.accept(this,argu);\n }", "public final void rule__AstInitialize__StatementsAssignment_8_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24594:1: ( ( ruleAstStatement ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24595:1: ( ruleAstStatement )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24595:1: ( ruleAstStatement )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24596:1: ruleAstStatement\n {\n before(grammarAccess.getAstInitializeAccess().getStatementsAstStatementParserRuleCall_8_1_0()); \n pushFollow(FOLLOW_ruleAstStatement_in_rule__AstInitialize__StatementsAssignment_8_149380);\n ruleAstStatement();\n\n state._fsp--;\n\n after(grammarAccess.getAstInitializeAccess().getStatementsAstStatementParserRuleCall_8_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
[ "0.5846747", "0.5717894", "0.5477662", "0.5390858", "0.5384206", "0.53756374", "0.53722036", "0.5274298", "0.5247379", "0.52021164", "0.5118003", "0.5090538", "0.50865245", "0.50741214", "0.5061169", "0.5061169", "0.50149566", "0.49787572", "0.49616915", "0.48258173", "0.4805898", "0.4792959", "0.47861278", "0.4774189", "0.47710598", "0.4759794", "0.4748683", "0.47472385", "0.47456414", "0.47288185", "0.4725726", "0.46861517", "0.46829677", "0.46613482", "0.46359062", "0.46271986", "0.46023276", "0.45522416", "0.45494226", "0.45469102", "0.45458865", "0.45191625", "0.45181382", "0.45165217", "0.45140964", "0.44922122", "0.44689828", "0.44621685", "0.44582468", "0.44575202", "0.44551545", "0.44420293", "0.44194183", "0.44068068", "0.44061327", "0.4397379", "0.43953103", "0.43879148", "0.43859497", "0.43783548", "0.43762937", "0.43699107", "0.4359715", "0.43586195", "0.43569237", "0.4355765", "0.43481535", "0.43427414", "0.4342559", "0.43404463", "0.43391794", "0.4332788", "0.4327722", "0.4327324", "0.4314142", "0.4311606", "0.43084216", "0.4307736", "0.43066508", "0.43023634", "0.43004352", "0.43003535", "0.42932624", "0.42829013", "0.42675662", "0.42674214", "0.42629158", "0.426194", "0.42580682", "0.42513674", "0.4242502", "0.42353985", "0.42317718", "0.4228236", "0.42140085", "0.4213031", "0.42100787", "0.42003137", "0.41951713", "0.41889584" ]
0.465487
34
Convert a statement AST to IR tree
public static void statement(CommonTree ast, IRTree irt) { CommonTree ast1; IRTree irt1 = new IRTree(); Token t = ast.getToken(); int tt = t.getType(); if (tt == WRITELN) { String a = String.valueOf(Memory.allocateString("\n")); irt.setOp("WRS"); irt.addSub(new IRTree("MEM", new IRTree("CONST", new IRTree(a)))); } else if (tt == WRITE) { ast1 = (CommonTree)ast.getChild(0); String type = arg(ast1, irt1); if (type.equals("real")) { irt.setOp("WRR"); irt.addSub(irt1); } else { irt.setOp("WRS"); irt.addSub(irt1); } } else if(tt == ASSIGN) { //try deailng with assign here irt.setOp("ASSIGN"); IRTree iHold = new IRTree("MEM", new IRTree("CONST", new IRTree(String.valueOf(Memory.allocateReal(ast.getChild(0).getText()))))); System.out.println("var name = " + ast.getChild(0).getText()); irt.addSub(iHold); expression((CommonTree)ast.getChild(1), irt1); irt.addSub(irt1); } else if(tt == MEM) { System.out.println("GOT MEM TYPE"); } else { error(tt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Statement build(LinkedListTree ast) {\n\t\tswitch (ast.getType()) {\n\t\t\tcase AS3Parser.BLOCK:\n\t\t\t\treturn new ASTStatementList(ast);\n\t\t\tcase AS3Parser.DO:\n\t\t\t\treturn new ASTASDoWhileStatement(ast);\n\t\t\tcase AS3Parser.EXPR_STMNT:\n\t\t\t\treturn new ASTASExpressionStatement(ast);\n\t\t\tcase AS3Parser.FOR_EACH:\n\t\t\t\treturn new ASTASForEachInStatement(ast);\n\t\t\tcase AS3Parser.FOR_IN:\n\t\t\t\treturn new ASTASForInStatement(ast);\n\t\t\tcase AS3Parser.FOR:\n\t\t\t\treturn new ASTASForStatement(ast);\n\t\t\tcase AS3Parser.IF:\n\t\t\t\treturn new ASTASIfStatement(ast);\n\t\t\tcase AS3Parser.SWITCH:\n\t\t\t\treturn new ASTASSwitchStatement(ast);\n\t\t\tcase AS3Parser.CONST:\n\t\t\tcase AS3Parser.VAR:\n\t\t\t\treturn new ASTASDeclarationStatement(ast);\n\t\t\tcase AS3Parser.WHILE:\n\t\t\t\treturn new ASTASWhileStatement(ast);\n\t\t\tcase AS3Parser.WITH:\n\t\t\t\treturn new ASTASWithStatement(ast);\n\t\t\tcase AS3Parser.RETURN:\n\t\t\t\treturn new ASTASReturnStatement(ast);\n\t\t\tcase AS3Parser.SUPER:\n\t\t\t\treturn new ASTASSuperStatement(ast);\n\t\t\tcase AS3Parser.BREAK:\n\t\t\t\treturn new ASTASBreakStatement(ast);\n\t\t\tcase AS3Parser.TRY:\n\t\t\t\treturn new ASTASTryStatement(ast);\n\t\t\tcase AS3Parser.DEFAULT_XML_NAMESPACE:\n\t\t\t\treturn new ASTASDefaultXMLNamespaceStatement(ast);\n\t\t\tcase AS3Parser.CONTINUE:\n\t\t\t\treturn new ASTASContinueStatement(ast);\n\t\t\tcase AS3Parser.THROW:\n\t\t\t\treturn new ASTASThrowStatement(ast);\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(\"Unsupported statement node type: \"+ASTUtils.tokenName(ast)+\" in \"+ActionScriptFactory.str(ASTUtils.stringifyNode(ast)));\n\t\t}\n\t}", "public ASTNode visitStatement(StatementContext ctx) {\n ASTStmt stmt = (ASTStmt)visit(ctx.stmt());\n return new ASTStmtUnit(ctx, stmt);\n }", "public String convertStatement (String oraStatement);", "public String convertStatement (String oraStatement);", "void genAst();", "public interface AST {\n \n /**\n * Returns the label or tag for this AST node.\n */\n public int getNodeLabel ();\n \n /**\n * Returns the textual value of this AST node.\n */\n public String getNodeValue ();\n \n /**\n * Returns a list of child nodes, or null if there are no child nodes. The value returned is a shallow copy\n * which can be manipulated by the caller.\n */\n public List<AST> getChildNodes ();\n \n /**\n * Returns the position of the node in the original source(s).\n */\n public CodePosition getCodePosition ();\n \n}", "private ParseTree parseStatement() {\n return parseSourceElement();\n }", "public static void program(CommonTree ast, IRTree irt)\n {\n statements(ast, irt);\n }", "public interface IStmt {\n\n String toStr();\n PrgState execute(PrgState state) throws StmtException;\n\n}", "public Element compileStatements() throws CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\n\t\tboolean end = false;\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\tElement statementsParent = document.createElement(\"statements\");\n\n\t\tdo {\n\t\t\tif (token.equals(\"let\")) {\n\t\t\t\tele = compileLet();\n\t\t\t} else if (token.equals(\"do\")) {\n\t\t\t\tele = compileDo();\n\t\t\t} else if (token.equals(\"if\")) {\n\t\t\t\tele = compileIf();\n\t\t\t} else if (token.equals(\"while\")) {\n\t\t\t\tele = compileWhile();\n\t\t\t} else if (token.equals(\"return\")) {\n\t\t\t\tele = compileReturn();\n\t\t\t}\n\t\t\tif (ele != null)\n\t\t\t\tstatementsParent.appendChild(ele);\n\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\tif (!token.matches(\"let|if|while|do|return\"))\n\t\t\t\tend = true;\n\t\t} while (!end);\n\n\t\treturn statementsParent;\n\t}", "public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n // System.out.println(\"BEGIN\");\n n.f1.accept(this);\n n.f2.accept(this);\n \t\n String s = (String) n.f3.accept(this);\n current_temp =s;\n n.f4.accept(this);\n //System.out.println(\"END\");\n return (R)s;\n }", "public static void expression(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == REALNUM) {\n constant(ast, irt1);\n irt.setOp(\"CONST\");\n irt.addSub(irt1);\n }\n else if(tt == PLUS || tt == MINUS || tt == TIMES || tt == DIVIDE)\n {\n //do something\n irt.setOp(\"BINOP\");\n IRTree irt2 = new IRTree();\n expression((CommonTree)ast.getChild(0), irt1);\n expression((CommonTree)ast.getChild(1), irt2);\n\tif(tt == PLUS)\n \t\t irt.addSub(new IRTree(\"+\")); \n\telse if(tt == MINUS)\n\t\tirt.addSub(new IRTree(\"-\"));\n\telse if(tt == TIMES)\n\t\tirt.addSub(new IRTree(\"*\"));\n\telse if(tt == DIVIDE)\n\t\tirt.addSub(new IRTree(\"/\"));\n irt.addSub(irt1);\n irt.addSub(irt2);\n }\n else\n\tSystem.out.println(\"unrecognised type \" + tt);\n }", "public abstract Statement createRootStatement(CodeLocation codeLoc, List<Annotation> annotations, Statement ... s);", "public String toStringAST()\r\n/* 75: */ {\r\n/* 76: 94 */ StringBuilder s = new StringBuilder();\r\n/* 77: */ \r\n/* 78: 96 */ s.append('{');\r\n/* 79: 97 */ int count = getChildCount();\r\n/* 80: 98 */ for (int c = 0; c < count; c++)\r\n/* 81: */ {\r\n/* 82: 99 */ if (c > 0) {\r\n/* 83:100 */ s.append(',');\r\n/* 84: */ }\r\n/* 85:102 */ s.append(getChild(c).toStringAST());\r\n/* 86: */ }\r\n/* 87:104 */ s.append('}');\r\n/* 88:105 */ return s.toString();\r\n/* 89: */ }", "public static void statements(CommonTree ast, IRTree irt)\n {\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == BEGIN) {\n int n = ast.getChildCount();\n if (n == 0) {\n irt.setOp(\"NOOP\");\n }\n else {\n CommonTree ast1 = (CommonTree)ast.getChild(0);\n statements1(ast, 0, n-1, irt);\n }\n }\n else {\n error(tt);\n }\n }", "protected abstract String assemble(Statement statement);", "private ParseTree parseStatementStandard() {\n switch (peekType()) {\n case OPEN_CURLY:\n return parseBlock();\n case CONST:\n case VAR:\n return parseVariableStatement();\n case SEMI_COLON:\n return parseEmptyStatement();\n case IF:\n return parseIfStatement();\n case DO:\n return parseDoWhileStatement();\n case WHILE:\n return parseWhileStatement();\n case FOR:\n return parseForStatement();\n case CONTINUE:\n return parseContinueStatement();\n case BREAK:\n return parseBreakStatement();\n case RETURN:\n return parseReturnStatement();\n case WITH:\n return parseWithStatement();\n case SWITCH:\n return parseSwitchStatement();\n case THROW:\n return parseThrowStatement();\n case TRY:\n return parseTryStatement();\n case DEBUGGER:\n return parseDebuggerStatement();\n default:\n if (peekLabelledStatement()) {\n return parseLabelledStatement();\n }\n return parseExpressionStatement();\n }\n }", "public static void parseAST(Node astNode) {\n\n int childrenNum = astNode.getChildCount();\n for (int i = 0; i < childrenNum; i++) {\n Node child = astNode.getChild(i);\n String astNodeType = child.getClass().getName();\n\n if (astNodeType.contains(\"Text\")) {\n if (child.getValue().contains(\"\\n\")) {\n lineNum++;\n }\n }\n if (astNodeType.contains(\"Element\")) {\n String localName = ((Element) child).getLocalName();\n if (localName.equals(\"decl_stmt\")) {\n String type = ((Element) child).getChildElements().get(0).getChildElements(\"type\", \"http://www.sdml.info/srcML/src\").get(0).getValue();\n String name = ((Element) child).getChildElements().get(0).getChildElements(\"name\", \"http://www.sdml.info/srcML/src\").get(0).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (localName.equals(\"function_decl\")) {\n String type = ((Element) child).getChildElements().get(0).getValue();\n String name = ((Element) child).getChildElements().get(1).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (localName.equals(\"function\")) {\n String type = ((Element) child).getChildElements().get(0).getValue();\n String name = ((Element) child).getChildElements().get(1).getValue();\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(child);\n } else if (localName.equals(\"block\")) {\n parseAST(child);\n } else if (localName.equals(\"expr_stmt\")) {\n Element exprChild = ((Element) ((Element) child).getChildElements().get(0).getChild(0));\n String exprType = exprChild.getLocalName();\n if (exprType.equals(\"name\")) {\n String name = exprChild.getValue();\n String type = \"\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else if (exprType.equals(\"call\")) {\n String name = exprChild.getChild(0).getValue();\n String type = \"call\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(exprChild);\n }\n } else if (localName.equals(\"call\")) {\n String name = child.getChild(0).getValue();\n String type = \"call\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n parseAST(child);\n } else if (localName.equals(\"argument\")) {\n Element c = ((Element) ((Element) child).getChildElements().get(0).getChild(0));\n if (c.getLocalName().equals(\"name\")) {\n String name = c.getValue();\n String type = \"\";\n candidates.add(new CppNode(name, type, localName, lineNum));\n } else {\n parseAST(child);\n }\n\n\n } else if (!entity.getTerminal().contains(localName)) {\n parseAST(child);\n }\n\n }\n }\n\n }", "public void visit(ExpressionStatement expressionStatement) {\n\t}", "public final void rule__AstAction__StatementsAssignment_9_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24459:1: ( ( ruleAstStatement ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24460:1: ( ruleAstStatement )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24460:1: ( ruleAstStatement )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24461:1: ruleAstStatement\n {\n before(grammarAccess.getAstActionAccess().getStatementsAstStatementParserRuleCall_9_1_0()); \n pushFollow(FOLLOW_ruleAstStatement_in_rule__AstAction__StatementsAssignment_9_149101);\n ruleAstStatement();\n\n state._fsp--;\n\n after(grammarAccess.getAstActionAccess().getStatementsAstStatementParserRuleCall_9_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public interface Expression {\n \n enum ExpressivoGrammar {ROOT, SUM, PRODUCT, TOKEN, PRIMITIVE_1, PRIMITIVE_2, \n NUMBER, INT, DECIMAL, WHITESPACE, VARIABLE};\n \n public static Expression buildAST(ParseTree<ExpressivoGrammar> concreteSymbolTree) {\n \n if (concreteSymbolTree.getName() == ExpressivoGrammar.DECIMAL) {\n /* reached a double terminal */\n return new Num(Double.parseDouble(concreteSymbolTree.getContents())); \n }\n\n else if (concreteSymbolTree.getName() == ExpressivoGrammar.INT) {\n /* reached an int terminal */\n return new Num(Integer.parseInt(concreteSymbolTree.getContents()));\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.VARIABLE) {\n /* reached a terminal */\n return new Var(concreteSymbolTree.getContents());\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.ROOT || \n concreteSymbolTree.getName() == ExpressivoGrammar.TOKEN || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_1 || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_2 || \n concreteSymbolTree.getName() == ExpressivoGrammar.NUMBER) {\n \n /* non-terminals with only one child */\n for (ParseTree<ExpressivoGrammar> child: concreteSymbolTree.children()) {\n if (child.getName() != ExpressivoGrammar.WHITESPACE) \n return buildAST(child);\n }\n \n // should never reach here\n throw new IllegalArgumentException(\"error in parsing\");\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.SUM || concreteSymbolTree.getName() == ExpressivoGrammar.PRODUCT) {\n /* a sum or product node can have one or more children that need to be accumulated together */\n return accumulator(concreteSymbolTree, concreteSymbolTree.getName()); \n }\n \n else {\n throw new IllegalArgumentException(\"error in input: should never reach here\");\n }\n \n }\n \n /**\n * (1) Create parser using lib6005.parser from grammar file\n * (2) Parse string input into CST\n * (3) Build AST from this CST using buildAST()\n * @param input\n * @return Expression (AST)\n */\n public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }\n \n // helper methods\n public static Expression accumulator(ParseTree<ExpressivoGrammar> tree, ExpressivoGrammar grammarObj) {\n Expression expr = null;\n boolean first = true;\n List<ParseTree<ExpressivoGrammar>> children = tree.children();\n int len = children.size();\n for (int i = len-1; i >= 0; i--) {\n /* the first child */\n ParseTree<ExpressivoGrammar> child = children.get(i);\n if (first) {\n expr = buildAST(child);\n first = false;\n }\n \n /* accumulate this by creating a new binaryOp object with\n * expr as the leftOp and the result as rightOp\n **/\n \n else if (child.getName() == ExpressivoGrammar.WHITESPACE) continue;\n else {\n if (grammarObj == ExpressivoGrammar.SUM)\n expr = new Sum(buildAST(child), expr);\n else\n expr = new Product(buildAST(child), expr);\n }\n }\n \n return expr;\n \n }\n \n // ----------------- problems 3-4 -----------------\n \n public static Expression create(Expression leftExpr, Expression rightExpr, char op) {\n if (op == '+')\n return Sum.createSum(leftExpr, rightExpr);\n else\n return Product.createProduct(leftExpr, rightExpr);\n }\n\n public Expression differentiate(Var x);\n \n public Expression simplify(Map<String, Double> env);\n\n}", "public void statement(Node n_parent) {\r\n System.out.println(\":: statement:\"+n_parent.getData());\r\n if(token.get(lookAheadPossition).contains(\"ident(\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_assignment = n_parent.setChildren(\":=\");\r\n this.assignment(n_assignment);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"IF\")) {\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_ifStatement = n_parent.setChildren(\"if\");\r\n this.ifStatement(n_ifStatement);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"WHILE\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_whileStatement = n_parent.setChildren(\"while\");\r\n this.whileStatement(n_whileStatement);\r\n }\r\n else if (token.get(lookAheadPossition).equals(\"WRITEINT\")){\r\n System.out.println(\":: statement::if\");\r\n\r\n Node n_writeInt = n_parent.setChildren(\"writeInt\");\r\n this.writeInt(n_writeInt);\r\n }\r\n }", "private void parseStatement() {\n switch (nextToken.kind) {\n case Token.IDENT:\n parseSimpleStatement();\n break;\n case Token.IF:\n parseIfStatement();\n break;\n case Token.WHILE:\n parseWhileStatement();\n break;\n case Token.RETURN:\n parseReturnStatement();\n break;\n case Token.READ:\n parseReadStatement();\n break;\n case Token.PRINT:\n parsePrintStatement();\n break;\n case Token.LBRACE:\n parseBlock();\n break;\n case Token.SEMICOLON:\n check(Token.SEMICOLON);\n break;\n default:\n error(\"Illegal start of statement: \" + nextToken.kind);\n }\n }", "@Override\r\n\tpublic void visit(InstrumentStatement instrumentStatement) {\n\t\t\r\n\t}", "public ContextNodeStatement getStatement();", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "public interface ASTPath\n{\n\tvoid debugSelf(IndentPrinter destination);\n\tvoid setParent(ASTChildList.ListKey key, ASTParent newParent);\n\tvoid compileSelf(LangCompiler compiler);\n\tASTBase getDeclaration();\n\tString getName();\n\tString getEnd();\n\tSpiritType getExpressionType();\n\n}", "public void printAst(){\n explore(ctx);\n }", "public final Statement statement() throws RecognitionException {\n\t\tStatement s = null;\n\n\n\t\tToken OPENPAREN7=null;\n\t\tToken OPENPAREN8=null;\n\t\tToken OPENPAREN9=null;\n\t\tToken RETURN10=null;\n\t\tExpr e =null;\n\t\tBlock b1 =null;\n\t\tBlock b2 =null;\n\t\tBlock b =null;\n\t\tId i =null;\n\t\tArrayRef ar =null;\n\t\tExpr e2 =null;\n\n\t\ttry {\n\t\t\t// ul.g:106:32: ( SEMI |e= expr SEMI | IF OPENPAREN e= expr CLOSEPAREN b1= block ELSE b2= block | IF OPENPAREN e= expr CLOSEPAREN b= block | WHILE OPENPAREN e= expr CLOSEPAREN b= block | PRINT e= expr SEMI | PRINTLN e= expr SEMI | RETURN (e= expr )? SEMI |i= id '=' e= expr SEMI |ar= arrayRef '=' e2= expr SEMI )\n\t\t\tint alt9=10;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase SEMI:\n\t\t\t\t{\n\t\t\t\talt9=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ID:\n\t\t\t\t{\n\t\t\t\tint LA9_2 = input.LA(2);\n\t\t\t\tif ( (synpred13_ul()) ) {\n\t\t\t\t\talt9=2;\n\t\t\t\t}\n\t\t\t\telse if ( (synpred21_ul()) ) {\n\t\t\t\t\talt9=9;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt9=10;\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CHARCONST:\n\t\t\tcase FALSE:\n\t\t\tcase FLOATCONST:\n\t\t\tcase INTCONST:\n\t\t\tcase OPENPAREN:\n\t\t\tcase STRCONST:\n\t\t\tcase TRUE:\n\t\t\t\t{\n\t\t\t\talt9=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase IF:\n\t\t\t\t{\n\t\t\t\tint LA9_10 = input.LA(2);\n\t\t\t\tif ( (synpred14_ul()) ) {\n\t\t\t\t\talt9=3;\n\t\t\t\t}\n\t\t\t\telse if ( (synpred15_ul()) ) {\n\t\t\t\t\talt9=4;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return s;}\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 9, 10, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase WHILE:\n\t\t\t\t{\n\t\t\t\talt9=5;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PRINT:\n\t\t\t\t{\n\t\t\t\talt9=6;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PRINTLN:\n\t\t\t\t{\n\t\t\t\talt9=7;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RETURN:\n\t\t\t\t{\n\t\t\t\talt9=8;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (state.backtracking>0) {state.failed=true; return s;}\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 9, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt9) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:107:2: SEMI\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement379); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new Statement();}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// ul.g:108:4: e= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement390);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement392); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new ExprStatement(e, e.line, e.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// ul.g:109:4: IF OPENPAREN e= expr CLOSEPAREN b1= block ELSE b2= block\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,IF,FOLLOW_IF_in_statement398); if (state.failed) return s;\n\t\t\t\t\tOPENPAREN7=(Token)match(input,OPENPAREN,FOLLOW_OPENPAREN_in_statement400); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement406);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,CLOSEPAREN,FOLLOW_CLOSEPAREN_in_statement408); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_block_in_statement414);\n\t\t\t\t\tb1=block();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,ELSE,FOLLOW_ELSE_in_statement416); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_block_in_statement422);\n\t\t\t\t\tb2=block();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new IfElseStatement(e, b1, b2, (OPENPAREN7!=null?OPENPAREN7.getLine():0), OPENPAREN7.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\t\t// ul.g:110:4: IF OPENPAREN e= expr CLOSEPAREN b= block\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,IF,FOLLOW_IF_in_statement428); if (state.failed) return s;\n\t\t\t\t\tOPENPAREN8=(Token)match(input,OPENPAREN,FOLLOW_OPENPAREN_in_statement430); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement436);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,CLOSEPAREN,FOLLOW_CLOSEPAREN_in_statement438); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_block_in_statement444);\n\t\t\t\t\tb=block();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new IfStatement(e, b, (OPENPAREN8!=null?OPENPAREN8.getLine():0), OPENPAREN8.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5 :\n\t\t\t\t\t// ul.g:111:4: WHILE OPENPAREN e= expr CLOSEPAREN b= block\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,WHILE,FOLLOW_WHILE_in_statement450); if (state.failed) return s;\n\t\t\t\t\tOPENPAREN9=(Token)match(input,OPENPAREN,FOLLOW_OPENPAREN_in_statement452); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement458);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,CLOSEPAREN,FOLLOW_CLOSEPAREN_in_statement460); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_block_in_statement466);\n\t\t\t\t\tb=block();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new WhileStatement(e, b, (OPENPAREN9!=null?OPENPAREN9.getLine():0), OPENPAREN9.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6 :\n\t\t\t\t\t// ul.g:112:4: PRINT e= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,PRINT,FOLLOW_PRINT_in_statement472); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement478);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement480); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new PrintStatement(e, e.line, e.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7 :\n\t\t\t\t\t// ul.g:113:4: PRINTLN e= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,PRINTLN,FOLLOW_PRINTLN_in_statement486); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement492);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement494); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new PrintLnStatement(e, e.line, e.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8 :\n\t\t\t\t\t// ul.g:114:4: RETURN (e= expr )? SEMI\n\t\t\t\t\t{\n\t\t\t\t\tRETURN10=(Token)match(input,RETURN,FOLLOW_RETURN_in_statement500); if (state.failed) return s;\n\t\t\t\t\t// ul.g:114:11: (e= expr )?\n\t\t\t\t\tint alt8=2;\n\t\t\t\t\tint LA8_0 = input.LA(1);\n\t\t\t\t\tif ( (LA8_0==CHARCONST||LA8_0==FALSE||(LA8_0 >= FLOATCONST && LA8_0 <= ID)||LA8_0==INTCONST||LA8_0==OPENPAREN||LA8_0==STRCONST||LA8_0==TRUE) ) {\n\t\t\t\t\t\talt8=1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt8) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:114:12: e= expr\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement507);\n\t\t\t\t\t\t\te=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\t\t\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement511); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new ReturnStatement(e, (RETURN10!=null?RETURN10.getLine():0), RETURN10.getCharPositionInLine());}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9 :\n\t\t\t\t\t// ul.g:115:4: i= id '=' e= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_id_in_statement521);\n\t\t\t\t\ti=id();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,36,FOLLOW_36_in_statement523); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement529);\n\t\t\t\t\te=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement531); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new AssignmentStatement(i, e, i.line, i.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10 :\n\t\t\t\t\t// ul.g:119:4: ar= arrayRef '=' e2= expr SEMI\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_arrayRef_in_statement544);\n\t\t\t\t\tar=arrayRef();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,36,FOLLOW_36_in_statement546); if (state.failed) return s;\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement552);\n\t\t\t\t\te2=expr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return s;\n\t\t\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_statement554); if (state.failed) return s;\n\t\t\t\t\tif ( state.backtracking==0 ) {s = new ArrayAssignment(ar, e2, ar.line, ar.offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn s;\n\t}", "public final AstValidator.statement_return statement() throws RecognitionException {\n AstValidator.statement_return retval = new AstValidator.statement_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n AstValidator.general_statement_return general_statement3 =null;\n\n AstValidator.split_statement_return split_statement4 =null;\n\n AstValidator.realias_statement_return realias_statement5 =null;\n\n AstValidator.register_statement_return register_statement6 =null;\n\n AstValidator.assert_statement_return assert_statement7 =null;\n\n\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:116:11: ( general_statement | split_statement | realias_statement | register_statement | assert_statement )\n int alt2=5;\n switch ( input.LA(1) ) {\n case STATEMENT:\n {\n alt2=1;\n }\n break;\n case SPLIT:\n {\n alt2=2;\n }\n break;\n case REALIAS:\n {\n alt2=3;\n }\n break;\n case REGISTER:\n {\n alt2=4;\n }\n break;\n case ASSERT:\n {\n alt2=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 2, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt2) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:116:13: general_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_general_statement_in_statement94);\n general_statement3=general_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, general_statement3.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 2 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:117:13: split_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_split_statement_in_statement108);\n split_statement4=split_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, split_statement4.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 3 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:118:13: realias_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_realias_statement_in_statement122);\n realias_statement5=realias_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, realias_statement5.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 4 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:119:13: register_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_register_statement_in_statement136);\n register_statement6=register_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, register_statement6.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 5 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:120:13: assert_statement\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_assert_statement_in_statement150);\n assert_statement7=assert_statement();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, assert_statement7.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public interface IIdentityInstVisitor extends IInstVisitor {\n public void visit(JIdentityStmt s);\n}", "public final void rule__AstInitialize__StatementsAssignment_8_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24594:1: ( ( ruleAstStatement ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24595:1: ( ruleAstStatement )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24595:1: ( ruleAstStatement )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24596:1: ruleAstStatement\n {\n before(grammarAccess.getAstInitializeAccess().getStatementsAstStatementParserRuleCall_8_1_0()); \n pushFollow(FOLLOW_ruleAstStatement_in_rule__AstInitialize__StatementsAssignment_8_149380);\n ruleAstStatement();\n\n state._fsp--;\n\n after(grammarAccess.getAstInitializeAccess().getStatementsAstStatementParserRuleCall_8_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "ForStatement(AST ast) {\n super(ast); }", "public final AliaChecker.statements_return statements() throws RecognitionException {\n\t\tAliaChecker.statements_return retval = new AliaChecker.statements_return();\n\t\tretval.start = input.LT(1);\n\n\t\tCommonTree root_0 = null;\n\n\t\tCommonTree _first_0 = null;\n\t\tCommonTree _last = null;\n\n\n\t\tTreeRuleReturnScope t =null;\n\n\n\t\ttry {\n\t\t\t// src\\\\alia\\\\AliaChecker.g:43:2: ( (t= statement )* )\n\t\t\t// src\\\\alia\\\\AliaChecker.g:43:4: (t= statement )*\n\t\t\t{\n\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t// src\\\\alia\\\\AliaChecker.g:43:4: (t= statement )*\n\t\t\tloop2:\n\t\t\twhile (true) {\n\t\t\t\tint alt2=2;\n\t\t\t\tint LA2_0 = input.LA(1);\n\t\t\t\tif ( ((LA2_0 >= AND && LA2_0 <= BECOMES)||(LA2_0 >= CHAR_EXPR && LA2_0 <= COLON)||(LA2_0 >= COMPOUND && LA2_0 <= CONST)||LA2_0==DIV||LA2_0==EQ||LA2_0==FALSE||(LA2_0 >= GE && LA2_0 <= GT)||(LA2_0 >= IDENTIFIER && LA2_0 <= IF)||LA2_0==LE||(LA2_0 >= LT && LA2_0 <= MOD)||(LA2_0 >= NOT && LA2_0 <= PRINT)||LA2_0==READ||(LA2_0 >= TIMES && LA2_0 <= TRUE)||LA2_0==WHILE) ) {\n\t\t\t\t\talt2=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt2) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:43:5: t= statement\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_statement_in_statements205);\n\t\t\t\t\tt=statement();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tadaptor.addChild(root_0, t.getTree());\n\n\t\t\t\t\t retval.type = (t!=null?((AliaChecker.statement_return)t).type:null); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tretval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\n\t\t}\n\t\t \n\t\t catch (RecognitionException e) { \n\t\t \tif(!e.getMessage().equals(\"\")) {\n\t\t\t\t\tSystem.err.println(\"Exception!:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow (new AliaException(\"\"));\n\t\t } \n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "private void parseStmt() throws IOException, FSException,RetException {\n\n\n switch(tok.ttype) {\n\n case LexAnn.TT_DEFINT:\n case LexAnn.TT_DEFSTRING:\n case LexAnn.TT_DEFDOUBLE:\n case LexAnn.TT_DEFOBJECT: {\n parseVarDef();\n break;\n }\n\n case LexAnn.TT_IF: {\n parseIf();\n break;\n }\n case LexAnn.TT_WHILE: {\n parseWhile();\n break;\n }\n case LexAnn.TT_RETURN: {\n parseReturn();\n break;\n }\n case LexAnn.TT_DEFFUNC: {\n parseFunctionDef();\n break;\n }\n case LexAnn.TT_EDEFFUNC: {\n parseFunctionEnd();\n break;\n }\n case LexAnn.TT_EIF:\n throw new FSException(\"unexpected endif\");\n case LexAnn.TT_EWHILE:\n throw new FSException(\"unexpected endwhile\");\n\n case LexAnn.TT_FUNC: {\n parseFunc();\n break;\n }\n case LexAnn.TT_ARRAY: {\n parseArrayAssign();\n break;\n }\n case LexAnn.TT_WORD: {\n parseAssign();\n break;\n }\n case LexAnn.TT_EOL: {\n tok.nextToken();\n break;\n }\n case LexAnn.TT_EOF: {\n // all done\n break;\n }\n default: {\n parseError(\"Expected identifier \"+tok);\n\n }\n }\n\n }", "public static void imprimirAST(NodoBase raiz){\n\t\t sangria+=2;\n\t\t while (raiz != null) {\n\t\t printSpaces();\n\t\t if (raiz instanceof NodoIf)\n\t\t \tSystem.out.println(\"If\");\n\t\t else if (raiz instanceof NodoRepeat)\n\t\t \tSystem.out.println(\"Repeat\");\n else if (raiz instanceof NodoFor)\n System.out.println(\"For\");\n else if (raiz instanceof NodoDeclaracion)\n System.out.println(\"Declaracion\");\n\t\t else if (raiz instanceof NodoLeer) \n\t\t \tSystem.out.println(\"Lectura: \"+((NodoLeer)raiz).getIdentificador());\n\t\t else if (raiz instanceof NodoEscribir)\n\t\t \tSystem.out.println(\"Escribir\");\n else if (raiz instanceof NodoEstructura)\n System.out.println(\"Estructura\");\n else if (raiz instanceof NodoFuncionRetorna){\n System.out.println(\"Funcion con Retorno\"); }\n else if (raiz instanceof NodoFuncionSinRetorna)\n System.out.println(\"Funcion sin Retorno\");\n else if (raiz instanceof NodoParametro)\n System.out.println(\"Parametro\");\n\t\t else \n if (raiz instanceof NodoAsignacion)\n {\n if(((NodoAsignacion)raiz).getPosicion()!=null) //vector\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador()+\"[\"+((NodoAsignacion)raiz).getPosicion()+\"]\"); \n else\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador());\n }\n else if (raiz instanceof NodoCall)\n {\n if(((NodoCall)raiz).getArgumentos()!=null) //vector\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()); \n else\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()+\"(\"+\")\");\n }\n else if (raiz instanceof NodoOperacion\n\t\t \t\t|| raiz instanceof NodoValor\n\t\t \t\t|| raiz instanceof NodoIdentificador )\n\t\t \timprimirNodo(raiz);\n \n else if (raiz instanceof NodoVariable)\n {\n if(((NodoVariable)raiz).getNumero()!=null)\n System.out.println(((NodoVariable)raiz).getIdentificador()+\"[\"+((NodoVariable)raiz).getNumero()+\"]\");\n else\n System.out.println(((NodoVariable)raiz).getIdentificador());\n }\n\t\t else System.out.println(\"Tipo de nodo desconocido\");\n\t\t \n\t\t \n /* Hago el recorrido recursivo */\n \n if (raiz instanceof NodoEstructura){\n printSpaces();\n System.out.println(\"**Funcion**\");\n imprimirAST(((NodoEstructura)raiz).getFuncion());\n printSpaces();\n System.out.println(\"**Main**\");\n imprimirAST(((NodoEstructura)raiz).getBloque());\n }\n \n if (raiz instanceof NodoFuncionRetorna){\n printSpaces();\n System.out.println(\"**Funcion con Retorno**\");\n imprimirAST(((NodoFuncionRetorna)raiz).getTipo());\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionRetorna)raiz).getSecuencias());\n \n printSpaces();\n System.out.println(\"retorno\");\n imprimirAST(((NodoFuncionRetorna)raiz).getExpresion());\n }\n \n if (raiz instanceof NodoFuncionSinRetorna){\n printSpaces();\n System.out.println(\"**Funcion sin Retorno**\");\n System.out.println(\"VOID\");\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionSinRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionSinRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getSecuencias());\n \n }\n \n if (raiz instanceof NodoParametro){\n printSpaces();\n System.out.println(\"**Parametros**\");\n imprimirAST(((NodoParametro)raiz).getTipo());\n \n System.out.println(\"\\tID, \"+((NodoParametro)raiz).getIdentificador());\n }\n \n if (raiz instanceof NodoCall){\n printSpaces();\n if(((NodoCall)raiz).getArgumentos()!=null)\n System.out.println(\"**argumentos**\");\n imprimirAST(((NodoCall)raiz).getArgumentos());\n }\n \n if (raiz instanceof NodoDeclaracion){\n printSpaces();\n System.out.println(\"**Declaracion**\");\n imprimirAST(((NodoDeclaracion)raiz).getTipo());\n imprimirAST(((NodoDeclaracion)raiz).getLis_asig());\n }\n \n if (raiz instanceof NodoIf){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getPrueba());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Then IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getParteThen());\n\t\t \tif(((NodoIf)raiz).getParteElse()!=null){\n\t\t \t\tprintSpaces();\n\t\t \t\tSystem.out.println(\"**Else IF**\");\n\t\t \t\timprimirAST(((NodoIf)raiz).getParteElse());\n\t\t \t}\n\t\t }\n\t\t else if (raiz instanceof NodoRepeat){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Cuerpo REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getCuerpo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getPrueba());\n\t\t }\n else if (raiz instanceof NodoFor){\n printSpaces();\n System.out.println(\"**Asignacion For**\");\n imprimirAST(((NodoFor)raiz).getAsignacion());\n printSpaces();\n System.out.println(\"**Comprobacion FOR**\");\n imprimirAST(((NodoFor)raiz).getPrueba());\n printSpaces();\n System.out.println(\"**Acumulador FOR**\");\n imprimirAST(((NodoFor)raiz).getAcumulador());\n printSpaces();\n System.out.println(\"**Cuerpo FOR**\");\n imprimirAST(((NodoFor)raiz).getCuerpo());\n \n }\n\t\t else \n \n if (raiz instanceof NodoAsignacion)\n\t\t \timprimirAST(((NodoAsignacion)raiz).getExpresion());\n\t\t else \n \n if (raiz instanceof NodoEscribir)\n\t\t \timprimirAST(((NodoEscribir)raiz).getExpresion());\n\t\t else \n \n \n if (raiz instanceof NodoOperacion){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Izquierda Operacion**\");\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpIzquierdo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Derecha Operacion**\");\t\t \t\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpDerecho());\n\t\t }\n\t\t raiz = raiz.getHermanoDerecha();\n\t\t }\n\t\t sangria-=2;\n\t\t}", "public interface ParseNodeVisitor {\r\n // non-leaf nodes: visitEnter and visitLeave\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Constructs larger than statements\r\n void visitEnter(ParseNode node);\r\n\r\n void visitLeave(ParseNode node);\r\n\r\n void visitEnter(ProgramNode node);\r\n\r\n void visitLeave(ProgramNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Function Node\r\n void visitEnter(GlobalDefinitionNode node);\r\n\r\n void visitLeave(GlobalDefinitionNode node);\r\n\r\n void visitEnter(FunctionDefinitionNode node);\r\n\r\n void visitLeave(FunctionDefinitionNode node);\r\n\r\n void visitEnter(LambdaNode node);\r\n\r\n void visitLeave(LambdaNode node);\r\n\r\n void visitEnter(LambdaParamTypeNode node);\r\n\r\n void visitLeave(LambdaParamTypeNode node);\r\n\r\n void visitEnter(ParameterListNode node);\r\n\r\n void visitLeave(ParameterListNode node);\r\n\r\n void visitEnter(ParameterSpecificationNode node);\r\n\r\n void visitLeave(ParameterSpecificationNode node);\r\n\r\n void visitEnter(FunctionInvocationNode node);\r\n\r\n void visitLeave(FunctionInvocationNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Statement Node\r\n void visitEnter(BlockStatementNode node);\r\n\r\n void visitLeave(BlockStatementNode node);\r\n\r\n void visitEnter(PrintStatementNode node);\r\n\r\n void visitLeave(PrintStatementNode node);\r\n\r\n void visitEnter(DeclarationNode node);\r\n\r\n void visitLeave(DeclarationNode node);\r\n\r\n void visitEnter(AssignmentStatementNode node);\r\n\r\n void visitLeave(AssignmentStatementNode node);\r\n\r\n void visitEnter(IfStatementNode node);\r\n\r\n void visitLeave(IfStatementNode node);\r\n\r\n void visitEnter(WhileStatementNode node);\r\n\r\n void visitLeave(WhileStatementNode node);\r\n\r\n void visitEnter(ReleaseStatementNode node);\r\n\r\n void visitLeave(ReleaseStatementNode node);\r\n\r\n void visitEnter(ReturnStatementNode node);\r\n\r\n void visitLeave(ReturnStatementNode node);\r\n\r\n void visitEnter(CallStatementNode node);\r\n\r\n void visitLeave(CallStatementNode node);\r\n\r\n void visitEnter(BreakStatementNode node);\r\n\r\n void visitLeave(BreakStatementNode node);\r\n\r\n void visitEnter(ContinueStatementNode node);\r\n\r\n void visitLeave(ContinueStatementNode node);\r\n \r\n void visitEnter(ForStatementNode node);\r\n\r\n void visitLeave(ForStatementNode node);\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Expression Node\r\n void visitEnter(BinaryOperatorNode node);\r\n\r\n void visitLeave(BinaryOperatorNode node);\r\n\r\n void visitEnter(UnaryOperatorNode node);\r\n\r\n void visitLeave(UnaryOperatorNode node);\r\n\r\n void visitEnter(TypeCastingNode node);\r\n\r\n void visitLeave(TypeCastingNode node);\r\n\r\n void visitEnter(ExpressionListNode node);\r\n\r\n void visitLeave(ExpressionListNode node);\r\n\r\n void visitEnter(NewArrayTypeLengthNode node);\r\n\r\n void visitLeave(NewArrayTypeLengthNode node);\r\n\r\n void visitEnter(TypeNode node);\r\n\r\n void visitLeave(TypeNode node);\r\n\r\n void visitEnter(TypeListNode node);\r\n\r\n void visitLeave(TypeListNode node);\r\n \r\n void visitEnter(LambdaTypeNode node);\r\n\r\n void visitLeave(LambdaTypeNode node);\r\n \r\n void visitEnter(ArrayIndexingNode node);\r\n\r\n void visitLeave(ArrayIndexingNode node);\r\n\r\n // leaf nodes: visitLeaf only\r\n void visit(BooleanConstantNode node);\r\n\r\n void visit(TypeCastedToNode node);\r\n\r\n void visit(ErrorNode node);\r\n\r\n void visit(IdentifierNode node);\r\n\r\n void visit(IntegerConstantNode node);\r\n\r\n void visit(FloatingConstantNode node);\r\n\r\n void visit(CharConstantNode node);\r\n\r\n void visit(StringConstantNode node);\r\n\r\n void visit(NewlineNode node);\r\n\r\n void visit(TabNode node);\r\n\r\n void visit(SpaceNode node);\r\n\r\n public static class Default implements ParseNodeVisitor {\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Constructs larger than statements\r\n\r\n public void defaultVisit(ParseNode node) {}\r\n\r\n public void defaultVisitEnter(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void defaultVisitLeave(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void defaultVisitForLeaf(ParseNode node) {\r\n defaultVisit(node);\r\n }\r\n\r\n public void visitEnter(ParseNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParseNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ProgramNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ProgramNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // Function Node\r\n public void visitEnter(GlobalDefinitionNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(GlobalDefinitionNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(FunctionDefinitionNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(FunctionDefinitionNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(LambdaNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(LambdaParamTypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaParamTypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ParameterListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParameterListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ParameterSpecificationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ParameterSpecificationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(FunctionInvocationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(FunctionInvocationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Statements\r\n\r\n /*\r\n * Statements -> BlockStatement PrintStatement Declaration AssignmentStatement IfStatement\r\n * WhileStatement ReleaseStatement ReturnStatement CallStatement BreakStatement\r\n * ContinueStatement\r\n */\r\n\r\n ///////////////////////////////////////////////////////////\r\n // BlockStatement\r\n public void visitEnter(BlockStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BlockStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // PrintStatement\r\n public void visitEnter(PrintStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(PrintStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // DeclarationStatement\r\n public void visitEnter(DeclarationNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(DeclarationNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // AssignmentStatement\r\n public void visitEnter(AssignmentStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(AssignmentStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // IfStatement\r\n public void visitEnter(IfStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(IfStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // WhileStatement\r\n public void visitEnter(WhileStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(WhileStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ReleaseStatement\r\n public void visitEnter(ReleaseStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ReleaseStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ReturnStatement\r\n public void visitEnter(ReturnStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ReturnStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // CallStatement\r\n public void visitEnter(CallStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(CallStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // BreakStatement\r\n public void visitEnter(BreakStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BreakStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////\r\n // ContinueStatement\r\n public void visitEnter(ContinueStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ContinueStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n ///////////////////////////////////////////////////////////\r\n // ForStatement\r\n public void visitEnter(ForStatementNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ForStatementNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // ExpressionNode\r\n\r\n public void visitEnter(BinaryOperatorNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(BinaryOperatorNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(UnaryOperatorNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(UnaryOperatorNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(TypeCastingNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeCastingNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ExpressionListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(ExpressionListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(NewArrayTypeLengthNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(NewArrayTypeLengthNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitLeave(ArrayIndexingNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n public void visitEnter(ArrayIndexingNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitEnter(TypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n public void visitEnter(LambdaTypeNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(LambdaTypeNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n \r\n public void visitEnter(TypeListNode node) {\r\n defaultVisitEnter(node);\r\n }\r\n\r\n public void visitLeave(TypeListNode node) {\r\n defaultVisitLeave(node);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////\r\n // Leaf nodes\r\n public void visit(IdentifierNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(TypeCastedToNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(BooleanConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(ErrorNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(IntegerConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(FloatingConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(CharConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(StringConstantNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(NewlineNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(TabNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n\r\n public void visit(SpaceNode node) {\r\n defaultVisitForLeaf(node);\r\n }\r\n }\r\n}", "public AST(RuleContext ctx){\n this.ctx = ctx;\n }", "public R visit(MoveStmt n) {\n R _ret=null;\n simple_exp=0;\n // System.out.print(\"MOVE \");\n String s0 = (String)n.f0.accept(this);\n String s1 = (String)n.f1.accept(this);\n String s = new String();\n s=(\"MOVE \"+s1+\" \");\n simple_exp=0;\n String s2 = (String)n.f2.accept(this);\n s=s+(s2+\" \");\n return (R)s;\n }", "private Stmt stmt(){\n \n switch(lexer.token){\n case IDENT:\n \n if (symbolTable.get(lexer.getStringValue()) instanceof Procedure) \n return procedureCall();\n \n //can´t be a function\n else if (symbolTable.get(lexer.getStringValue()) instanceof Function)\n lexer.error(\"Function was expected \\n\");\n \n //assignstmt\n else \n return assignstmt();\n \n case BEGIN:\n return cmpstmt();\n case IF:\n return ifstmt();\n case WHILE:\n return whilestmt();\n case WRITE:\n return writestmt();\n case WRITELN:\n return writelnstmt();\n case READ:\n return readstmt();\n case RETURN:\n return returnStmt();\n default:\n lexer.error(\"missing statment\\n\");\n }\n \n return null;\n }", "private ASTNode buildAST(String contents) throws JavaModelException {\n\t\treturn buildAST(contents, this.workingCopy);\n\t}", "public final JavaliParser.ioStmt_return ioStmt() throws RecognitionException {\n\t\tJavaliParser.ioStmt_return retval = new JavaliParser.ioStmt_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken mth=null;\n\t\tToken char_literal55=null;\n\t\tToken char_literal57=null;\n\t\tToken char_literal58=null;\n\t\tToken char_literal59=null;\n\t\tToken char_literal61=null;\n\t\tToken char_literal62=null;\n\t\tToken char_literal63=null;\n\t\tToken char_literal64=null;\n\t\tToken char_literal65=null;\n\t\tParserRuleReturnScope expr56 =null;\n\t\tParserRuleReturnScope expr60 =null;\n\n\t\tObject mth_tree=null;\n\t\tObject char_literal55_tree=null;\n\t\tObject char_literal57_tree=null;\n\t\tObject char_literal58_tree=null;\n\t\tObject char_literal59_tree=null;\n\t\tObject char_literal61_tree=null;\n\t\tObject char_literal62_tree=null;\n\t\tObject char_literal63_tree=null;\n\t\tObject char_literal64_tree=null;\n\t\tObject char_literal65_tree=null;\n\t\tRewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\n\t\tRewriteRuleTokenStream stream_77=new RewriteRuleTokenStream(adaptor,\"token 77\");\n\t\tRewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,\"token 70\");\n\t\tRewriteRuleTokenStream stream_103=new RewriteRuleTokenStream(adaptor,\"token 103\");\n\t\tRewriteRuleTokenStream stream_102=new RewriteRuleTokenStream(adaptor,\"token 102\");\n\t\tRewriteRuleTokenStream stream_101=new RewriteRuleTokenStream(adaptor,\"token 101\");\n\t\tRewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,\"rule expr\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:373:2: (mth= 'write' '(' expr ')' ';' -> ^( BuiltInWrite[$mth, \\\"BuiltInWrite\\\"] expr ) |mth= 'writef' '(' expr ')' ';' -> ^( BuiltInWriteFloat[$mth, \\\"BuiltInWriteFloat\\\"] expr ) |mth= 'writeln' '(' ')' ';' -> ^( BuiltInWriteln[$mth, \\\"BuiltInWriteln\\\"] ) )\n\t\t\tint alt20=3;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 101:\n\t\t\t\t{\n\t\t\t\talt20=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 102:\n\t\t\t\t{\n\t\t\t\talt20=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 103:\n\t\t\t\t{\n\t\t\t\talt20=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 20, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt20) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:373:4: mth= 'write' '(' expr ')' ';'\n\t\t\t\t\t{\n\t\t\t\t\tmth=(Token)match(input,101,FOLLOW_101_in_ioStmt1074); \n\t\t\t\t\tstream_101.add(mth);\n\n\t\t\t\t\tchar_literal55=(Token)match(input,69,FOLLOW_69_in_ioStmt1076); \n\t\t\t\t\tstream_69.add(char_literal55);\n\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_ioStmt1078);\n\t\t\t\t\texpr56=expr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_expr.add(expr56.getTree());\n\t\t\t\t\tchar_literal57=(Token)match(input,70,FOLLOW_70_in_ioStmt1080); \n\t\t\t\t\tstream_70.add(char_literal57);\n\n\t\t\t\t\tchar_literal58=(Token)match(input,77,FOLLOW_77_in_ioStmt1082); \n\t\t\t\t\tstream_77.add(char_literal58);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: expr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 374:5: -> ^( BuiltInWrite[$mth, \\\"BuiltInWrite\\\"] expr )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:374:8: ^( BuiltInWrite[$mth, \\\"BuiltInWrite\\\"] expr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(BuiltInWrite, mth, \"BuiltInWrite\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:375:6: mth= 'writef' '(' expr ')' ';'\n\t\t\t\t\t{\n\t\t\t\t\tmth=(Token)match(input,102,FOLLOW_102_in_ioStmt1106); \n\t\t\t\t\tstream_102.add(mth);\n\n\t\t\t\t\tchar_literal59=(Token)match(input,69,FOLLOW_69_in_ioStmt1108); \n\t\t\t\t\tstream_69.add(char_literal59);\n\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_ioStmt1110);\n\t\t\t\t\texpr60=expr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_expr.add(expr60.getTree());\n\t\t\t\t\tchar_literal61=(Token)match(input,70,FOLLOW_70_in_ioStmt1112); \n\t\t\t\t\tstream_70.add(char_literal61);\n\n\t\t\t\t\tchar_literal62=(Token)match(input,77,FOLLOW_77_in_ioStmt1114); \n\t\t\t\t\tstream_77.add(char_literal62);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: expr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 376:7: -> ^( BuiltInWriteFloat[$mth, \\\"BuiltInWriteFloat\\\"] expr )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:376:10: ^( BuiltInWriteFloat[$mth, \\\"BuiltInWriteFloat\\\"] expr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(BuiltInWriteFloat, mth, \"BuiltInWriteFloat\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:377:6: mth= 'writeln' '(' ')' ';'\n\t\t\t\t\t{\n\t\t\t\t\tmth=(Token)match(input,103,FOLLOW_103_in_ioStmt1140); \n\t\t\t\t\tstream_103.add(mth);\n\n\t\t\t\t\tchar_literal63=(Token)match(input,69,FOLLOW_69_in_ioStmt1142); \n\t\t\t\t\tstream_69.add(char_literal63);\n\n\t\t\t\t\tchar_literal64=(Token)match(input,70,FOLLOW_70_in_ioStmt1144); \n\t\t\t\t\tstream_70.add(char_literal64);\n\n\t\t\t\t\tchar_literal65=(Token)match(input,77,FOLLOW_77_in_ioStmt1146); \n\t\t\t\t\tstream_77.add(char_literal65);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 378:5: -> ^( BuiltInWriteln[$mth, \\\"BuiltInWriteln\\\"] )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:378:8: ^( BuiltInWriteln[$mth, \\\"BuiltInWriteln\\\"] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(BuiltInWriteln, mth, \"BuiltInWriteln\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public String visit(AStoreStmt n, Object argu)\r\n\t {\r\n\t\t int stackPos = 4*Integer.parseInt(n.f1.f1.f0.tokenImage);\r\n int RegNum = n.f2.f0.which;\r\n MipsOutPut.add(MipsOutPut.Space+\"sw \" + Regs.RegList[RegNum] +\", \" + stackPos + \"($sp) \\n\");\r\n return null;\r\n\t }", "public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n \n use.put(statementNumber, new ArrayList<Integer>());\n def.put(statementNumber, new ArrayList<Integer>());\n n.f3.accept(this);\n end.add(statementNumber);\n// System.out.println(statementNumber);\n n.f4.accept(this);\n statementNumber++;\n return _ret;\n }", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations);", "private void parseSimpleStatement() {\n Operand operand = parseDesignator();\n\n if (nextToken.kind == Token.ASSIGN) {\n check(Token.ASSIGN);\n if (operand.kind != Operand.KIND_ELEMENT\n && operand.kind != Operand.KIND_FIELD\n && operand.kind != Operand.KIND_LOCAL\n && operand.kind != Operand.KIND_STATIC) {\n error(\"Illegal left-hand side operand in assignment\");\n }\n\n Struct type = parseExpr().type;\n if (!(type.assignableTo(operand.type))) {\n error(\"Incompatible types in assignment\");\n }\n\n code.store(operand);\n } else {\n if (operand.kind != Operand.KIND_METHOD) {\n error(\"Designator isn't a valid method\");\n }\n parseActPars(operand.object);\n\n code.put(Code.OP_CALL);\n code.put2(operand.address);\n if (operand.kind == Operand.KIND_METHOD\n && operand.type != SymbolTable.STRUCT_NONE) {\n code.put(Code.OP_POP);\n }\n }\n check(Token.SEMICOLON);\n }", "@Test\n void testExample1() {\n List<Token> input = Arrays.asList(\n new Token(Token.Type.IDENTIFIER, \"LET\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \":\", -1),\n new Token(Token.Type.IDENTIFIER, \"INTEGER\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"WHILE\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"!=\", -1),\n new Token(Token.Type.INTEGER, \"10\", -1),\n new Token(Token.Type.IDENTIFIER, \"DO\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"PRINT\", -1),\n new Token(Token.Type.OPERATOR, \"(\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \")\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"+\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"END\", -1)\n );\n Ast.Source expected = new Ast.Source(Arrays.asList(\n new Ast.Statement.Declaration(\"first\", \"INTEGER\",\n Optional.of(new Ast.Expression.Literal(BigInteger.valueOf(1)))),\n new Ast.Statement.While(\n new Ast.Expression.Binary(\"!=\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(10))\n ),\n Arrays.asList(\n new Ast.Statement.Expression(\n new Ast.Expression.Function(\"PRINT\", Arrays.asList(\n new Ast.Expression.Variable(\"first\"))\n )\n ),\n new Ast.Statement.Assignment(\"first\",\n new Ast.Expression.Binary(\"+\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(1))\n )\n )\n )\n )\n ));\n test(input, expected, Parser::parseSource);\n }", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations, Variable assign, Value ... v);", "public Code visitStatementListNode(StatementNode.ListNode node) {\n beginGen(\"StatementList\");\n Code code = new Code();\n for(StatementNode s : node.getStatements()) {\n code.append(s.genCode(this));\n }\n endGen(\"StatementList\");\n return code;\n }", "@Test\n public void testRewriteCreate() throws Exception{\n try {\n ParseNode tree = TestQuery.prepareCreateStmtAnalysed();\n ParseNode ansTreeRewritten = TestQuery.prepareCreateStmtRewritten();\n testObj.rewrite(tree);\n System.out.println(tree.toSql());\n assertEquals(ansTreeRewritten.toSql(), tree.toSql());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public abstract void parseStatements(\n\t\tParser parser,\n\t\tCompilationUnitDeclaration unit);", "public final PythonParser.expr_stmt_return expr_stmt() throws RecognitionException {\n PythonParser.expr_stmt_return retval = new PythonParser.expr_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token at=null;\n Token ay=null;\n List list_t=null;\n List list_y2=null;\n PythonParser.testlist_return lhs = null;\n\n PythonParser.augassign_return aay = null;\n\n PythonParser.yield_expr_return y1 = null;\n\n PythonParser.augassign_return aat = null;\n\n PythonParser.testlist_return rhs = null;\n\n PythonParser.testlist_return t = null;\n t = null;\n PythonParser.yield_expr_return y2 = null;\n y2 = null;\n PythonTree at_tree=null;\n PythonTree ay_tree=null;\n RewriteRuleTokenStream stream_ASSIGN=new RewriteRuleTokenStream(adaptor,\"token ASSIGN\");\n RewriteRuleSubtreeStream stream_augassign=new RewriteRuleSubtreeStream(adaptor,\"rule augassign\");\n RewriteRuleSubtreeStream stream_yield_expr=new RewriteRuleSubtreeStream(adaptor,\"rule yield_expr\");\n RewriteRuleSubtreeStream stream_testlist=new RewriteRuleSubtreeStream(adaptor,\"rule testlist\");\n\n stmt stype = null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:590:5: ( ( ( testlist[null] augassign )=>lhs= testlist[expr_contextType.AugStore] ( (aay= augassign y1= yield_expr ) | (aat= augassign rhs= testlist[expr_contextType.Load] ) ) | ( testlist[null] ASSIGN )=>lhs= testlist[expr_contextType.Store] ( | ( (at= ASSIGN t+= testlist[expr_contextType.Store] )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] ) ) | ( (ay= ASSIGN y2+= yield_expr )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] ) ) ) | lhs= testlist[expr_contextType.Load] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:590:7: ( ( testlist[null] augassign )=>lhs= testlist[expr_contextType.AugStore] ( (aay= augassign y1= yield_expr ) | (aat= augassign rhs= testlist[expr_contextType.Load] ) ) | ( testlist[null] ASSIGN )=>lhs= testlist[expr_contextType.Store] ( | ( (at= ASSIGN t+= testlist[expr_contextType.Store] )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] ) ) | ( (ay= ASSIGN y2+= yield_expr )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] ) ) ) | lhs= testlist[expr_contextType.Load] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:590:7: ( ( testlist[null] augassign )=>lhs= testlist[expr_contextType.AugStore] ( (aay= augassign y1= yield_expr ) | (aat= augassign rhs= testlist[expr_contextType.Load] ) ) | ( testlist[null] ASSIGN )=>lhs= testlist[expr_contextType.Store] ( | ( (at= ASSIGN t+= testlist[expr_contextType.Store] )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] ) ) | ( (ay= ASSIGN y2+= yield_expr )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] ) ) ) | lhs= testlist[expr_contextType.Load] )\n int alt34=3;\n alt34 = dfa34.predict(input);\n switch (alt34) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:590:8: ( testlist[null] augassign )=>lhs= testlist[expr_contextType.AugStore] ( (aay= augassign y1= yield_expr ) | (aat= augassign rhs= testlist[expr_contextType.Load] ) )\n {\n pushFollow(FOLLOW_testlist_in_expr_stmt1652);\n lhs=testlist(expr_contextType.AugStore);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_testlist.add(lhs.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:591:9: ( (aay= augassign y1= yield_expr ) | (aat= augassign rhs= testlist[expr_contextType.Load] ) )\n int alt30=2;\n alt30 = dfa30.predict(input);\n switch (alt30) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:591:11: (aay= augassign y1= yield_expr )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:591:11: (aay= augassign y1= yield_expr )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:591:12: aay= augassign y1= yield_expr\n {\n pushFollow(FOLLOW_augassign_in_expr_stmt1668);\n aay=augassign();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_augassign.add(aay.getTree());\n pushFollow(FOLLOW_yield_expr_in_expr_stmt1672);\n y1=yield_expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_yield_expr.add(y1.getTree());\n if ( state.backtracking==0 ) {\n\n actions.checkAssign(actions.castExpr((lhs!=null?((PythonTree)lhs.tree):null)));\n stype = new AugAssign((lhs!=null?((PythonTree)lhs.tree):null), actions.castExpr((lhs!=null?((PythonTree)lhs.tree):null)), (aay!=null?aay.op:null), actions.castExpr((y1!=null?((PythonTree)y1.tree):null)));\n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:597:11: (aat= augassign rhs= testlist[expr_contextType.Load] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:597:11: (aat= augassign rhs= testlist[expr_contextType.Load] )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:597:12: aat= augassign rhs= testlist[expr_contextType.Load]\n {\n pushFollow(FOLLOW_augassign_in_expr_stmt1712);\n aat=augassign();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_augassign.add(aat.getTree());\n pushFollow(FOLLOW_testlist_in_expr_stmt1716);\n rhs=testlist(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_testlist.add(rhs.getTree());\n if ( state.backtracking==0 ) {\n\n actions.checkAssign(actions.castExpr((lhs!=null?((PythonTree)lhs.tree):null)));\n stype = new AugAssign((lhs!=null?((PythonTree)lhs.tree):null), actions.castExpr((lhs!=null?((PythonTree)lhs.tree):null)), (aat!=null?aat.op:null), actions.castExpr((rhs!=null?((PythonTree)rhs.tree):null)));\n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:604:7: ( testlist[null] ASSIGN )=>lhs= testlist[expr_contextType.Store] ( | ( (at= ASSIGN t+= testlist[expr_contextType.Store] )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] ) ) | ( (ay= ASSIGN y2+= yield_expr )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] ) ) )\n {\n pushFollow(FOLLOW_testlist_in_expr_stmt1771);\n lhs=testlist(expr_contextType.Store);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_testlist.add(lhs.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:605:9: ( | ( (at= ASSIGN t+= testlist[expr_contextType.Store] )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] ) ) | ( (ay= ASSIGN y2+= yield_expr )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] ) ) )\n int alt33=3;\n int LA33_0 = input.LA(1);\n\n if ( (LA33_0==NEWLINE||LA33_0==SEMI) ) {\n alt33=1;\n }\n else if ( (LA33_0==ASSIGN) ) {\n int LA33_2 = input.LA(2);\n\n if ( (LA33_2==NAME||(LA33_2>=LAMBDA && LA33_2<=NOT)||LA33_2==LPAREN||(LA33_2>=PLUS && LA33_2<=MINUS)||(LA33_2>=TILDE && LA33_2<=LBRACK)||LA33_2==LCURLY||(LA33_2>=BACKQUOTE && LA33_2<=STRING)) ) {\n alt33=2;\n }\n else if ( (LA33_2==YIELD) ) {\n alt33=3;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 33, 2, input);\n\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 33, 0, input);\n\n throw nvae;\n }\n switch (alt33) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:606:9: \n {\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:606:11: ( (at= ASSIGN t+= testlist[expr_contextType.Store] )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] ) )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:606:11: ( (at= ASSIGN t+= testlist[expr_contextType.Store] )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:606:12: (at= ASSIGN t+= testlist[expr_contextType.Store] )+\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:606:12: (at= ASSIGN t+= testlist[expr_contextType.Store] )+\n int cnt31=0;\n loop31:\n do {\n int alt31=2;\n int LA31_0 = input.LA(1);\n\n if ( (LA31_0==ASSIGN) ) {\n alt31=1;\n }\n\n\n switch (alt31) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:606:13: at= ASSIGN t+= testlist[expr_contextType.Store]\n \t {\n \t at=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_expr_stmt1798); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_ASSIGN.add(at);\n\n \t pushFollow(FOLLOW_testlist_in_expr_stmt1802);\n \t t=testlist(expr_contextType.Store);\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_testlist.add(t.getTree());\n \t if (list_t==null) list_t=new ArrayList();\n \t list_t.add(t.getTree());\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt31 >= 1 ) break loop31;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(31, input);\n throw eee;\n }\n cnt31++;\n } while (true);\n\n\n\n // AST REWRITE\n // elements: ASSIGN\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 607:8: -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:607:11: ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $t),\\n actions.makeAssignValue($t)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Assign(ASSIGN, (lhs!=null?((Token)lhs.start):null), actions.makeAssignTargets(actions.castExpr((lhs!=null?((PythonTree)lhs.tree):null)), list_t), actions.makeAssignValue(list_t)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n\n }\n break;\n case 3 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:610:11: ( (ay= ASSIGN y2+= yield_expr )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] ) )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:610:11: ( (ay= ASSIGN y2+= yield_expr )+ -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:610:12: (ay= ASSIGN y2+= yield_expr )+\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:610:12: (ay= ASSIGN y2+= yield_expr )+\n int cnt32=0;\n loop32:\n do {\n int alt32=2;\n int LA32_0 = input.LA(1);\n\n if ( (LA32_0==ASSIGN) ) {\n alt32=1;\n }\n\n\n switch (alt32) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:610:13: ay= ASSIGN y2+= yield_expr\n \t {\n \t ay=(Token)match(input,ASSIGN,FOLLOW_ASSIGN_in_expr_stmt1850); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_ASSIGN.add(ay);\n\n \t pushFollow(FOLLOW_yield_expr_in_expr_stmt1854);\n \t y2=yield_expr();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_yield_expr.add(y2.getTree());\n \t if (list_y2==null) list_y2=new ArrayList();\n \t list_y2.add(y2.getTree());\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt32 >= 1 ) break loop32;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(32, input);\n throw eee;\n }\n cnt32++;\n } while (true);\n\n\n\n // AST REWRITE\n // elements: ASSIGN\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 611:8: -> ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:611:11: ^( ASSIGN[$lhs.start, actions.makeAssignTargets(actions.castExpr($lhs.tree), $y2),\\n actions.makeAssignValue($y2)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Assign(ASSIGN, (lhs!=null?((Token)lhs.start):null), actions.makeAssignTargets(actions.castExpr((lhs!=null?((PythonTree)lhs.tree):null)), list_y2), actions.makeAssignValue(list_y2)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n\n }\n break;\n\n }\n\n\n }\n break;\n case 3 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:615:7: lhs= testlist[expr_contextType.Load]\n {\n pushFollow(FOLLOW_testlist_in_expr_stmt1905);\n lhs=testlist(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_testlist.add(lhs.getTree());\n if ( state.backtracking==0 ) {\n\n stype = new Expr((lhs!=null?((Token)lhs.start):null), actions.castExpr((lhs!=null?((PythonTree)lhs.tree):null)));\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n if ( state.backtracking==0 ) {\n\n if (stype != null) {\n retval.tree = stype;\n }\n\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public R visit(StmtList n) {\n R _ret=null;\n coming_from_stmt_list=1;\n String s = (String) n.f0.accept(this);\n // String new1 = (String) n.f0.elementAt(0).toString();\n// System.out.println(\"check\"+new1);\n \n return _ret;\n }", "@Override\n public Void visit(DebuggerStatement node, StatementVisitor mv) {\n return null;\n }", "private void compile(SSAProgram prog, String methodName, SSAStatement s) {\n // recommended for debuggability:\n sb.append(\" # \");\n if (s.getRegister() >= 0)\n sb.append(reg(s));\n sb.append(\": \");\n sb.append(s.toString());\n sb.append(\"\\n\");\n\n SSAStatement left, right;\n String special;\n StringBuilder built = new StringBuilder();\n\n left = s.getLeft();\n right = s.getRight();\n\n switch (s.getOp()) {\n // FILLIN (this is the actual code generator!)\n case Unify:\n case Alias:\n break; // Do nothing\n case Parameter:\n int paramPos = (Integer)s.getSpecial();\n if(paramPos > 3) {\n built.append(\" lw $\" + reg(s) + \", \" + (paramPos-3)*wordSize + \"($fp)\\n\"); \n }\n break; \n case Int:\n int intValue = (Integer)s.getSpecial();\n built.append(\" li $\" + reg(s) + \", \" + intValue + \"\\n\");\n break;\n case Print:\n callerSave(-1);\n built.append(crstores);\n built.append(moveRegister(\"a0\", reg(left)));\n built.append(\" jal minijavaPrint\\n\");\n built.append(crloads);\n break;\n case Boolean:\n boolean boolValue = (Boolean)s.getSpecial();\n if(boolValue) {\n built.append(\" li $\" + reg(s) + \", \" + 1 + \"\\n\");\n } else {\n built.append(\" move $\" + reg(s) + \", $zero\\n\");\n }\n break;\n case This:\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n break;\n case Arg:\n int argPos = (Integer)s.getSpecial();\n if(argPos > 3) {\n built.append(\" sw $\" + reg(left) + \", \" + (argPos-4)*wordSize + \"($sp)\\n\"); \n } else {\n built.append(moveRegister(reg(s) ,reg(left)));\n }\n break;\n case Null:\n built.append(\" move $\" + reg(s) + \", $zero\\n\");\n break;\n case NewObj:\n callerSave(freeReg(s));\n built.append(crstores);\n special = (String)s.getSpecial();\n built.append(\" la $a0, mj__v_\" + special + \"\\n\");\n built.append(\" li $a1, \" + objectSize(prog, prog.getClass(special)) + \"\\n\");\n built.append(\" jal minijavaNew\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case NewIntArray:\n callerSave(freeReg(s));\n built.append(crstores);\n built.append(moveRegister(\"a0\", reg(left)));\n built.append(\" jal minijavaNewArray\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case Label:\n special = (String)s.getSpecial();\n built.append(\" .\" + special + \":\\n\");\n break;\n case Goto:\n special = (String)s.getSpecial();\n built.append(\" j .\" + special + \"\\n\");\n break;\n case Branch:\n special = (String)s.getSpecial();\n built.append(\" bne $\" + reg(left) + \", $zero .\" + special +\"\\n\");\n break;\n case NBranch:\n // could change to beqz\n special = (String)s.getSpecial();\n built.append(\" beq $\" + reg(left) + \", $zero, .\" + special +\"\\n\");\n break;\n case Call:\n String clasName = left.getType().toString();\n SSACall call = (SSACall)s.getSpecial();\n String funcName = call.getMethod();\n Vtable vtab = getVtable(prog, prog.getClass(clasName));\n int methodOffset = vtab.methodOffsets.get(funcName);\n callerSave(freeReg(s));\n built.append(crstores);\n built.append(\" move $v0, $\" + reg(left) + \"\\n\");\n built.append(\" lw $v1, ($v0)\\n\");\n built.append(\" lw $v1, \" + (methodOffset*wordSize) + \"($v1)\\n\");\n built.append(\" jal $v1\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case Return:\n built.append(\" move $v0, $\" + reg(left) + \"\\n\");\n built.append(\" j .ret_\" + methodName + \"\\n\");\n break;\n case Member:\n special = (String)s.getSpecial();\n String clname = left.getType().toString();\n int memOffset;\n if(clname.equals(\"int[]\")) {\n memOffset = 0;\n } else {\n memOffset = fieldOffset(prog, prog.getClass(clname), special);\n }\n if(memOffset == 0) {\n built.append(\" lw $\" + reg(s) + \", ($\" + reg(left) + \")\\n\");\n } else {\n built.append(\" lw $\" + reg(s) + \", \" + (wordSize*memOffset) + \"($\" + reg(left) + \")\\n\");\n }\n break;\n case Index:\n built.append(\" mul $v1, $\" + reg(right) + \", 4\\n\");\n built.append(\" add $v1, $v1, 4\\n\");\n built.append(\" add $v1, $v1, $\" + reg(left) + \"\\n\");\n built.append(\" lw $\" + reg(s) + \", ($v1)\\n\");\n break;\n case VarAssg:\n built.append(moveRegister(reg(s), reg(left)));\n break;\n case MemberAssg:\n special = (String)s.getSpecial();\n String className = left.getType().toString();\n int memSOffset = fieldOffset(prog, prog.getClass(className), special);\n built.append(\" sw $\" + reg(right) + \", \" + (memSOffset*wordSize) + \"($\" + reg(left) + \")\\n\");\n built.append(moveRegister(reg(s), reg(right)));\n break;\n case IndexAssg:\n SSAStatement index = (SSAStatement)s.getSpecial();\n built.append(\" mul $v1, $\" + reg(index) + \", 4\\n\");\n built.append(\" add $v1, $v1, 4\\n\");\n built.append(\" add $v1, $v1, $\" + reg(left) + \"\\n\");\n built.append(\" sw $\" + reg(right) + \", ($v1)\\n\");\n built.append(moveRegister(reg(s), reg(right)));\n break;\n case Not:\n built.append(\" seq $\" + reg(s) + \", $zero , $\" + reg(left) + \"\\n\");\n break;\n case Eq:\n built.append(\" seq $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Ne:\n built.append(\" sne $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Lt:\n built.append(\" slt $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Le:\n built.append(\" sle $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Gt:\n built.append(\" sgt $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Ge:\n built.append(\" sge $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case And:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n built.append(\" seq $\" + reg(s) + \", $\" + reg(s) + \", 2\\n\");\n break;\n case Or:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n built.append(\" sgt $\" + reg(s) + \", $\" + reg(s) + \", 0\\n\");\n break;\n case Plus:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Minus:\n built.append(\" sub $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Mul:\n built.append(\" mul $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Div: \n // can change this to one liner after verifying it works\n built.append(\" div $\" + reg(s) + \", $\"+ reg(left) + \", $\" + reg(right) + \"\\n\");\n //built.append(\" mflo $\" + reg(s) + \"\\n\");\n break; \n case Mod:\n // can change to one liner\n //built.append(\" div $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n //built.append(\" mfhi $\" + reg(s) + \"\\n\");\n built.append(\" rem $\" + reg(s) + \", $\"+ reg(left) + \", $\" + reg(right) + \"\\n\");\n \n break;\n case Store:\n int storeVal = (Integer)s.getSpecial();\n built.append(\" sw $\" + reg(left) + \", -\" + (storeVal+1)*wordSize + \"($fp)\\n\");\n break;\n case Load:\n int loadVal = (Integer)s.getSpecial();\n built.append(\" lw $\" + reg(s) + \", -\" + (loadVal+1)*wordSize + \"($fp)\\n\");\n break;\n default:\n throw new Error(\"Implement MIPS compiler for \" + s.getOp() + \"!\");\n }\n\n sb.append(built);\n }", "@Override\n public String visit(AStoreStmt n) {\n String r1 = this.reg[n.f2.f0.which];\n int offset = Integer.parseInt(n.f1.f1.f0.tokenImage);\n Global.outputString += \"sw $\" + r1 + \", -\" + ((offset + 3) * 4)\n + \"($fp)\\n\";\n return null;\n }", "public Code visitStatementErrorNode(StatementNode.ErrorNode node) {\n errors.fatal(\"PL0 Internal error: generateCode for Statement Error Node\",\n node.getLocation());\n return null;\n }", "public final void rule__AstProcedure__StatementsAssignment_8() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23936:1: ( ( ruleAstStatement ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23937:1: ( ruleAstStatement )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23937:1: ( ruleAstStatement )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23938:1: ruleAstStatement\n {\n before(grammarAccess.getAstProcedureAccess().getStatementsAstStatementParserRuleCall_8_0()); \n pushFollow(FOLLOW_ruleAstStatement_in_rule__AstProcedure__StatementsAssignment_848022);\n ruleAstStatement();\n\n state._fsp--;\n\n after(grammarAccess.getAstProcedureAccess().getStatementsAstStatementParserRuleCall_8_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\r\n public void visit(StmtExp n, Graph argu) {\r\n n.f1.accept(this, argu);\r\n\r\n // RETURN is treated as a statement\r\n cur = new Statement(null);\r\n n.f3.accept(this, argu);\r\n argu.addStatement(cur, true);\r\n argu.setRet(n.f3);\r\n }", "public Statement getNativeStatement(Statement stmt)\r\n/* 51: */ throws SQLException\r\n/* 52: */ {\r\n/* 53:103 */ return (Statement)stmt.unwrap(this.statementType);\r\n/* 54: */ }", "private ParseTree parseSwitchStatement() {\n SourcePosition start = getTreeStartLocation();\n eat(TokenType.SWITCH);\n eat(TokenType.OPEN_PAREN);\n ParseTree expression = parseExpression();\n eat(TokenType.CLOSE_PAREN);\n eat(TokenType.OPEN_CURLY);\n ImmutableList<ParseTree> caseClauses = parseCaseClauses();\n eat(TokenType.CLOSE_CURLY);\n return new SwitchStatementTree(getTreeLocation(start), expression, caseClauses);\n }", "public List<Stmt> convertToStmtList(Term... terms) {\n List<Stmt> stmts = new ArrayList<Stmt> (terms.length);\n for (Term term : terms) {\n if (term instanceof Expr) {\n term = xnf.Eval(term.position(), (Expr) term);\n } else if (!(term instanceof Stmt)) {\n throw new IllegalArgumentException(\"Invalid argument type: \"+term.getClass());\n }\n stmts.add((Stmt) term);\n }\n return stmts;\n }", "public final void statementExpression() throws RecognitionException {\n int statementExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"statementExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(700, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 103) ) { return ; }\n // Java.g:701:5: ( expression )\n dbg.enterAlt(1);\n\n // Java.g:701:9: expression\n {\n dbg.location(701,9);\n pushFollow(FOLLOW_expression_in_statementExpression4033);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 103, statementExpression_StartIndex); }\n }\n dbg.location(702, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"statementExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void rule__AstStatementBlock__StatementsAssignment_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24996:1: ( ( ruleAstStatement ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24997:1: ( ruleAstStatement )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24997:1: ( ruleAstStatement )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:24998:1: ruleAstStatement\n {\n before(grammarAccess.getAstStatementBlockAccess().getStatementsAstStatementParserRuleCall_3_0()); \n pushFollow(FOLLOW_ruleAstStatement_in_rule__AstStatementBlock__StatementsAssignment_350210);\n ruleAstStatement();\n\n state._fsp--;\n\n after(grammarAccess.getAstStatementBlockAccess().getStatementsAstStatementParserRuleCall_3_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final AstValidator.rank_by_statement_return rank_by_statement() throws RecognitionException {\n AstValidator.rank_by_statement_return retval = new AstValidator.rank_by_statement_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree BY294=null;\n CommonTree DENSE296=null;\n AstValidator.rank_by_clause_return rank_by_clause295 =null;\n\n\n CommonTree BY294_tree=null;\n CommonTree DENSE296_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:476:19: ( ^( BY rank_by_clause ( DENSE )? ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:476:21: ^( BY rank_by_clause ( DENSE )? )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n BY294=(CommonTree)match(input,BY,FOLLOW_BY_in_rank_by_statement2457); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n BY294_tree = (CommonTree)adaptor.dupNode(BY294);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(BY294_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_rank_by_clause_in_rank_by_statement2459);\n rank_by_clause295=rank_by_clause();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, rank_by_clause295.getTree());\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:476:42: ( DENSE )?\n int alt75=2;\n int LA75_0 = input.LA(1);\n\n if ( (LA75_0==DENSE) ) {\n alt75=1;\n }\n switch (alt75) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:476:44: DENSE\n {\n _last = (CommonTree)input.LT(1);\n DENSE296=(CommonTree)match(input,DENSE,FOLLOW_DENSE_in_rank_by_statement2463); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DENSE296_tree = (CommonTree)adaptor.dupNode(DENSE296);\n\n\n adaptor.addChild(root_1, DENSE296_tree);\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "private Stmt simpleStmt() {\n if (null != lexer.token) {\n switch (lexer.token) {\n case PRINT:\n return printStmt();\n case BREAK:\n return breakStmt();\n case IDENT:\n lexer.nextToken();\n if (lexer.token == Symbol.LEFTPAR) {\n lexer.backToken();\n return funcStmt();\n } else {\n lexer.backToken();\n return exprStmt();\n }\n case RETURN:\n return returnStmt();\n default:\n break;\n }\n }\n return null;\n }", "Statement getStmt();", "public void flattenASTChangesToString(){\n\t\tthis.codeBlob = getCodeString();\n\t\tthis.compUnit = null;\n\t\tthis.rewriter = null;\n\t}", "StatementsPackage getStatementsPackage();", "public final AliaChecker.statement_return statement() throws RecognitionException {\n\t\tAliaChecker.statement_return retval = new AliaChecker.statement_return();\n\t\tretval.start = input.LT(1);\n\n\t\tCommonTree root_0 = null;\n\n\t\tCommonTree _first_0 = null;\n\t\tCommonTree _last = null;\n\n\n\t\tCommonTree WHILE2=null;\n\t\tCommonTree DO3=null;\n\t\tTreeRuleReturnScope stat =null;\n\t\tTreeRuleReturnScope t =null;\n\t\tTreeRuleReturnScope statements4 =null;\n\n\t\tCommonTree WHILE2_tree=null;\n\t\tCommonTree DO3_tree=null;\n\n\t\ttry {\n\t\t\t// src\\\\alia\\\\AliaChecker.g:48:5: ( ^( WHILE stat= statements ^( DO statements ) ) |t= expr )\n\t\t\tint alt3=2;\n\t\t\tint LA3_0 = input.LA(1);\n\t\t\tif ( (LA3_0==WHILE) ) {\n\t\t\t\talt3=1;\n\t\t\t}\n\t\t\telse if ( ((LA3_0 >= AND && LA3_0 <= BECOMES)||(LA3_0 >= CHAR_EXPR && LA3_0 <= COLON)||(LA3_0 >= COMPOUND && LA3_0 <= CONST)||LA3_0==DIV||LA3_0==EQ||LA3_0==FALSE||(LA3_0 >= GE && LA3_0 <= GT)||(LA3_0 >= IDENTIFIER && LA3_0 <= IF)||LA3_0==LE||(LA3_0 >= LT && LA3_0 <= MOD)||(LA3_0 >= NOT && LA3_0 <= PRINT)||LA3_0==READ||(LA3_0 >= TIMES && LA3_0 <= TRUE)) ) {\n\t\t\t\talt3=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 3, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt3) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:48:9: ^( WHILE stat= statements ^( DO statements ) )\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tWHILE2=(CommonTree)match(input,WHILE,FOLLOW_WHILE_in_statement236); \n\t\t\t\t\tWHILE2_tree = (CommonTree)adaptor.dupNode(WHILE2);\n\n\n\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(WHILE2_tree, root_1);\n\n\t\t\t\t\tsymTab.openScope();\n\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\tpushFollow(FOLLOW_statements_in_statement242);\n\t\t\t\t\t\tstat=statements();\n\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\tadaptor.addChild(root_1, stat.getTree());\n\n\t\t\t\t\t\tsymTab.openScope();\n\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree _save_last_2 = _last;\n\t\t\t\t\t\tCommonTree _first_2 = null;\n\t\t\t\t\t\tCommonTree root_2 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\tDO3=(CommonTree)match(input,DO,FOLLOW_DO_in_statement254); \n\t\t\t\t\t\tDO3_tree = (CommonTree)adaptor.dupNode(DO3);\n\n\n\t\t\t\t\t\troot_2 = (CommonTree)adaptor.becomeRoot(DO3_tree, root_2);\n\n\t\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_statements_in_statement256);\n\t\t\t\t\t\t\tstatements4=statements();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tadaptor.addChild(root_2, statements4.getTree());\n\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t}\n\t\t\t\t\t\tadaptor.addChild(root_1, root_2);\n\t\t\t\t\t\t_last = _save_last_2;\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tsymTab.closeScope();symTab.closeScope();\n\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t}\n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t checkBoolType((stat!=null?((AliaChecker.statements_return)stat).type:null), (stat!=null?((CommonTree)stat.getTree()):null)); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:51:9: t= expr\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_statement280);\n\t\t\t\t\tt=expr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tadaptor.addChild(root_0, t.getTree());\n\n\t\t\t\t\t retval.type = (t!=null?((AliaChecker.expr_return)t).type:null); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\n\t\t}\n\t\t \n\t\t catch (RecognitionException e) { \n\t\t \tif(!e.getMessage().equals(\"\")) {\n\t\t\t\t\tSystem.err.println(\"Exception!:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow (new AliaException(\"\"));\n\t\t } \n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public void visit(Statement n) {\n n.f0.accept(this);\n }", "private String node(String name) { return prefix + \"AST\" + name + \"Node\"; }", "private void convert(AssignStatContext c, List<String> ssa) {\n\t\tString expr = getExpr(c.expr());\n\t\tString id = this.variableTrack.get(c.ID().getText());\n\t\tString newId = generateNewName(id);\n\t\tString constraint = \"(assert(= \" + newId + \" \" + expr + \"))\";\n\t\tssa.add(constraint);\n\t\t\n\t}", "final public LogicalPlan Parse() throws ParseException {\n /*@bgen(jjtree) Parse */\n SimpleNode jjtn000 = new SimpleNode(JJTPARSE);\n boolean jjtc000 = true;\n jjtree.openNodeScope(jjtn000);LogicalOperator root = null;\n Token t1;\n Token t2;\n LogicalPlan lp = new LogicalPlan();\n log.trace(\"Entering Parse\");\n try {\n if (jj_2_1(3)) {\n t1 = jj_consume_token(IDENTIFIER);\n jj_consume_token(79);\n t2 = jj_consume_token(IDENTIFIER);\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case AS:\n jj_consume_token(AS);\n jj_consume_token(80);\n TupleSchema();\n jj_consume_token(81);\n break;\n default:\n jj_la1[0] = jj_gen;\n ;\n }\n jj_consume_token(82);\n {if (true) throw new ParseException(\n \"Currently PIG does not support assigning an existing relation (\" + t1.image + \") to another alias (\" + t2.image + \")\");}\n } else if (jj_2_2(2)) {\n t1 = jj_consume_token(IDENTIFIER);\n jj_consume_token(79);\n root = Expr(lp);\n jj_consume_token(82);\n root.setAlias(t1.image);\n addAlias(t1.image, root);\n pigContext.setLastAlias(t1.image);\n } else {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case DEFINE:\n case LOAD:\n case FILTER:\n case FOREACH:\n case ORDER:\n case DISTINCT:\n case COGROUP:\n case JOIN:\n case CROSS:\n case UNION:\n case GROUP:\n case STREAM:\n case STORE:\n case LIMIT:\n case SAMPLE:\n case IDENTIFIER:\n case 80:\n root = Expr(lp);\n jj_consume_token(82);\n break;\n case SPLIT:\n jj_consume_token(SPLIT);\n root = SplitClause(lp);\n jj_consume_token(82);\n break;\n default:\n jj_la1[1] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n }\n jjtree.closeNodeScope(jjtn000, true);\n jjtc000 = false;\n if(null != root) {\n log.debug(\"Adding \" + root.getAlias() + \" \" + root + \" to the lookup table \" + aliases);\n\n //Translate all the project(*) leaves in the plan to a sequence of projections\n ProjectStarTranslator translate = new ProjectStarTranslator(lp);\n translate.visit();\n\n addLogicalPlan(root, lp);\n\n try {\n log.debug(\"Root: \" + root.getClass().getName() + \" schema: \" + root.getSchema());\n } catch(FrontendException fee) {\n ParseException pe = new ParseException(fee.getMessage());\n pe.initCause(fee);\n {if (true) throw pe;}\n }\n }\n\n ArrayList<LogicalOperator> roots = new ArrayList<LogicalOperator>(lp.getRoots().size());\n for(LogicalOperator op: lp.getRoots()) {\n roots.add(op);\n }\n\n Map<LogicalOperator, Boolean> rootProcessed = new HashMap<LogicalOperator, Boolean>();\n for(LogicalOperator op: roots) {\n //At this point we have a logical plan for the pig statement\n //In order to construct the entire logical plan we need to traverse\n //each root and get the logical plan it belongs to. From each of those\n //plans we need the predecessors of the root of the current logical plan\n //and so on. This is a computationally intensive operatton but should\n //be fine as its restricted to the parser\n\n LogicalPlan rootPlan = aliases.get(op);\n if(null != rootPlan) {\n attachPlan(lp, op, rootPlan, rootProcessed);\n rootProcessed.put(op, true);\n }\n }\n\n log.trace(\"Exiting Parse\");\n {if (true) return lp;}\n } catch (Throwable jjte000) {\n if (jjtc000) {\n jjtree.clearNodeScope(jjtn000);\n jjtc000 = false;\n } else {\n jjtree.popNode();\n }\n if (jjte000 instanceof RuntimeException) {\n {if (true) throw (RuntimeException)jjte000;}\n }\n if (jjte000 instanceof ParseException) {\n {if (true) throw (ParseException)jjte000;}\n }\n {if (true) throw (Error)jjte000;}\n } finally {\n if (jjtc000) {\n jjtree.closeNodeScope(jjtn000, true);\n }\n }\n throw new Error(\"Missing return statement in function\");\n }", "public StatementParse reconstructTree(ArrayList<StatementParse> expression){\n // an empty expression will not trigger this method\n // first element is always an integer\n StatementParse left_node = expression.get(0);\n\n for (int i = 1; i < expression.size(); i++){\n StatementParse right_node = expression.get(i);\n if (right_node instanceof IntegerParse && ((IntegerParse) right_node).getValue() == 0){\n continue;\n }\n StatementParse top;\n if (right_node.isNegative()){\n top = new StatementParse(\"-\");\n } else {\n top = new StatementParse(\"+\");\n }\n top.getChildren().add(left_node);\n top.getChildren().add(right_node);\n left_node = top;\n }\n return left_node;\n }", "@Override\n public String visit(MoveStmt n) {\n String _ret = null;\n String r1 = this.reg[n.f1.f0.which];\n int which = n.f2.f0.which;\n if (which == 0) {\n /* 0 MOVE r1 HALLOCATE SimpleExp */\n this.save_a0v0(r1);\n n.f2.accept(this);\n Global.outputString += \"move $\" + r1 + \", $v0\\n\";\n this.load_a0v0(r1);\n } else {\n /* 1 MOVE r1 Operator Reg SimpleExp */\n /* 2 MOVE r1 SimpleExp */\n this.moveReg = r1;\n n.f2.accept(this);\n this.moveReg = null;\n }\n return _ret;\n }", "protected abstract NativeSQLStatement createNativeAsTextStatement();", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "public StmtExpr createStmtExpr(Position pos, List<Stmt> stmts, Expr expr) {\n if (null == expr) return (StmtExpr) xnf.StmtExpr(pos, stmts, null).type(xts.Void());\n return (StmtExpr) xnf.StmtExpr(pos, stmts, expr).type(expr.type());\n }", "public String wrapStatement(String statement);", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "Statement createStatement();", "Statement createStatement();", "Statement createStatement();", "public void processStatement(BaseStatement statement) {\n\n labels.addAll(statement.produceLabels());\n\n // Only produce Init if it is the first statement\n if(((BaseMutableTreeNode)statement.getParent()).getChildBefore(statement) == null) {\n init = statement.produceInit();\n }\n\n // Only produce Init if it is the first statement\n if(((BaseMutableTreeNode)statement.getParent()).getChildAfter(statement) == null) {\n finals = statement.produceFinals();\n }\n\n boolean isAssigningInitFlow = false;\n if(flow.edgeSet().size() == 0) {\n isAssigningInitFlow = true;\n }\n flow = statement.produceFlows(flow);\n if(isAssigningInitFlow) {\n Set<DefaultEdge> edgeSet = flow.edgeSet();\n initEdge = edgeSet.iterator().next();\n }\n\n statements.add(statement);\n }", "RewrittenStatement rewrite(String sql, Binding params);", "private StatementNode parseStatementFor() {\n\t\tToken tokenFor = tokenReader.getCurrent();\n\t\ttokenReader.moveNext();\n\t\t\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.ROUNDBR_OPEN);\n\t\t\n\t\tToken identifier1 = tokenReader.matchTokenAndMoveOn(TokenType.IDENTIFIER);\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.ASSIGN);\n\t\tStatementNode stm1 = new AssignNode(identifier1, parserExpression.parse());\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.SEMICOLONS);\n\t\t\n\t\tExpressionNode condition = parserExpression.parse();\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.SEMICOLONS);\n\t\t\n\t\tToken identifier2 = tokenReader.matchTokenAndMoveOn(TokenType.IDENTIFIER);\n\t\tStatementNode stm2 = parseStatementIdentifier(identifier2);\n\t\t\n\t\ttokenReader.matchTokenAndMoveOn(TokenType.ROUNDBR_CLOSE);\n\t\t\n\t\tBlockNode bodyNode = this.parse(BlockNode.BlockType.BLOCK);\n\t\treturn new ForNode(tokenFor, stm1, condition, stm2, bodyNode);\n\t}", "public static Expr parse(String str) {\r\n\t\tExprBinary at = new ExprBinary(null, null); // the root of the tree\r\n\t\tStringBuilder opstore = new StringBuilder(); // stores operator characters\r\n\t\tStringBuilder adder = new StringBuilder(); // stores value characters\r\n\t\tboolean text = false; // whether inside of a string\r\n\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tboolean add = (c != '\\\\'); // whether to add the char to adder. ignore escape char\r\n\t\t\tboolean leftSide = (opstore.length() == 0); // whether on the left side of the binary expression (before the operator)\r\n\t\t\tString adderStr = adder.toString();\r\n\t\t\tString opStr = opstore.toString();\r\n\r\n\t\t\tif (c == '\"') { // string\r\n\t\t\t\tif (i == 0 || str.charAt(i - 1) != '\\\\') {\r\n\t\t\t\t\ttext = !text; // ignore string contents\r\n\t\t\t\t}\r\n\t\t\t} else if (!text) {\r\n\t\t\t\tif (c == ' ') {\r\n\t\t\t\t\tadd = false; // ignore spaces\r\n\t\t\t\t} else if (c == '(') { // grouping or function\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tString contents = str.substring(i + 1, closeIndex);\r\n\t\t\t\t\tExpr group; // the expression denoted by the parentheses group\r\n\r\n\t\t\t\t\tif (i > 0 && (!isReserved(str.charAt(i - 1)) || str.charAt(i - 1) == ')')) { // function\r\n\t\t\t\t\t\tif (adderStr.isEmpty()) { // function reference call ... func()()\r\n\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(null, contents); // a reference call is only a parameter group, null name\r\n\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t} else { // function call\r\n\t\t\t\t\t\t\tif (adderStr.startsWith(\".\")) { // function sub call ... func().subfunc()\r\n\t\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t\t} else { // standalone function ... func()\r\n\t\t\t\t\t\t\t\tif (Character.toString(adderStr.charAt(0)).equals(Operator.REF.op)) { // @func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprFuncRef(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\t} else { // func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprCall(adderStr, contents);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // parenthetical grouping\r\n\t\t\t\t\t\tchar cc = (adderStr.length() == 1 ? adderStr.charAt(0) : 0); // operator before parenthesis ... !()\r\n\t\t\t\t\t\tif (isReserved(cc)) { // operation on the group\r\n\t\t\t\t\t\t\tgroup = new ExprUnary(Operator.get(Character.toString(cc)), parse(contents));\r\n\t\t\t\t\t\t} else { // ignore character, not an operator\r\n\t\t\t\t\t\t\tgroup = parse(contents);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add to tree\r\n\t\t\t\t\tif (leftSide) at.setLeft(group);\r\n\t\t\t\t\telse at.setRight(group);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (c == '{') { // array initializer ... {}\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tExpr arr = new ExprArray(str.substring(i + 1, closeIndex), adderStr);\r\n\r\n\t\t\t\t\tif (adderStr.length() == 1 && isReserved(adderStr.charAt(0))) {\r\n\t\t\t\t\t\t// unary op done on array initializer ... !{}\r\n\t\t\t\t\t\tarr = new ExprUnary(Operator.get(Character.toString(adderStr.charAt(0))), arr);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (leftSide) at.setLeft(arr);\r\n\t\t\t\t\telse at.setRight(arr);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (isOp(c)) { // operator\r\n\t\t\t\t\t// add value used in operation to tree\r\n\t\t\t\t\tif (!adderStr.isEmpty()) {\r\n\t\t\t\t\t\tif (leftSide) { // ex: adderStr + ___\r\n\t\t\t\t\t\t\tat.setLeft(parseValue(adderStr));\r\n\t\t\t\t\t\t} else { // ex: (___ + adderStr) + ___\r\n\t\t\t\t\t\t\tat.setRight(parseValue(adderStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opStr.equals(\"\") || (i > 0 && isOp(str.charAt(i - 1)))) { // accumulate operator from adjacent operator characters (ex: != consists of ! and =)\r\n\t\t\t\t\t\tif (!(adderStr.isEmpty() && (opStr + c).equals(\"-\")) && (Operator.get(opStr + c) != null || (opStr.isEmpty() && isOp(c)))) {// if the operator exists, then it is an operator character\r\n\t\t\t\t\t\t\tif (opStr.equals(\"-\") && c == '-') { // this and the above line handle negatives and double negatives\r\n\t\t\t\t\t\t\t\topStr = \"+\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topStr += c;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // existing operator operation must be added to tree ... in \"(a + b) * c\", \"(a+b)\" must be abstracted-out so we get \"x * c\"\r\n\t\t\t\t\t\tint endIndex = i + 1; // end index of operator\r\n\r\n\t\t\t\t\t\t// get entire operator if operator is more than 1 character long\r\n\t\t\t\t\t\tfor (int i2 = endIndex; i2 < str.length(); i2++) {\r\n\t\t\t\t\t\t\tif (isOp(str.charAt(i2))) endIndex++;\r\n\t\t\t\t\t\t\telse break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOperator nextOp = Operator.get(str.substring(i, endIndex)); // second (right-most) operator\r\n\t\t\t\t\t\tat.op = Operator.get(opStr); // first (left-most) operator\r\n\r\n\t\t\t\t\t\t// group values in operation by operator precedence\r\n\t\t\t\t\t\tint p1 = precedence(nextOp); // right-most op\r\n\t\t\t\t\t\tint p2 = precedence(at.op); // left-most op\r\n\r\n\t\t\t\t\t\tif (p1 > p2) { // group around the right-most op\r\n\t\t\t\t\t\t\tExprBinary right = new ExprBinary(at, nextOp);\r\n\t\t\t\t\t\t\tright.setLeft(at.right());\r\n\r\n\t\t\t\t\t\t\tat.setRight(right);\r\n\t\t\t\t\t\t\tat = right;\r\n\r\n\t\t\t\t\t\t} else if (p1 < p2) { // group around the left-most op\r\n\t\t\t\t\t\t\tExprBinary last = at;\r\n\t\t\t\t\t\t\tExprBinary match = at.parent();\r\n\r\n\t\t\t\t\t\t\t// correctly add to the binary tree based on precedence of operators\r\n\t\t\t\t\t\t\twhile (match instanceof ExprBinary && p1 < (p2 = precedence(((ExprBinary) match).op))) {\r\n\t\t\t\t\t\t\t\tlast = match;\r\n\t\t\t\t\t\t\t\tmatch = match.parent();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tExprBinary tr = new ExprBinary(match, nextOp);\r\n\t\t\t\t\t\t\ttr.setLeft(last);\r\n\r\n\t\t\t\t\t\t\tif (match != null) {\r\n\t\t\t\t\t\t\t\tif (last == match.right()) match.setRight(tr);\r\n\t\t\t\t\t\t\t\telse match.setLeft(tr);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tat = tr;\r\n\r\n\t\t\t\t\t\t} else { // group from left to right (equal operator precedence)\r\n\t\t\t\t\t\t\tExprBinary left = new ExprBinary(at, at.op); // group existing values into left node, add right to open right node spot\r\n\t\t\t\t\t\t\tleft.setLeft(at.left());\r\n\t\t\t\t\t\t\tleft.setRight(at.right());\r\n\r\n\t\t\t\t\t\t\tat.op = nextOp;\r\n\t\t\t\t\t\t\tat.setLeft(left);\r\n\t\t\t\t\t\t\tat.setRight(null);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\topStr = nextOp.op;\r\n\t\t\t\t\t\ti = endIndex - 1;\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// store valid value characters\r\n\t\t\tif (add) {\r\n\t\t\t\tadder.append(c);\r\n\r\n\t\t\t\t// if this is the last character, then add the stored value to the tree.\r\n\t\t\t\t// otherwise, would be incorrectly ignored because there is no next operator\r\n\t\t\t\tif (i + 1 == str.length()) {\r\n\t\t\t\t\tif (opstore.length() == 0) {\r\n\t\t\t\t\t\tat.setLeft(parseValue(adder.toString()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tat.setRight(parseValue(adder.toString()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// initialize binary tree operator if not done so already\r\n\t\tif (at.op == null) {\r\n\t\t\tat.op = Operator.get(opstore.toString());\r\n\t\t}\r\n\r\n\t\t// after traversing the tree to some point, we need to get back to root so we can return the entire tree\r\n\t\twhile (at.parent() != null) {\r\n\t\t\tat = (ExprBinary) at.parent();\r\n\t\t}\r\n\r\n\t\t// the expression may not actually be a binary operation\r\n\t\tif (at.op == null && at.right() == NULL) {\r\n\t\t\tif (at.left() == NULL) return NULL; // the expression is empty\r\n\t\t\treturn at.left(); // the expression is a single value/unary-operation\r\n\t\t}\r\n\r\n\t\treturn at;\r\n\t}", "public interface StatementResolver {\n\t/**\n\t * Adds a statement to the registry.\n\t *\n\t * Registered statements can be resolved with {@code resolveStatement()}.\n\t *\n\t * @param statementName The name used to reference the statement afterwards.\n\t * @param statement The statement that shall be registered.\n\t * @param type The type of the statement, i.e. {@link de.codecentric.zucchini.bdd.dsl.Fact},\n\t * {@link de.codecentric.zucchini.bdd.dsl.Step},\n\t * {@link de.codecentric.zucchini.bdd.dsl.Result}, or their subclasses.\n\t */\n\tvoid addStatement(String statementName, Statement statement, Class<? extends Statement> type);\n\n\t/**\n\t * Resolves a statement using its name and the type of the statement.\n\t *\n\t * @param statementName The name used to reference the statement.\n\t * @param type The type of the statement, i.e. {@link de.codecentric.zucchini.bdd.dsl.Fact},\n\t * {@link de.codecentric.zucchini.bdd.dsl.Step},\n\t * {@link de.codecentric.zucchini.bdd.dsl.Result}, or their subclasses.\n\t * @param <T> The result type equates to the parameter {@code type}.\n\t * @return The resolved statement.\n\t */\n\t<T extends Statement> T resolveStatement(String statementName, Class<T> type);\n}", "public interface AstFactory\n{\n\tIdNode IdNode(Token t, String text);\n\tExtIdNode ExtIdNode(Token t, String text);\n\n\tAmbigNameNode AmbigNameNode(Token t, String text);\t // Deprecate? Never need to make ambigname \"manually\" via af? (constructed only by ScribbleParser)\n\tDataParamNode DataParamNode(Token t, String text);\n\tOpNode OpNode(Token t, String text);\n\tRecVarNode RecVarNode(Token t, String text);\n\tRoleNode RoleNode(Token t, String text);\n\tSigParamNode SigParamNode(Token t, String text);\n\n\tDataNameNode DataNameNode(Token t, List<IdNode> elems);\n\tGProtoNameNode GProtoNameNode(Token t, List<IdNode> elems);\n\tLProtoNameNode LProtoNameNode(Token t, List<IdNode> elems);\n\tModuleNameNode ModuleNameNode(Token t, List<IdNode> elems);\n\tSigNameNode SigNameNode(Token t, List<IdNode> elems);\n\t\n\tModule Module(Token t, ModuleDecl mdecl,\n\t\t\tList<? extends ImportDecl<?>> imports,\n\t\t\tList<? extends NonProtoDecl<?>> nonprotos,\n\t\t\tList<? extends ProtoDecl<?>> protos);\n\n\tModuleDecl ModuleDecl(Token t, ModuleNameNode fullname);\n\tImportModule ImportModule(Token t, ModuleNameNode modname,\n\t\t\tModuleNameNode alias); // alias == null for no alias (child not added)\n\n\tDataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);\n\tSigDecl SigDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, SigNameNode name);\n\tGProtoDecl GProtoDecl(Token t, ProtoModList mods, GProtoHeader header,\n\t\t\tGProtoDef def);\n\n\t// TODO: refactor to use ProtoModList, etc.\n\tProtoModList ProtoModList(Token t, List<ProtoModNode> mods);\n\tAuxMod AuxMod(Token t);\n\tExplicitMod ExplicitMod(Token t);\n\n\tGProtoHeader GProtocolHeader(Token t, GProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tRoleDeclList RoleDeclList(Token t, List<RoleDecl> ds);\n\tRoleDecl RoleDecl(Token t, RoleNode r);\n\tNonRoleParamDeclList NonRoleParamDeclList(Token t, \n\t\t\tList<NonRoleParamDecl<? extends NonRoleParamKind>> ds);\n\tDataParamDecl DataParamDecl(Token t, DataParamNode p);\n\tSigParamDecl SigParamDecl(Token t, SigParamNode p);\n\n\tGProtoDef GProtoDef(Token t, GProtoBlock block);\n\tGProtoBlock GProtoBlock(Token t, GInteractionSeq seq);\n\tGInteractionSeq GInteractionSeq(Token t, List<GSessionNode> elems); // CHECKME: ? extends GSessionNode ? -- and similar others?\n\n\tSigLitNode SigLitNode(Token t, OpNode op, PayElemList pay);\n\tPayElemList PayElemList(Token t, List<PayElem<?>> elems);\n\t<K extends PayElemKind> UnaryPayElem<K> UnaryPayElem(Token t, \n\t\t\tPayElemNameNode<K> name);\n\tGDelegPayElem GDelegPayElem(Token t, GProtoNameNode name, RoleNode r);\n\n\tGMsgTransfer GMsgTransfer(Token t, RoleNode src, MsgNode msg,\n\t\t\tList<RoleNode> dsts);\n\tGConnect GConnect(Token t, RoleNode src, MsgNode msg, RoleNode dst);\n\tGDisconnect GDisconnect(Token t, RoleNode left, RoleNode right);\n\tGWrap GWrap(Token t, RoleNode client, RoleNode server);\n\n\tGContinue GContinue(Token t, RecVarNode rv);\n\tGDo GDo(Token t, GProtoNameNode proto, NonRoleArgList args, RoleArgList rs);\n\n\tRoleArgList RoleArgList(Token t, List<RoleArg> rs);\n\tRoleArg RoleArg(Token t, RoleNode r);\n\tNonRoleArgList NonRoleArgList(Token t, List<NonRoleArg> args);\n\tNonRoleArg NonRoleArg(Token t, NonRoleArgNode arg);\n\n\tGChoice GChoice(Token t, RoleNode subj, List<GProtoBlock> blocks);\n\tGRecursion GRecursion(Token t, RecVarNode rv, GProtoBlock block);\n\n\t/*LProtoDecl LProtoDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def); // Not currently used -- local protos not yet parsed, only projected*/\n\n\tLProjectionDecl LProjectionDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def, GProtoNameNode fullname,\n\t\t\tRoleNode self); // del extends that of LProtoDecl\n\n\tLProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tLSelfDecl LSelfDecl(Token t, RoleNode r);\n\n\tLProtoDef LProtoDef(Token t, LProtoBlock block);\n\tLProtoBlock LProtoBlock(Token t, LInteractionSeq seq);\n\tLInteractionSeq LInteractionSeq(Token t, List<LSessionNode> elems);\n\n\t// Following take \"self\" param in case of parsed Token (not actually supported yet)\n\tLSend LSend(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLRecv LRecv(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLAcc LAcc(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLReq LReq(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLDisconnect LDisconnect(Token t, RoleNode self, RoleNode peer); \n\tLClientWrap LClientWrap(Token t, RoleNode client, RoleNode server);\n\tLServerWrap LServerWrap(Token t, RoleNode client, RoleNode server);\n\n\tLContinue LContinue(Token t, RecVarNode rv); \n\tLDo LDo(Token t, LProtoNameNode proto, NonRoleArgList as, RoleArgList rs);\n\n\tLChoice LChoice(Token t, RoleNode subj, List<LProtoBlock> blocks);\n\tLRecursion LRecursion(Token t, RecVarNode rv, LProtoBlock block);\n}", "private void parse() {\r\n for (int length = sourceCode.length(); index < length; ++index) {\r\n char c = sourceCode.charAt(index);\r\n if (!Character.isWhitespace(c)) {\r\n ArrayList<String> tokens = tokenizeStatement(sourceCode);\r\n if (tokens != null) {\r\n parseStatementTokens(tokens);\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }", "final public SqlStatement Statement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:{\n st = UseStatement();\n break;\n }\n case SET:{\n st = SetVariableStatement();\n break;\n }\n case CREATE:{\n st = CreateStatement();\n break;\n }\n case ALTER:{\n st = AlterStatement();\n break;\n }\n case DROP:{\n st = DropStatement();\n break;\n }\n case INSERT:{\n st = InsertStatement();\n break;\n }\n case LOCK:{\n st = LockTablesStatement();\n break;\n }\n case UNLOCK:{\n st = UnlockTablesStatement();\n break;\n }\n case START:{\n st = StartTransactionStatement();\n break;\n }\n case COMMIT:{\n st = CommitTransactionStatement();\n break;\n }\n default:\n jj_la1[2] = jj_gen;\nst = new EmptyStatement();\n }\nreturn st;\n}", "public final void rule__AstStatementWhile__StatementsAssignment_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25071:1: ( ( ruleAstStatement ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25072:1: ( ruleAstStatement )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25072:1: ( ruleAstStatement )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25073:1: ruleAstStatement\n {\n before(grammarAccess.getAstStatementWhileAccess().getStatementsAstStatementParserRuleCall_3_0()); \n pushFollow(FOLLOW_ruleAstStatement_in_rule__AstStatementWhile__StatementsAssignment_350365);\n ruleAstStatement();\n\n state._fsp--;\n\n after(grammarAccess.getAstStatementWhileAccess().getStatementsAstStatementParserRuleCall_3_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public CodeTree toCodeTree() {\n List<Node> nodes = new ArrayList<Node>();\n for (int i = max(codeLengths); i >= 0; i--) { // Descend through code lengths\n List<Node> newNodes = new ArrayList<Node>();\n\n // Add leaves for symbols with positive code length i\n if (i > 0) {\n for (int j = 0; j < codeLengths.length; j++) {\n if (codeLengths[j] == i)\n newNodes.add(new Leaf(j)); //Isidedame ASCII reiksmes ilgiausio kodo\n }\n }\n\n // Merge pairs of nodes from the previous deeper layer\n for (int j = 0; j < nodes.size(); j += 2) {\n newNodes.add(new InternalNode(nodes.get(j), nodes.get(j + 1))); //Sujungia lapus i InternalNodes\n }\n nodes = newNodes;\n }\n return new CodeTree((InternalNode)nodes.get(0), codeLengths.length);\n }", "private static StatementType getStatementType(@NotNull String statementStr) throws SyntaxException {\n\n if (OpenFileStatement.matchesString(statementStr)) {\n return StatementType.OpenFileStatement;\n }\n else if (ReadFileStatement.matchesString(statementStr)) {\n return StatementType.ReadFileStatement;\n }\n else if (CloseFileStatement.matchesString(statementStr)) {\n return StatementType.CloseFileStatement;\n }\n else if (AssignmentStatement.matchesString(statementStr))\n return StatementType.AssignmentStatement;\n else if (CompoundStatement.matchesString(statementStr)) {\n return StatementType.CompoundStatement;\n }\n else if (IfStatement.matchesString(statementStr)) {\n return StatementType.IfStatement;\n }\n else if (PrintStatement.matchesString(statementStr)) {\n return StatementType.PrintStatement;\n }\n else if (CallStatement.matchesString(statementStr)) {\n return StatementType.CallStatement;\n }\n else if (false) {\n return StatementType.LoadFunctionFromFileStatement;\n }\n else if (ReturnStatement.matchesString(statementStr)) {\n return StatementType.ReadFileStatement;\n }\n else if (NewHeapEntryStatement.matchesString(statementStr)) {\n return StatementType.NewHeapEntryStatement;\n }\n else if (WriteHeapStatement.matchesString(statementStr)) {\n return StatementType.WriteHeapStatement;\n }\n else if (WhileStatement.matchesString(statementStr)) {\n return StatementType.WhileStatement;\n } else if (ForkStatement.matchesString(statementStr)) {\n return StatementType.ForkStatement;\n } else\n throw new SyntaxException(\"Invalid syntax in: \" + statementStr);\n }", "public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }", "final public SqlStatement ScriptStatement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:\n case CREATE:\n case DROP:\n case SET:\n case INSERT:\n case ALTER:\n case LOCK:\n case UNLOCK:\n case START:\n case COMMIT:\n case 117:{\n st = Statement();\n jj_consume_token(117);\n break;\n }\n case 0:{\n jj_consume_token(0);\n break;\n }\n default:\n jj_la1[1] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn st;\n}", "public String visit(Statement n, String s) {\n n.f0.accept(this, null);\n return null;\n }", "void compileStatements() {\n tagBracketPrinter(STAT_TAG, OPEN_TAG_BRACKET);\n try {\n compileStatementHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(STAT_TAG, CLOSE_TAG_BRACKET);\n }", "public void visit(Operand operand);" ]
[ "0.6617584", "0.6011537", "0.572363", "0.572363", "0.5694548", "0.56888545", "0.5639179", "0.5614902", "0.5556669", "0.55309844", "0.55080956", "0.5403967", "0.5345819", "0.53333384", "0.5317293", "0.5256224", "0.5223541", "0.5218979", "0.5198087", "0.5167298", "0.5159046", "0.5157928", "0.51483387", "0.5137995", "0.5106884", "0.50605136", "0.5059946", "0.50116485", "0.50085974", "0.50015026", "0.49833745", "0.49633253", "0.49621895", "0.49591133", "0.49471462", "0.49387917", "0.4894228", "0.48864025", "0.48837858", "0.48662552", "0.48554516", "0.4811304", "0.48085642", "0.48003182", "0.4786267", "0.47695515", "0.4763954", "0.47559595", "0.47549808", "0.47534996", "0.4745602", "0.4717323", "0.469131", "0.46899837", "0.4671223", "0.46624574", "0.4636557", "0.4604472", "0.46041933", "0.4603648", "0.4599701", "0.45872676", "0.4577228", "0.4574746", "0.45591035", "0.4558446", "0.4557893", "0.4544372", "0.4533661", "0.45227996", "0.45184395", "0.4517325", "0.45081586", "0.45045933", "0.4497908", "0.44739044", "0.44724327", "0.4469341", "0.4466618", "0.44655028", "0.4460322", "0.44550022", "0.44550022", "0.44550022", "0.44521695", "0.44463396", "0.4439306", "0.44373628", "0.44286588", "0.4407436", "0.4398576", "0.43955094", "0.4394797", "0.43902838", "0.43901333", "0.4387915", "0.4380641", "0.43781346", "0.43742317", "0.43594486" ]
0.6470206
1
Convert an arg AST to IR tree
public static String arg(CommonTree ast, IRTree irt) { Token t = ast.getToken(); int tt = t.getType(); if (tt == STRING) { String tx = t.getText(); int a = Memory.allocateString(tx); String st = String.valueOf(a); irt.setOp("MEM"); irt.addSub(new IRTree("CONST", new IRTree(st))); return "string"; } else { expression(ast, irt); return "real"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void traverseArg(UniArg node) {\n\t}", "AstroArg unpack(Astro litChars);", "void genAst();", "public Code visitArgumentsNode(ExpNode.ArgumentsNode node) {\n beginGen(\"Arguments\");\n Code code = new Code();\n for(ExpNode exp : node.getArgs()) {\n code.append(exp.genCode(this));\n }\n endGen(\"Arguments\");\n return code;\n }", "void visitArgument(Argument argument);", "public static void expression(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == REALNUM) {\n constant(ast, irt1);\n irt.setOp(\"CONST\");\n irt.addSub(irt1);\n }\n else if(tt == PLUS || tt == MINUS || tt == TIMES || tt == DIVIDE)\n {\n //do something\n irt.setOp(\"BINOP\");\n IRTree irt2 = new IRTree();\n expression((CommonTree)ast.getChild(0), irt1);\n expression((CommonTree)ast.getChild(1), irt2);\n\tif(tt == PLUS)\n \t\t irt.addSub(new IRTree(\"+\")); \n\telse if(tt == MINUS)\n\t\tirt.addSub(new IRTree(\"-\"));\n\telse if(tt == TIMES)\n\t\tirt.addSub(new IRTree(\"*\"));\n\telse if(tt == DIVIDE)\n\t\tirt.addSub(new IRTree(\"/\"));\n irt.addSub(irt1);\n irt.addSub(irt2);\n }\n else\n\tSystem.out.println(\"unrecognised type \" + tt);\n }", "public interface AST {\n \n /**\n * Returns the label or tag for this AST node.\n */\n public int getNodeLabel ();\n \n /**\n * Returns the textual value of this AST node.\n */\n public String getNodeValue ();\n \n /**\n * Returns a list of child nodes, or null if there are no child nodes. The value returned is a shallow copy\n * which can be manipulated by the caller.\n */\n public List<AST> getChildNodes ();\n \n /**\n * Returns the position of the node in the original source(s).\n */\n public CodePosition getCodePosition ();\n \n}", "public String visit(int i){\n i++;\n tree = tree + a1.visit(i);\n tree = tree + a2.visit(i);\n return(Indent(i) + \"SeqArg\\n\" + tree);\n }", "public String visit(IntegerArrayType n, LLVMRedux argu) {\n return \"i32*\";\n }", "Astro bag(AstroArg args);", "OclExpression getArgument();", "void visitOperandFunction(ArgumentFunction operand);", "public AST(RuleContext ctx){\n this.ctx = ctx;\n }", "@Override\n\tpublic String visitArExpr(ArExprContext ctx) {\n\t\tint chNo=ctx.children.size();\n\t\tif(chNo == 3){\n\t\t\tParseTree cur = ctx.getChild(1);\n\t\t\tif(cur==ctx.MULT() || cur==ctx.DIV()|| cur==ctx.PLUS() || cur==ctx.MINUS()){\n\t\t\t\tString left = visit(ctx.getChild(0));\n\t\t\t\tString right = visit(ctx.getChild(2));\n\t\t\t\tif(!(right.equals(left) && right.equals(\"int\")) ){throw new RuntimeException(\"Arithmetic operations only with integers\");}\n\t\t\t\treturn(\"int\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn(visit(cur));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tParseTree cur=ctx.getChild(0);\n\t\t\tif (cur instanceof TerminalNode) {\t\t\t\t\n\t\t\t\tif (cur==ctx.INTEG()) return \"int\";\n\t\t\t\telse if (cur==ctx.CH()) return \"char\";\n\t\t\t\telse if(cur==ctx.ID()){\n\t\t\t\t\tString key=visitTerminal((TerminalNode)cur);\n\t\t\t\t\tRecord id= table.lookup(key);\n\t\t\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\t\t\treturn id.getReturnType();\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t}else {\n\t\t\t\tString type=visit(ctx.getChild(0));\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public interface ASTPath\n{\n\tvoid debugSelf(IndentPrinter destination);\n\tvoid setParent(ASTChildList.ListKey key, ASTParent newParent);\n\tvoid compileSelf(LangCompiler compiler);\n\tASTBase getDeclaration();\n\tString getName();\n\tString getEnd();\n\tSpiritType getExpressionType();\n\n}", "public String visit(IntegerType n, LLVMRedux argu) {\n return \"i32\";\n }", "@Override\n public R visit(Bind n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n n.expression.accept(this, argu);\n n.nodeToken2.accept(this, argu);\n n.var.accept(this, argu);\n n.nodeToken3.accept(this, argu);\n return _ret;\n }", "@Override\n public R visit(FunctionCall n, A argu) {\n R _ret = null;\n n.iRIref.accept(this, argu);\n n.argList.accept(this, argu);\n return _ret;\n }", "public String visit(ExpressionTerm n, LLVMRedux argu) throws Exception {\n argStack.get(argStackIndex).add(n.f1.accept(this, argu));\n return null;\n }", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Transcription p, A arg)\n {\n\n p.expression_.accept(new ExpressionVisitor<R,A>(), arg);\n\n return null;\n }", "Astro tuple(AstroArg args);", "@Override\n public String visit(PassArgStmt n) {\n // 直接将参数保存到下一个栈帧\n // PASSARG 起始1\n int offset = Integer.parseInt(n.f1.f0.tokenImage);\n String r1 = this.reg[n.f2.f0.which];\n Global.outputString += \"sw $\" + r1 + \", -\" + ((offset + 2) * 4)\n + \"($sp)\\n\";\n return null;\n }", "@Override\r\n\tpublic Object visitClosure(Closure closure, Object arg) throws Exception {\r\n//\t\tList<String> argTypes = new ArrayList<String>();\r\n//\t\tString resultType = null;\r\n//\t\tint numScopes = symbolTable.enterScope();\r\n////\t\t visit children\r\n//\t\tfor (VarDec vd : closure.formalArgList) {\r\n//\t\t\tString vdType = (String) vd.visit(this, arg);\r\n//\t\t\targTypes.add(vdType);\r\n//\t\t}\r\n//\t\tfor (Statement s : closure.statementList) {\r\n//\t\t\ts.visit(this, arg);\r\n//\t\t}\r\n//\t\tint numScopesExit = symbolTable.leaveScope();\r\n//\t\tcheck(numScopesExit > 0 && numScopesExit == numScopes,\r\n//\t\t\t\t\"unbalanced scopes\", closure);\r\n//\t\tclosure.setJVMType(JVMType);\r\n//\t\tclosure.setArgTypes(argTypes);\r\n//\t\tclosure.setResultType(resultType);\r\n//\t\treturn resultType;\r\n\t\tthrow new UnsupportedOperationException(\"not yet implemented\");\r\n\t}", "public static void statement(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == WRITELN)\n {\n String a = String.valueOf(Memory.allocateString(\"\\n\"));\n irt.setOp(\"WRS\");\n irt.addSub(new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(a))));\n }\n else if (tt == WRITE)\n {\n ast1 = (CommonTree)ast.getChild(0);\n String type = arg(ast1, irt1);\n if (type.equals(\"real\")) {\n irt.setOp(\"WRR\");\n irt.addSub(irt1);\n }\n else {\n irt.setOp(\"WRS\");\n irt.addSub(irt1);\n }\n }\n else if(tt == ASSIGN)\n {\n //try deailng with assign here\n irt.setOp(\"ASSIGN\");\n IRTree iHold = new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(String.valueOf(Memory.allocateReal(ast.getChild(0).getText())))));\n System.out.println(\"var name = \" + ast.getChild(0).getText());\n irt.addSub(iHold);\n expression((CommonTree)ast.getChild(1), irt1);\n irt.addSub(irt1);\n }\n else if(tt == MEM)\n {\n System.out.println(\"GOT MEM TYPE\");\n }\n else {\n error(tt);\n }\n }", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "public Object visit(ASTOr node, Object data) {\n for (int i = 0; i < node.jjtGetNumChildren(); i++) {\n List args = (List) node.jjtGetChild(i).jjtAccept(this, data);\n //((List) data).addAll(args);\n }\n return data;\n }", "public String visit (StringArgument aArg)\n {\n return aArg.getValue ();\n }", "public ParseTree checkArgument(String arg) throws ParseException{\n\t\ttree = new ParseTree(info);\n\t\tcheckArgument(arg, new int[] {0, Integer.MAX_VALUE - 1, ERROR});\n\t\treturn tree;\n\t}", "public static void program(CommonTree ast, IRTree irt)\n {\n statements(ast, irt);\n }", "public static void main(String [] args) {\n List<Ast.Param> pl = new ArrayList<Ast.Param>(); // empty param list\n List<Ast.VarDecl> vl = new ArrayList<Ast.VarDecl>(); // empty var list\n List<Ast.Stmt> sl = new ArrayList<Ast.Stmt>(); // empty stmt list\n\n // Construct a print stmt and add it to stmt list\n Ast.Exp arg = new Ast.StrLit(\"Hello World!\"); // create an arg\n Ast.Stmt s = new Ast.Print(arg); // create a print stmt\n sl.add(s); // add stmt to list\n \n // Construct a MethodDecl ---\n // Ast.MethodDecl(Ast.Type rt, String m, List<Ast.Param> pl, \n // List<Ast.VarDecl> vl, List<Ast.Stmt> sl)\n Ast.MethodDecl md = new Ast.MethodDecl(null, \t// null represents 'void'\n\t\t\t\t\t \"main\",\t// method's name\n\t\t\t\t\t pl, \t\t// formal params\n\t\t\t\t\t vl, \t\t// local var decls\n\t\t\t\t\t sl); \t// method body\n List<Ast.MethodDecl> ml = new ArrayList<Ast.MethodDecl>();\n ml.add(md);\n\n // Construct a ClassDecl ---\n // Ast.ClassDecl(String nm, String pnm, \n // List<Ast.VarDecl> vl, List<Ast.MethodDecl> ml)\n Ast.ClassDecl cd = new Ast.ClassDecl(\"Hello\",\t// class name\n\t\t\t\t\t null, \t\t// parent's name\n\t\t\t\t\t vl, \t\t// field decls \n\t\t\t\t\t ml); \t\t// method decls\n List<Ast.ClassDecl> cl = new ArrayList<Ast.ClassDecl>();\n cl.add(cd);\n\n // Construct a Program ---\n // Ast.Program(List<Ast.ClassDecl> cl)\n Ast.Program p = new Ast.Program(cl); \t// create the whole AST\n System.out.print(p); \t\t\t// dump out the AST\n }", "public static RoleArgList parseRoleArgList(ScribParser parser, CommonTree ct) throws ScribParserException\r\n\t{\n\t\tList<RoleArg> ris = new LinkedList<>();\r\n\t\tfor (CommonTree ri : getRoleInstantiationChildren(ct))\r\n\t\t{\r\n\t\t\tris.add((RoleArg) parser.parse(ri));\r\n\t\t}\r\n\t\treturn AstFactoryImpl.FACTORY.RoleArgList(ct, ris);\r\n\t}", "public interface Program extends AstItem {\n}", "OpFunctionArgOperand createOpFunctionArgOperand();", "protected ASTree make(Object arg) throws IllegalArgumentException {\n try {\n return make0(arg);\n } catch (IllegalArgumentException e1) {\n throw e1;\n } catch (Exception e2) {\n throw new RuntimeException(e2); // compiler is broken\n }\n }", "public void printAst(){\n explore(ctx);\n }", "ArgList createArgList();", "@Override\n public R visit(BuiltInCall n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }", "public void visit(Operand operand);", "AstroArg seq(AstroArg first, AstroArg second);", "public interface IArgsParser {\r\n\tvoid parse(String [] aParams, Iterable<IArgument> args);\r\n}", "AstroArg seq(AstroArg first, AstroArg second, AstroArg third);", "public Snippet visit(AbsExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t _ret.returnTemp = \"Math.abs(\"+f4.returnTemp+\")\";\n\t return _ret;\n\t }", "OpFunctionArgAgregate createOpFunctionArgAgregate();", "public final void rule__AstAnnotation__ArgumentsAssignment_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26213:1: ( ( ruleAstAnnotationArgument ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26214:1: ( ruleAstAnnotationArgument )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26214:1: ( ruleAstAnnotationArgument )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26215:1: ruleAstAnnotationArgument\n {\n before(grammarAccess.getAstAnnotationAccess().getArgumentsAstAnnotationArgumentParserRuleCall_2_1_0()); \n pushFollow(FOLLOW_ruleAstAnnotationArgument_in_rule__AstAnnotation__ArgumentsAssignment_2_152706);\n ruleAstAnnotationArgument();\n\n state._fsp--;\n\n after(grammarAccess.getAstAnnotationAccess().getArgumentsAstAnnotationArgumentParserRuleCall_2_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "OpFunctionArg createOpFunctionArg();", "AExpArgs createAExpArgs();", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Function p, A arg)\n {\n\n p.lambdaexpr_.accept(new LambdaExprVisitor<R,A>(), arg);\n\n return null;\n }", "public String visit(PassArgStmt n, Object argu)\r\n\t {\r\n\t\t int stackPos = 4*( Integer.parseInt(n.f1.f0.tokenImage)-1);\r\n\t\t int RegNum = n.f2.f0.which;\r\n\t\t MipsOutPut.add(MipsOutPut.Space+\"sw \"+ Regs.RegList[RegNum] + \", \" + stackPos+ \"( $sp ) \\n\" );\r\n\t return null;\r\n\t }", "public String visit(ArrayType n, String argu) {\n return \"ArrayType\"; \n }", "private Code genArgsInReverse(ExpNode.ArgumentsNode args) {\n beginGen(\"ArgsInReverse\");\n List<ExpNode> argList = args.getArgs();\n Code code = new Code();\n for(int i = argList.size()-1; 0 <= i; i--) {\n code.append(argList.get(i).genCode(this));\n }\n endGen(\"ArgsInReverse\");\n return code;\n }", "Argument<T> parse(Function<String, ParseResult<T>> parser);", "public final void rule__AstAnnotation__ArgumentsAssignment_2_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26228:1: ( ( ruleAstAnnotationArgument ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26229:1: ( ruleAstAnnotationArgument )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26229:1: ( ruleAstAnnotationArgument )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26230:1: ruleAstAnnotationArgument\n {\n before(grammarAccess.getAstAnnotationAccess().getArgumentsAstAnnotationArgumentParserRuleCall_2_2_1_0()); \n pushFollow(FOLLOW_ruleAstAnnotationArgument_in_rule__AstAnnotation__ArgumentsAssignment_2_2_152737);\n ruleAstAnnotationArgument();\n\n state._fsp--;\n\n after(grammarAccess.getAstAnnotationAccess().getArgumentsAstAnnotationArgumentParserRuleCall_2_2_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public String visit(MessageSend n, LLVMRedux argu) throws Exception {\n int i=0;\n String primex_res = n.f0.accept(this, argu);\n Function f = scopeSearch(u.getRegType(primex_res)).getFunction(n.f2.accept(this, argu));\n\n ArrayList<String> localArgList;\n //bitcast\n String bitcast = u.getReg();\n u.println(bitcast+\" = bitcast i8* \"+primex_res+\" to i8***\");\n //load bitcasted to new reg (vtable)\n String load = u.getReg();\n u.println(load+\" = load i8**, i8*** \"+bitcast);\n //getelemntptr from above reg and the functoffset\n String gepr = u.getReg();\n u.println(gepr+\" = getelementptr i8*, i8** \"+load+\", i32 \"+f.offset);\n //get actual funct ptr load new ptr i8* above ptr\n String loader2 = u.getReg();\n u.println(loader2+\" = load i8*, i8** \"+gepr);\n //String functId = ;\n String bitcast2 = u.getReg();\n //if has only one argument copy paste command below without comma and closed parentheses\n if(f.arguments.size()==0){\n u.println(bitcast2+\" = bitcast i8* \"+loader2+\" to \"+u.javaTypeToLLVMType(f.returnType)+\"(i8*)*\");\n }else{\n u.print(bitcast2+\" = bitcast i8* \"+loader2+\" to \"+u.javaTypeToLLVMType(f.returnType)+\"(i8*, \");\n //else c&c c&v comm above & loop\n for (Variable v: f.arguments){\n u.simpleInlinePrint(u.javaTypeToLLVMType(v.type));\n if (!(i==f.arguments.size()-1))u.simpleInlinePrint(\", \");\n i++;\n }\n u.simplePrint(\")*\");\n }\n\n argStack.add(new ArrayList<>());\n argStackIndex++;\n n.f4.accept(this, argu);\n String rvalue= u.getReg(f.returnType);\n if(f.arguments.size()==0){\n u.println(rvalue+\" = call \"+u.javaTypeToLLVMType(f.returnType)+\" \"+bitcast2+\"(i8* \"+primex_res+\")\");\n }else{\n\n u.print(rvalue+\" = call \"+u.javaTypeToLLVMType(f.returnType)+\" \"+bitcast2+\"(i8* \"+primex_res+\", \");\n localArgList = argStack.get(argStackIndex);\n for (i=0;i<f.arguments.size();i++){\n u.simpleInlinePrint(u.javaTypeToLLVMType(f.arguments.get(i).type)+\" \"+localArgList.get(i));\n if (!(i==f.arguments.size()-1))u.simpleInlinePrint(\", \");\n }\n u.simplePrint(\")\");\n }\n\n argStackIndex--;\n argStack.remove(argStack.size()-1);\n return rvalue;\n }", "public String visit(BooleanType n, LLVMRedux argu) {\n return \"i1\";\n }", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "@Override\n\tpublic void outAMethodCallExpr(AMethodCallExpr node){\n\t\tString methodName = node.getId().getText();\n\t\tType targetType = nodeTypes.get(node.getTarget());\n\t\tboxIt(targetType); \n\t\tClassAttributes targetClass = topLevelSymbolTable.get(targetType.getTypeName());\n\t\tMethodAttributes methodAttributes = targetClass.getMethod(methodName);\n\t\tif (!(node.getTarget() instanceof ASuperExpr)){\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()) , Constants.INVOKEVIRTUAL));\n\t\t}\n\t\telse {\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()), Constants.INVOKESPECIAL)); \n\t\t}\n\t\tunboxIt(methodAttributes.getReturnType()); \n\t}", "@Override\n\tpublic TypeDenoter visitIxExpr(IxExpr expr, TypeDenoter arg) {\n\t\treturn expr.ref.visit(this, null);\n\t}", "private static List<Type> getExprTypes(Expr... args) {\n List<Type> argTypes = new ArrayList<Type> (args.length);\n for (Expr a : args) {\n argTypes.add(a.type());\n }\n return argTypes;\n }", "public interface TreeInterface extends SymmetricDigraphInterface {\r\n /** Return parent of a tree node.\r\n * @precondition nonNull(node)\r\n */\r\n public IRNode getParent(IRNode node);\r\n\r\n /** The location is a value used by an IRSequence\r\n * to locate an element. For IRArray, it is an integer.\r\n * @precondition nonNull(node)\r\n */\r\n public IRLocation getLocation(IRNode node);\r\n\r\n /** Return the root of a subtree.\r\n */\r\n public IRNode getRoot(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with leaves and working toward the node given.\r\n * A postorder traversal.\r\n */\r\n public Iteratable<IRNode> bottomUp(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with this node and working toward the leaves.\r\n * A preorder traversal.\r\n */\r\n public Iteratable<IRNode> topDown(IRNode subtree);\r\n}", "PermissionSerializer (GetArg arg) throws IOException, ClassNotFoundException {\n\tthis( \n\t create(\n\t\targ.get(\"targetType\", null, Class.class),\n\t\targ.get(\"type\", null, String.class),\n\t\targ.get(\"targetName\", null, String.class),\n\t\targ.get(\"targetActions\", null, String.class) \n\t )\n\t);\n }", "List<Type> attribArgs(List<JCExpression> trees, Env<AttrContext> env) {\n \ttry {//我加上的\n\t\tDEBUG.P(this,\"attribArgs(2)\");\n\t\tDEBUG.P(\"trees=\"+trees);\n\t\t//DEBUG.P(\"env=\"+env);\n\t\t\n ListBuffer<Type> argtypes = new ListBuffer<Type>();\n for (List<JCExpression> l = trees; l.nonEmpty(); l = l.tail)\n argtypes.append(chk.checkNonVoid(\n l.head.pos(), types.upperBound(attribTree(l.head, env, VAL, Infer.anyPoly))));\n return argtypes.toList();\n \n }finally{//我加上的\n\t\tDEBUG.P(0,this,\"attribArgs(2)\");\n\t\t}\n }", "@Override\r\n\tpublic Object visitIntegerLiteralExpression(\r\n\t\t\tIntegerLiteralExpression integerLiteralExpression, Object arg)\r\n\t\t\tthrows Exception {\n\t\tmv.visitLdcInsn(integerLiteralExpression.integerLiteral.getIntVal());\r\n\t\tif(arg != null)\r\n\t\t{\r\n//\t\t mv.visitMethodInsn(INVOKESTATIC, \"java/lang/Integer\", \"valueOf\", \"(I)Ljava/lang/Integer;\");\r\n\t\t}\r\n\t\treturn \"I\";\r\n\t}", "public static void main(String[] args) throws IOException {\n\r\n ParserMain Parse = new ParserMain(args);\r\n Node n_program = Parse.program();\r\n\tSystem.out.println(\"\\ninside parser: parsing end, pass tree ro type checking\\n\");\r\n CodeGener cg= new CodeGener(n_program,args[0]); ////////////////////////////////////////////////////////////////////////////////////kavita\r\n h_typeCheckingClass tp = new h_typeCheckingClass(n_program);\r\n Node result = tp.starttype(n_program);\r\n\tSystem.out.println(\"\\ninside parser: TYPE checking end, pass tree to WRITING AST\\n\");\r\n AST2word ast=new AST2word();\r\n ast.read(result, args);\r\n\r\n\r\n\r\n\r\n }", "private Node expandStateArgNode(State s, Node curr, Node parent, int depth) {\n\n Node add = null;\n\n if (curr instanceof TerminalNode) {\n\n if (curr instanceof NullaryTerminalNode) {\n\n if (parent != null && !(parent instanceof RepSketchNode)) {\n\n if (((OperatorNode) parent).operatorName.equals(\"notcc\")) {\n\n if (((TerminalNode) curr).sym.name.equals(\"<any>\")) return add;\n\n } else if (((OperatorNode) parent).operatorName.equals(\"not\")) {\n\n s.cost += Main.NOT_TERMINAL_PATTERN;\n\n }\n\n }\n\n add = s.pp.mkTerminalNode(((TerminalNode) curr).sym.name, parent);\n\n\n } else if (curr instanceof RealConstantTerminalNode) {\n\n RealConstantTerminalNode cn = (RealConstantTerminalNode) curr;\n add = s.pp.mkRealConstantNode(cn.k, curr.parent);\n\n }\n\n return add;\n\n } else if (curr instanceof OperatorNode) {\n\n Node[] args = new Node[((OperatorNode) curr).opSymbol.prod.argumentSymbols.length];\n add = s.pp.mkOperatorNode(((OperatorNode) curr).opSymbol, parent, args);\n\n\n if (((OperatorNode) curr).operatorName.contains(\"repeat\")) {\n\n s.pp.numRepeat++;\n\n if (checkConsecutiveRepeat(add)) s.cost += Main.CONSECUTIVE_REPEAT_COST;\n\n }\n\n\n for (int i = 0; i < args.length; i++) {\n\n Node curr_arg = ((OperatorNode) curr).args.get(i);\n Node parsed_arg = expandStateArgNode(s, curr_arg, add, depth + 1);\n\n ((OperatorNode) add).args.set(i, parsed_arg);\n\n }\n\n return add;\n } else {\n\n add = s.pp.mkVarNode(curr, parent, depth);\n\n return add;\n\n }\n\n }", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Abstraction p, A arg)\n {\n\n for (VariableExpr x : p.listvariableexpr_) {\n }\n p.program_.accept(new ProgramVisitor<R,A>(), arg);\n\n return null;\n }", "final public IASTLiteralTextNode Argument() throws ParseException {\r\n IASTLiteralTextNode node = null;\r\n Token lastToken = null;\r\n Token equalToken = null;\r\n Token firstToken = null;\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case INT:\r\n firstToken = jj_consume_token(INT);\r\n if (jj_2_3(2147483647)) {\r\n equalToken = jj_consume_token(EQUAL);\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case MINUS:\r\n jj_consume_token(MINUS);\r\n break;\r\n default:\r\n jj_la1[16] = jj_gen;\r\n ;\r\n }\r\n lastToken = jj_consume_token(INT);\r\n } else {\r\n ;\r\n }\r\n if (equalToken == null) {\r\n lastToken = firstToken;\r\n }\r\n break;\r\n case ASTERISK:\r\n case WORD:\r\n case STRING:\r\n case PACKAGE_OPTION:\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case ASTERISK:\r\n firstToken = jj_consume_token(ASTERISK);\r\n break;\r\n case PACKAGE_OPTION:\r\n firstToken = jj_consume_token(PACKAGE_OPTION);\r\n break;\r\n case WORD:\r\n firstToken = jj_consume_token(WORD);\r\n break;\r\n case STRING:\r\n firstToken = jj_consume_token(STRING);\r\n break;\r\n default:\r\n jj_la1[17] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n lastToken = firstToken;\r\n break;\r\n default:\r\n jj_la1[18] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n node = getRawLiteralTextNodeSpanning(firstToken, lastToken);\r\n {if (true) return node;}\r\n throw new Error(\"Missing return statement in function\");\r\n }", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Atom p, A arg)\n {\n\n return null;\n }", "public interface ARightHandSide extends AAstNode {\n\n\n /**\n * This method returns the type of the expression.\n * If the expression is evaluated, the result of the evaluation has this type.\n * <p>\n * In some cases the parser can not determine the correct type\n * (because of missing information),\n * then this method can return a ProblemType.\n */\n public Type getExpressionType();\n\n\n}", "@Override\n\tpublic void outACastExpr(ACastExpr node) {\n\t\tType t = nodeTypes.get(node.getExpr());\n\t\tboxIt(t); \n\t\tType result = nodeTypes.get(node.getType()); \n\t\til.append(fi.createCast(getBecelType(t), getBecelType(result)));\n\t\tunboxIt(result); \t\n\t}", "public final ExprOrOpArgNode[] getArgs() { return this.operands; }", "public String visit(ExpressionList n, LLVMRedux argu) throws Exception {\n argStack.get(argStackIndex).add(n.f0.accept(this, argu));\n n.f1.accept(this, argu);\n return null;\n }", "@Override\n\t\t\tpublic Ast binaryOp(BinaryOp ast, Void arg) {\n\t\t\t\tsuper.binaryOp(ast, arg);\n\n\t\t\t\ttry {\n\t\t\t\t\tExpr left = ast.left();\n\t\t\t\t\tExpr right = ast.right();\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase B_TIMES:\n\t\t\t\t\t\tintValue = asInt(left) * asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_DIV:\n\t\t\t\t\t\tintValue = asInt(left) / asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MOD:\n\t\t\t\t\t\tintValue = asInt(left) % asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_PLUS:\n\t\t\t\t\t\tintValue = asInt(left) + asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MINUS:\n\t\t\t\t\t\tintValue = asInt(left) - asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_AND:\n\t\t\t\t\t\tboolValue = asBool(left) && asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_OR:\n\t\t\t\t\t\tboolValue = asBool(left) || asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) < asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) <= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) > asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) >= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_NOT_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tif (boolValue != null)\n\t\t\t\t\t\t\tboolValue = !boolValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException exc) {\n\t\t\t\t\t// non-constant operands: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t} catch (ArithmeticException exc) {\n\t\t\t\t\t// division by zero etc: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}", "AnalyticExprArg createAnalyticExprArg();", "public Arginfo visit(IdentifierRest n, Arginfo argu) {\n Arginfo _ret=null;\n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n return _ret;\n }", "@Override ASTSeq parse_impl(Exec E) {\n try {\n if (!E.skipWS().hasNext()) throw new IllegalArgumentException(\"End of input unexpected. Badly formed AST. Missing `from` argument.\");\n _from = E.nextDbl();\n } catch (ClassCastException e) {\n e.printStackTrace();\n throw new IllegalArgumentException(\"Argument `from` expected to be a number.\");\n }\n // Get the to\n try {\n if (!E.skipWS().hasNext()) throw new IllegalArgumentException(\"End of input unexpected. Badly formed AST. Missing `to` argument.\");\n _to = E.nextDbl();\n } catch (ClassCastException e) {\n e.printStackTrace();\n throw new IllegalArgumentException(\"Argument `to` expected to be a number.\");\n }\n // Get the by\n try {\n if (!E.skipWS().hasNext()) throw new IllegalArgumentException(\"End of input unexpected. Badly formed AST. Missing `by` argument.\");\n _by = E.nextDbl();\n } catch (ClassCastException e) {\n e.printStackTrace();\n throw new IllegalArgumentException(\"Argument `by` expected to be a number.\");\n }\n\n if( _from >= _to ) throw new IllegalArgumentException(\"`from` >= `to`: \" + _from + \">=\" + _to);\n if( _by <= 0 ) throw new IllegalArgumentException(\"`by` must be >0: \" + _by + \" <=0\");\n\n E.eatEnd(); // eat the ending ')'\n // Finish the rest\n ASTSeq res = (ASTSeq) clone();\n res._asts = new AST[]{}; // in reverse order so they appear correctly on the stack.\n return res;\n }", "public static void imprimirAST(NodoBase raiz){\n\t\t sangria+=2;\n\t\t while (raiz != null) {\n\t\t printSpaces();\n\t\t if (raiz instanceof NodoIf)\n\t\t \tSystem.out.println(\"If\");\n\t\t else if (raiz instanceof NodoRepeat)\n\t\t \tSystem.out.println(\"Repeat\");\n else if (raiz instanceof NodoFor)\n System.out.println(\"For\");\n else if (raiz instanceof NodoDeclaracion)\n System.out.println(\"Declaracion\");\n\t\t else if (raiz instanceof NodoLeer) \n\t\t \tSystem.out.println(\"Lectura: \"+((NodoLeer)raiz).getIdentificador());\n\t\t else if (raiz instanceof NodoEscribir)\n\t\t \tSystem.out.println(\"Escribir\");\n else if (raiz instanceof NodoEstructura)\n System.out.println(\"Estructura\");\n else if (raiz instanceof NodoFuncionRetorna){\n System.out.println(\"Funcion con Retorno\"); }\n else if (raiz instanceof NodoFuncionSinRetorna)\n System.out.println(\"Funcion sin Retorno\");\n else if (raiz instanceof NodoParametro)\n System.out.println(\"Parametro\");\n\t\t else \n if (raiz instanceof NodoAsignacion)\n {\n if(((NodoAsignacion)raiz).getPosicion()!=null) //vector\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador()+\"[\"+((NodoAsignacion)raiz).getPosicion()+\"]\"); \n else\n System.out.println(\"Asignacion a: \"+((NodoAsignacion)raiz).getIdentificador());\n }\n else if (raiz instanceof NodoCall)\n {\n if(((NodoCall)raiz).getArgumentos()!=null) //vector\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()); \n else\n System.out.println(\"Llamada a la funcion: \"+((NodoCall)raiz).getIdentificador()+\"(\"+\")\");\n }\n else if (raiz instanceof NodoOperacion\n\t\t \t\t|| raiz instanceof NodoValor\n\t\t \t\t|| raiz instanceof NodoIdentificador )\n\t\t \timprimirNodo(raiz);\n \n else if (raiz instanceof NodoVariable)\n {\n if(((NodoVariable)raiz).getNumero()!=null)\n System.out.println(((NodoVariable)raiz).getIdentificador()+\"[\"+((NodoVariable)raiz).getNumero()+\"]\");\n else\n System.out.println(((NodoVariable)raiz).getIdentificador());\n }\n\t\t else System.out.println(\"Tipo de nodo desconocido\");\n\t\t \n\t\t \n /* Hago el recorrido recursivo */\n \n if (raiz instanceof NodoEstructura){\n printSpaces();\n System.out.println(\"**Funcion**\");\n imprimirAST(((NodoEstructura)raiz).getFuncion());\n printSpaces();\n System.out.println(\"**Main**\");\n imprimirAST(((NodoEstructura)raiz).getBloque());\n }\n \n if (raiz instanceof NodoFuncionRetorna){\n printSpaces();\n System.out.println(\"**Funcion con Retorno**\");\n imprimirAST(((NodoFuncionRetorna)raiz).getTipo());\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionRetorna)raiz).getSecuencias());\n \n printSpaces();\n System.out.println(\"retorno\");\n imprimirAST(((NodoFuncionRetorna)raiz).getExpresion());\n }\n \n if (raiz instanceof NodoFuncionSinRetorna){\n printSpaces();\n System.out.println(\"**Funcion sin Retorno**\");\n System.out.println(\"VOID\");\n \n printSpaces();\n System.out.println(\" ID, \"+((NodoFuncionSinRetorna)raiz).getIdentificador());\n \n if(((NodoFuncionSinRetorna)raiz).getParametros()!=null){\n printSpaces();\n System.out.println(\"parametros\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getParametros());\n }\n printSpaces();\n System.out.println(\"cuerpo\");\n imprimirAST(((NodoFuncionSinRetorna)raiz).getSecuencias());\n \n }\n \n if (raiz instanceof NodoParametro){\n printSpaces();\n System.out.println(\"**Parametros**\");\n imprimirAST(((NodoParametro)raiz).getTipo());\n \n System.out.println(\"\\tID, \"+((NodoParametro)raiz).getIdentificador());\n }\n \n if (raiz instanceof NodoCall){\n printSpaces();\n if(((NodoCall)raiz).getArgumentos()!=null)\n System.out.println(\"**argumentos**\");\n imprimirAST(((NodoCall)raiz).getArgumentos());\n }\n \n if (raiz instanceof NodoDeclaracion){\n printSpaces();\n System.out.println(\"**Declaracion**\");\n imprimirAST(((NodoDeclaracion)raiz).getTipo());\n imprimirAST(((NodoDeclaracion)raiz).getLis_asig());\n }\n \n if (raiz instanceof NodoIf){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getPrueba());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Then IF**\");\n\t\t \timprimirAST(((NodoIf)raiz).getParteThen());\n\t\t \tif(((NodoIf)raiz).getParteElse()!=null){\n\t\t \t\tprintSpaces();\n\t\t \t\tSystem.out.println(\"**Else IF**\");\n\t\t \t\timprimirAST(((NodoIf)raiz).getParteElse());\n\t\t \t}\n\t\t }\n\t\t else if (raiz instanceof NodoRepeat){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Cuerpo REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getCuerpo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Prueba REPEAT**\");\n\t\t \timprimirAST(((NodoRepeat)raiz).getPrueba());\n\t\t }\n else if (raiz instanceof NodoFor){\n printSpaces();\n System.out.println(\"**Asignacion For**\");\n imprimirAST(((NodoFor)raiz).getAsignacion());\n printSpaces();\n System.out.println(\"**Comprobacion FOR**\");\n imprimirAST(((NodoFor)raiz).getPrueba());\n printSpaces();\n System.out.println(\"**Acumulador FOR**\");\n imprimirAST(((NodoFor)raiz).getAcumulador());\n printSpaces();\n System.out.println(\"**Cuerpo FOR**\");\n imprimirAST(((NodoFor)raiz).getCuerpo());\n \n }\n\t\t else \n \n if (raiz instanceof NodoAsignacion)\n\t\t \timprimirAST(((NodoAsignacion)raiz).getExpresion());\n\t\t else \n \n if (raiz instanceof NodoEscribir)\n\t\t \timprimirAST(((NodoEscribir)raiz).getExpresion());\n\t\t else \n \n \n if (raiz instanceof NodoOperacion){\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Izquierda Operacion**\");\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpIzquierdo());\n\t\t \tprintSpaces();\n\t\t \tSystem.out.println(\"**Expr Derecha Operacion**\");\t\t \t\n\t\t \timprimirAST(((NodoOperacion)raiz).getOpDerecho());\n\t\t }\n\t\t raiz = raiz.getHermanoDerecha();\n\t\t }\n\t\t sangria-=2;\n\t\t}", "public String visit(BooleanArrayType n, LLVMRedux argu) {\n return \"i8*\";\n }", "public void visit (Object expr) {\n\t\t\t\n\t\t\toffset += 2;\n\t\t\t\n\t\t\tif (expr instanceof VariableReferenceExpr) {\n\t\t\t\tvisit ( (VariableReferenceExpr) expr);\n\t\t\t} else if (expr instanceof UnionExpr) {\n\t\t\t\tvisit ( (UnionExpr) expr);\n\t\t\t} else if ( expr instanceof UnaryExpr) {\n\t\t\t\tvisit ( (UnaryExpr) expr);\n\t\t\t} else if ( expr instanceof TextNodeStep ) {\n\t\t\t\tvisit ( (TextNodeStep) expr) ;\n\t\t\t} else if ( expr instanceof RelationalExpr) {\n\t\t\t\tvisit ( (RelationalExpr) expr);\n\t\t\t} else if ( expr instanceof ProcessingInstructionNodeStep) {\n\t\t\t\tvisit ( (ProcessingInstructionNodeStep) expr) ;\n\t\t\t} else if ( expr instanceof Predicate) {\n\t\t\t\tvisit ( (Predicate) expr );\n\t\t\t} else if ( expr instanceof PathExpr) {\n\t\t\t\tvisit ( (PathExpr) expr) ;\n\t\t\t} else if ( expr instanceof NumberExpr) {\n\t\t\t\tvisit ( (NumberExpr) expr);\n\t\t\t} else if ( expr instanceof NameStep) {\n\t\t\t\tvisit ( (NameStep) expr);\n\t\t\t} else if ( expr instanceof MultiplicativeExpr) {\n\t\t\t\tvisit ( (MultiplicativeExpr) expr);\n\t\t\t} else if ( expr instanceof LogicalExpr) {\n\t\t\t\tvisit ( (LogicalExpr) expr);\n\t\t\t} else if ( expr instanceof LocationPath) {\n\t\t\t\tvisit ( (LocationPath) expr);\n\t\t\t} else if ( expr instanceof LiteralExpr) {\n\t\t\t\tvisit ( (LiteralExpr) expr);\n\t\t\t} else if ( expr instanceof FunctionCallExpr) {\n\t\t\t\tvisit ( (FunctionCallExpr) expr);\n\t\t\t} else if ( expr instanceof FilterExpr) {\n\t\t\t\tvisit ( (FilterExpr) expr);\n\t\t\t} else if ( expr instanceof EqualityExpr) {\n\t\t\t\tvisit ( (EqualityExpr) expr);\n\t\t\t} else if ( expr instanceof CommentNodeStep) {\n\t\t\t\tvisit ( (CommentNodeStep)expr);\n\t\t\t} else if ( expr instanceof AllNodeStep) {\n\t\t\t\tvisit ( (AllNodeStep) expr);\n\t\t\t} else if ( expr instanceof AdditiveExpr) {\n\t\t\t\tvisit ( (AdditiveExpr) expr);\n\t\t\t} else if (expr instanceof List) {\n\t\t\t\tvisitList((List)expr);\n\t\t\t} else if (expr != null) {\n\t\t\t\tout(\"Panic: Unknown expression kind {0} \",expr.getClass().getName()); //$NON-NLS-1$\n\t\t\t} else {\n\t\t\t\tout(\"null - unset\");\n\t\t\t}\n\t\t\t\n\t\t\toffset -= 2;\n\t\t}", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Binding p, A arg)\n {\n\n p.variableexpr_.accept(new VariableExprVisitor<R,A>(), arg);\n p.expression_.accept(new ExpressionVisitor<R,A>(), arg);\n p.program_.accept(new ProgramVisitor<R,A>(), arg);\n\n return null;\n }", "public final ANTLRv3Parser.rewrite_tree_atom_return rewrite_tree_atom() throws RecognitionException {\r\n ANTLRv3Parser.rewrite_tree_atom_return retval = new ANTLRv3Parser.rewrite_tree_atom_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token d=null;\r\n Token CHAR_LITERAL162=null;\r\n Token TOKEN_REF163=null;\r\n Token ARG_ACTION164=null;\r\n Token RULE_REF165=null;\r\n Token STRING_LITERAL166=null;\r\n Token ACTION168=null;\r\n ANTLRv3Parser.id_return id167 =null;\r\n\r\n\r\n CommonTree d_tree=null;\r\n CommonTree CHAR_LITERAL162_tree=null;\r\n CommonTree TOKEN_REF163_tree=null;\r\n CommonTree ARG_ACTION164_tree=null;\r\n CommonTree RULE_REF165_tree=null;\r\n CommonTree STRING_LITERAL166_tree=null;\r\n CommonTree ACTION168_tree=null;\r\n RewriteRuleTokenStream stream_67=new RewriteRuleTokenStream(adaptor,\"token 67\");\r\n RewriteRuleTokenStream stream_TOKEN_REF=new RewriteRuleTokenStream(adaptor,\"token TOKEN_REF\");\r\n RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,\"token ARG_ACTION\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:389:5: ( CHAR_LITERAL | TOKEN_REF ( ARG_ACTION )? -> ^( TOKEN_REF ( ARG_ACTION )? ) | RULE_REF | STRING_LITERAL |d= '$' id -> LABEL[$d,$id.text] | ACTION )\r\n int alt78=6;\r\n switch ( input.LA(1) ) {\r\n case CHAR_LITERAL:\r\n {\r\n alt78=1;\r\n }\r\n break;\r\n case TOKEN_REF:\r\n {\r\n alt78=2;\r\n }\r\n break;\r\n case RULE_REF:\r\n {\r\n alt78=3;\r\n }\r\n break;\r\n case STRING_LITERAL:\r\n {\r\n alt78=4;\r\n }\r\n break;\r\n case 67:\r\n {\r\n alt78=5;\r\n }\r\n break;\r\n case ACTION:\r\n {\r\n alt78=6;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 78, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt78) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:389:9: CHAR_LITERAL\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n CHAR_LITERAL162=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_rewrite_tree_atom2870); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n CHAR_LITERAL162_tree = \r\n (CommonTree)adaptor.create(CHAR_LITERAL162)\r\n ;\r\n adaptor.addChild(root_0, CHAR_LITERAL162_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:6: TOKEN_REF ( ARG_ACTION )?\r\n {\r\n TOKEN_REF163=(Token)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_rewrite_tree_atom2877); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_TOKEN_REF.add(TOKEN_REF163);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:16: ( ARG_ACTION )?\r\n int alt77=2;\r\n int LA77_0 = input.LA(1);\r\n\r\n if ( (LA77_0==ARG_ACTION) ) {\r\n alt77=1;\r\n }\r\n switch (alt77) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:16: ARG_ACTION\r\n {\r\n ARG_ACTION164=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rewrite_tree_atom2879); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(ARG_ACTION164);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: ARG_ACTION, TOKEN_REF\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 390:28: -> ^( TOKEN_REF ( ARG_ACTION )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:31: ^( TOKEN_REF ( ARG_ACTION )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_TOKEN_REF.nextNode()\r\n , root_1);\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:43: ( ARG_ACTION )?\r\n if ( stream_ARG_ACTION.hasNext() ) {\r\n adaptor.addChild(root_1, \r\n stream_ARG_ACTION.nextNode()\r\n );\r\n\r\n }\r\n stream_ARG_ACTION.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n break;\r\n case 3 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:391:9: RULE_REF\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n RULE_REF165=(Token)match(input,RULE_REF,FOLLOW_RULE_REF_in_rewrite_tree_atom2900); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n RULE_REF165_tree = \r\n (CommonTree)adaptor.create(RULE_REF165)\r\n ;\r\n adaptor.addChild(root_0, RULE_REF165_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 4 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:392:6: STRING_LITERAL\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n STRING_LITERAL166=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2907); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n STRING_LITERAL166_tree = \r\n (CommonTree)adaptor.create(STRING_LITERAL166)\r\n ;\r\n adaptor.addChild(root_0, STRING_LITERAL166_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 5 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:393:6: d= '$' id\r\n {\r\n d=(Token)match(input,67,FOLLOW_67_in_rewrite_tree_atom2916); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_67.add(d);\r\n\r\n\r\n pushFollow(FOLLOW_id_in_rewrite_tree_atom2918);\r\n id167=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id167.getTree());\r\n\r\n // AST REWRITE\r\n // elements: \r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 393:15: -> LABEL[$d,$id.text]\r\n {\r\n adaptor.addChild(root_0, \r\n (CommonTree)adaptor.create(LABEL, d, (id167!=null?input.toString(id167.start,id167.stop):null))\r\n );\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n break;\r\n case 6 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:394:4: ACTION\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n ACTION168=(Token)match(input,ACTION,FOLLOW_ACTION_in_rewrite_tree_atom2929); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n ACTION168_tree = \r\n (CommonTree)adaptor.create(ACTION168)\r\n ;\r\n adaptor.addChild(root_0, ACTION168_tree);\r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public BaseNode getArgument()\r\n\t{\r\n\t\treturn _argument;\r\n\t}", "void visit(Object node, String command);", "public interface ATypeCheckNode {}", "ASTBinOp parse_impl(Exec E) {\n AST l = E.parse();\n AST r = E.parse();\n E.eatEnd(); // eat ending ')'\n ASTBinOp res = (ASTBinOp) clone();\n res._asts = new AST[]{l,r};\n return res;\n }", "public void flattenASTChangesToString(){\n\t\tthis.codeBlob = getCodeString();\n\t\tthis.compUnit = null;\n\t\tthis.rewriter = null;\n\t}", "@Override\n\tpublic Object visitParamDec(ParamDec paramDec, Object arg) throws Exception {\n\t\tMethodVisitor mv = (MethodVisitor) arg;\n\t\tTypeName typeName = paramDec.getType();\n\t\tswitch (typeName) {\n\t\tcase INTEGER:\n\t\t\tmv.visitVarInsn(ALOAD, 0);\n\t\t\tmv.visitVarInsn(ALOAD, 1);\n\t\t\tmv.visitLdcInsn(paramDec.slotnumber);\n\t\t\tmv.visitInsn(AALOAD);\n\t\t\tmv.visitMethodInsn(INVOKESTATIC, \"java/lang/Integer\", \"parseInt\", \"(Ljava/lang/String;)I\", false);\n\t\t\tmv.visitFieldInsn(PUTFIELD, className, paramDec.getIdent().getText(), \"I\");\n\t\t\tbreak;\n\n\t\tcase BOOLEAN:\n\t\t\tmv.visitVarInsn(ALOAD, 0);\n\t\t\tmv.visitVarInsn(ALOAD, 1);\n\t\t\tmv.visitLdcInsn(paramDec.slotnumber);\n\t\t\tmv.visitInsn(AALOAD);\n\t\t\tmv.visitMethodInsn(INVOKESTATIC, \"java/lang/Boolean\", \"parseBoolean\", \"(Ljava/lang/String;)Z\", false);\n\t\t\tmv.visitFieldInsn(PUTFIELD, className, paramDec.getIdent().getText(), \"Z\");\n\t\t\tbreak;\n\n\t\tcase FILE:\n\t\t\tmv.visitVarInsn(ALOAD, 0);\n\t\t\tmv.visitTypeInsn(NEW, \"java/io/File\");\n\t\t\tmv.visitInsn(DUP);\n\t\t\tmv.visitVarInsn(ALOAD, 1);\n\t\t\tmv.visitLdcInsn(paramDec.slotnumber);\n\t\t\tmv.visitInsn(AALOAD);\n\t\t\tmv.visitMethodInsn(INVOKESPECIAL, \"java/io/File\", \"<init>\", \"(Ljava/lang/String;)V\", false);\n\t\t\tmv.visitFieldInsn(PUTFIELD, className, paramDec.getIdent().getText(), \"Ljava/io/File;\");\n\t\t\tbreak;\n\t\tcase URL:\n\t\t\tmv.visitVarInsn(ALOAD, 0);\n\t\t\tmv.visitVarInsn(ALOAD, 1);\n\t\t\tmv.visitLdcInsn(paramDec.slotnumber);\n\t\t\tmv.visitMethodInsn(INVOKESTATIC, PLPRuntimeImageIO.className, \"getURL\", PLPRuntimeImageIO.getURLSig, false);\n\t\t\tmv.visitFieldInsn(PUTFIELD, className, paramDec.getIdent().getText(), \"Ljava/net/URL;\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn null;\n\n\t}", "public interface AstFactory\n{\n\tIdNode IdNode(Token t, String text);\n\tExtIdNode ExtIdNode(Token t, String text);\n\n\tAmbigNameNode AmbigNameNode(Token t, String text);\t // Deprecate? Never need to make ambigname \"manually\" via af? (constructed only by ScribbleParser)\n\tDataParamNode DataParamNode(Token t, String text);\n\tOpNode OpNode(Token t, String text);\n\tRecVarNode RecVarNode(Token t, String text);\n\tRoleNode RoleNode(Token t, String text);\n\tSigParamNode SigParamNode(Token t, String text);\n\n\tDataNameNode DataNameNode(Token t, List<IdNode> elems);\n\tGProtoNameNode GProtoNameNode(Token t, List<IdNode> elems);\n\tLProtoNameNode LProtoNameNode(Token t, List<IdNode> elems);\n\tModuleNameNode ModuleNameNode(Token t, List<IdNode> elems);\n\tSigNameNode SigNameNode(Token t, List<IdNode> elems);\n\t\n\tModule Module(Token t, ModuleDecl mdecl,\n\t\t\tList<? extends ImportDecl<?>> imports,\n\t\t\tList<? extends NonProtoDecl<?>> nonprotos,\n\t\t\tList<? extends ProtoDecl<?>> protos);\n\n\tModuleDecl ModuleDecl(Token t, ModuleNameNode fullname);\n\tImportModule ImportModule(Token t, ModuleNameNode modname,\n\t\t\tModuleNameNode alias); // alias == null for no alias (child not added)\n\n\tDataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);\n\tSigDecl SigDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, SigNameNode name);\n\tGProtoDecl GProtoDecl(Token t, ProtoModList mods, GProtoHeader header,\n\t\t\tGProtoDef def);\n\n\t// TODO: refactor to use ProtoModList, etc.\n\tProtoModList ProtoModList(Token t, List<ProtoModNode> mods);\n\tAuxMod AuxMod(Token t);\n\tExplicitMod ExplicitMod(Token t);\n\n\tGProtoHeader GProtocolHeader(Token t, GProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tRoleDeclList RoleDeclList(Token t, List<RoleDecl> ds);\n\tRoleDecl RoleDecl(Token t, RoleNode r);\n\tNonRoleParamDeclList NonRoleParamDeclList(Token t, \n\t\t\tList<NonRoleParamDecl<? extends NonRoleParamKind>> ds);\n\tDataParamDecl DataParamDecl(Token t, DataParamNode p);\n\tSigParamDecl SigParamDecl(Token t, SigParamNode p);\n\n\tGProtoDef GProtoDef(Token t, GProtoBlock block);\n\tGProtoBlock GProtoBlock(Token t, GInteractionSeq seq);\n\tGInteractionSeq GInteractionSeq(Token t, List<GSessionNode> elems); // CHECKME: ? extends GSessionNode ? -- and similar others?\n\n\tSigLitNode SigLitNode(Token t, OpNode op, PayElemList pay);\n\tPayElemList PayElemList(Token t, List<PayElem<?>> elems);\n\t<K extends PayElemKind> UnaryPayElem<K> UnaryPayElem(Token t, \n\t\t\tPayElemNameNode<K> name);\n\tGDelegPayElem GDelegPayElem(Token t, GProtoNameNode name, RoleNode r);\n\n\tGMsgTransfer GMsgTransfer(Token t, RoleNode src, MsgNode msg,\n\t\t\tList<RoleNode> dsts);\n\tGConnect GConnect(Token t, RoleNode src, MsgNode msg, RoleNode dst);\n\tGDisconnect GDisconnect(Token t, RoleNode left, RoleNode right);\n\tGWrap GWrap(Token t, RoleNode client, RoleNode server);\n\n\tGContinue GContinue(Token t, RecVarNode rv);\n\tGDo GDo(Token t, GProtoNameNode proto, NonRoleArgList args, RoleArgList rs);\n\n\tRoleArgList RoleArgList(Token t, List<RoleArg> rs);\n\tRoleArg RoleArg(Token t, RoleNode r);\n\tNonRoleArgList NonRoleArgList(Token t, List<NonRoleArg> args);\n\tNonRoleArg NonRoleArg(Token t, NonRoleArgNode arg);\n\n\tGChoice GChoice(Token t, RoleNode subj, List<GProtoBlock> blocks);\n\tGRecursion GRecursion(Token t, RecVarNode rv, GProtoBlock block);\n\n\t/*LProtoDecl LProtoDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def); // Not currently used -- local protos not yet parsed, only projected*/\n\n\tLProjectionDecl LProjectionDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def, GProtoNameNode fullname,\n\t\t\tRoleNode self); // del extends that of LProtoDecl\n\n\tLProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tLSelfDecl LSelfDecl(Token t, RoleNode r);\n\n\tLProtoDef LProtoDef(Token t, LProtoBlock block);\n\tLProtoBlock LProtoBlock(Token t, LInteractionSeq seq);\n\tLInteractionSeq LInteractionSeq(Token t, List<LSessionNode> elems);\n\n\t// Following take \"self\" param in case of parsed Token (not actually supported yet)\n\tLSend LSend(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLRecv LRecv(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLAcc LAcc(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLReq LReq(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLDisconnect LDisconnect(Token t, RoleNode self, RoleNode peer); \n\tLClientWrap LClientWrap(Token t, RoleNode client, RoleNode server);\n\tLServerWrap LServerWrap(Token t, RoleNode client, RoleNode server);\n\n\tLContinue LContinue(Token t, RecVarNode rv); \n\tLDo LDo(Token t, LProtoNameNode proto, NonRoleArgList as, RoleArgList rs);\n\n\tLChoice LChoice(Token t, RoleNode subj, List<LProtoBlock> blocks);\n\tLRecursion LRecursion(Token t, RecVarNode rv, LProtoBlock block);\n}", "private ArgumentListTree parseArguments() {\n\n SourcePosition start = getTreeStartLocation();\n ImmutableList.Builder<ParseTree> arguments = ImmutableList.builder();\n boolean trailingComma = false;\n ImmutableList.Builder<SourcePosition> commaPositions = ImmutableList.builder();\n\n eat(TokenType.OPEN_PAREN);\n while (peekAssignmentOrSpread()) {\n arguments.add(parseAssignmentOrSpread());\n\n if (!peek(TokenType.CLOSE_PAREN)) {\n Token comma = eat(TokenType.COMMA);\n if (comma != null) {\n commaPositions.add(comma.getStart());\n }\n if (peek(TokenType.CLOSE_PAREN)) {\n if (!config.atLeast8) {\n reportError(comma, \"Invalid trailing comma in arguments list\");\n }\n trailingComma = true;\n }\n }\n }\n eat(TokenType.CLOSE_PAREN);\n return new ArgumentListTree(\n getTreeLocation(start), arguments.build(), trailingComma, commaPositions.build());\n }", "Type attribExpr(JCTree tree, Env<AttrContext> env) {\n \ttry {//我加上的\n\t\tDEBUG.P(this,\"attribExpr(2)\");\n\t\t\n return attribTree(tree, env, VAL, Type.noType);\n\t\t\n\t\t}finally{//我加上的\n\t\tDEBUG.P(0,this,\"attribExpr(2)\");\n\t\t}\n \n }", "private static String getArgumentString(Object arg) {\n if (arg instanceof String) {\n return \"\\\\\\\"\"+arg+\"\\\\\\\"\";\n }\n else return arg.toString();\n }", "public interface Visitor<R> {\n\n //Lists\n public <T extends IRNode> R visit(List<T> ns);\n\n //IRStms\n public R visit(CJUMP n);\n\n public R visit(CMOVE n);\n\n public R visit(EXP n);\n\n public R visit(JUMP n);\n\n public R visit(LABEL n);\n\n public R visit(MOVE n);\n\n public R visit(SEQ n);\n\n //Types\n public R visit(BINOP n);\n\n public R visit(CALL n);\n\n public R visit(CONST n);\n\n public R visit(ESEQ n);\n\n //Statements\n public R visit(MEM n);\n\n public R visit(NAME n);\n\n public R visit(TEMP n);\n}", "@Override\n public String visit(InstanceOfExpr n, Object arg) {\n return null;\n }", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "public void tokenizeFunctionArguments(){\n for (int i = 0; i < tokenization.size(); i++){\n if (tokenization.get(i).kind == Token.Kind.FUN && tokenization.get(i+1).kind == Token.Kind.LEFT){\n int argIn = i + 2;\n HashMap<String, String> argNameMap = new HashMap<>();\n int argNum = 1;\n while (tokenization.get(argIn).kind == Token.Kind.ID || tokenization.get(argIn).kind == Token.Kind.COMMA || tokenization.get(argIn).kind == Token.Kind.RIGHT){\n if (tokenization.get(argIn).kind == Token.Kind.ID){\n argNameMap.put(tokenization.get(argIn).varName,\"$\" + argNum);\n tokenization.get(argIn).varName = \"$\" + argNum;\n argNum++;\n }\n argIn++;\n }\n //By here argIn is the index of the right parenthesis if there are arguments\n int funBodyIn = argIn;\n if (tokenization.get(funBodyIn).kind != Token.Kind.LBRACE){\n\n }\n else{\n int bracketBalance = 1;\n funBodyIn = funBodyIn + 1;\n while (bracketBalance > 0){\n if (tokenization.get(funBodyIn).kind == Token.Kind.ID && argNameMap.containsKey(tokenization.get(funBodyIn).varName)){\n tokenization.get(funBodyIn).varName = argNameMap.get(tokenization.get(funBodyIn).varName);\n }\n else if (tokenization.get(funBodyIn).kind == Token.Kind.LBRACE){\n bracketBalance++;\n }\n else if (tokenization.get(funBodyIn).kind == Token.Kind.RBRACE){\n bracketBalance--;\n }\n funBodyIn++;\n }\n }\n }\n }\n }", "public String toStringAST()\r\n/* 75: */ {\r\n/* 76: 94 */ StringBuilder s = new StringBuilder();\r\n/* 77: */ \r\n/* 78: 96 */ s.append('{');\r\n/* 79: 97 */ int count = getChildCount();\r\n/* 80: 98 */ for (int c = 0; c < count; c++)\r\n/* 81: */ {\r\n/* 82: 99 */ if (c > 0) {\r\n/* 83:100 */ s.append(',');\r\n/* 84: */ }\r\n/* 85:102 */ s.append(getChild(c).toStringAST());\r\n/* 86: */ }\r\n/* 87:104 */ s.append('}');\r\n/* 88:105 */ return s.toString();\r\n/* 89: */ }", "AstroArg seq(AstroArg first,\n AstroArg second,\n AstroArg third,\n AstroArg fourth);", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Application p, A arg)\n {\n\n p.lambdaexpr_.accept(new LambdaExprVisitor<R,A>(), arg);\n for (LambdaExpr x : p.listlambdaexpr_) {\n }\n\n return null;\n }", "@Converted(kind = Converted.Kind.MANUAL_SEMANTIC,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 154,\n FQN=\"llvm::Module::getOrInsertFunction\", NM=\"_ZN4llvm6Module19getOrInsertFunctionENS_9StringRefENS_12AttributeSetEPNS_4TypeEz\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module19getOrInsertFunctionENS_9StringRefENS_12AttributeSetEPNS_4TypeEz\")\n //</editor-fold>\n public Constant /*P*/ getOrInsertFunction(StringRef Name, \n AttributeSet AttributeList, \n Type /*P*/ RetTy, Type ... $VarArg)/* __attribute__((sentinel(0, 0)))*/ {\n std.vector<Type /*P*/ > ArgTys = null;\n try {\n // Build the list of argument types...\n ArgTys/*J*/= new std.vector<Type /*P*/ >((Type /*P*/ )null);\n if (false) {\n// char$ptr/*char P*/ Args = create_char$ptr();\n// __builtin_va_start(Args, RetTy);\n//\n// {\n// Type /*P*/ ArgTy;\n// while (((/*P*/ ArgTy = __builtin_va_arg(Args, Type /*P*/ .class)) != null)) {\n// ArgTys.push_back_T$C$R(ArgTy);\n// }\n// }\n// __builtin_va_end(Args);\n } else {\n // JAVA: \n if ($VarArg != null) {\n for (Type ArgTy : $VarArg) {\n if (ArgTy != null) {\n ArgTys.push_back_T$C$R(ArgTy);\n }\n }\n } \n }\n \n // Build the function type and chain to the other getOrInsertFunction...\n return getOrInsertFunction(new StringRef(Name), \n FunctionType.get(RetTy, new ArrayRef<Type /*P*/ >(ArgTys, true), false), \n new AttributeSet(AttributeList));\n } finally {\n if (ArgTys != null) { ArgTys.$destroy(); }\n }\n }", "@Override\r\n\tpublic Object visitParamDec(ParamDec paramDec, Object arg) throws Exception {\n\r\n\t\tparamDec.slotNumber = argSlot;\r\n\r\n\t\tif (paramDec.typeName.equals(TypeName.INTEGER)) {\r\n\t\t\tfv = cw.visitField(0, paramDec.getIdent().getText(), paramDec.typeName.getJVMTypeDesc(), null, null);\r\n\t\t\tfv.visitEnd();\r\n\t\t\tmv.visitVarInsn(ALOAD, 0);\r\n\t\t\tmv.visitVarInsn(ALOAD, 1);\r\n\t\t\tmv.visitLdcInsn(argSlot);\r\n\t\t\tmv.visitInsn(AALOAD);\r\n\t\t\tmv.visitMethodInsn(INVOKESTATIC, \"java/lang/Integer\", \"parseInt\", \"(Ljava/lang/String;)I\", false);\r\n\t\t\tmv.visitFieldInsn(PUTFIELD, className, paramDec.getIdent().getText(), \"I\");\r\n\r\n\t\t} else if (paramDec.typeName.equals(TypeName.BOOLEAN)) {\r\n\t\t\tfv = cw.visitField(0, paramDec.getIdent().getText(), paramDec.typeName.getJVMTypeDesc(), null, null);\r\n\t\t\tfv.visitEnd();\r\n\t\t\tmv.visitVarInsn(ALOAD, 0);\r\n\t\t\tmv.visitVarInsn(ALOAD, 1);\r\n\t\t\tmv.visitLdcInsn(argSlot);\r\n\t\t\tmv.visitInsn(AALOAD);\r\n\t\t\tmv.visitMethodInsn(INVOKESTATIC, \"java/lang/Boolean\", \"parseBoolean\", \"(Ljava/lang/String;)Z\", false);\r\n\t\t\tmv.visitFieldInsn(PUTFIELD, className, paramDec.getIdent().getText(), \"Z\");\r\n\r\n\t\t} else if (paramDec.typeName.equals(TypeName.FILE)) {\r\n\t\t\tfv = cw.visitField(0, paramDec.getIdent().getText(), paramDec.typeName.getJVMTypeDesc(), null, null);\r\n\t\t\tfv.visitEnd();\r\n\t\t\tmv.visitVarInsn(ALOAD, 0);\r\n\t\t\tmv.visitTypeInsn(NEW, \"java/io/File\");\r\n\t\t\tmv.visitInsn(DUP);\r\n\t\t\tmv.visitVarInsn(ALOAD, 1);\r\n\t\t\tmv.visitLdcInsn(argSlot);\r\n\t\t\tmv.visitInsn(AALOAD);\r\n\t\t\tmv.visitMethodInsn(INVOKESPECIAL, \"java/io/File\", \"<init>\", \"(Ljava/lang/String;)V\", false);\r\n\t\t\tmv.visitFieldInsn(PUTFIELD, className, paramDec.getIdent().getText(), \"Ljava/io/File;\");\r\n\r\n\t\t} else if (paramDec.typeName.equals(TypeName.URL)) {\r\n\t\t\tfv = cw.visitField(0, paramDec.getIdent().getText(), paramDec.typeName.getJVMTypeDesc(), null, null);\r\n\t\t\tfv.visitEnd();\r\n\t\t\tmv.visitVarInsn(ALOAD, 0);\r\n\t\t\tmv.visitVarInsn(ALOAD, 1);\r\n\t\t\tmv.visitLdcInsn(argSlot);\r\n\t\t\t// mv.visitInsn(AALOAD);\r\n\t\t\tmv.visitMethodInsn(INVOKESTATIC, \"cop5556sp17/PLPRuntimeImageIO\", \"getURL\",\r\n\t\t\t\t\t\"([Ljava/lang/String;I)Ljava/net/URL;\", false);\r\n\t\t\tmv.visitFieldInsn(PUTFIELD, className, paramDec.getIdent().getText(), \"Ljava/net/URL;\");\r\n\t\t}\r\n\r\n\t\targSlot += 1;\r\n\t\treturn null;\r\n\t}", "List<IArgumentBuilder> getArguments();" ]
[ "0.59684765", "0.56530523", "0.5309492", "0.52786595", "0.5263913", "0.5260564", "0.51078576", "0.51014304", "0.5037481", "0.50304955", "0.5021986", "0.49762", "0.4969453", "0.4959841", "0.49111882", "0.4906415", "0.4894387", "0.4885247", "0.48743284", "0.48482057", "0.48476467", "0.48432997", "0.4821091", "0.47683534", "0.47567627", "0.47329885", "0.47245312", "0.47220895", "0.47186556", "0.47157833", "0.47041723", "0.46910357", "0.46905702", "0.46815658", "0.46273312", "0.4624904", "0.46179017", "0.4612103", "0.460765", "0.46012735", "0.45993653", "0.45868948", "0.45723748", "0.45714274", "0.456879", "0.4568434", "0.45601112", "0.45574087", "0.45534465", "0.45482582", "0.45473176", "0.45380178", "0.45339015", "0.45299092", "0.45223898", "0.45209292", "0.45207638", "0.45185432", "0.4516385", "0.4508485", "0.450478", "0.45036077", "0.45013338", "0.45009375", "0.44961724", "0.4490374", "0.44828764", "0.44719145", "0.4465511", "0.44633988", "0.4459355", "0.4456944", "0.44532335", "0.44507074", "0.44492558", "0.44423288", "0.44399387", "0.44364664", "0.44350109", "0.4431506", "0.44304413", "0.44245914", "0.44244298", "0.44178274", "0.44177306", "0.4410544", "0.44055507", "0.4403616", "0.44003692", "0.4398451", "0.43961433", "0.4391836", "0.43918085", "0.43895522", "0.4385045", "0.4383411", "0.43827105", "0.43790826", "0.43759048", "0.43720517" ]
0.6180459
0
Convert an expression AST to IR tree
public static void expression(CommonTree ast, IRTree irt) { CommonTree ast1; IRTree irt1 = new IRTree(); Token t = ast.getToken(); int tt = t.getType(); if (tt == REALNUM) { constant(ast, irt1); irt.setOp("CONST"); irt.addSub(irt1); } else if(tt == PLUS || tt == MINUS || tt == TIMES || tt == DIVIDE) { //do something irt.setOp("BINOP"); IRTree irt2 = new IRTree(); expression((CommonTree)ast.getChild(0), irt1); expression((CommonTree)ast.getChild(1), irt2); if(tt == PLUS) irt.addSub(new IRTree("+")); else if(tt == MINUS) irt.addSub(new IRTree("-")); else if(tt == TIMES) irt.addSub(new IRTree("*")); else if(tt == DIVIDE) irt.addSub(new IRTree("/")); irt.addSub(irt1); irt.addSub(irt2); } else System.out.println("unrecognised type " + tt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Expression {\n \n enum ExpressivoGrammar {ROOT, SUM, PRODUCT, TOKEN, PRIMITIVE_1, PRIMITIVE_2, \n NUMBER, INT, DECIMAL, WHITESPACE, VARIABLE};\n \n public static Expression buildAST(ParseTree<ExpressivoGrammar> concreteSymbolTree) {\n \n if (concreteSymbolTree.getName() == ExpressivoGrammar.DECIMAL) {\n /* reached a double terminal */\n return new Num(Double.parseDouble(concreteSymbolTree.getContents())); \n }\n\n else if (concreteSymbolTree.getName() == ExpressivoGrammar.INT) {\n /* reached an int terminal */\n return new Num(Integer.parseInt(concreteSymbolTree.getContents()));\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.VARIABLE) {\n /* reached a terminal */\n return new Var(concreteSymbolTree.getContents());\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.ROOT || \n concreteSymbolTree.getName() == ExpressivoGrammar.TOKEN || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_1 || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_2 || \n concreteSymbolTree.getName() == ExpressivoGrammar.NUMBER) {\n \n /* non-terminals with only one child */\n for (ParseTree<ExpressivoGrammar> child: concreteSymbolTree.children()) {\n if (child.getName() != ExpressivoGrammar.WHITESPACE) \n return buildAST(child);\n }\n \n // should never reach here\n throw new IllegalArgumentException(\"error in parsing\");\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.SUM || concreteSymbolTree.getName() == ExpressivoGrammar.PRODUCT) {\n /* a sum or product node can have one or more children that need to be accumulated together */\n return accumulator(concreteSymbolTree, concreteSymbolTree.getName()); \n }\n \n else {\n throw new IllegalArgumentException(\"error in input: should never reach here\");\n }\n \n }\n \n /**\n * (1) Create parser using lib6005.parser from grammar file\n * (2) Parse string input into CST\n * (3) Build AST from this CST using buildAST()\n * @param input\n * @return Expression (AST)\n */\n public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }\n \n // helper methods\n public static Expression accumulator(ParseTree<ExpressivoGrammar> tree, ExpressivoGrammar grammarObj) {\n Expression expr = null;\n boolean first = true;\n List<ParseTree<ExpressivoGrammar>> children = tree.children();\n int len = children.size();\n for (int i = len-1; i >= 0; i--) {\n /* the first child */\n ParseTree<ExpressivoGrammar> child = children.get(i);\n if (first) {\n expr = buildAST(child);\n first = false;\n }\n \n /* accumulate this by creating a new binaryOp object with\n * expr as the leftOp and the result as rightOp\n **/\n \n else if (child.getName() == ExpressivoGrammar.WHITESPACE) continue;\n else {\n if (grammarObj == ExpressivoGrammar.SUM)\n expr = new Sum(buildAST(child), expr);\n else\n expr = new Product(buildAST(child), expr);\n }\n }\n \n return expr;\n \n }\n \n // ----------------- problems 3-4 -----------------\n \n public static Expression create(Expression leftExpr, Expression rightExpr, char op) {\n if (op == '+')\n return Sum.createSum(leftExpr, rightExpr);\n else\n return Product.createProduct(leftExpr, rightExpr);\n }\n\n public Expression differentiate(Var x);\n \n public Expression simplify(Map<String, Double> env);\n\n}", "public String convert(ArithmeticExpression expression)\n {\n String expressionString = expression.getExpression();\n String convertedExpression = \"\";\n Stack<String> OpStack = new Stack<>();\n\n int startIndex = 0;\n while(startIndex < expressionString.length())\n {\n if(isOperand(nextToken(expressionString,startIndex)))\n {\n convertedExpression += nextToken(expressionString,startIndex);\n convertedExpression += \" \";\n\n }\n if(Brackets.isLeftBracket(nextToken(expressionString,startIndex)))\n {\n OpStack.push(nextToken(expressionString,startIndex));\n }\n if(Brackets.isRightBracket(nextToken(expressionString,startIndex)))\n {\n String topOp = OpStack.pop();\n while(!Brackets.isLeftBracket(topOp))\n {\n convertedExpression += topOp;\n convertedExpression += \" \";\n topOp = OpStack.pop();\n }\n }\n if(Operator.isOperator(nextToken(expressionString,startIndex)))\n {\n Operator temp = Operator.of(nextToken(expressionString,startIndex));\n if(OpStack.isEmpty())\n {\n OpStack.push(nextToken(expressionString, startIndex));\n }\n else\n {\n Operator topOp = Operator.of(OpStack.peek());\n while (topOp.getRank() <= temp.getRank())\n {\n convertedExpression += OpStack.pop();\n convertedExpression += \" \";\n topOp = Operator.of(OpStack.peek());\n }\n OpStack.push(nextToken(expressionString, startIndex));\n\n }\n }\n if(isOperand(nextToken(expressionString,startIndex)))\n startIndex += nextToken(expressionString,startIndex).length();\n else\n startIndex++;\n }\n while(!OpStack.isEmpty())\n {\n convertedExpression += OpStack.pop();\n convertedExpression += \" \";\n }\n return convertedExpression;\n }", "public interface AST {\n \n /**\n * Returns the label or tag for this AST node.\n */\n public int getNodeLabel ();\n \n /**\n * Returns the textual value of this AST node.\n */\n public String getNodeValue ();\n \n /**\n * Returns a list of child nodes, or null if there are no child nodes. The value returned is a shallow copy\n * which can be manipulated by the caller.\n */\n public List<AST> getChildNodes ();\n \n /**\n * Returns the position of the node in the original source(s).\n */\n public CodePosition getCodePosition ();\n \n}", "Expr expr();", "public interface ExpressionNode\n{\n /** Node id for matrix nodes (remain constant) */\n public static final int MATRIX_NODE = 1;\n /** Node id for addition nodes */\n public static final int ADDITION_NODE = 2;\n /** Node id for multiplication nodes */\n public static final int MULTIPLICATION_NODE = 3;\n\n /**\n * Returns the type of the node.ExpressionNode\n *\n * Each class derived from ExpressionNode representing a specific\n * role in the expression should return the type according to that\n * role.\n * \n * @return type of the node\n */\n public int getType();\n \n /**\n * Calculates and returns the value of the sub-expression represented by\n * the node.\n * \n * @return value of expression\n */\n public Matrix getValue();\n \n /**\n * Method needed for the visitor design pattern\n * \n * @param visitor\n * the visitor\n */\n public void accept(ExpressionNodeVisitor visitor);\n\n}", "public static Temp evalExpression(CommonTree tree){\n\t\t// leaf node, int/float/id\n\n\t\tif (tree.getChildCount() == 0){\n\t\t\tTemp temp = new Temp(temperaryNum++,tree.getType(),tree.getText());\n\t\t\tif (tree.getType() == LittleParser.INTLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREI\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse if(tree.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREF\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse{ // look up the variable in the symbol table to set type, use var_name instead of $Tx and recycle $Tx\n\t\t\t\ttemp.setType(allTables.lookupType(temp.getValue().trim()));\n\t\t\t\ttemp.setName(tree.getText());\n\t\t\t\ttemperaryNum--;\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\t\t// Not a leaf node, evaluate children expressions\n\t\telse{\n\t\t\t// test for function call\n\t\t\tif (tree.getType() == LittleParser.FUNC_CALL){\n\t\t\t\t// add IR for evaluating the function and return temperary for return value\n\t\t\t\t// after it has been popped off the stack\n\t\t\t\treturn evalFunction(tree);\n\t\t\t}\n\t\t\t//\t\t\tif (tree.getChild(0).getChildCount() == 0 && tree.getChild(1).getChildCount() == 0){\n\t\t\t//\t\t\t\tif ()\n\t\t\t//\t\t\t}\n\t\t\tTemp left = evalExpression((CommonTree) tree.getChild(0));\n\t\t\tTemp right = evalExpression((CommonTree) tree.getChild(1));\n\n\t\t\tTemp temp = new Temp(temperaryNum++,left.getType(), \"EXP\");\n\t\t\tif (tree.getText().contains(\"+\")){ // add\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t} //both parameters\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"-\")){ // subtract\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"*\")){ // multiply\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{ // divide\n\t\t\t\tif (right.getType() == LittleParser.INTLITERAL && left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (right.getType() == LittleParser.FLOATLITERAL || left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\n\t}", "private Object parseExpr() throws IOException, FSException{\n\n ETreeNode curNode=null;\n boolean end=false;\n Object val;\n boolean negate=false; //flag for unary minus\n boolean not=false;//flag for unary not.\n boolean prevOp=true;//flag - true if previous value was an operator\n\n while (!end){\n\n switch (tok.ttype) {\n\n\n //the various possible 'values'\n case LexAnn.TT_INTEGER:\n case LexAnn.TT_DOUBLE:\n case LexAnn.TT_STRING:\n case LexAnn.TT_WORD:\n case LexAnn.TT_FUNC:\n case LexAnn.TT_NULL:\n case LexAnn.TT_ARRAY:{\n\n if (!prevOp){\n parseError(\"Expected Operator\");\n } else {\n\n val=null;\n ETreeNode node=new ETreeNode();\n node.type=ETreeNode.E_VAL;\n\n switch (tok.ttype){\n //numbers - just get them\n case LexAnn.TT_INTEGER:{\n val=tok.value;\n break;\n }\n case LexAnn.TT_DOUBLE:{\n val=tok.value;\n break;\n }\n //functions - evaluate them\n case LexAnn.TT_FUNC:{\n String name=(String)tok.value;\n getNextToken();\n val=parseCallFunc(name);\n break;\n }\n //arrays - evaluate them\n case LexAnn.TT_ARRAY:{\n String name=(String)tok.value;\n getNextToken(); //should be a '['\n getNextToken(); //should be the index\n Object index=parseExpr();\n try {\n val=host.getVarEntry(name,index);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n break;\n }\n //variables - resolve them\n case LexAnn.TT_WORD:{\n if (hasVar((String)tok.value)) {\n val=getVar((String)tok.value);\n } else {\n try {\n val=host.getVarEntry((String)tok.value,null);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n }\n break;\n }\n //strings - just get again\n case LexAnn.TT_STRING:{\n val=tok.value;\n break;\n }\n //null\n case LexAnn.TT_NULL:{\n val=new FSObject(null);\n break;\n }\n }\n\n //unary not\n if (not){\n if (val instanceof Integer){\n if (((Integer)val).intValue()==0){\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n not=false;\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Boolean) {\n if (((FSObject)val).getObject().equals(Boolean.FALSE)) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Integer) {\n if (((Integer)((FSObject)val).getObject()).intValue()==0) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else {\n String msg=val.getClass().getName();\n if (val instanceof FSObject) msg=\"FSObject with \"+((FSObject)val).getNullClass().getName();\n parseError(\"Type mismatch for ! \"+msg);\n }\n }\n\n //unary minus\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n node.value=val;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n\n prevOp=false;\n }\n break;\n }\n /*operators - have to be more carefull with these.\n We build an expression tree - inserting the nodes at the right\n points to get a reasonable approximation to correct operator\n precidence*/\n case LexAnn.TT_LEQ:\n case LexAnn.TT_LNEQ:\n case LexAnn.TT_MULT:\n case LexAnn.TT_DIV:\n case LexAnn.TT_MOD:\n case LexAnn.TT_PLUS:\n case LexAnn.TT_MINUS:\n case LexAnn.TT_LGR:\n case LexAnn.TT_LGRE:\n case LexAnn.TT_LLSE:\n case LexAnn.TT_LLS:\n case LexAnn.TT_NOT:\n case LexAnn.TT_LAND:\n case LexAnn.TT_LOR: {\n if (prevOp){\n if (tok.ttype==LexAnn.TT_MINUS){\n negate=true;\n } else if (tok.ttype==LexAnn.TT_NOT){\n not=true;\n } else {\n parseError(\"Expected Expression\");\n }\n } else {\n\n ETreeNode node=new ETreeNode();\n\n node.type=ETreeNode.E_OP;\n node.value=new Integer(tok.ttype);\n\n if (curNode.parent!=null){\n\n int curPrio=getPrio(tok.ttype);\n int parPrio=\n getPrio(((Integer)curNode.parent.value).intValue());\n\n if (curPrio<=parPrio){\n //this nodes parent is the current nodes grandparent\n node.parent=curNode.parent.parent;\n //our nodes left leg is now linked into the current nodes\n //parent\n node.left=curNode.parent;\n //hook into grandparent\n if (curNode.parent.parent!=null){\n curNode.parent.parent.right=node;\n }\n\n //the current nodes parent is now us (because of above)\n curNode.parent=node;\n //set the current node.\n curNode=node;\n } else {\n //current node's parent's right is now us.\n curNode.parent.right=node;\n //our nodes left is the current node.\n node.left=curNode;\n //our nodes parent is the current node's parent.\n node.parent=curNode.parent;\n //curent nodes parent is now us.\n curNode.parent=node;\n //set the current node.\n curNode=node;\n }\n } else {\n //our node's left is the current node\n node.left=curNode;\n //current node's parent is us now\n //we don't have to set our parent, as it is null.\n curNode.parent=node;\n //set current node\n curNode=node;\n }\n prevOp=true;\n }\n break;\n }\n case '(':\n //start of an bracketed expression, recursively call ourself\n //to get a value\n {\n getNextToken();\n val=parseExpr();\n\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n ETreeNode node=new ETreeNode();\n node.value=val;\n node.type=ETreeNode.E_VAL;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n prevOp=false;\n break;\n }\n\n default: {\n end=true;\n }\n\n }\n if (!end){\n tok.nextToken();\n }\n }\n\n //find the top of the tree we just built.\n if (curNode==null) parseError(\"Missing Expression\");\n while(curNode.parent!=null){\n curNode=curNode.parent;\n }\n\n\n return evalETree(curNode);\n\n }", "public interface ExpressionVisitor{\n\n void handel(BracketExpression bracketExpression);\n\n void handel(NaturalNumber naturalNumber);\n\n\n void handel(Sum sum);\n void handel(Difference difference);\n void handel(Product product);\n void handel(Quotient quotient);\n\n void handel(VariableExpression variableExpression);\n}", "public StatementParse reconstructTree(ArrayList<StatementParse> expression){\n // an empty expression will not trigger this method\n // first element is always an integer\n StatementParse left_node = expression.get(0);\n\n for (int i = 1; i < expression.size(); i++){\n StatementParse right_node = expression.get(i);\n if (right_node instanceof IntegerParse && ((IntegerParse) right_node).getValue() == 0){\n continue;\n }\n StatementParse top;\n if (right_node.isNegative()){\n top = new StatementParse(\"-\");\n } else {\n top = new StatementParse(\"+\");\n }\n top.getChildren().add(left_node);\n top.getChildren().add(right_node);\n left_node = top;\n }\n return left_node;\n }", "public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }", "Expression createExpression();", "public void visit (Object expr) {\n\t\t\t\n\t\t\toffset += 2;\n\t\t\t\n\t\t\tif (expr instanceof VariableReferenceExpr) {\n\t\t\t\tvisit ( (VariableReferenceExpr) expr);\n\t\t\t} else if (expr instanceof UnionExpr) {\n\t\t\t\tvisit ( (UnionExpr) expr);\n\t\t\t} else if ( expr instanceof UnaryExpr) {\n\t\t\t\tvisit ( (UnaryExpr) expr);\n\t\t\t} else if ( expr instanceof TextNodeStep ) {\n\t\t\t\tvisit ( (TextNodeStep) expr) ;\n\t\t\t} else if ( expr instanceof RelationalExpr) {\n\t\t\t\tvisit ( (RelationalExpr) expr);\n\t\t\t} else if ( expr instanceof ProcessingInstructionNodeStep) {\n\t\t\t\tvisit ( (ProcessingInstructionNodeStep) expr) ;\n\t\t\t} else if ( expr instanceof Predicate) {\n\t\t\t\tvisit ( (Predicate) expr );\n\t\t\t} else if ( expr instanceof PathExpr) {\n\t\t\t\tvisit ( (PathExpr) expr) ;\n\t\t\t} else if ( expr instanceof NumberExpr) {\n\t\t\t\tvisit ( (NumberExpr) expr);\n\t\t\t} else if ( expr instanceof NameStep) {\n\t\t\t\tvisit ( (NameStep) expr);\n\t\t\t} else if ( expr instanceof MultiplicativeExpr) {\n\t\t\t\tvisit ( (MultiplicativeExpr) expr);\n\t\t\t} else if ( expr instanceof LogicalExpr) {\n\t\t\t\tvisit ( (LogicalExpr) expr);\n\t\t\t} else if ( expr instanceof LocationPath) {\n\t\t\t\tvisit ( (LocationPath) expr);\n\t\t\t} else if ( expr instanceof LiteralExpr) {\n\t\t\t\tvisit ( (LiteralExpr) expr);\n\t\t\t} else if ( expr instanceof FunctionCallExpr) {\n\t\t\t\tvisit ( (FunctionCallExpr) expr);\n\t\t\t} else if ( expr instanceof FilterExpr) {\n\t\t\t\tvisit ( (FilterExpr) expr);\n\t\t\t} else if ( expr instanceof EqualityExpr) {\n\t\t\t\tvisit ( (EqualityExpr) expr);\n\t\t\t} else if ( expr instanceof CommentNodeStep) {\n\t\t\t\tvisit ( (CommentNodeStep)expr);\n\t\t\t} else if ( expr instanceof AllNodeStep) {\n\t\t\t\tvisit ( (AllNodeStep) expr);\n\t\t\t} else if ( expr instanceof AdditiveExpr) {\n\t\t\t\tvisit ( (AdditiveExpr) expr);\n\t\t\t} else if (expr instanceof List) {\n\t\t\t\tvisitList((List)expr);\n\t\t\t} else if (expr != null) {\n\t\t\t\tout(\"Panic: Unknown expression kind {0} \",expr.getClass().getName()); //$NON-NLS-1$\n\t\t\t} else {\n\t\t\t\tout(\"null - unset\");\n\t\t\t}\n\t\t\t\n\t\t\toffset -= 2;\n\t\t}", "private Object evalETree(ETreeNode node) throws FSException{\n Object lVal,rVal;\n\n if ( node == null )\n {\n parseError(\"Malformed expression\");\n // this is never reached, just for readability\n return null;\n }\n\n if (node.type==ETreeNode.E_VAL){\n return node.value;\n }\n lVal=evalETree(node.left);\n rVal=evalETree(node.right);\n\n switch (((Integer)node.value).intValue()){\n //call the various eval functions\n case LexAnn.TT_PLUS:{\n return evalPlus(lVal,rVal);\n }\n case LexAnn.TT_MINUS:{\n return evalMinus(lVal,rVal);\n }\n case LexAnn.TT_MULT:{\n return evalMult(lVal,rVal);\n }\n case LexAnn.TT_DIV:{\n return evalDiv(lVal,rVal);\n }\n case LexAnn.TT_LEQ:{\n return evalEq(lVal,rVal);\n }\n case LexAnn.TT_LNEQ:{\n return evalNEq(lVal,rVal);\n }\n case LexAnn.TT_LLS:{\n return evalLs(lVal,rVal);\n }\n case LexAnn.TT_LLSE:{\n return evalLse(lVal,rVal);\n }\n case LexAnn.TT_LGR:{\n return evalGr(lVal,rVal);\n }\n case LexAnn.TT_LGRE:{\n return evalGre(lVal,rVal);\n }\n case LexAnn.TT_MOD:{\n return evalMod(lVal,rVal);\n }\n case LexAnn.TT_LAND:{\n return evalAnd(lVal,rVal);\n }\n case LexAnn.TT_LOR:{\n return evalOr(lVal,rVal);\n }\n }\n\n return null;\n }", "public Expression asExpression() {\n switch (TYPE) {\n case EXPRESSION:\n return EXPRESSION;\n case IDENTIFIER:\n return new Variable(VALUE);\n case LITERAL:\n if (VALUE.matches(\"\\\\d+\")) {\n return new LInteger(Integer.parseInt(VALUE));\n } else if (VALUE.equals(\"true\") || VALUE.equals(\"false\")) {\n return LBoolean.resolve(VALUE.equals(\"true\"));\n } else if (VALUE.equals(\"null\")) {\n return LNull.NULL;\n } else {\n return new LString(VALUE);\n }\n default:\n throw ErrorLog.get(\"Unexpected symbol '%s'\", VALUE);\n }\n }", "void genAst();", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "private InfixExpression getNode()\n{\n return (InfixExpression) ast_node;\n}", "public void accept(ExpressionNodeVisitor visitor);", "Expr createExpr();", "public Object eval (Object expression);", "public static ExpressionTree makeExpression(TreeNode root,\n Field resultField) {\n return new ExpressionTree(root, resultField);\n }", "public static Expr parse(String str) {\r\n\t\tExprBinary at = new ExprBinary(null, null); // the root of the tree\r\n\t\tStringBuilder opstore = new StringBuilder(); // stores operator characters\r\n\t\tStringBuilder adder = new StringBuilder(); // stores value characters\r\n\t\tboolean text = false; // whether inside of a string\r\n\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tboolean add = (c != '\\\\'); // whether to add the char to adder. ignore escape char\r\n\t\t\tboolean leftSide = (opstore.length() == 0); // whether on the left side of the binary expression (before the operator)\r\n\t\t\tString adderStr = adder.toString();\r\n\t\t\tString opStr = opstore.toString();\r\n\r\n\t\t\tif (c == '\"') { // string\r\n\t\t\t\tif (i == 0 || str.charAt(i - 1) != '\\\\') {\r\n\t\t\t\t\ttext = !text; // ignore string contents\r\n\t\t\t\t}\r\n\t\t\t} else if (!text) {\r\n\t\t\t\tif (c == ' ') {\r\n\t\t\t\t\tadd = false; // ignore spaces\r\n\t\t\t\t} else if (c == '(') { // grouping or function\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tString contents = str.substring(i + 1, closeIndex);\r\n\t\t\t\t\tExpr group; // the expression denoted by the parentheses group\r\n\r\n\t\t\t\t\tif (i > 0 && (!isReserved(str.charAt(i - 1)) || str.charAt(i - 1) == ')')) { // function\r\n\t\t\t\t\t\tif (adderStr.isEmpty()) { // function reference call ... func()()\r\n\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(null, contents); // a reference call is only a parameter group, null name\r\n\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t} else { // function call\r\n\t\t\t\t\t\t\tif (adderStr.startsWith(\".\")) { // function sub call ... func().subfunc()\r\n\t\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t\t} else { // standalone function ... func()\r\n\t\t\t\t\t\t\t\tif (Character.toString(adderStr.charAt(0)).equals(Operator.REF.op)) { // @func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprFuncRef(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\t} else { // func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprCall(adderStr, contents);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // parenthetical grouping\r\n\t\t\t\t\t\tchar cc = (adderStr.length() == 1 ? adderStr.charAt(0) : 0); // operator before parenthesis ... !()\r\n\t\t\t\t\t\tif (isReserved(cc)) { // operation on the group\r\n\t\t\t\t\t\t\tgroup = new ExprUnary(Operator.get(Character.toString(cc)), parse(contents));\r\n\t\t\t\t\t\t} else { // ignore character, not an operator\r\n\t\t\t\t\t\t\tgroup = parse(contents);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add to tree\r\n\t\t\t\t\tif (leftSide) at.setLeft(group);\r\n\t\t\t\t\telse at.setRight(group);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (c == '{') { // array initializer ... {}\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tExpr arr = new ExprArray(str.substring(i + 1, closeIndex), adderStr);\r\n\r\n\t\t\t\t\tif (adderStr.length() == 1 && isReserved(adderStr.charAt(0))) {\r\n\t\t\t\t\t\t// unary op done on array initializer ... !{}\r\n\t\t\t\t\t\tarr = new ExprUnary(Operator.get(Character.toString(adderStr.charAt(0))), arr);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (leftSide) at.setLeft(arr);\r\n\t\t\t\t\telse at.setRight(arr);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (isOp(c)) { // operator\r\n\t\t\t\t\t// add value used in operation to tree\r\n\t\t\t\t\tif (!adderStr.isEmpty()) {\r\n\t\t\t\t\t\tif (leftSide) { // ex: adderStr + ___\r\n\t\t\t\t\t\t\tat.setLeft(parseValue(adderStr));\r\n\t\t\t\t\t\t} else { // ex: (___ + adderStr) + ___\r\n\t\t\t\t\t\t\tat.setRight(parseValue(adderStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opStr.equals(\"\") || (i > 0 && isOp(str.charAt(i - 1)))) { // accumulate operator from adjacent operator characters (ex: != consists of ! and =)\r\n\t\t\t\t\t\tif (!(adderStr.isEmpty() && (opStr + c).equals(\"-\")) && (Operator.get(opStr + c) != null || (opStr.isEmpty() && isOp(c)))) {// if the operator exists, then it is an operator character\r\n\t\t\t\t\t\t\tif (opStr.equals(\"-\") && c == '-') { // this and the above line handle negatives and double negatives\r\n\t\t\t\t\t\t\t\topStr = \"+\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topStr += c;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // existing operator operation must be added to tree ... in \"(a + b) * c\", \"(a+b)\" must be abstracted-out so we get \"x * c\"\r\n\t\t\t\t\t\tint endIndex = i + 1; // end index of operator\r\n\r\n\t\t\t\t\t\t// get entire operator if operator is more than 1 character long\r\n\t\t\t\t\t\tfor (int i2 = endIndex; i2 < str.length(); i2++) {\r\n\t\t\t\t\t\t\tif (isOp(str.charAt(i2))) endIndex++;\r\n\t\t\t\t\t\t\telse break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOperator nextOp = Operator.get(str.substring(i, endIndex)); // second (right-most) operator\r\n\t\t\t\t\t\tat.op = Operator.get(opStr); // first (left-most) operator\r\n\r\n\t\t\t\t\t\t// group values in operation by operator precedence\r\n\t\t\t\t\t\tint p1 = precedence(nextOp); // right-most op\r\n\t\t\t\t\t\tint p2 = precedence(at.op); // left-most op\r\n\r\n\t\t\t\t\t\tif (p1 > p2) { // group around the right-most op\r\n\t\t\t\t\t\t\tExprBinary right = new ExprBinary(at, nextOp);\r\n\t\t\t\t\t\t\tright.setLeft(at.right());\r\n\r\n\t\t\t\t\t\t\tat.setRight(right);\r\n\t\t\t\t\t\t\tat = right;\r\n\r\n\t\t\t\t\t\t} else if (p1 < p2) { // group around the left-most op\r\n\t\t\t\t\t\t\tExprBinary last = at;\r\n\t\t\t\t\t\t\tExprBinary match = at.parent();\r\n\r\n\t\t\t\t\t\t\t// correctly add to the binary tree based on precedence of operators\r\n\t\t\t\t\t\t\twhile (match instanceof ExprBinary && p1 < (p2 = precedence(((ExprBinary) match).op))) {\r\n\t\t\t\t\t\t\t\tlast = match;\r\n\t\t\t\t\t\t\t\tmatch = match.parent();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tExprBinary tr = new ExprBinary(match, nextOp);\r\n\t\t\t\t\t\t\ttr.setLeft(last);\r\n\r\n\t\t\t\t\t\t\tif (match != null) {\r\n\t\t\t\t\t\t\t\tif (last == match.right()) match.setRight(tr);\r\n\t\t\t\t\t\t\t\telse match.setLeft(tr);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tat = tr;\r\n\r\n\t\t\t\t\t\t} else { // group from left to right (equal operator precedence)\r\n\t\t\t\t\t\t\tExprBinary left = new ExprBinary(at, at.op); // group existing values into left node, add right to open right node spot\r\n\t\t\t\t\t\t\tleft.setLeft(at.left());\r\n\t\t\t\t\t\t\tleft.setRight(at.right());\r\n\r\n\t\t\t\t\t\t\tat.op = nextOp;\r\n\t\t\t\t\t\t\tat.setLeft(left);\r\n\t\t\t\t\t\t\tat.setRight(null);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\topStr = nextOp.op;\r\n\t\t\t\t\t\ti = endIndex - 1;\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// store valid value characters\r\n\t\t\tif (add) {\r\n\t\t\t\tadder.append(c);\r\n\r\n\t\t\t\t// if this is the last character, then add the stored value to the tree.\r\n\t\t\t\t// otherwise, would be incorrectly ignored because there is no next operator\r\n\t\t\t\tif (i + 1 == str.length()) {\r\n\t\t\t\t\tif (opstore.length() == 0) {\r\n\t\t\t\t\t\tat.setLeft(parseValue(adder.toString()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tat.setRight(parseValue(adder.toString()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// initialize binary tree operator if not done so already\r\n\t\tif (at.op == null) {\r\n\t\t\tat.op = Operator.get(opstore.toString());\r\n\t\t}\r\n\r\n\t\t// after traversing the tree to some point, we need to get back to root so we can return the entire tree\r\n\t\twhile (at.parent() != null) {\r\n\t\t\tat = (ExprBinary) at.parent();\r\n\t\t}\r\n\r\n\t\t// the expression may not actually be a binary operation\r\n\t\tif (at.op == null && at.right() == NULL) {\r\n\t\t\tif (at.left() == NULL) return NULL; // the expression is empty\r\n\t\t\treturn at.left(); // the expression is a single value/unary-operation\r\n\t\t}\r\n\r\n\t\treturn at;\r\n\t}", "Unary expr(Expr e);", "@Test\n\t\tpublic void testExpression() throws LexicalException, SyntaxException {\n\t\t\tString input = \"x + 2\";\n\t\t\tPLPParser parser = makeParser(input);\n\t\t\tExpression e = parser.expression(); //call expression here instead of parse\n\t\t\tshow(e);\t\n\t\t\tassertEquals(ExpressionBinary.class, e.getClass());\n\t\t\tExpressionBinary b = (ExpressionBinary)e;\n\t\t\tassertEquals(ExpressionIdentifier.class, b.leftExpression.getClass());//\n\t\t\tExpressionIdentifier left = (ExpressionIdentifier)b.leftExpression;\n\t\t\tassertEquals(\"x\", left.name);\n\t\t\tassertEquals(ExpressionIntegerLiteral.class, b.rightExpression.getClass());\n\t\t\tExpressionIntegerLiteral right = (ExpressionIntegerLiteral)b.rightExpression;\n\t\t\tassertEquals(2, right.value);\n\t\t\tassertEquals(OP_PLUS, b.op);\n\t\t}", "public static void statement(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == WRITELN)\n {\n String a = String.valueOf(Memory.allocateString(\"\\n\"));\n irt.setOp(\"WRS\");\n irt.addSub(new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(a))));\n }\n else if (tt == WRITE)\n {\n ast1 = (CommonTree)ast.getChild(0);\n String type = arg(ast1, irt1);\n if (type.equals(\"real\")) {\n irt.setOp(\"WRR\");\n irt.addSub(irt1);\n }\n else {\n irt.setOp(\"WRS\");\n irt.addSub(irt1);\n }\n }\n else if(tt == ASSIGN)\n {\n //try deailng with assign here\n irt.setOp(\"ASSIGN\");\n IRTree iHold = new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(String.valueOf(Memory.allocateReal(ast.getChild(0).getText())))));\n System.out.println(\"var name = \" + ast.getChild(0).getText());\n irt.addSub(iHold);\n expression((CommonTree)ast.getChild(1), irt1);\n irt.addSub(irt1);\n }\n else if(tt == MEM)\n {\n System.out.println(\"GOT MEM TYPE\");\n }\n else {\n error(tt);\n }\n }", "public static Node parseExpression(String expression)\n throws OgnlException {\n try {\n OgnlParser parser = new OgnlParser(new StringReader(expression));\n return parser.topLevelExpression();\n } catch (ParseException e) {\n throw new ExpressionSyntaxException(expression, e);\n } catch (TokenMgrError e) {\n throw new ExpressionSyntaxException(expression, e);\n }\n }", "public static int evaluate(String expression) {\n\n\t\tchar[] tokens = expression.toCharArray();\n\t\t// Stack for numbers: 'values'\n\t\tStack<Integer> values = new Stack<Integer>();\n\t\t// Stack for Operators: 'operators'\n\t\tStack<Character> operators = new Stack<Character>();\n\n\t\tfor (int i = 0; i < tokens.length; i++) {\n\t\t\t// Current token is a whitespace, skip it\n\t\t\tif (tokens[i] == ' ')\n\t\t\t\tcontinue;\n\t\t\t// Current token is a number, push it to stack for numbers\n\t\t\tif (tokens[i] >= '0' && tokens[i] <= '9') {\n\t\t\t\tStringBuffer stringBuffer = new StringBuffer();\n\t\t\t\t// There may be more than one digits in number\n\t\t\t\twhile (i < tokens.length && tokens[i] >= '0' && tokens[i] <= '9') {\n\t\t\t\t\tstringBuffer.append(tokens[i++]);\n\t\t\t\t}\n\t\t\t\tvalues.push(Integer.parseInt(stringBuffer.toString()));\n\t\t\t i--;\n\t\t\t} else if (tokens[i] == '(') {\n\t\t\t // Current token is an opening brace, push it to 'operators'\n\t\t\t\toperators.push(tokens[i]);\n\t\t\t} else if (tokens[i] == ')') {\n\t\t\t // Closing brace encountered, solve entire brace\n\t\t\t\twhile (operators.peek() != '(') {\n\t\t\t\t values.push(applyOperation(operators.pop(), values.pop(), values.pop()));\n\t\t\t }\n\t\t\t\toperators.pop();\n\t\t\t} else if (tokens[i] == '+' || tokens[i] == '-' ||tokens[i] == '*' || tokens[i] == '/') {\n\t\t\t // Current token is an operator.\n\t\t\t\twhile (!operators.empty() && hasPrecedence(tokens[i], operators.peek())) {\n\t\t\t\t values.push(applyOperation(operators.pop(), values.pop(),values.pop()));\n\t\t\t // System.out.println(values.peek());\n\t\t\t }\n\t\t\t\t// Push current token to 'operators'.\n\t\t\t\toperators.push(tokens[i]);\n\t\t\t}\n\t\t}\n\t\t// Entire expression has been parsed at this point, apply remaining operators to remaining values\n\t\twhile (!operators.empty()) {\n\t\t\tvalues.push(applyOperation(operators.pop(), values.pop(), values.pop()));\n\t\t}\n\t\t// Top of 'values' contains result, return it\n\t\treturn values.pop();\n\t}", "public Expression(String expr) {\n this.expr = expr;\n scalars = null;\n arrays = null;\n openingBracketIndex = null;\n closingBracketIndex = null;\n }", "@GetMapping(\"/tree\")\n public ResponseEntity<?> growSyntaxTree(@RequestParam(\"expression\") String expression) {\n try {\n Tokeniser tokeniser = new Tokeniser(expression);\n Parser parser = new Parser(tokeniser.tokenise());\n ExpressionTree tree = parser.parse();\n\n return new ResponseEntity<>(tree, HttpStatus.OK);\n } catch (SyntaxError | IllegalArgumentException e) {\n return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);\n }\n }", "@Test\n public void ensureCompileTreeWorksAsIntended() throws Exception {\n String formula = \"#euro{2$+25$}\";\n CommonTree ast = new MonetaryExpressionCompiler().compileTree(formula);\n boolean verdict = ast.toStringTree().equals(\"(euro (+ ($ 2) ($ 25)))\");\n assertEquals(true, verdict);\n }", "EvaluationResult evalExpression(ValueExp expr) { return evalExpression(expr, true); }", "public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }", "public static int evaluateExpression(String expression) {\r\n // Create operandStack of ints to store operands\r\n Stack<Integer> operandStack = new Stack<>();\r\n \r\n // Create operatorStack of characters to store operators\r\n Stack<Character> operatorStack = new Stack<>();\r\n \r\n // Insert Blanks\r\n expression = insertBlanks(expression);\r\n \r\n // Extract operands and operators by splitting around blanks\r\n String[] tokens = expression.split(\" \");\r\n \r\n /* Phase 1: Scan tokens\r\n Enhanced for loop, puts every element of tokens in token each time\r\n Like writing token = tokens[i] every time\r\n */\r\n for (String token: tokens) { \r\n if(token.length() == 0) // It's a blank\r\n continue; // Go to the while loop\r\n else if (token.charAt(0) == '+' || token.charAt(0) == '-') {\r\n // process all +, -, *, / in the top of the operator stack\r\n while (!operatorStack.isEmpty() && // While stack isn't empty\r\n (operatorStack.peek() == '+' || // and has an operator on top\r\n operatorStack.peek() == '-' || // Like if you had (2 * 3) + 5 \r\n operatorStack.peek() == '*' || // Or if you had (2 - 3) + 5, do that last no matter what b/c +- is lowest priority\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n // After processing the all the previous operations, push the +- operator onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '*' || token.charAt(0) == '/') {\r\n // Proess all *, / in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '*' ||\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the * or / onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '^') {\r\n // Proess all ^ in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the ^ onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if(token.trim().charAt(0) == '(') {\r\n operatorStack.push('(');\r\n } \r\n else if(token.trim().charAt(0) == ')') {\r\n while(operatorStack.peek() != '(') {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n operatorStack.pop(); // pop\r\n }\r\n else {\r\n operandStack.push(new Integer(token));\r\n }\r\n }\r\n // Phase two: process everything left over\r\n while (!operatorStack.isEmpty()) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n return operandStack.pop(); \r\n }", "public Object eval(String expression) throws Exception;", "JavaExpression createJavaExpression();", "private Expression toExpression() {\n Expression lhs = null, rhs = null;\n if (base instanceof DerefSymbol) {\n lhs = ((DerefSymbol)base).toExpression();\n } else if (base instanceof AccessSymbol) {\n lhs = ((AccessSymbol)base).toExpression();\n } else if (base instanceof Identifier) {\n lhs = new Identifier(base);\n } else {\n PrintTools.printlnStatus(0,\n \"[WARNING] Unexpected access expression type\");\n return null;\n }\n rhs = new Identifier(member);\n return new AccessExpression(lhs, AccessOperator.MEMBER_ACCESS, rhs);\n }", "public T evaluate(String expr) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>();\n return visitor.visit(expression);\n }", "public interface Expression {\n\t\n\t/**\n\t * Evaluates an arithmetic expression.\n\t * \n\t * @return the value to which this expression evaluates\n\t */\n\tdouble eval();\n\t\n\t/**\n\t * Creates a String representation of an arithmetic expression.\n\t * \n\t * @return this expression in standard form, suitable for inclusion\n\t * in a program or text document (e.g., \"(2 - 4 * (7 + 2))\"). Note\n\t * that the string can have \"unnecessary\" parentheses as this (toy)\n\t * system does not know about operator precedence. \n\t */\n\tString toString();\n\n}", "@Override\n\tpublic String visitArExpr(ArExprContext ctx) {\n\t\tint chNo=ctx.children.size();\n\t\tif(chNo == 3){\n\t\t\tParseTree cur = ctx.getChild(1);\n\t\t\tif(cur==ctx.MULT() || cur==ctx.DIV()|| cur==ctx.PLUS() || cur==ctx.MINUS()){\n\t\t\t\tString left = visit(ctx.getChild(0));\n\t\t\t\tString right = visit(ctx.getChild(2));\n\t\t\t\tif(!(right.equals(left) && right.equals(\"int\")) ){throw new RuntimeException(\"Arithmetic operations only with integers\");}\n\t\t\t\treturn(\"int\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn(visit(cur));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tParseTree cur=ctx.getChild(0);\n\t\t\tif (cur instanceof TerminalNode) {\t\t\t\t\n\t\t\t\tif (cur==ctx.INTEG()) return \"int\";\n\t\t\t\telse if (cur==ctx.CH()) return \"char\";\n\t\t\t\telse if(cur==ctx.ID()){\n\t\t\t\t\tString key=visitTerminal((TerminalNode)cur);\n\t\t\t\t\tRecord id= table.lookup(key);\n\t\t\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\t\t\treturn id.getReturnType();\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t}else {\n\t\t\t\tString type=visit(ctx.getChild(0));\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n \n \treturn new TreeNode(expr); // you fill this in\n } else{\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n char myChar='\\0';\n \n for (int k = 1; k < expr.length() - 1; k++) {\n myChar = expr.charAt(k);\n \tif(myChar == '('){\n \tnesting++;\n }\n if(myChar==')'){\n \tnesting--;\n }\n if(nesting == 0){\n \tif(myChar == '+' || myChar == '*'){\n \t\topPos = k;\n \t break;\t\n \t}\n }\n }\n \n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op,exprTreeHelper(opnd1),exprTreeHelper(opnd2));\n \n }\n }", "public ASTNode visitEvaluate(EvaluateContext ctx) {\n ASTExpr expr = (ctx.expr() == null) ? null : (ASTExpr)visit(ctx.expr());\n return new ASTEval(ctx, expr);\n }", "private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n return new TreeNode(expr); // you fill this in\n } else {\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n for (int k = 1; k < expr.length() - 1; k++) {\n // you supply the missing code\n \tif (nesting == 0) {\n \t\tif (expr.charAt(k) == '+' || expr.charAt(k) == '*') {\n \t\t\topPos = k;\n \t\t}\n \t}\n \tif (expr.charAt(k) == '(') {\n \t\tnesting++;\n \t} else if (expr.charAt(k) == ')') {\n \t\tnesting--;\n \t}\n }\n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op, exprTreeHelper(opnd1), exprTreeHelper(opnd2)); // you fill this in\n }\n }", "public static List<Element> Exp2Rpn(String expression) {\r\n\t\tList<String> tokenList = tokenize(expression);\r\n\t\tList<Element> rpn = new LinkedList<Element>();\r\n\t\tStack<Element> stack = new Stack<Element>();\r\n\r\n\t\tfor (String token : tokenList) {\r\n\t\t\tElement currentElement = string2Element(token);\r\n\r\n\t\t\tif (currentElement.isOperator()) {\r\n\t\t\t\twhile (!stack.empty() && precedence(stack.peek(), currentElement) == 1) {\r\n\t\t\t\t\trpn.add(stack.pop());\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(currentElement);\r\n\t\t\t} else if (currentElement.isNumber()) {\r\n\t\t\t\trpn.add(currentElement);\r\n\t\t\t} else if (currentElement.isLeftParenthesis()) {\r\n\t\t\t\tstack.push(currentElement);\r\n\t\t\t} else if (currentElement.isRightParenthesis()) {\r\n\t\t\t\twhile (!stack.peek().isLeftParenthesis()) {\r\n\t\t\t\t\trpn.add(stack.pop());\r\n\t\t\t\t}\r\n\t\t\t\tstack.pop(); // pops '('\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\twhile (!stack.empty()) {\r\n\t\t\trpn.add(stack.pop());\r\n\t\t}\r\n\r\n\t\treturn rpn;\r\n\t}", "public AST(RuleContext ctx){\n this.ctx = ctx;\n }", "public T expr(final Expression expression) {\r\n\t\tif (expression.values() == null)\r\n\t\t\treturn expr(expression.expression());\r\n\t\treturn expr(expression.expression(), expression.values()\r\n\t\t\t\t.toArray());\r\n\t}", "public static UnaryExpression convert_(Expression expression, Class type, Method method) { throw Extensions.todo(); }", "private Operation expression(Scope scope, Vector queue)\r\n {\r\n Operation root = expression1(scope, queue);\r\n\r\n if (assign.contains(nextSymbol))\r\n {\r\n Operation op = new Operation();\r\n\r\n op.left = root;\r\n\r\n op.operator = assignmentOperator();\r\n op.right = expression(scope, queue);\r\n\r\n root = op;\r\n }\r\n\r\n return root;\r\n }", "public Element compileExpression() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tboolean op;\n\t\tboolean oper = false;\n\t\tString command = \"\";\n\t\tElement expressionParent = document.createElement(\"expression\");\n\n\t\t// if the term-op-term-op cycle breaks, that means its the end of the expression\n\t\tdo {\n\n\t\t\t// At least one term\n\t\t\texpressionParent.appendChild(compileTerm());\n\t\t\t\n\t\t\t//If an operand has been encountered, then can write the command as it is postfix\n\t\t\tif (oper) {\n\t\t\t\twriter.writeCommand(command);\n\t\t\t}\n\t\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\t\tclone.advance();\n\t\t\ttoken = clone.presentToken;\n\n\t\t\t// zero or more ops\n\t\t\tif (token.matches(\"\\\\+|-|\\\\*|/|\\\\&|\\\\||<|=|>|~\")) {\n\t\t\t\toper = true;\n\n\t\t\t\tswitch (token) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tcommand = \"add\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tcommand = \"sub\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tcommand = \"call Math.multiply 2\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tcommand = \"call Math.divide 2\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"<\":\n\t\t\t\t\tcommand = \"lt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \">\":\n\t\t\t\t\tcommand = \"gt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"=\":\n\t\t\t\t\tcommand = \"eq\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"&\":\n\t\t\t\t\tcommand = \"and\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"|\":\n\t\t\t\t\tcommand = \"or\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\texpressionParent.appendChild(ele);\n\t\t\t\tjTokenizer.advance();\n\t\t\t\top = true;\n\t\t\t} else {\n\t\t\t\top = false;\n\t\t\t}\n\t\t} while (op);\n\n\t\treturn expressionParent;\n\t}", "public Stmt createEval(Expr expr) {\n return xnf.Eval(expr.position(), expr);\n }", "@Override\n protected HardwareNode visit(BinaryExpressionASTNode node) throws Exception {\n var lnode = visit(node.getLeft());\n var rnode = visit(node.getRight());\n\n HardwareExpression finalexpr = null;\n String op = node.getOperator().getAsString();\n switch (op) {\n case \"+\":\n finalexpr = new AdditionExpression((HardwareExpression) lnode, (HardwareExpression) rnode);\n break;\n case \"-\":\n finalexpr = new SubtractionExpression((HardwareExpression) lnode, (HardwareExpression) rnode);\n break;\n case \"*\":\n finalexpr = new MultiplicationExpression((HardwareExpression) lnode, (HardwareExpression) rnode);\n break;\n case \"<<\":\n finalexpr = new LeftShiftExpression((HardwareExpression) lnode, (HardwareExpression) rnode);\n break;\n case \"&\":\n finalexpr = new BitWiseAndExpression((HardwareExpression) lnode, (HardwareExpression) rnode);\n break;\n case \"==\":\n finalexpr = new ComparisonExpression((HardwareExpression) lnode, (HardwareExpression) rnode);\n break;\n default:\n // finalexpr = new UnimplementedExpression((HardwareExpression) lnode, (HardwareExpression) rnode, op);\n throw new UnimplementedExpressionException(node.getAsString());\n }\n\n return new ParenthesisExpression(finalexpr);\n }", "public interface ASTPath\n{\n\tvoid debugSelf(IndentPrinter destination);\n\tvoid setParent(ASTChildList.ListKey key, ASTParent newParent);\n\tvoid compileSelf(LangCompiler compiler);\n\tASTBase getDeclaration();\n\tString getName();\n\tString getEnd();\n\tSpiritType getExpressionType();\n\n}", "@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }", "public static Expression getExpression(Object value) {\n\t\tif (isBool(value)) {\n\t\t\treturn IrFactory.eINSTANCE.createExprBool((Boolean) value);\n\t\t} else if (isFloat(value)) {\n\t\t\treturn IrFactory.eINSTANCE.createExprFloat((BigDecimal) value);\n\t\t} else if (isInt(value)) {\n\t\t\treturn IrFactory.eINSTANCE.createExprInt((BigInteger) value);\n\t\t} else if (isString(value)) {\n\t\t\treturn IrFactory.eINSTANCE.createExprString((String) value);\n\t\t} else if (isList(value)) {\n\t\t\tExprList list = IrFactory.eINSTANCE.createExprList();\n\t\t\tint length = Array.getLength(value);\n\t\t\tfor (int i = 0; i < length; i++) {\n\t\t\t\tlist.getValue().add(getExpression(Array.get(value, i)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public Ast visitExpressions(napParser.ExpressionsContext ctx) {\n assert(false) : \"The AST builder should not arrive there.\";\n return null;\n }", "public Node getExpression() {\r\n return expression;\r\n }", "public Object getExpression();", "public static ArithExpr arithExpr(ArithExprContext ctx) {\n\t\tArithExpr t = null;\n\t\tif (Parsing.has(ctx.minusExpr())) {\n\t\t\tt = MinusArithExpr.minusExpr(ctx.minusExpr());\n\t\t} else if (Parsing.has(ctx.operand())) {\n\t\t\tt = Operand.operand(ctx.operand());\n\t\t} else if (ctx.arithExpr().size() == 2) {\n\t\t\tArithExprContext a0 = ctx.arithExpr(0);\n\t\t\tArithExprContext a1 = ctx.arithExpr(1);\n\t\t\tArithExpr t0 = arithExpr(a0);\n\t\t\tArithExpr t1 = arithExpr(a1);\n\t\t\tif (Parsing.has(ctx.arithOp2())) {\n\t\t\t\tString op = ctx.arithOp2().getText();\n\t\t\t\tt = InfixArithExpr.infixArithExpr(t0, t1, op);\n\t\t\t} else\n\t\t\t\tParsing.error(\"arithExpr, arithOp2 \" + ctx.toString());\n\n\t\t} else\n\t\t\tParsing.error(\"arithExpr \" + ctx.toString());\n\t\treturn t;\n\t}", "public interface\nExp extends HIR\n{\n\n/** ConstNode (##3)\n * Build HIR constant node.\n * @param pConstSym constant symbol to be attached to the node.\n * @return constant leaf node having operation code opConst.\n**/\n// Constructor (##3)\n// ConstNode( Const pConstSym );\n\n/** getConstSym\n * Get constant symbol attached to this node.\n * \"this\" should be a constant node.\n * @return constant symbol attached to this node.\n**/\nConst\ngetConstSym();\n\n/** SymNode (##3)\n * Build an HIR symbol name node from a symbol name.\n * @param pVar variable name symbol to be attached to the node.\n * @param pSubp subprogram name symbol to be attached to the node.\n * @param pLabel label name symbol to be attached to the node.\n * @param pElem struct/union element name to be attached to the node.\n * @param pField class field name to be attached to the node.\n * @return symbol name node of corresponding class (##2)\n * having operation code opSym.\n**/\n// Constructor (##3)\n// VarNode( Var pVar ); (##3)\n// SubpNode( Subp pSubp ); (##3)\n// LabelNode( Label pLabel ); (##3)\n// ElemNode( Elem pElem ); (##3)\n// FieldNode( Field pField ); (##3)\n\n/** getSym\n * Get symbol from SymNode. (##2)\n * \"this\" should be a SymNode (##2)\n * (either VarNode, SubpNode, LabelNode, ElemNode, or FieldNode). (##2)\n * @return the symbol attached to the node\n * (either Var, Subp, Label, Elem, or Field). (##2)\n**/\n//## Sym\n//## getSym();\n\n/** getVar\n * Get symbol of specified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nVar getVar();\n\n/** getSubp\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nSubp getSubp();\n\n/**\n * getLabel\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nLabel getLabel();\n\n/**\n * getElem\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nElem getElem();\n// Field getField();\n\n/** UnaryExp (##3)\n * Build an unary expression having pOperator as its operator\n * and pExp as its source operand.\n * @param pOperator unary operator.\n * @param pExp source operand expression.\n * @return unary expression using pOperator and pExp as its\n * operator and operand.\n**/\n// Constructor (##3)\n// UnaryExp( int pOperator, Exp pExp );\n\n/** BinaryExp (##3)\n * Build a binary expression having pOperator as its operator\n * and pExp1, pExp2 as its source operand 1 and 2.\n * @param pOperator binary operator.\n * @param pExp1 source operand 1 expression.\n * @param pExp2 source operand 2 expression.\n * @return binary expression using pOperator and\n * pExp1 and pExp2 as its operator and operands.\n**/\n// Constructor (##3)\n// BinaryExp( int pOperator, Exp pExp1, Exp pExp2 );\n\n/** getExp1\n * Get source operand 1 from unary or binary expression.\n * \"this\" should be either unary or binary expression.\n * @return the source operand 1 expression of this node.\n**/\nExp\ngetExp1();\n\n/** getExp2\n * Get source operand 2 from binary expression.\n * \"this\" should be a binary expression.\n * @return the source operand 2 expression of this node.\n**/\nExp\ngetExp2();\n\n/** getArrayExp (##2)\n * getSubscriptExp\n * getElemSizeExp (##2)\n * Get a component of a subscripted variable.\n * \"this\" should be a node built by buildSubscriptedVar method.\n * @return a component expression of this subscripted variable.\n**/\nExp getArrayExp(); // return array expression part (pArrayExp).\nExp getSubscriptExp(); // return subscript expression part (pSubscript).\nExp getElemSizeExp(); // return element size part (pElemSize).\n\n/** PointedVar (##3)\n * Build a pointed variable node.\n * @param pPointer pointer expression which may be a compond variable.\n(##2)\n * @param pElement struct/union element name pointed by pPointer.\n * @return pointed variable node having operation code opArrow.\n**/\n// Constructor (##3)\n// PointedVar( Exp pPointer, Elem pElement ); // (##2)\n\n/** getPointerExp\n * getPointedElem\n * Get a component of pointed variable expression.\n * \"this\" should be a node built by buildPointedVar method.\n * @return a component expression of this pointed variable.\n**/\nExp getPointerExp(); // return the pointer expression part (pPointer).\nElem getPointedElem(); // return the pointed element part (pElem).\n\n/** QualifiedVar (##3)\n * Build qualified variable node that represents an element\n * of structure or union.\n * @param pQualifier struct/union variable having elements.\n * @param pElement struct/union element name to be represented.\n * @return qualified variable node having operation code opQual.\n**/\n// Constructor (##3)\n// QualifiedVar( Exp pQualifier, Elem pElement );\n\n/** getQualifier\n * getQualifiedElem\n * Get a component of qualified variable expression.\n * \"this\" should be a node built by BuildQualifiedVar method.\n * @return a component of \"this\" QualifiedVar expression. (##2)\n**/\nExp getQualifierExp(); // return qualifier part (pQualifier).\nElem getQualifiedElem(); // return qualified element part (pelement).\n\n/** FunctionExp (##3)\n * Build a function expression node that computes function value.\n * @param pSubpExp function specification part which may be either\n * a function name, or an expression specifying a function name.\n * @param pParamList actual parameter list.\n * @return function expression node having operation code opCall.\n * @see IrList.\n**/\n// Constructor (##3)\n// FunctionExp( Subp pSubpSpec, IrList pParamList );\n\n/** getSubpSpec (##2)\n * getActualParamList\n * Get a component expression of the function expression. (##2)\n * \"this\" should be a node built by buildFunctionExp.\n * getSubpSpec return the expression specifying the subprogram\n * to be called (pSubpSpec). (##2)\n * getActualParamList return the actual parameter list (pParamList).\n * If this has no parameter, then return null.\n**/\nExp getSubpSpec();\nIrList getActualParamList();\n\n/** findSubpType\n * Find SubpType represented by this expression.\n * If this is SubpNode then return SubpType pointed by this node type,\n * else decompose this expression to find Subpnode.\n * If illegal type is encountered, return null.\n**/\npublic SubpType // (##6)\nfindSubpType();\n\n/** isEvaluable\n * See if \"this\" expression can be evaluated or not.\n * Following expressions are evaluable expression: //##14\n * constant expression,\n * expression whose operands are all evaluable expressions.\n * Expressions with OP_ADDR or OP_NULL are treated as non evaluable.\n * Variable with initial value is also treated as non evaluable\n * because its value may change. //##43\n * @return true if this expression can be evaluated as constant value\n * at the invocation of this method, false otherwise.\n**/\nboolean isEvaluable();\n\n//SF050111[\n///** evaluate\n// * Evaluate \"this\" expression.\n// * \"this\" should be an evaluable expression.\n// * If not, this method returns null.\n// * It is strongly recommended to confirm isEvaluable() returns true\n// * for this expression before calling this method.\n// * @return constant node as the result of evaluation.\n//**/\n//ConstNode evaluate();\n\n/**\n * Evaluate \"this\" expression.\n * @return constant as the result of evaluation or null(when failing in the\n * evaluation)\n**/\npublic Const evaluate();\n\n/**\n * Fold \"this\" expression.\n * evaluate() is called by recursive. If the evaluation succeeded, former node\n * is substituted for the constant node generated as evaluation result.\n * @return constant as the result of evaluation or null (when failing in the\n * evaluation)\n**/\npublic Exp fold();\n//SF050111]\n\n/** evaluateAsInt\n * Evaluate \"this\" expression as int.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return integer value as the result of evaluation.\n**/\n//SF050111 int evaluateAsInt();\npublic int evaluateAsInt(); //SF050111\n\n/**\n * Evaluate \"this\" expression as long.\n * \"this\" should be an evaluable expression. If not, this method returns 0.\n * @return long value as the result of evaluation.\n**/\npublic long evaluateAsLong(); //SF050111\n\n/** evaluateAsFloat\n * Evaluate \"this\" expression as float.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 float evaluateAsFloat();\npublic float evaluateAsFloat(); //SF050111\n\n/** evaluateAsDouble\n * Evaluate \"this\" expression as double.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 double evaluateAsDouble();\npublic double evaluateAsDouble(); //SF050111\n\n/** getValueString //##40\n * Evaluate this subtree and return the result as a string.\n * If the result is constant, then return the string representing\n * the constant.\n * If the result is not a constant, then return a string\n * representing the resultant expression.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return a string representing the evaluated result.\n**/\npublic String\ngetValueString();\n\n//##84 BEGIN\n/**\n * Adjust the types of binary operands according to the\n * C language specifications\n * (See ISO/IEC 9899-1999 Programming language C section 6.3.1.8).\n * The result is an expression\n * (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2).\n * The operands can be get by\n * ((HIR)lResult.getChild1()).copyWithOperands()\n * ((HIR)lResult.getChild2()).copyWithOperands()\n * @param pExp1 operand 1.\n * @param pExp2 operand 2.\n * @return (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2)\n */\npublic Exp\nadjustTypesOfBinaryOperands( Exp pExp1, Exp pExp2 );\n//##84 END\n\n/** initiateArray //##15\n * Create loop statement to initiate all elements of\n * the array pArray and append it to the initiation block\n * of subprogram pSubp.\n * The initiation statement to be created for pSubp is\n * for (i = pFrom; i <= pTo; i++)\n * pArray[i] = pInitExp;\n * If pSubp is null, set-data statement is generated.\n * @param pArray array variable expression.\n * @param pInitExp initial value to be set.\n * @param pFrom array index start position\n * @param pTo array index end position\n * @param pSubp subprogram containing the initiation statement.\n * null for global variable initiation.\n * @return the loop statement to set initial value.\n**/\npublic Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp ); //##15\n\n}", "public Expression parseExpression(SyntaxTreeNode parent, String exp) {\n return (Expression)parseTopLevel(parent, \"<EXPRESSION>\"+exp, null);\n }", "private String evaluate(String expression) {\n String separators = \"()*+/-\";\n String result;\n // Stack for using in algorithm\n Stack<String> stackOperations = new Stack<String>();\n // Stack for RPN - reverse polish notation\n Stack<String> stackRPN = new Stack<String>();\n // Stack for evaluating answer\n Stack<String> stackTemp = new Stack<String>();\n //splitting expression into tokens\n StringTokenizer stringTokenizer = new StringTokenizer(updateUnaryMinus(expression), separators, true);\n\n while (stringTokenizer.hasMoreTokens()) {\n String token = stringTokenizer.nextToken();\n if (isNumber(token)) {\n stackRPN.push(token);\n } else if (isOpenBracket(token)) {\n stackOperations.push(token);\n } else if (isCloseBracket(token)) {\n while (!isOpenBracket(stackOperations.lastElement())) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.pop();\n } else if (isOperator(token)) {\n while (!stackOperations.empty() && isOperator(stackOperations.lastElement())\n && getPrecedence(stackOperations.lastElement()) > getPrecedence(token)) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.push(token);\n }\n }\n while (!stackOperations.empty()) {\n stackRPN.push(stackOperations.pop());\n }\n Collections.reverse(stackRPN);\n\n // Evaluation if RPN expression\n while (!stackRPN.empty()) {\n if (isNumber(stackRPN.lastElement())) stackTemp.push(stackRPN.pop());\n else stackTemp.push(makeOperation(stackRPN.pop(), stackTemp.pop(), stackTemp.pop()));\n }\n result = stackTemp.pop();\n return result;\n }", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "public BinaryTree(String expression) {\n \tString[] arr = expression.split(\" \");\n \troot = parse(arr);\n }", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "public static Object parseExpression(String expression) throws OgnlException{\n final Integer currentExpressionMaxLength = Ognl.expressionMaxLength; // Limit access to the volatile variable to a single operation\n if (currentExpressionMaxLength != null && expression != null && expression.length() > currentExpressionMaxLength){\n throw new OgnlException(\n \"Parsing blocked due to security reasons!\",\n new SecurityException(\"This expression exceeded maximum allowed length: \" + expression));\n }\n try{\n OgnlParser parser = new OgnlParser(new StringReader(expression));\n return parser.topLevelExpression();\n }catch (ParseException e){\n throw new ExpressionSyntaxException(expression, e);\n }catch (TokenMgrError e){\n throw new ExpressionSyntaxException(expression, e);\n }\n }", "@Test\n\tpublic void testExpression() throws ParseException {\n\t\tExpression expression = langParser(\"a\").expression();\n\t\tassertEquals(expression.getClass(), Identifier.class);\n\t\texpression = langParser(\"a()\").expression();\n\t\tassertEquals(expression.getClass(), FunctionCall.class);\n\t\texpression = langParser(\"a.b\").expression();\n\t\tassertEquals(expression.getClass(), MemberAccess.class);\n\t\texpression = langParser(\"1\").expression();\n\t\tassertEquals(expression.getClass(), LongLiteral.class);\n\t\texpression = langParser(\"1.1\").expression();\n\t\tassertEquals(expression.getClass(), DoubleLiteral.class);\n\t\texpression = langParser(\"if(a,b,c)\").expression();\n\t\tassertEquals(expression.getClass(), TernaryIf.class);\n\t}", "Expr getExpr();", "public interface TreeInterface extends SymmetricDigraphInterface {\r\n /** Return parent of a tree node.\r\n * @precondition nonNull(node)\r\n */\r\n public IRNode getParent(IRNode node);\r\n\r\n /** The location is a value used by an IRSequence\r\n * to locate an element. For IRArray, it is an integer.\r\n * @precondition nonNull(node)\r\n */\r\n public IRLocation getLocation(IRNode node);\r\n\r\n /** Return the root of a subtree.\r\n */\r\n public IRNode getRoot(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with leaves and working toward the node given.\r\n * A postorder traversal.\r\n */\r\n public Iteratable<IRNode> bottomUp(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with this node and working toward the leaves.\r\n * A preorder traversal.\r\n */\r\n public Iteratable<IRNode> topDown(IRNode subtree);\r\n}", "public ArrayList<StatementParse> collapseExpression(ArrayList<StatementParse> expression){\n int index = 0;\n for (int i = 0; i < expression.size(); i++){\n if (expression.get(i) instanceof IntegerParse) {\n index = i;\n break;\n }\n // when all nodes are not constant\n if (i == expression.size() - 1){\n index = expression.size();\n }\n }\n\n int result = 0;\n for (int i = index; i < expression.size(); i++){\n StatementParse child = expression.get(i);\n if (child.isNegative()){\n result = result - ((IntegerParse) child).getValue();\n } else {\n result = result + ((IntegerParse) child).getValue();\n }\n }\n ArrayList<StatementParse> converted = new ArrayList<>(expression.subList(0, index));\n // collapse 0\n if (result == 0) return converted;\n // if result is negative, flip the sign\n IntegerParse integer;\n if (result < 0){\n result = - result;\n integer = new IntegerParse(result);\n integer.setNegative(true);\n } else {\n integer = new IntegerParse(result);\n }\n converted.add(integer);\n return converted;\n }", "public final void rule__AstExpressionList__ExpressionsAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25580:1: ( ( ruleAstExpression ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25581:1: ( ruleAstExpression )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25581:1: ( ruleAstExpression )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25582:1: ruleAstExpression\n {\n before(grammarAccess.getAstExpressionListAccess().getExpressionsAstExpressionParserRuleCall_1_0()); \n pushFollow(FOLLOW_ruleAstExpression_in_rule__AstExpressionList__ExpressionsAssignment_151402);\n ruleAstExpression();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionListAccess().getExpressionsAstExpressionParserRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public Expression toExpression()\n {\n return new ComparisonExpression(getType(this.compareType), lvalue.toExpression(), rvalue.toExpression());\n }", "public void visit(ExpressionStatement expressionStatement) {\n\t}", "private Type traverseTree(Node parsedTree) {\n Expression exp = new Expression(Type.EMPTY, Type.EMPTY, Connector.empty); // Creation of a new expression with empty fields\n\n\t\t// Determines the type from left to right of the given expression\n for (Node child : parsedTree.getChildren()) {\n \texp = evalExpressionAndSetLeft(addChildToExpression(child, exp));\n }\n return exp.getLeftExpressionType();\n }", "public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }", "private static UnaryExpr retrieveUnaryExpression(Expression expression) {\n return expression.asUnaryExpr();\n }", "public ExpressionTree()\n\t\t{\n\t root = null;\n\t\t}", "public ExpressionTree(TreeNode treeNode) {\n\t\tsuper(treeNode.getValue(), treeNode.getLeft(), treeNode.getRight());\n\t}", "protected Evaluable parseExpression() throws ParsingException {\n Evaluable sub = parseSubExpression();\n\n while (_token != null &&\n _token.type == TokenType.Operator &&\n \">=<==!=\".indexOf(_token.text) >= 0) {\n\n String op = _token.text;\n\n next(true);\n\n Evaluable sub2 = parseSubExpression();\n\n sub = new OperatorCallExpr(new Evaluable[] { sub, sub2 }, op);\n }\n\n return sub;\n }", "private void executeBinaryExpression(Tree tree) {\n ProgramState.Pop unstackBinary = programState.unstackValue(2);\n programState = unstackBinary.state;\n SymbolicValue symbolicValue = constraintManager.createSymbolicValue(tree);\n symbolicValue.computedFrom(unstackBinary.values);\n programState = programState.stackValue(symbolicValue);\n }", "public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}", "public static String evaluate( String expr ) \n {\n\tString[] arr = expr.split(\"\\\\s+\");\n\tLLStack<String> nums = new LLStack<String>();\n\tLLStack<String> noClose = new LLStack<String>();\n\tint op = 0;\n\n\tfor(String i : arr){ \n\t if(i.equals(\")\")){ //when you reach the closing parenthesis\n\t\tString top = noClose.pop(); //start going through this part of the expression\n\t\tnums.push(i); //add ( to stack for unload\n\t\t\n\t\twhile(!top.equals(\"(\")){ //until you reach the (, where the expression ends\n\t\t\t \n\t\t if(top.equals(\"+\")) op = 1;\n\t\t else if(top.equals(\"-\")) op = 2;\n\t\t else if(top.equals(\"*\")) op = 3;\n\n\t\t else nums.push(top); //if it's not an operand\n\n\t\t top = noClose.pop();\n\t\t}\n\n\t\tnoClose.push(unload(op, nums));\n\t }\n\t \n\t else noClose.push(i); //pushed into a stack of what's in this ()\n \n\t}//end of for loop \n \n\treturn noClose.peek();\n }", "@Generated(value={\"edu.jhu.cs.bsj.compiler.utils.generator.SourceGenerator\"})\npublic interface ExpressionNode extends Node, VariableInitializerNode\n{\n /**\n * Generates a deep copy of this node.\n * @param factory The node factory to use to create the deep copy.\n * @return The resulting deep copy node.\n */\n @Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);\n \n}", "public interface IExpressionRuntime\n{\n Object evaluate();\n}", "Expr expr() throws IOException {\n\t\tExpr e = term();\n\t\twhile (look.tag == '+' || look.tag == '-') {\n\t\t\tToken tok = look;\n\t\t\tmove();\n\t\t\te = new Arith(tok, e, term());\n\t\t}\n\t\treturn e;\n\t}", "public final PythonParser.arith_expr_return arith_expr() throws RecognitionException {\n PythonParser.arith_expr_return retval = new PythonParser.arith_expr_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n List list_right=null;\n PythonParser.term_return left = null;\n\n PythonParser.arith_op_return arith_op205 = null;\n\n PythonParser.term_return right = null;\n right = null;\n RewriteRuleSubtreeStream stream_arith_op=new RewriteRuleSubtreeStream(adaptor,\"rule arith_op\");\n RewriteRuleSubtreeStream stream_term=new RewriteRuleSubtreeStream(adaptor,\"rule term\");\n\n List ops = new ArrayList();\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1217:5: (left= term ( ( arith_op right+= term )+ | -> $left) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1217:7: left= term ( ( arith_op right+= term )+ | -> $left)\n {\n pushFollow(FOLLOW_term_in_arith_expr5284);\n left=term();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_term.add(left.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1218:9: ( ( arith_op right+= term )+ | -> $left)\n int alt98=2;\n int LA98_0 = input.LA(1);\n\n if ( ((LA98_0>=PLUS && LA98_0<=MINUS)) ) {\n alt98=1;\n }\n else if ( (LA98_0==EOF||LA98_0==NEWLINE||LA98_0==NAME||(LA98_0>=AND && LA98_0<=AS)||LA98_0==FOR||LA98_0==IF||(LA98_0>=IN && LA98_0<=IS)||(LA98_0>=NOT && LA98_0<=ORELSE)||(LA98_0>=RPAREN && LA98_0<=COMMA)||(LA98_0>=SEMI && LA98_0<=LEFTSHIFT)||LA98_0==RBRACK||(LA98_0>=RCURLY && LA98_0<=BACKQUOTE)) ) {\n alt98=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 98, 0, input);\n\n throw nvae;\n }\n switch (alt98) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1218:11: ( arith_op right+= term )+\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1218:11: ( arith_op right+= term )+\n int cnt97=0;\n loop97:\n do {\n int alt97=2;\n int LA97_0 = input.LA(1);\n\n if ( ((LA97_0>=PLUS && LA97_0<=MINUS)) ) {\n alt97=1;\n }\n\n\n switch (alt97) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1218:12: arith_op right+= term\n \t {\n \t pushFollow(FOLLOW_arith_op_in_arith_expr5297);\n \t arith_op205=arith_op();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_arith_op.add(arith_op205.getTree());\n \t pushFollow(FOLLOW_term_in_arith_expr5301);\n \t right=term();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_term.add(right.getTree());\n \t if (list_right==null) list_right=new ArrayList();\n \t list_right.add(right.getTree());\n\n \t if ( state.backtracking==0 ) {\n\n \t ops.add((arith_op205!=null?arith_op205.op:null));\n \t \n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt97 >= 1 ) break loop97;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(97, input);\n throw eee;\n }\n cnt97++;\n } while (true);\n\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1224:8: \n {\n\n // AST REWRITE\n // elements: left\n // token labels: \n // rule labels: retval, left\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_left=new RewriteRuleSubtreeStream(adaptor,\"rule left\",left!=null?left.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 1224:8: -> $left\n {\n adaptor.addChild(root_0, stream_left.nextTree());\n\n }\n\n retval.tree = root_0;}\n }\n break;\n\n }\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n if ( state.backtracking==0 ) {\n\n if (!ops.isEmpty()) {\n retval.tree = actions.makeBinOp((left!=null?((PythonTree)left.tree):null), ops, list_right);\n }\n\n }\n }\n catch (RewriteCardinalityException rce) {\n\n PythonTree badNode = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), null);\n retval.tree = badNode;\n errorHandler.error(\"Internal Parser Error\", badNode);\n \n }\n finally {\n }\n return retval;\n }", "public final AliaChecker.expr_return expr() throws RecognitionException {\n\t\tAliaChecker.expr_return retval = new AliaChecker.expr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tCommonTree root_0 = null;\n\n\t\tCommonTree _first_0 = null;\n\t\tCommonTree _last = null;\n\n\n\t\tCommonTree c=null;\n\t\tCommonTree id=null;\n\t\tCommonTree PRINT5=null;\n\t\tCommonTree READ6=null;\n\t\tCommonTree IF7=null;\n\t\tCommonTree DO8=null;\n\t\tCommonTree COLON9=null;\n\t\tCommonTree BECOMES10=null;\n\t\tCommonTree BECOMES11=null;\n\t\tCommonTree COMPOUND12=null;\n\t\tCommonTree CONST13=null;\n\t\tCommonTree BECOMES14=null;\n\t\tCommonTree COLON15=null;\n\t\tTreeRuleReturnScope to =null;\n\t\tTreeRuleReturnScope t1 =null;\n\t\tTreeRuleReturnScope t2 =null;\n\t\tTreeRuleReturnScope te1 =null;\n\t\tTreeRuleReturnScope te2 =null;\n\t\tTreeRuleReturnScope te =null;\n\t\tTreeRuleReturnScope tv =null;\n\t\tTreeRuleReturnScope o =null;\n\t\tTreeRuleReturnScope t =null;\n\t\tTreeRuleReturnScope ts =null;\n\t\tTreeRuleReturnScope texp =null;\n\t\tTreeRuleReturnScope typ =null;\n\t\tTreeRuleReturnScope prim =null;\n\n\t\tCommonTree c_tree=null;\n\t\tCommonTree id_tree=null;\n\t\tCommonTree PRINT5_tree=null;\n\t\tCommonTree READ6_tree=null;\n\t\tCommonTree IF7_tree=null;\n\t\tCommonTree DO8_tree=null;\n\t\tCommonTree COLON9_tree=null;\n\t\tCommonTree BECOMES10_tree=null;\n\t\tCommonTree BECOMES11_tree=null;\n\t\tCommonTree COMPOUND12_tree=null;\n\t\tCommonTree CONST13_tree=null;\n\t\tCommonTree BECOMES14_tree=null;\n\t\tCommonTree COLON15_tree=null;\n\t\tRewriteRuleNodeStream stream_AND_ALT=new RewriteRuleNodeStream(adaptor,\"token AND_ALT\");\n\t\tRewriteRuleNodeStream stream_GE=new RewriteRuleNodeStream(adaptor,\"token GE\");\n\t\tRewriteRuleNodeStream stream_LT=new RewriteRuleNodeStream(adaptor,\"token LT\");\n\t\tRewriteRuleNodeStream stream_MOD=new RewriteRuleNodeStream(adaptor,\"token MOD\");\n\t\tRewriteRuleNodeStream stream_CONST=new RewriteRuleNodeStream(adaptor,\"token CONST\");\n\t\tRewriteRuleNodeStream stream_NQ=new RewriteRuleNodeStream(adaptor,\"token NQ\");\n\t\tRewriteRuleNodeStream stream_BECOMES=new RewriteRuleNodeStream(adaptor,\"token BECOMES\");\n\t\tRewriteRuleNodeStream stream_NOT=new RewriteRuleNodeStream(adaptor,\"token NOT\");\n\t\tRewriteRuleNodeStream stream_MINUS=new RewriteRuleNodeStream(adaptor,\"token MINUS\");\n\t\tRewriteRuleNodeStream stream_AND=new RewriteRuleNodeStream(adaptor,\"token AND\");\n\t\tRewriteRuleNodeStream stream_PRINT=new RewriteRuleNodeStream(adaptor,\"token PRINT\");\n\t\tRewriteRuleNodeStream stream_COMPOUND=new RewriteRuleNodeStream(adaptor,\"token COMPOUND\");\n\t\tRewriteRuleNodeStream stream_COLON=new RewriteRuleNodeStream(adaptor,\"token COLON\");\n\t\tRewriteRuleNodeStream stream_READ=new RewriteRuleNodeStream(adaptor,\"token READ\");\n\t\tRewriteRuleNodeStream stream_IDENTIFIER=new RewriteRuleNodeStream(adaptor,\"token IDENTIFIER\");\n\t\tRewriteRuleNodeStream stream_OR=new RewriteRuleNodeStream(adaptor,\"token OR\");\n\t\tRewriteRuleNodeStream stream_OR_ALT=new RewriteRuleNodeStream(adaptor,\"token OR_ALT\");\n\t\tRewriteRuleNodeStream stream_GT=new RewriteRuleNodeStream(adaptor,\"token GT\");\n\t\tRewriteRuleNodeStream stream_PLUS=new RewriteRuleNodeStream(adaptor,\"token PLUS\");\n\t\tRewriteRuleNodeStream stream_MINUS_OP=new RewriteRuleNodeStream(adaptor,\"token MINUS_OP\");\n\t\tRewriteRuleNodeStream stream_PLUS_OP=new RewriteRuleNodeStream(adaptor,\"token PLUS_OP\");\n\t\tRewriteRuleNodeStream stream_DIV=new RewriteRuleNodeStream(adaptor,\"token DIV\");\n\t\tRewriteRuleNodeStream stream_EQ=new RewriteRuleNodeStream(adaptor,\"token EQ\");\n\t\tRewriteRuleNodeStream stream_TIMES=new RewriteRuleNodeStream(adaptor,\"token TIMES\");\n\t\tRewriteRuleNodeStream stream_LE=new RewriteRuleNodeStream(adaptor,\"token LE\");\n\t\tRewriteRuleSubtreeStream stream_varlist=new RewriteRuleSubtreeStream(adaptor,\"rule varlist\");\n\t\tRewriteRuleSubtreeStream stream_statements=new RewriteRuleSubtreeStream(adaptor,\"rule statements\");\n\t\tRewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,\"rule expr\");\n\t\tRewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,\"rule type\");\n\t\tRewriteRuleSubtreeStream stream_operand=new RewriteRuleSubtreeStream(adaptor,\"rule operand\");\n\t\tRewriteRuleSubtreeStream stream_exprlist=new RewriteRuleSubtreeStream(adaptor,\"rule exprlist\");\n\t\tRewriteRuleSubtreeStream stream_primitive=new RewriteRuleSubtreeStream(adaptor,\"rule primitive\");\n\n\t\ttry {\n\t\t\t// src\\\\alia\\\\AliaChecker.g:57:5: (to= operand | ( ^(c= OR t1= expr t2= expr ) | ^(c= OR_ALT t1= expr t2= expr ) | ^(c= AND t1= expr t2= expr ) | ^(c= AND_ALT t1= expr t2= expr ) ) -> ^( $c expr expr TYPE[typename] ) | ( ^(c= EQ t1= expr t2= expr ) | ^(c= NQ t1= expr t2= expr ) | ^(c= LE t1= expr t2= expr ) | ^(c= GE t1= expr t2= expr ) | ^(c= GT t1= expr t2= expr ) | ^(c= LT t1= expr t2= expr ) ) -> ^( $c expr expr TYPE[typename] ) | ( ^(c= PLUS te1= expr te2= expr ) | ^(c= MINUS te1= expr te2= expr ) | ^(c= TIMES te1= expr te2= expr ) | ^(c= DIV te1= expr te2= expr ) | ^(c= MOD te1= expr te2= expr ) ) -> ^( $c expr expr TYPE[typename] ) | ^( PRINT te= exprlist ) -> ^( PRINT TYPE[typename] exprlist ) | ^( READ tv= varlist ) -> ^( READ TYPE[typename] varlist ) | ^(c= ( NOT ) to= operand ) -> ^( $c operand TYPE[typename] ) | ^(c= ( PLUS_OP | MINUS_OP ) o= operand ) -> ^( $c operand TYPE[typename] ) | ^( IF t= statements ^( DO ts= statements ) (texp= else_stmnt )? ) | ^( COLON ^( BECOMES id= IDENTIFIER t1= expr ) typ= type ) -> ^( BECOMES ^( IDENTIFIER TYPE[typename] ID[identifier] ) expr ) | ^( BECOMES id= IDENTIFIER t1= expr ) -> ^( BECOMES ^( IDENTIFIER TYPE[typename] ID[identifier] ) expr ) | ^( COMPOUND t= statements ) -> ^( COMPOUND TYPE[typename] statements ) | ^( CONST id= IDENTIFIER BECOMES prim= primitive ( COLON typ= type )? ) ->)\n\t\t\tint alt10=13;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase CHAR_EXPR:\n\t\t\tcase FALSE:\n\t\t\tcase IDENTIFIER:\n\t\t\tcase NUMBER:\n\t\t\tcase TRUE:\n\t\t\t\t{\n\t\t\t\talt10=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AND:\n\t\t\tcase AND_ALT:\n\t\t\tcase OR:\n\t\t\tcase OR_ALT:\n\t\t\t\t{\n\t\t\t\talt10=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase EQ:\n\t\t\tcase GE:\n\t\t\tcase GT:\n\t\t\tcase LE:\n\t\t\tcase LT:\n\t\t\tcase NQ:\n\t\t\t\t{\n\t\t\t\talt10=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DIV:\n\t\t\tcase MINUS:\n\t\t\tcase MOD:\n\t\t\tcase PLUS:\n\t\t\tcase TIMES:\n\t\t\t\t{\n\t\t\t\talt10=4;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PRINT:\n\t\t\t\t{\n\t\t\t\talt10=5;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase READ:\n\t\t\t\t{\n\t\t\t\talt10=6;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase NOT:\n\t\t\t\t{\n\t\t\t\talt10=7;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MINUS_OP:\n\t\t\tcase PLUS_OP:\n\t\t\t\t{\n\t\t\t\talt10=8;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase IF:\n\t\t\t\t{\n\t\t\t\talt10=9;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase COLON:\n\t\t\t\t{\n\t\t\t\talt10=10;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BECOMES:\n\t\t\t\t{\n\t\t\t\talt10=11;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase COMPOUND:\n\t\t\t\t{\n\t\t\t\talt10=12;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CONST:\n\t\t\t\t{\n\t\t\t\talt10=13;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 10, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt10) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:57:9: to= operand\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_operand_in_expr310);\n\t\t\t\t\tto=operand();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tadaptor.addChild(root_0, to.getTree());\n\n\n\t\t\t\t\t\t\t\tretval.type = (to!=null?((AliaChecker.operand_return)to).type:null);\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:61:9: ( ^(c= OR t1= expr t2= expr ) | ^(c= OR_ALT t1= expr t2= expr ) | ^(c= AND t1= expr t2= expr ) | ^(c= AND_ALT t1= expr t2= expr ) )\n\t\t\t\t\t{\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:61:9: ( ^(c= OR t1= expr t2= expr ) | ^(c= OR_ALT t1= expr t2= expr ) | ^(c= AND t1= expr t2= expr ) | ^(c= AND_ALT t1= expr t2= expr ) )\n\t\t\t\t\tint alt4=4;\n\t\t\t\t\tswitch ( input.LA(1) ) {\n\t\t\t\t\tcase OR:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt4=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase OR_ALT:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt4=2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AND:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt4=3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AND_ALT:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt4=4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 4, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt4) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:61:10: ^(c= OR t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,OR,FOLLOW_OR_in_expr328); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_OR.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr332);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr336);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:62:9: ^(c= OR_ALT t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,OR_ALT,FOLLOW_OR_ALT_in_expr350); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_OR_ALT.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr354);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr358);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:63:9: ^(c= AND t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,AND,FOLLOW_AND_in_expr372); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_AND.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr376);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr380);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:64:9: ^(c= AND_ALT t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,AND_ALT,FOLLOW_AND_ALT_in_expr394); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_AND_ALT.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr398);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr402);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\t checkEqualType((t1!=null?((AliaChecker.expr_return)t1).type:null), (t2!=null?((AliaChecker.expr_return)t2).type:null), (t1!=null?((CommonTree)t1.getTree()):null));\n\t\t\t\t\t checkBoolType((t1!=null?((AliaChecker.expr_return)t1).type:null), (t1!=null?((CommonTree)t1.getTree()):null));\n\t\t\t\t\t retval.type = new _Bool();\n\t\t\t\t\t String typename = String.valueOf(retval.type);\n\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: expr, c, expr\n\t\t\t\t\t// token labels: c\n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleNodeStream stream_c=new RewriteRuleNodeStream(adaptor,\"token c\",c);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 71:7: -> ^( $c expr expr TYPE[typename] )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:71:10: ^( $c expr expr TYPE[typename] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(stream_c.nextNode(), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:72:9: ( ^(c= EQ t1= expr t2= expr ) | ^(c= NQ t1= expr t2= expr ) | ^(c= LE t1= expr t2= expr ) | ^(c= GE t1= expr t2= expr ) | ^(c= GT t1= expr t2= expr ) | ^(c= LT t1= expr t2= expr ) )\n\t\t\t\t\t{\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:72:9: ( ^(c= EQ t1= expr t2= expr ) | ^(c= NQ t1= expr t2= expr ) | ^(c= LE t1= expr t2= expr ) | ^(c= GE t1= expr t2= expr ) | ^(c= GT t1= expr t2= expr ) | ^(c= LT t1= expr t2= expr ) )\n\t\t\t\t\tint alt5=6;\n\t\t\t\t\tswitch ( input.LA(1) ) {\n\t\t\t\t\tcase EQ:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt5=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase NQ:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt5=2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LE:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt5=3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GE:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt5=4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase GT:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt5=5;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LT:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt5=6;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 5, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt5) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:72:10: ^(c= EQ t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,EQ,FOLLOW_EQ_in_expr446); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_EQ.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr450);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr454);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:73:9: ^(c= NQ t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,NQ,FOLLOW_NQ_in_expr468); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_NQ.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr472);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr476);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:74:9: ^(c= LE t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,LE,FOLLOW_LE_in_expr490); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_LE.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr494);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr498);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:75:9: ^(c= GE t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,GE,FOLLOW_GE_in_expr512); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_GE.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr516);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr520);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:76:9: ^(c= GT t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,GT,FOLLOW_GT_in_expr534); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_GT.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr538);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr542);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:77:9: ^(c= LT t1= expr t2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,LT,FOLLOW_LT_in_expr556); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_LT.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr560);\n\t\t\t\t\t\t\tt1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr564);\n\t\t\t\t\t\t\tt2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(t2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\t\t \t checkEqualType((t1!=null?((AliaChecker.expr_return)t1).type:null), (t2!=null?((AliaChecker.expr_return)t2).type:null), (t1!=null?((CommonTree)t1.getTree()):null));\n\t\t\t\t\t\t \t retval.type = new _Bool();\n\t\t\t\t\t \tString typename = String.valueOf(retval.type);\n\t\t\t\t\t\t \t\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: expr, expr, c\n\t\t\t\t\t// token labels: c\n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleNodeStream stream_c=new RewriteRuleNodeStream(adaptor,\"token c\",c);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 83:6: -> ^( $c expr expr TYPE[typename] )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:83:9: ^( $c expr expr TYPE[typename] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(stream_c.nextNode(), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:84:9: ( ^(c= PLUS te1= expr te2= expr ) | ^(c= MINUS te1= expr te2= expr ) | ^(c= TIMES te1= expr te2= expr ) | ^(c= DIV te1= expr te2= expr ) | ^(c= MOD te1= expr te2= expr ) )\n\t\t\t\t\t{\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:84:9: ( ^(c= PLUS te1= expr te2= expr ) | ^(c= MINUS te1= expr te2= expr ) | ^(c= TIMES te1= expr te2= expr ) | ^(c= DIV te1= expr te2= expr ) | ^(c= MOD te1= expr te2= expr ) )\n\t\t\t\t\tint alt6=5;\n\t\t\t\t\tswitch ( input.LA(1) ) {\n\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt6=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MINUS:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt6=2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TIMES:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt6=3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DIV:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt6=4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MOD:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt6=5;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 6, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt6) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:84:10: ^(c= PLUS te1= expr te2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,PLUS,FOLLOW_PLUS_in_expr606); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_PLUS.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr610);\n\t\t\t\t\t\t\tte1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr614);\n\t\t\t\t\t\t\tte2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:85:9: ^(c= MINUS te1= expr te2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,MINUS,FOLLOW_MINUS_in_expr628); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_MINUS.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr632);\n\t\t\t\t\t\t\tte1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr636);\n\t\t\t\t\t\t\tte2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:86:9: ^(c= TIMES te1= expr te2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,TIMES,FOLLOW_TIMES_in_expr650); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_TIMES.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr654);\n\t\t\t\t\t\t\tte1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr658);\n\t\t\t\t\t\t\tte2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:87:9: ^(c= DIV te1= expr te2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,DIV,FOLLOW_DIV_in_expr672); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_DIV.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr676);\n\t\t\t\t\t\t\tte1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr680);\n\t\t\t\t\t\t\tte2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:88:9: ^(c= MOD te1= expr te2= expr )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,MOD,FOLLOW_MOD_in_expr694); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_MOD.add(c);\n\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr698);\n\t\t\t\t\t\t\tte1=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te1.getTree());\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr702);\n\t\t\t\t\t\t\tte2=expr();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_expr.add(te2.getTree());\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t \n\t\t\t\t\t\t \tcheckMathType((te1!=null?((AliaChecker.expr_return)te1).type:null), (te2!=null?((AliaChecker.expr_return)te2).type:null), (te1!=null?((CommonTree)te1.getTree()):null));\n\t\t\t\t\t\t \tretval.type = new _Int();\n\t\t\t\t\t \tString typename = String.valueOf(retval.type);\n\t\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: c, expr, expr\n\t\t\t\t\t// token labels: c\n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleNodeStream stream_c=new RewriteRuleNodeStream(adaptor,\"token c\",c);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 94:6: -> ^( $c expr expr TYPE[typename] )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:94:9: ^( $c expr expr TYPE[typename] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(stream_c.nextNode(), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:95:7: ^( PRINT te= exprlist )\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tPRINT5=(CommonTree)match(input,PRINT,FOLLOW_PRINT_in_expr739); \n\t\t\t\t\t \n\t\t\t\t\tstream_PRINT.add(PRINT5);\n\n\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_exprlist_in_expr743);\n\t\t\t\t\tte=exprlist();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_exprlist.add(te.getTree());\n\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t \t\tretval.type = (te!=null?((AliaChecker.exprlist_return)te).type:null);\n\t\t\t\t\t \tString typename = String.valueOf(retval.type);\n\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: exprlist, PRINT\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 100:6: -> ^( PRINT TYPE[typename] exprlist )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:100:9: ^( PRINT TYPE[typename] exprlist )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(\n\t\t\t\t\t\tstream_PRINT.nextNode()\n\t\t\t\t\t\t, root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_exprlist.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:101:7: ^( READ tv= varlist )\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tREAD6=(CommonTree)match(input,READ,FOLLOW_READ_in_expr776); \n\t\t\t\t\t \n\t\t\t\t\tstream_READ.add(READ6);\n\n\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_varlist_in_expr780);\n\t\t\t\t\ttv=varlist();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_varlist.add(tv.getTree());\n\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t \t\tretval.type = (tv!=null?((AliaChecker.varlist_return)tv).type:null);\n\t\t\t\t\t \tString typename = String.valueOf(retval.type);\n\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: varlist, READ\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 106:6: -> ^( READ TYPE[typename] varlist )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:106:9: ^( READ TYPE[typename] varlist )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(\n\t\t\t\t\t\tstream_READ.nextNode()\n\t\t\t\t\t\t, root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_varlist.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:107:4: ^(c= ( NOT ) to= operand )\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:107:8: ( NOT )\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:107:9: NOT\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tc=(CommonTree)match(input,NOT,FOLLOW_NOT_in_expr813); \n\t\t\t\t\t \n\t\t\t\t\tstream_NOT.add(c);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_operand_in_expr818);\n\t\t\t\t\tto=operand();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_operand.add(to.getTree());\n\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t \t\t retval.type = (to!=null?((AliaChecker.operand_return)to).type:null);\n\t\t\t\t\t \tString typename = String.valueOf(retval.type);\n\t\t\t\t\t \tcheckBoolType((to!=null?((AliaChecker.operand_return)to).type:null), (to!=null?((CommonTree)to.getTree()):null));\n\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: c, operand\n\t\t\t\t\t// token labels: c\n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleNodeStream stream_c=new RewriteRuleNodeStream(adaptor,\"token c\",c);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 113:6: -> ^( $c operand TYPE[typename] )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:113:9: ^( $c operand TYPE[typename] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(stream_c.nextNode(), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_operand.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:114:6: ^(c= ( PLUS_OP | MINUS_OP ) o= operand )\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:114:10: ( PLUS_OP | MINUS_OP )\n\t\t\t\t\tint alt7=2;\n\t\t\t\t\tint LA7_0 = input.LA(1);\n\t\t\t\t\tif ( (LA7_0==PLUS_OP) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_0==MINUS_OP) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt7) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:114:12: PLUS_OP\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,PLUS_OP,FOLLOW_PLUS_OP_in_expr855); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_PLUS_OP.add(c);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:114:22: MINUS_OP\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tc=(CommonTree)match(input,MINUS_OP,FOLLOW_MINUS_OP_in_expr859); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_MINUS_OP.add(c);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_operand_in_expr865);\n\t\t\t\t\to=operand();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_operand.add(o.getTree());\n\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t retval.type = (o!=null?((AliaChecker.operand_return)o).type:null);\n\t\t\t\t\t String typename = String.valueOf(retval.type);\n\t\t\t\t\t checkEqualType((o!=null?((AliaChecker.operand_return)o).type:null), new _Int(), (o!=null?((CommonTree)o.getTree()):null));\n\t\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: operand, c\n\t\t\t\t\t// token labels: c\n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleNodeStream stream_c=new RewriteRuleNodeStream(adaptor,\"token c\",c);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 120:6: -> ^( $c operand TYPE[typename] )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:120:9: ^( $c operand TYPE[typename] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(stream_c.nextNode(), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_operand.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:121:9: ^( IF t= statements ^( DO ts= statements ) (texp= else_stmnt )? )\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tIF7=(CommonTree)match(input,IF,FOLLOW_IF_in_expr901); \n\t\t\t\t\tIF7_tree = (CommonTree)adaptor.dupNode(IF7);\n\n\n\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(IF7_tree, root_1);\n\n\n\t\t\t\t\t \t\t\t\tsymTab.openScope(); // Open scope for conditional statements, the scope is the same for the IF and ELSEIF conditions\n\t\t\t\t\t \t\t\t\n\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\tpushFollow(FOLLOW_statements_in_expr919);\n\t\t\t\t\t\tt=statements();\n\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\tadaptor.addChild(root_1, t.getTree());\n\n\n\t\t\t\t\t\t \t\t\t\tsymTab.openScope(); // Open scope for the first statement\n\t\t\t\t\t\t \t\t\t\n\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree _save_last_2 = _last;\n\t\t\t\t\t\tCommonTree _first_2 = null;\n\t\t\t\t\t\tCommonTree root_2 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\tDO8=(CommonTree)match(input,DO,FOLLOW_DO_in_expr936); \n\t\t\t\t\t\tDO8_tree = (CommonTree)adaptor.dupNode(DO8);\n\n\n\t\t\t\t\t\troot_2 = (CommonTree)adaptor.becomeRoot(DO8_tree, root_2);\n\n\t\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_statements_in_expr946);\n\t\t\t\t\t\t\tts=statements();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tadaptor.addChild(root_2, ts.getTree());\n\n\n\t\t\t\t\t\t\t\t \t\t\tcheckBoolType((t!=null?((AliaChecker.statements_return)t).type:null), (ts!=null?((CommonTree)ts.getTree()):null));\n\t\t\t\t\t\t\t\t \t\t\tsymTab.closeScope(); // Close scope for the first statement\n\t\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t\t}\n\t\t\t\t\t\tadaptor.addChild(root_1, root_2);\n\t\t\t\t\t\t_last = _save_last_2;\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:136:11: (texp= else_stmnt )?\n\t\t\t\t\t\tint alt8=2;\n\t\t\t\t\t\tint LA8_0 = input.LA(1);\n\t\t\t\t\t\tif ( ((LA8_0 >= ELSE && LA8_0 <= ELSEIF)) ) {\n\t\t\t\t\t\t\talt8=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tswitch (alt8) {\n\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:136:11: texp= else_stmnt\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\t\tpushFollow(FOLLOW_else_stmnt_in_expr972);\n\t\t\t\t\t\t\t\ttexp=else_stmnt();\n\t\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\t\tadaptor.addChild(root_1, texp.getTree());\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t \t\t\t\tsymTab.closeScope(); // Close scope for the conditional statements\n\t\t\t\t\t\t\t \t\t\tcheckBoolType((t!=null?((AliaChecker.statements_return)t).type:null), (t!=null?((CommonTree)t.getTree()):null));\n\t\t\t\t\t\t\t \t\t\tretval.type = checkTypesIf((ts!=null?((AliaChecker.statements_return)ts).type:null),(texp!=null?((AliaChecker.else_stmnt_return)texp).type:null));\n\t\t\t\t\t\t \t\t\t\n\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t}\n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:143:9: ^( COLON ^( BECOMES id= IDENTIFIER t1= expr ) typ= type )\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tCOLON9=(CommonTree)match(input,COLON,FOLLOW_COLON_in_expr999); \n\t\t\t\t\t \n\t\t\t\t\tstream_COLON.add(COLON9);\n\n\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_2 = _last;\n\t\t\t\t\tCommonTree _first_2 = null;\n\t\t\t\t\tCommonTree root_2 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tBECOMES10=(CommonTree)match(input,BECOMES,FOLLOW_BECOMES_in_expr1002); \n\t\t\t\t\t \n\t\t\t\t\tstream_BECOMES.add(BECOMES10);\n\n\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tid=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_expr1006); \n\t\t\t\t\t \n\t\t\t\t\tstream_IDENTIFIER.add(id);\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr1010);\n\t\t\t\t\tt1=expr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\tadaptor.addChild(root_1, root_2);\n\t\t\t\t\t_last = _save_last_2;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_type_in_expr1015);\n\t\t\t\t\ttyp=type();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_type.add(typ.getTree());\n\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t \n\t\t\t\t\t \t_Type declType = checkEqualType((t1!=null?((AliaChecker.expr_return)t1).type:null), (typ!=null?((AliaChecker.type_return)typ).type:null), (t1!=null?((CommonTree)t1.getTree()):null));\n\t\t\t\t\t \tdeclare((id!=null?id.getText():null), declType, (t1!=null?((CommonTree)t1.getTree()):null));\n\t\t\t\t\t \t\tretval.type = declType;\n\t\t\t\t\t \t\t\n\t\t\t\t\t \tString typename = String.valueOf(retval.type);\n\t\t\t\t\t \tString identifier = String.valueOf(getIdentifier((id!=null?id.getText():null), id_tree));\n\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: expr, BECOMES, IDENTIFIER\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 152:9: -> ^( BECOMES ^( IDENTIFIER TYPE[typename] ID[identifier] ) expr )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:152:12: ^( BECOMES ^( IDENTIFIER TYPE[typename] ID[identifier] ) expr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(\n\t\t\t\t\t\tstream_BECOMES.nextNode()\n\t\t\t\t\t\t, root_1);\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:152:22: ^( IDENTIFIER TYPE[typename] ID[identifier] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_2 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_2 = (CommonTree)adaptor.becomeRoot(\n\t\t\t\t\t\tstream_IDENTIFIER.nextNode()\n\t\t\t\t\t\t, root_2);\n\t\t\t\t\t\tadaptor.addChild(root_2, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_2, (CommonTree)adaptor.create(ID, identifier));\n\t\t\t\t\t\tadaptor.addChild(root_1, root_2);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:153:9: ^( BECOMES id= IDENTIFIER t1= expr )\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tBECOMES11=(CommonTree)match(input,BECOMES,FOLLOW_BECOMES_in_expr1063); \n\t\t\t\t\t \n\t\t\t\t\tstream_BECOMES.add(BECOMES11);\n\n\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tid=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_expr1067); \n\t\t\t\t\t \n\t\t\t\t\tstream_IDENTIFIER.add(id);\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_expr_in_expr1071);\n\t\t\t\t\tt1=expr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_expr.add(t1.getTree());\n\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t \n\t\t\t\t\t \tdeclare((id!=null?id.getText():null), (t1!=null?((AliaChecker.expr_return)t1).type:null), (t1!=null?((CommonTree)t1.getTree()):null));\n\t\t\t\t\t \t\tretval.type = (t1!=null?((AliaChecker.expr_return)t1).type:null);\n\t\t\t\t\t \t\tcheckNotVoid(retval.type, (t1!=null?((CommonTree)t1.getTree()):null));\n\t\t\t\t\t \t\t\n\t\t\t\t\t \tString typename = String.valueOf(retval.type);\n\t\t\t\t\t \tString identifier = String.valueOf(getIdentifier((id!=null?id.getText():null), id_tree));\n\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: BECOMES, expr, IDENTIFIER\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 162:6: -> ^( BECOMES ^( IDENTIFIER TYPE[typename] ID[identifier] ) expr )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:162:9: ^( BECOMES ^( IDENTIFIER TYPE[typename] ID[identifier] ) expr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(\n\t\t\t\t\t\tstream_BECOMES.nextNode()\n\t\t\t\t\t\t, root_1);\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:162:19: ^( IDENTIFIER TYPE[typename] ID[identifier] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_2 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_2 = (CommonTree)adaptor.becomeRoot(\n\t\t\t\t\t\tstream_IDENTIFIER.nextNode()\n\t\t\t\t\t\t, root_2);\n\t\t\t\t\t\tadaptor.addChild(root_2, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_2, (CommonTree)adaptor.create(ID, identifier));\n\t\t\t\t\t\tadaptor.addChild(root_1, root_2);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:163:9: ^( COMPOUND t= statements )\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tCOMPOUND12=(CommonTree)match(input,COMPOUND,FOLLOW_COMPOUND_in_expr1116); \n\t\t\t\t\t \n\t\t\t\t\tstream_COMPOUND.add(COMPOUND12);\n\n\t\t\t\t\t // symTab.openScope\n\t\t\t\t\t \t\t\tsymTab.openScope();\n\t\t\t\t\t \t\t\n\t\t\t\t\tif ( input.LA(1)==Token.DOWN ) {\n\t\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\tpushFollow(FOLLOW_statements_in_expr1132);\n\t\t\t\t\t\tt=statements();\n\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\tstream_statements.add(t.getTree());\n\t\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\t}\n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t \t// closeScope\n\t\t\t\t\t \tsymTab.closeScope();\n\t\t\t\t\t \t\tretval.type = (t!=null?((AliaChecker.statements_return)t).type:null);\n\t\t\t\t\t \tString typename = String.valueOf(retval.type);\n\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: COMPOUND, statements\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 174:6: -> ^( COMPOUND TYPE[typename] statements )\n\t\t\t\t\t{\n\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:174:9: ^( COMPOUND TYPE[typename] statements )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t\troot_1 = (CommonTree)adaptor.becomeRoot(\n\t\t\t\t\t\tstream_COMPOUND.nextNode()\n\t\t\t\t\t\t, root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (CommonTree)adaptor.create(TYPE, typename));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_statements.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 13 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:175:9: ^( CONST id= IDENTIFIER BECOMES prim= primitive ( COLON typ= type )? )\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t{\n\t\t\t\t\tCommonTree _save_last_1 = _last;\n\t\t\t\t\tCommonTree _first_1 = null;\n\t\t\t\t\tCommonTree root_1 = (CommonTree)adaptor.nil();\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tCONST13=(CommonTree)match(input,CONST,FOLLOW_CONST_in_expr1170); \n\t\t\t\t\t \n\t\t\t\t\tstream_CONST.add(CONST13);\n\n\t\t\t\t\tmatch(input, Token.DOWN, null); \n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tid=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_expr1174); \n\t\t\t\t\t \n\t\t\t\t\tstream_IDENTIFIER.add(id);\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tBECOMES14=(CommonTree)match(input,BECOMES,FOLLOW_BECOMES_in_expr1176); \n\t\t\t\t\t \n\t\t\t\t\tstream_BECOMES.add(BECOMES14);\n\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_primitive_in_expr1180);\n\t\t\t\t\tprim=primitive();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_primitive.add(prim.getTree());\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:175:54: ( COLON typ= type )?\n\t\t\t\t\tint alt9=2;\n\t\t\t\t\tint LA9_0 = input.LA(1);\n\t\t\t\t\tif ( (LA9_0==COLON) ) {\n\t\t\t\t\t\talt9=1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt9) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:175:55: COLON typ= type\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tCOLON15=(CommonTree)match(input,COLON,FOLLOW_COLON_in_expr1183); \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tstream_COLON.add(COLON15);\n\n\t\t\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\t\t\tpushFollow(FOLLOW_type_in_expr1187);\n\t\t\t\t\t\t\ttyp=type();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_type.add(typ.getTree());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmatch(input, Token.UP, null); \n\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t_last = _save_last_1;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t _Type declType = checkEqualType((prim!=null?((AliaChecker.primitive_return)prim).type:null), (typ!=null?((AliaChecker.type_return)typ).type:null), (prim!=null?((CommonTree)prim.getTree()):null));\n\t\t\t\t\t declareConst((id!=null?id.getText():null), declType, prim, (prim!=null?((CommonTree)prim.getTree()):null));\n\t\t\t\t\t retval.type = declType;\n\t\t\t\t\t String typename = String.valueOf(retval.type);\n\t\t\t\t\t String identifier = String.valueOf(getIdentifier((id!=null?id.getText():null), (prim!=null?((CommonTree)prim.getTree()):null)));\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (CommonTree)adaptor.nil();\n\t\t\t\t\t// 183:7: ->\n\t\t\t\t\t{\n\t\t\t\t\t\troot_0 = null;\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\n\t\t}\n\t\t \n\t\t catch (RecognitionException e) { \n\t\t \tif(!e.getMessage().equals(\"\")) {\n\t\t\t\t\tSystem.err.println(\"Exception!:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow (new AliaException(\"\"));\n\t\t } \n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public final JavaliParser.expr_return expr() throws RecognitionException {\n\t\tJavaliParser.expr_return retval = new JavaliParser.expr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tParserRuleReturnScope leftExpr =null;\n\t\tParserRuleReturnScope op =null;\n\t\tParserRuleReturnScope rightExpr =null;\n\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_compOp=new RewriteRuleSubtreeStream(adaptor,\"rule compOp\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:2: (leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) ) )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:4: leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1531);\n\t\t\tleftExpr=simpleExpr();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_simpleExpr.add(leftExpr.getTree());\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:428:3: ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\tint alt25=2;\n\t\t\tint LA25_0 = input.LA(1);\n\t\t\tif ( (LA25_0==70||LA25_0==73||LA25_0==77) ) {\n\t\t\t\talt25=1;\n\t\t\t}\n\t\t\telse if ( (LA25_0==66||(LA25_0 >= 78 && LA25_0 <= 79)||(LA25_0 >= 81 && LA25_0 <= 83)) ) {\n\t\t\t\talt25=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 25, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt25) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:429:4: \n\t\t\t\t\t{\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: leftExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 429:4: -> $leftExpr\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, stream_leftExpr.nextTree());\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:430:5: op= compOp rightExpr= simpleExpr\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_compOp_in_expr1552);\n\t\t\t\t\top=compOp();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_compOp.add(op.getTree());\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1556);\n\t\t\t\t\trightExpr=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(rightExpr.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: compOp, leftExpr, rightExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval, rightExpr\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_rightExpr=new RewriteRuleSubtreeStream(adaptor,\"rule rightExpr\",rightExpr!=null?rightExpr.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 431:4: -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:431:7: ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(BinaryOp, (op!=null?(op.start):null), \"BinaryOp\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_leftExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_compOp.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_rightExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public String toStringAST()\r\n/* 75: */ {\r\n/* 76: 94 */ StringBuilder s = new StringBuilder();\r\n/* 77: */ \r\n/* 78: 96 */ s.append('{');\r\n/* 79: 97 */ int count = getChildCount();\r\n/* 80: 98 */ for (int c = 0; c < count; c++)\r\n/* 81: */ {\r\n/* 82: 99 */ if (c > 0) {\r\n/* 83:100 */ s.append(',');\r\n/* 84: */ }\r\n/* 85:102 */ s.append(getChild(c).toStringAST());\r\n/* 86: */ }\r\n/* 87:104 */ s.append('}');\r\n/* 88:105 */ return s.toString();\r\n/* 89: */ }", "final public ASTExpression Expression() throws ParseException {\r\n /*@bgen(jjtree) Expression */\r\n ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);\r\n boolean jjtc000 = true;\r\n jjtree.openNodeScope(jjtn000);\r\n try {\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case QUOTE:\r\n StringLiteral();\r\n jj_consume_token(61);\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n case IDENTIFIER:\r\n case INTEGER:\r\n case NOT:\r\n case SUB:\r\n case FLOATING_POINT_LITERAL:\r\n case 59:\r\n LogicalORExpression();\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n default:\r\n jj_la1[45] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n } catch (Throwable jjte000) {\r\n if (jjtc000) {\r\n jjtree.clearNodeScope(jjtn000);\r\n jjtc000 = false;\r\n } else {\r\n jjtree.popNode();\r\n }\r\n if (jjte000 instanceof RuntimeException) {\r\n {if (true) throw (RuntimeException)jjte000;}\r\n }\r\n if (jjte000 instanceof ParseException) {\r\n {if (true) throw (ParseException)jjte000;}\r\n }\r\n {if (true) throw (Error)jjte000;}\r\n } finally {\r\n if (jjtc000) {\r\n jjtree.closeNodeScope(jjtn000, true);\r\n }\r\n }\r\n throw new Error(\"Missing return statement in function\");\r\n }", "public final AstValidator.expr_return expr() throws RecognitionException {\n AstValidator.expr_return retval = new AstValidator.expr_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree PLUS213=null;\n CommonTree MINUS216=null;\n CommonTree STAR219=null;\n CommonTree DIV222=null;\n CommonTree PERCENT225=null;\n CommonTree CAST_EXPR228=null;\n CommonTree NEG233=null;\n CommonTree CAST_EXPR235=null;\n CommonTree EXPR_IN_PAREN238=null;\n AstValidator.expr_return expr214 =null;\n\n AstValidator.expr_return expr215 =null;\n\n AstValidator.expr_return expr217 =null;\n\n AstValidator.expr_return expr218 =null;\n\n AstValidator.expr_return expr220 =null;\n\n AstValidator.expr_return expr221 =null;\n\n AstValidator.expr_return expr223 =null;\n\n AstValidator.expr_return expr224 =null;\n\n AstValidator.expr_return expr226 =null;\n\n AstValidator.expr_return expr227 =null;\n\n AstValidator.type_return type229 =null;\n\n AstValidator.expr_return expr230 =null;\n\n AstValidator.const_expr_return const_expr231 =null;\n\n AstValidator.var_expr_return var_expr232 =null;\n\n AstValidator.expr_return expr234 =null;\n\n AstValidator.type_cast_return type_cast236 =null;\n\n AstValidator.expr_return expr237 =null;\n\n AstValidator.expr_return expr239 =null;\n\n\n CommonTree PLUS213_tree=null;\n CommonTree MINUS216_tree=null;\n CommonTree STAR219_tree=null;\n CommonTree DIV222_tree=null;\n CommonTree PERCENT225_tree=null;\n CommonTree CAST_EXPR228_tree=null;\n CommonTree NEG233_tree=null;\n CommonTree CAST_EXPR235_tree=null;\n CommonTree EXPR_IN_PAREN238_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:411:6: ( ^( PLUS expr expr ) | ^( MINUS expr expr ) | ^( STAR expr expr ) | ^( DIV expr expr ) | ^( PERCENT expr expr ) | ^( CAST_EXPR type expr ) | const_expr | var_expr | ^( NEG expr ) | ^( CAST_EXPR type_cast expr ) | ^( EXPR_IN_PAREN expr ) )\n int alt58=11;\n switch ( input.LA(1) ) {\n case PLUS:\n {\n alt58=1;\n }\n break;\n case MINUS:\n {\n int LA58_2 = input.LA(2);\n\n if ( (synpred111_AstValidator()) ) {\n alt58=2;\n }\n else if ( (synpred116_AstValidator()) ) {\n alt58=7;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 58, 2, input);\n\n throw nvae;\n\n }\n }\n break;\n case STAR:\n {\n alt58=3;\n }\n break;\n case DIV:\n {\n alt58=4;\n }\n break;\n case PERCENT:\n {\n alt58=5;\n }\n break;\n case CAST_EXPR:\n {\n int LA58_6 = input.LA(2);\n\n if ( (synpred115_AstValidator()) ) {\n alt58=6;\n }\n else if ( (synpred119_AstValidator()) ) {\n alt58=10;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 58, 6, input);\n\n throw nvae;\n\n }\n }\n break;\n case BIGDECIMALNUMBER:\n case BIGINTEGERNUMBER:\n case DOUBLENUMBER:\n case FALSE:\n case FLOATNUMBER:\n case INTEGER:\n case LONGINTEGER:\n case NULL:\n case QUOTEDSTRING:\n case TRUE:\n case BAG_VAL:\n case MAP_VAL:\n case TUPLE_VAL:\n {\n alt58=7;\n }\n break;\n case CUBE:\n case DOLLARVAR:\n case GROUP:\n case IDENTIFIER:\n case BIN_EXPR:\n case CASE_COND:\n case CASE_EXPR:\n case FUNC_EVAL:\n case INVOKER_FUNC_EVAL:\n {\n alt58=8;\n }\n break;\n case NEG:\n {\n alt58=9;\n }\n break;\n case EXPR_IN_PAREN:\n {\n alt58=11;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 58, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt58) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:411:8: ^( PLUS expr expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n PLUS213=(CommonTree)match(input,PLUS,FOLLOW_PLUS_in_expr1932); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n PLUS213_tree = (CommonTree)adaptor.dupNode(PLUS213);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(PLUS213_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr1934);\n expr214=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr214.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr1936);\n expr215=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr215.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 2 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:412:8: ^( MINUS expr expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n MINUS216=(CommonTree)match(input,MINUS,FOLLOW_MINUS_in_expr1949); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n MINUS216_tree = (CommonTree)adaptor.dupNode(MINUS216);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(MINUS216_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr1951);\n expr217=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr217.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr1953);\n expr218=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr218.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 3 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:413:8: ^( STAR expr expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n STAR219=(CommonTree)match(input,STAR,FOLLOW_STAR_in_expr1966); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR219_tree = (CommonTree)adaptor.dupNode(STAR219);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(STAR219_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr1968);\n expr220=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr220.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr1970);\n expr221=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr221.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 4 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:414:8: ^( DIV expr expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n DIV222=(CommonTree)match(input,DIV,FOLLOW_DIV_in_expr1983); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DIV222_tree = (CommonTree)adaptor.dupNode(DIV222);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(DIV222_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr1985);\n expr223=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr223.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr1987);\n expr224=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr224.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 5 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:415:8: ^( PERCENT expr expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n PERCENT225=(CommonTree)match(input,PERCENT,FOLLOW_PERCENT_in_expr2000); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n PERCENT225_tree = (CommonTree)adaptor.dupNode(PERCENT225);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(PERCENT225_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr2002);\n expr226=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr226.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr2004);\n expr227=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr227.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 6 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:416:8: ^( CAST_EXPR type expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n CAST_EXPR228=(CommonTree)match(input,CAST_EXPR,FOLLOW_CAST_EXPR_in_expr2017); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n CAST_EXPR228_tree = (CommonTree)adaptor.dupNode(CAST_EXPR228);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(CAST_EXPR228_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_type_in_expr2019);\n type229=type();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, type229.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr2021);\n expr230=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr230.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 7 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:417:8: const_expr\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_const_expr_in_expr2032);\n const_expr231=const_expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, const_expr231.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 8 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:418:8: var_expr\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_var_expr_in_expr2041);\n var_expr232=var_expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, var_expr232.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 9 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:419:8: ^( NEG expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n NEG233=(CommonTree)match(input,NEG,FOLLOW_NEG_in_expr2052); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n NEG233_tree = (CommonTree)adaptor.dupNode(NEG233);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(NEG233_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr2054);\n expr234=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr234.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 10 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:420:8: ^( CAST_EXPR type_cast expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n CAST_EXPR235=(CommonTree)match(input,CAST_EXPR,FOLLOW_CAST_EXPR_in_expr2067); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n CAST_EXPR235_tree = (CommonTree)adaptor.dupNode(CAST_EXPR235);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(CAST_EXPR235_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_type_cast_in_expr2069);\n type_cast236=type_cast();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, type_cast236.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr2071);\n expr237=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr237.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 11 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:421:8: ^( EXPR_IN_PAREN expr )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n EXPR_IN_PAREN238=(CommonTree)match(input,EXPR_IN_PAREN,FOLLOW_EXPR_IN_PAREN_in_expr2084); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n EXPR_IN_PAREN238_tree = (CommonTree)adaptor.dupNode(EXPR_IN_PAREN238);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(EXPR_IN_PAREN238_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_expr2086);\n expr239=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, expr239.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "ExpOperand createExpOperand();", "private static Expression retrieveParseExpression(String expression) {\n return StaticJavaParser.parseExpression(expression);\n }", "public final void rule__AstExpressionList__ExpressionsAssignment_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25595:1: ( ( ruleAstExpression ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25596:1: ( ruleAstExpression )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25596:1: ( ruleAstExpression )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25597:1: ruleAstExpression\n {\n before(grammarAccess.getAstExpressionListAccess().getExpressionsAstExpressionParserRuleCall_2_1_0()); \n pushFollow(FOLLOW_ruleAstExpression_in_rule__AstExpressionList__ExpressionsAssignment_2_151433);\n ruleAstExpression();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionListAccess().getExpressionsAstExpressionParserRuleCall_2_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public ArrayList<String> convertToRPN(String[] expression) {\n ArrayList<String> result = new ArrayList<String>();\n if (expression == null || expression.length == 0) {\n return result;\n }\n \n ExpressionTreeNode root = build(expression);\n Stack<ExpressionTreeNode> stack = new Stack<ExpressionTreeNode>();\n ExpressionTreeNode curr = null;\n ExpressionTreeNode prev = null;\n if (root == null) { // take care of here, null root can also be pushed to stack\n return result;\n }\n stack.push(root);\n while (!stack.isEmpty()) {\n curr = stack.peek();\n if (prev == null || prev.left == curr || prev.right == curr) {\n if (curr.left != null) {\n stack.push(curr.left);\n } else if (curr.right != null) {\n stack.push(curr.right);\n }\n } else if (curr.left == prev) {\n if (curr.right != null) {\n stack.push(curr.right);\n }\n } else {\n result.add(stack.pop().expression);\n }\n prev = curr;\n }\n \n return result;\n }", "XExpression getExpression();", "public static void program(CommonTree ast, IRTree irt)\n {\n statements(ast, irt);\n }" ]
[ "0.61666906", "0.6060191", "0.58937", "0.58288723", "0.57861584", "0.57436407", "0.5663611", "0.5649377", "0.55975854", "0.5554686", "0.55420727", "0.5499283", "0.54860497", "0.54684746", "0.5464292", "0.54366475", "0.54294103", "0.54179573", "0.5404155", "0.54023486", "0.5368113", "0.5356775", "0.5356176", "0.5350592", "0.5345286", "0.5281574", "0.527924", "0.5272477", "0.5270114", "0.5267638", "0.52522653", "0.5232059", "0.52297235", "0.5229328", "0.52223617", "0.521942", "0.52060825", "0.51782644", "0.5177896", "0.5176462", "0.5149204", "0.5148997", "0.5146994", "0.5126021", "0.5113442", "0.5111637", "0.51099205", "0.5109676", "0.5103653", "0.5102566", "0.5074045", "0.50708026", "0.5054416", "0.5042525", "0.50414515", "0.501658", "0.5010218", "0.5007852", "0.5001008", "0.49892864", "0.4988288", "0.4988288", "0.4988288", "0.4988288", "0.49810624", "0.4979604", "0.49793547", "0.497378", "0.497281", "0.49727276", "0.4968132", "0.49661362", "0.49633536", "0.49586618", "0.49574682", "0.4955844", "0.4953696", "0.49536183", "0.49499902", "0.49458227", "0.4938197", "0.4937057", "0.49315584", "0.49254024", "0.4922432", "0.4921481", "0.4920429", "0.49203947", "0.4915576", "0.49151275", "0.49120194", "0.4912", "0.49103785", "0.49064183", "0.49035072", "0.48918733", "0.48901835", "0.4886845", "0.48832354", "0.48738042" ]
0.64813215
0
Convert a constant AST to IR tree
public static void constant(CommonTree ast, IRTree irt) { Token t = ast.getToken(); int tt = t.getType(); if (tt == REALNUM) { String tx = t.getText(); irt.setOp(tx); } else { error(tt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void visit(RealConstantNode intConstantNode) {\n }", "public static void expression(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == REALNUM) {\n constant(ast, irt1);\n irt.setOp(\"CONST\");\n irt.addSub(irt1);\n }\n else if(tt == PLUS || tt == MINUS || tt == TIMES || tt == DIVIDE)\n {\n //do something\n irt.setOp(\"BINOP\");\n IRTree irt2 = new IRTree();\n expression((CommonTree)ast.getChild(0), irt1);\n expression((CommonTree)ast.getChild(1), irt2);\n\tif(tt == PLUS)\n \t\t irt.addSub(new IRTree(\"+\")); \n\telse if(tt == MINUS)\n\t\tirt.addSub(new IRTree(\"-\"));\n\telse if(tt == TIMES)\n\t\tirt.addSub(new IRTree(\"*\"));\n\telse if(tt == DIVIDE)\n\t\tirt.addSub(new IRTree(\"/\"));\n irt.addSub(irt1);\n irt.addSub(irt2);\n }\n else\n\tSystem.out.println(\"unrecognised type \" + tt);\n }", "public static void statement(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == WRITELN)\n {\n String a = String.valueOf(Memory.allocateString(\"\\n\"));\n irt.setOp(\"WRS\");\n irt.addSub(new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(a))));\n }\n else if (tt == WRITE)\n {\n ast1 = (CommonTree)ast.getChild(0);\n String type = arg(ast1, irt1);\n if (type.equals(\"real\")) {\n irt.setOp(\"WRR\");\n irt.addSub(irt1);\n }\n else {\n irt.setOp(\"WRS\");\n irt.addSub(irt1);\n }\n }\n else if(tt == ASSIGN)\n {\n //try deailng with assign here\n irt.setOp(\"ASSIGN\");\n IRTree iHold = new IRTree(\"MEM\", new IRTree(\"CONST\", new IRTree(String.valueOf(Memory.allocateReal(ast.getChild(0).getText())))));\n System.out.println(\"var name = \" + ast.getChild(0).getText());\n irt.addSub(iHold);\n expression((CommonTree)ast.getChild(1), irt1);\n irt.addSub(irt1);\n }\n else if(tt == MEM)\n {\n System.out.println(\"GOT MEM TYPE\");\n }\n else {\n error(tt);\n }\n }", "public Code visitConstNode(ExpNode.ConstNode node) {\n beginGen(\"Const\");\n Code code = new Code();\n if(node.getValue() == 0) {\n code.generateOp(Operation.ZERO);\n } else if(node.getValue() == 1) {\n code.generateOp(Operation.ONE);\n } else {\n code.genLoadConstant(node.getValue());\n }\n endGen(\"Const\");\n return code;\n }", "@Override\n public void visit(IntConstantNode intConstantNode) {\n }", "public String toCode()\n {\n return \"TermConstant.getConstant(\" + index + \")\";\n }", "@Override\r\n\tpublic void visit(ConstantExpression constantExpression) {\n\r\n\t}", "public interface AST {\n \n /**\n * Returns the label or tag for this AST node.\n */\n public int getNodeLabel ();\n \n /**\n * Returns the textual value of this AST node.\n */\n public String getNodeValue ();\n \n /**\n * Returns a list of child nodes, or null if there are no child nodes. The value returned is a shallow copy\n * which can be manipulated by the caller.\n */\n public List<AST> getChildNodes ();\n \n /**\n * Returns the position of the node in the original source(s).\n */\n public CodePosition getCodePosition ();\n \n}", "void genAst();", "private void checkIfConstant()\r\n/* 23: */ {\r\n/* 24: 49 */ boolean isConstant = true;\r\n/* 25: 50 */ int c = 0;\r\n/* 26: 50 */ for (int max = getChildCount(); c < max; c++)\r\n/* 27: */ {\r\n/* 28: 51 */ SpelNode child = getChild(c);\r\n/* 29: 52 */ if (!(child instanceof Literal)) {\r\n/* 30: 53 */ if ((child instanceof InlineList))\r\n/* 31: */ {\r\n/* 32: 54 */ InlineList inlineList = (InlineList)child;\r\n/* 33: 55 */ if (!inlineList.isConstant()) {\r\n/* 34: 56 */ isConstant = false;\r\n/* 35: */ }\r\n/* 36: */ }\r\n/* 37: */ else\r\n/* 38: */ {\r\n/* 39: 59 */ isConstant = false;\r\n/* 40: */ }\r\n/* 41: */ }\r\n/* 42: */ }\r\n/* 43: 63 */ if (isConstant)\r\n/* 44: */ {\r\n/* 45: 64 */ List<Object> constantList = new ArrayList();\r\n/* 46: 65 */ int childcount = getChildCount();\r\n/* 47: 66 */ for (int c = 0; c < childcount; c++)\r\n/* 48: */ {\r\n/* 49: 67 */ SpelNode child = getChild(c);\r\n/* 50: 68 */ if ((child instanceof Literal)) {\r\n/* 51: 69 */ constantList.add(((Literal)child).getLiteralValue().getValue());\r\n/* 52: 70 */ } else if ((child instanceof InlineList)) {\r\n/* 53: 71 */ constantList.add(((InlineList)child).getConstantValue());\r\n/* 54: */ }\r\n/* 55: */ }\r\n/* 56: 74 */ this.constant = new TypedValue(Collections.unmodifiableList(constantList));\r\n/* 57: */ }\r\n/* 58: */ }", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 523,\n FQN=\"llvm::Module::getValueSymbolTable\", NM=\"_ZNK4llvm6Module19getValueSymbolTableEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module19getValueSymbolTableEv\")\n //</editor-fold>\n public /*const*/ ValueSymbolTable /*&*/ getValueSymbolTable$Const() /*const*/ {\n return /*Deref*/ValSymTab;\n }", "private ConstantTransformer(Object constant) {\n super();\n iConstant = constant;\n }", "public Snippet visit(ConstantDeclaration n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"public static final \",null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f3 = n.type.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f6 = n.methodCall.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t _ret.returnTemp += f3.returnTemp+\" \"+f4.returnTemp+\" = \"+f6.returnTemp+\";\\n\";\n\t\t\tcurrentClassBody.constants += _ret.returnTemp;\n\t\t\treturn _ret;\n\t }", "public interface ConstantExpression extends GenericExpression\n{\n}", "public static ConstantExpression constant(Object value) { throw Extensions.todo(); }", "public void visitLCONST(LCONST o){\n\t\t// Nothing to do here.\n\t}", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "public interface ConstantExpression extends AtomicExpression {\r\n}", "Rule IntConstant() {\n // Push 1 IntConstNode onto the value stack\n return Sequence(\n Sequence(\n Optional(NumericSign()),\n OneOrMore(Digit())),\n actions.pushIntConstNode());\n }", "public final AstValidator.const_expr_return const_expr() throws RecognitionException {\n AstValidator.const_expr_return retval = new AstValidator.const_expr_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n AstValidator.literal_return literal416 =null;\n\n\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:649:12: ( literal )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:649:14: literal\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_literal_in_const_expr3423);\n literal416=literal();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, literal416.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public final ANTLRv3Parser.rewrite_tree_return rewrite_tree() throws RecognitionException {\r\n ANTLRv3Parser.rewrite_tree_return retval = new ANTLRv3Parser.rewrite_tree_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token string_literal171=null;\r\n Token char_literal174=null;\r\n ANTLRv3Parser.rewrite_tree_atom_return rewrite_tree_atom172 =null;\r\n\r\n ANTLRv3Parser.rewrite_tree_element_return rewrite_tree_element173 =null;\r\n\r\n\r\n CommonTree string_literal171_tree=null;\r\n CommonTree char_literal174_tree=null;\r\n RewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\r\n RewriteRuleTokenStream stream_TREE_BEGIN=new RewriteRuleTokenStream(adaptor,\"token TREE_BEGIN\");\r\n RewriteRuleSubtreeStream stream_rewrite_tree_element=new RewriteRuleSubtreeStream(adaptor,\"rule rewrite_tree_element\");\r\n RewriteRuleSubtreeStream stream_rewrite_tree_atom=new RewriteRuleSubtreeStream(adaptor,\"rule rewrite_tree_atom\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:409:2: ( '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' -> ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:409:4: '^(' rewrite_tree_atom ( rewrite_tree_element )* ')'\r\n {\r\n string_literal171=(Token)match(input,TREE_BEGIN,FOLLOW_TREE_BEGIN_in_rewrite_tree2972); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_TREE_BEGIN.add(string_literal171);\r\n\r\n\r\n pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree2974);\r\n rewrite_tree_atom172=rewrite_tree_atom();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_rewrite_tree_atom.add(rewrite_tree_atom172.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:409:27: ( rewrite_tree_element )*\r\n loop79:\r\n do {\r\n int alt79=2;\r\n int LA79_0 = input.LA(1);\r\n\r\n if ( (LA79_0==ACTION||LA79_0==CHAR_LITERAL||LA79_0==RULE_REF||LA79_0==STRING_LITERAL||(LA79_0 >= TOKEN_REF && LA79_0 <= TREE_BEGIN)||(LA79_0 >= 67 && LA79_0 <= 68)) ) {\r\n alt79=1;\r\n }\r\n\r\n\r\n switch (alt79) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:409:27: rewrite_tree_element\r\n \t {\r\n \t pushFollow(FOLLOW_rewrite_tree_element_in_rewrite_tree2976);\r\n \t rewrite_tree_element173=rewrite_tree_element();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_rewrite_tree_element.add(rewrite_tree_element173.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop79;\r\n }\r\n } while (true);\r\n\r\n\r\n char_literal174=(Token)match(input,69,FOLLOW_69_in_rewrite_tree2979); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_69.add(char_literal174);\r\n\r\n\r\n // AST REWRITE\r\n // elements: rewrite_tree_element, rewrite_tree_atom\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 410:3: -> ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:410:6: ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(TREE_BEGIN, \"TREE_BEGIN\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_rewrite_tree_atom.nextTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:410:37: ( rewrite_tree_element )*\r\n while ( stream_rewrite_tree_element.hasNext() ) {\r\n adaptor.addChild(root_1, stream_rewrite_tree_element.nextTree());\r\n\r\n }\r\n stream_rewrite_tree_element.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public Literal getDeepLiteral(XDI3Segment contextNodeXri);", "private void parseConstDecl() {\n check(Token.FINAL);\n\n Struct type = parseType();\n\n check(Token.IDENT);\n\n String constName = token.string;\n\n check(Token.ASSIGN);\n\n if (nextToken.kind != Token.NUMBER\n && nextToken.kind != Token.CHAR_CONST) {\n error(\"Expected number or char constant\");\n }\n\n if ((nextToken.kind == Token.NUMBER\n && type != SymbolTable.STRUCT_INT)\n || (nextToken.kind == Token.CHAR_CONST\n && type != SymbolTable.STRUCT_CHAR)) {\n error(\"Incompatible types in constant declaration\");\n }\n\n scan();\n\n int value = token.value;\n\n insert(new SymObject(type, constName, value));\n\n check(Token.SEMICOLON);\n }", "public Snippet visit(InitializableConstantDeclaration n, Snippet argu) {\n\t Snippet _ret=new Snippet(\"\",\"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.type.accept(this, argu);\n\t Snippet f3 = n.identifier.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret.returnTemp += f2.expType.getTypeName()+\" \"+f3.returnTemp+\";\";\n\t\t\t//?? possible here\n\t tPlasmaCode=\"\";\n\t\t\t//tPlasmaCode += \n\t\t\tcurrentClassBody.initConstants+=generateTabs(0)+\"public final \" + f2.expType.getTypeName()+\" \"+f3.returnTemp+\";\\n\";;\n\t\t\ttPlasmaCode=\"\";\n\t return _ret;\n\t }", "public interface Expression {\n \n enum ExpressivoGrammar {ROOT, SUM, PRODUCT, TOKEN, PRIMITIVE_1, PRIMITIVE_2, \n NUMBER, INT, DECIMAL, WHITESPACE, VARIABLE};\n \n public static Expression buildAST(ParseTree<ExpressivoGrammar> concreteSymbolTree) {\n \n if (concreteSymbolTree.getName() == ExpressivoGrammar.DECIMAL) {\n /* reached a double terminal */\n return new Num(Double.parseDouble(concreteSymbolTree.getContents())); \n }\n\n else if (concreteSymbolTree.getName() == ExpressivoGrammar.INT) {\n /* reached an int terminal */\n return new Num(Integer.parseInt(concreteSymbolTree.getContents()));\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.VARIABLE) {\n /* reached a terminal */\n return new Var(concreteSymbolTree.getContents());\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.ROOT || \n concreteSymbolTree.getName() == ExpressivoGrammar.TOKEN || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_1 || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_2 || \n concreteSymbolTree.getName() == ExpressivoGrammar.NUMBER) {\n \n /* non-terminals with only one child */\n for (ParseTree<ExpressivoGrammar> child: concreteSymbolTree.children()) {\n if (child.getName() != ExpressivoGrammar.WHITESPACE) \n return buildAST(child);\n }\n \n // should never reach here\n throw new IllegalArgumentException(\"error in parsing\");\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.SUM || concreteSymbolTree.getName() == ExpressivoGrammar.PRODUCT) {\n /* a sum or product node can have one or more children that need to be accumulated together */\n return accumulator(concreteSymbolTree, concreteSymbolTree.getName()); \n }\n \n else {\n throw new IllegalArgumentException(\"error in input: should never reach here\");\n }\n \n }\n \n /**\n * (1) Create parser using lib6005.parser from grammar file\n * (2) Parse string input into CST\n * (3) Build AST from this CST using buildAST()\n * @param input\n * @return Expression (AST)\n */\n public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }\n \n // helper methods\n public static Expression accumulator(ParseTree<ExpressivoGrammar> tree, ExpressivoGrammar grammarObj) {\n Expression expr = null;\n boolean first = true;\n List<ParseTree<ExpressivoGrammar>> children = tree.children();\n int len = children.size();\n for (int i = len-1; i >= 0; i--) {\n /* the first child */\n ParseTree<ExpressivoGrammar> child = children.get(i);\n if (first) {\n expr = buildAST(child);\n first = false;\n }\n \n /* accumulate this by creating a new binaryOp object with\n * expr as the leftOp and the result as rightOp\n **/\n \n else if (child.getName() == ExpressivoGrammar.WHITESPACE) continue;\n else {\n if (grammarObj == ExpressivoGrammar.SUM)\n expr = new Sum(buildAST(child), expr);\n else\n expr = new Product(buildAST(child), expr);\n }\n }\n \n return expr;\n \n }\n \n // ----------------- problems 3-4 -----------------\n \n public static Expression create(Expression leftExpr, Expression rightExpr, char op) {\n if (op == '+')\n return Sum.createSum(leftExpr, rightExpr);\n else\n return Product.createProduct(leftExpr, rightExpr);\n }\n\n public Expression differentiate(Var x);\n \n public Expression simplify(Map<String, Double> env);\n\n}", "Const\ngetConstSym();", "public String toStringAST()\r\n/* 75: */ {\r\n/* 76: 94 */ StringBuilder s = new StringBuilder();\r\n/* 77: */ \r\n/* 78: 96 */ s.append('{');\r\n/* 79: 97 */ int count = getChildCount();\r\n/* 80: 98 */ for (int c = 0; c < count; c++)\r\n/* 81: */ {\r\n/* 82: 99 */ if (c > 0) {\r\n/* 83:100 */ s.append(',');\r\n/* 84: */ }\r\n/* 85:102 */ s.append(getChild(c).toStringAST());\r\n/* 86: */ }\r\n/* 87:104 */ s.append('}');\r\n/* 88:105 */ return s.toString();\r\n/* 89: */ }", "static ExpNode copy(ExpNode root) {\n\n if (root instanceof ConstNode) {\n return new ConstNode(((ConstNode).root).number);\n }\n else if (root instanceof VariableNode) {\n return new VariableNode();\n }\n else {\n Bin0pNode node = (Bin0pNode)root;\n // Left and right operand trees have to be copied not only referenced\n return new Bin0pNode(node.op, copy(node.left). copy(node.right));\n }\n }", "public interface\nExp extends HIR\n{\n\n/** ConstNode (##3)\n * Build HIR constant node.\n * @param pConstSym constant symbol to be attached to the node.\n * @return constant leaf node having operation code opConst.\n**/\n// Constructor (##3)\n// ConstNode( Const pConstSym );\n\n/** getConstSym\n * Get constant symbol attached to this node.\n * \"this\" should be a constant node.\n * @return constant symbol attached to this node.\n**/\nConst\ngetConstSym();\n\n/** SymNode (##3)\n * Build an HIR symbol name node from a symbol name.\n * @param pVar variable name symbol to be attached to the node.\n * @param pSubp subprogram name symbol to be attached to the node.\n * @param pLabel label name symbol to be attached to the node.\n * @param pElem struct/union element name to be attached to the node.\n * @param pField class field name to be attached to the node.\n * @return symbol name node of corresponding class (##2)\n * having operation code opSym.\n**/\n// Constructor (##3)\n// VarNode( Var pVar ); (##3)\n// SubpNode( Subp pSubp ); (##3)\n// LabelNode( Label pLabel ); (##3)\n// ElemNode( Elem pElem ); (##3)\n// FieldNode( Field pField ); (##3)\n\n/** getSym\n * Get symbol from SymNode. (##2)\n * \"this\" should be a SymNode (##2)\n * (either VarNode, SubpNode, LabelNode, ElemNode, or FieldNode). (##2)\n * @return the symbol attached to the node\n * (either Var, Subp, Label, Elem, or Field). (##2)\n**/\n//## Sym\n//## getSym();\n\n/** getVar\n * Get symbol of specified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nVar getVar();\n\n/** getSubp\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nSubp getSubp();\n\n/**\n * getLabel\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nLabel getLabel();\n\n/**\n * getElem\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nElem getElem();\n// Field getField();\n\n/** UnaryExp (##3)\n * Build an unary expression having pOperator as its operator\n * and pExp as its source operand.\n * @param pOperator unary operator.\n * @param pExp source operand expression.\n * @return unary expression using pOperator and pExp as its\n * operator and operand.\n**/\n// Constructor (##3)\n// UnaryExp( int pOperator, Exp pExp );\n\n/** BinaryExp (##3)\n * Build a binary expression having pOperator as its operator\n * and pExp1, pExp2 as its source operand 1 and 2.\n * @param pOperator binary operator.\n * @param pExp1 source operand 1 expression.\n * @param pExp2 source operand 2 expression.\n * @return binary expression using pOperator and\n * pExp1 and pExp2 as its operator and operands.\n**/\n// Constructor (##3)\n// BinaryExp( int pOperator, Exp pExp1, Exp pExp2 );\n\n/** getExp1\n * Get source operand 1 from unary or binary expression.\n * \"this\" should be either unary or binary expression.\n * @return the source operand 1 expression of this node.\n**/\nExp\ngetExp1();\n\n/** getExp2\n * Get source operand 2 from binary expression.\n * \"this\" should be a binary expression.\n * @return the source operand 2 expression of this node.\n**/\nExp\ngetExp2();\n\n/** getArrayExp (##2)\n * getSubscriptExp\n * getElemSizeExp (##2)\n * Get a component of a subscripted variable.\n * \"this\" should be a node built by buildSubscriptedVar method.\n * @return a component expression of this subscripted variable.\n**/\nExp getArrayExp(); // return array expression part (pArrayExp).\nExp getSubscriptExp(); // return subscript expression part (pSubscript).\nExp getElemSizeExp(); // return element size part (pElemSize).\n\n/** PointedVar (##3)\n * Build a pointed variable node.\n * @param pPointer pointer expression which may be a compond variable.\n(##2)\n * @param pElement struct/union element name pointed by pPointer.\n * @return pointed variable node having operation code opArrow.\n**/\n// Constructor (##3)\n// PointedVar( Exp pPointer, Elem pElement ); // (##2)\n\n/** getPointerExp\n * getPointedElem\n * Get a component of pointed variable expression.\n * \"this\" should be a node built by buildPointedVar method.\n * @return a component expression of this pointed variable.\n**/\nExp getPointerExp(); // return the pointer expression part (pPointer).\nElem getPointedElem(); // return the pointed element part (pElem).\n\n/** QualifiedVar (##3)\n * Build qualified variable node that represents an element\n * of structure or union.\n * @param pQualifier struct/union variable having elements.\n * @param pElement struct/union element name to be represented.\n * @return qualified variable node having operation code opQual.\n**/\n// Constructor (##3)\n// QualifiedVar( Exp pQualifier, Elem pElement );\n\n/** getQualifier\n * getQualifiedElem\n * Get a component of qualified variable expression.\n * \"this\" should be a node built by BuildQualifiedVar method.\n * @return a component of \"this\" QualifiedVar expression. (##2)\n**/\nExp getQualifierExp(); // return qualifier part (pQualifier).\nElem getQualifiedElem(); // return qualified element part (pelement).\n\n/** FunctionExp (##3)\n * Build a function expression node that computes function value.\n * @param pSubpExp function specification part which may be either\n * a function name, or an expression specifying a function name.\n * @param pParamList actual parameter list.\n * @return function expression node having operation code opCall.\n * @see IrList.\n**/\n// Constructor (##3)\n// FunctionExp( Subp pSubpSpec, IrList pParamList );\n\n/** getSubpSpec (##2)\n * getActualParamList\n * Get a component expression of the function expression. (##2)\n * \"this\" should be a node built by buildFunctionExp.\n * getSubpSpec return the expression specifying the subprogram\n * to be called (pSubpSpec). (##2)\n * getActualParamList return the actual parameter list (pParamList).\n * If this has no parameter, then return null.\n**/\nExp getSubpSpec();\nIrList getActualParamList();\n\n/** findSubpType\n * Find SubpType represented by this expression.\n * If this is SubpNode then return SubpType pointed by this node type,\n * else decompose this expression to find Subpnode.\n * If illegal type is encountered, return null.\n**/\npublic SubpType // (##6)\nfindSubpType();\n\n/** isEvaluable\n * See if \"this\" expression can be evaluated or not.\n * Following expressions are evaluable expression: //##14\n * constant expression,\n * expression whose operands are all evaluable expressions.\n * Expressions with OP_ADDR or OP_NULL are treated as non evaluable.\n * Variable with initial value is also treated as non evaluable\n * because its value may change. //##43\n * @return true if this expression can be evaluated as constant value\n * at the invocation of this method, false otherwise.\n**/\nboolean isEvaluable();\n\n//SF050111[\n///** evaluate\n// * Evaluate \"this\" expression.\n// * \"this\" should be an evaluable expression.\n// * If not, this method returns null.\n// * It is strongly recommended to confirm isEvaluable() returns true\n// * for this expression before calling this method.\n// * @return constant node as the result of evaluation.\n//**/\n//ConstNode evaluate();\n\n/**\n * Evaluate \"this\" expression.\n * @return constant as the result of evaluation or null(when failing in the\n * evaluation)\n**/\npublic Const evaluate();\n\n/**\n * Fold \"this\" expression.\n * evaluate() is called by recursive. If the evaluation succeeded, former node\n * is substituted for the constant node generated as evaluation result.\n * @return constant as the result of evaluation or null (when failing in the\n * evaluation)\n**/\npublic Exp fold();\n//SF050111]\n\n/** evaluateAsInt\n * Evaluate \"this\" expression as int.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return integer value as the result of evaluation.\n**/\n//SF050111 int evaluateAsInt();\npublic int evaluateAsInt(); //SF050111\n\n/**\n * Evaluate \"this\" expression as long.\n * \"this\" should be an evaluable expression. If not, this method returns 0.\n * @return long value as the result of evaluation.\n**/\npublic long evaluateAsLong(); //SF050111\n\n/** evaluateAsFloat\n * Evaluate \"this\" expression as float.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 float evaluateAsFloat();\npublic float evaluateAsFloat(); //SF050111\n\n/** evaluateAsDouble\n * Evaluate \"this\" expression as double.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 double evaluateAsDouble();\npublic double evaluateAsDouble(); //SF050111\n\n/** getValueString //##40\n * Evaluate this subtree and return the result as a string.\n * If the result is constant, then return the string representing\n * the constant.\n * If the result is not a constant, then return a string\n * representing the resultant expression.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return a string representing the evaluated result.\n**/\npublic String\ngetValueString();\n\n//##84 BEGIN\n/**\n * Adjust the types of binary operands according to the\n * C language specifications\n * (See ISO/IEC 9899-1999 Programming language C section 6.3.1.8).\n * The result is an expression\n * (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2).\n * The operands can be get by\n * ((HIR)lResult.getChild1()).copyWithOperands()\n * ((HIR)lResult.getChild2()).copyWithOperands()\n * @param pExp1 operand 1.\n * @param pExp2 operand 2.\n * @return (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2)\n */\npublic Exp\nadjustTypesOfBinaryOperands( Exp pExp1, Exp pExp2 );\n//##84 END\n\n/** initiateArray //##15\n * Create loop statement to initiate all elements of\n * the array pArray and append it to the initiation block\n * of subprogram pSubp.\n * The initiation statement to be created for pSubp is\n * for (i = pFrom; i <= pTo; i++)\n * pArray[i] = pInitExp;\n * If pSubp is null, set-data statement is generated.\n * @param pArray array variable expression.\n * @param pInitExp initial value to be set.\n * @param pFrom array index start position\n * @param pTo array index end position\n * @param pSubp subprogram containing the initiation statement.\n * null for global variable initiation.\n * @return the loop statement to set initial value.\n**/\npublic Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp ); //##15\n\n}", "public static Statement build(LinkedListTree ast) {\n\t\tswitch (ast.getType()) {\n\t\t\tcase AS3Parser.BLOCK:\n\t\t\t\treturn new ASTStatementList(ast);\n\t\t\tcase AS3Parser.DO:\n\t\t\t\treturn new ASTASDoWhileStatement(ast);\n\t\t\tcase AS3Parser.EXPR_STMNT:\n\t\t\t\treturn new ASTASExpressionStatement(ast);\n\t\t\tcase AS3Parser.FOR_EACH:\n\t\t\t\treturn new ASTASForEachInStatement(ast);\n\t\t\tcase AS3Parser.FOR_IN:\n\t\t\t\treturn new ASTASForInStatement(ast);\n\t\t\tcase AS3Parser.FOR:\n\t\t\t\treturn new ASTASForStatement(ast);\n\t\t\tcase AS3Parser.IF:\n\t\t\t\treturn new ASTASIfStatement(ast);\n\t\t\tcase AS3Parser.SWITCH:\n\t\t\t\treturn new ASTASSwitchStatement(ast);\n\t\t\tcase AS3Parser.CONST:\n\t\t\tcase AS3Parser.VAR:\n\t\t\t\treturn new ASTASDeclarationStatement(ast);\n\t\t\tcase AS3Parser.WHILE:\n\t\t\t\treturn new ASTASWhileStatement(ast);\n\t\t\tcase AS3Parser.WITH:\n\t\t\t\treturn new ASTASWithStatement(ast);\n\t\t\tcase AS3Parser.RETURN:\n\t\t\t\treturn new ASTASReturnStatement(ast);\n\t\t\tcase AS3Parser.SUPER:\n\t\t\t\treturn new ASTASSuperStatement(ast);\n\t\t\tcase AS3Parser.BREAK:\n\t\t\t\treturn new ASTASBreakStatement(ast);\n\t\t\tcase AS3Parser.TRY:\n\t\t\t\treturn new ASTASTryStatement(ast);\n\t\t\tcase AS3Parser.DEFAULT_XML_NAMESPACE:\n\t\t\t\treturn new ASTASDefaultXMLNamespaceStatement(ast);\n\t\t\tcase AS3Parser.CONTINUE:\n\t\t\t\treturn new ASTASContinueStatement(ast);\n\t\t\tcase AS3Parser.THROW:\n\t\t\t\treturn new ASTASThrowStatement(ast);\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(\"Unsupported statement node type: \"+ASTUtils.tokenName(ast)+\" in \"+ActionScriptFactory.str(ASTUtils.stringifyNode(ast)));\n\t\t}\n\t}", "Rule ConstValue() {\n // Push 1 ConstValue node onto the value stack\n return Sequence(\n FirstOf(\n IntConstant(),\n DoubleConstant(),\n Literal(),\n Identifier(),\n ConstList(),\n ConstMap()),\n actions.pushConstValueNode());\n }", "public static String arg(CommonTree ast, IRTree irt)\n {\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == STRING) {\n String tx = t.getText();\n int a = Memory.allocateString(tx); \n String st = String.valueOf(a);\n irt.setOp(\"MEM\");\n irt.addSub(new IRTree(\"CONST\", new IRTree(st)));\n return \"string\";\n }\n else {\n expression(ast, irt);\n return \"real\";\n }\n }", "@Generated(value={\"edu.jhu.cs.bsj.compiler.utils.generator.SourceGenerator\"})\npublic interface ExpressionNode extends Node, VariableInitializerNode\n{\n /**\n * Generates a deep copy of this node.\n * @param factory The node factory to use to create the deep copy.\n * @return The resulting deep copy node.\n */\n @Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);\n \n}", "void visit(BooleanConstantNode node);", "public void visit(Literal literal) {}", "public interface Node {\n Oper oper();\n CNFOrdinal toCNF();\n}", "@jdk.Supported\npublic interface Tree {\n\n /**\n * Enumerates all kinds of trees.\n */\n @jdk.Supported\n public enum Kind {\n\n /**\n * Used for instance of {@link ExtendedASTAnnotationTree}\n * representing AST-level tree annotation \"@@\"\n */\n AST_ANNOTATION(null, \"ASTAnnotation\"), // ExtendedASTAnnotationTree.class ... break API compatility with visitor ...\n\n ANNOTATED_TYPE(AnnotatedTypeTree.class, \"AnnotatedType\", \"AtType\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing declaration annotations.\n */\n ANNOTATION(AnnotationTree.class, \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing type annotations.\n */\n TYPE_ANNOTATION(AnnotationTree.class, \"TypeAnnotation\", \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link ArrayAccessTree}.\n */\n ARRAY_ACCESS(ArrayAccessTree.class, \"ArrayAccess\"),\n\n /**\n * Used for instances of {@link ArrayTypeTree}.\n */\n ARRAY_TYPE(ArrayTypeTree.class, \"ArrayType\"),\n\n /**\n * Used for instances of {@link AssertTree}.\n */\n ASSERT(AssertTree.class, \"Assert\", \"assert\"),\n\n /**\n * Used for instances of {@link AssignmentTree}.\n */\n ASSIGNMENT(AssignmentTree.class, \"Assign\", \"Eq\", \"=\"),\n\n /**\n * Used for instances of {@link BlockTree}.\n */\n BLOCK(BlockTree.class, \"Block\", \"{}\"),\n\n /**\n * Used for instances of {@link BreakTree}.\n */\n BREAK(BreakTree.class, \"Break\", \"break\"),\n\n /**\n * Used for instances of {@link CaseTree}.\n */\n CASE(CaseTree.class, \"Case\", \"case\"),\n\n /**\n * Used for instances of {@link CatchTree}.\n */\n CATCH(CatchTree.class, \"Catch\", \"catch\"),\n\n /**\n * Used for instances of {@link ClassTree} representing classes.\n */\n CLASS(ClassTree.class, \"Class\", \"class\"),\n\n /**\n * Used for instances of {@link CompilationUnitTree}.\n */\n COMPILATION_UNIT(CompilationUnitTree.class, \"CompilationUnit\", \"cu\"),\n\n /**\n * Used for instances of {@link ConditionalExpressionTree}.\n */\n CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class, \"ConditionalExpression\", \"?\"),\n\n /**\n * Used for instances of {@link ContinueTree}.\n */\n CONTINUE(ContinueTree.class, \"Continue\", \"continue\"),\n\n /**\n * Used for instances of {@link DoWhileLoopTree}.\n */\n DO_WHILE_LOOP(DoWhileLoopTree.class, \"DoWhile\", \"do\"),\n\n /**\n * Used for instances of {@link EnhancedForLoopTree}.\n */\n ENHANCED_FOR_LOOP(EnhancedForLoopTree.class, \"EnhancedForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link ExpressionStatementTree}.\n */\n EXPRESSION_STATEMENT(ExpressionStatementTree.class, \"ExpressionStatement\", \"expr;\", \"e;\"),\n\n /**\n * Used for instances of {@link MemberSelectTree}.\n */\n MEMBER_SELECT(MemberSelectTree.class, \"MemberSelect\", \".\"),\n\n /**\n * Used for instances of {@link MemberReferenceTree}.\n */\n MEMBER_REFERENCE(MemberReferenceTree.class, \"MemberReference\", \"#\"),\n\n /**\n * Used for instances of {@link ForLoopTree}.\n */\n FOR_LOOP(ForLoopTree.class, \"ForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link IdentifierTree}.\n */\n IDENTIFIER(IdentifierTree.class, \"Identifier\", \"id\", \"name\"),\n\n /**\n * Used for instances of {@link IfTree}.\n */\n IF(IfTree.class, \"If\", \"if\"),\n\n /**\n * Used for instances of {@link ImportTree}.\n */\n IMPORT(ImportTree.class, \"Import\", \"import\"),\n\n /**\n * Used for instances of {@link InstanceOfTree}.\n */\n INSTANCE_OF(InstanceOfTree.class, \"InstanceOf\", \"instanceof\"),\n\n /**\n * Used for instances of {@link LabeledStatementTree}.\n */\n LABELED_STATEMENT(LabeledStatementTree.class, \"LabeledStatement\", \"label\"),\n\n /**\n * Used for instances of {@link MethodTree}.\n */\n METHOD(MethodTree.class, \"Method\", \"method\"),\n\n /**\n * Used for instances of {@link MethodInvocationTree}.\n */\n METHOD_INVOCATION(MethodInvocationTree.class, \"MethodInvocation\", \"invoke\", \"call\"),\n\n /**\n * Used for instances of {@link ModifiersTree}.\n */\n MODIFIERS(ModifiersTree.class, \"Modifiers\"),\n\n /**\n * Used for instances of {@link NewArrayTree}.\n */\n NEW_ARRAY(NewArrayTree.class, \"NewArray\", \"new\"),\n\n /**\n * Used for instances of {@link NewClassTree}.\n */\n NEW_CLASS(NewClassTree.class, \"NewClass\", \"new\"),\n\n /**\n * Used for instances of {@link LambdaExpressionTree}.\n */\n LAMBDA_EXPRESSION(LambdaExpressionTree.class, \"Lambda\", \"lambda\"),\n\n /**\n * Used for instances of {@link ParenthesizedTree}.\n */\n PARENTHESIZED(ParenthesizedTree.class, \"Parenthesized\"), // should not use prefix with \"(e)\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link PrimitiveTypeTree}.\n */\n PRIMITIVE_TYPE(PrimitiveTypeTree.class, \"PrimitiveType\", \"type\"),\n\n /**\n * Used for instances of {@link ReturnTree}.\n */\n RETURN(ReturnTree.class, \"Return\", \"return\"),\n\n /**\n * Used for instances of {@link EmptyStatementTree}.\n */\n EMPTY_STATEMENT(EmptyStatementTree.class, \"EmptyStatement\", \"empty\"),\n\n /**\n * Used for instances of {@link SwitchTree}.\n */\n SWITCH(SwitchTree.class, \"Switch\", \"switch\"),\n\n /**\n * Used for instances of {@link SynchronizedTree}.\n */\n SYNCHRONIZED(SynchronizedTree.class, \"Synchronized\", \"synchronized\"),\n\n /**\n * Used for instances of {@link ThrowTree}.\n */\n THROW(ThrowTree.class, \"Throw\", \"throw\"),\n\n /**\n * Used for instances of {@link TryTree}.\n */\n TRY(TryTree.class, \"Try\", \"try\"),\n\n /**\n * Used for instances of {@link ParameterizedTypeTree}.\n */\n PARAMETERIZED_TYPE(ParameterizedTypeTree.class, \"ParameterizedType\", \"type<>\", \"type\"),\n\n /**\n * Used for instances of {@link UnionTypeTree}.\n */\n UNION_TYPE(UnionTypeTree.class, \"UnionType\", \"union\", \"|\", \"uniontype\", \"type\"),\n\n /**\n * Used for instances of {@link IntersectionTypeTree}.\n */\n INTERSECTION_TYPE(IntersectionTypeTree.class, \"IntersectionType\", \"intersectiontype\", \"type\"),\n\n /**\n * Used for instances of {@link TypeCastTree}.\n */\n TYPE_CAST(TypeCastTree.class, \"TypeCast\", \"cast\"), // should not use prefix with \"()\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link TypeParameterTree}.\n */\n TYPE_PARAMETER(TypeParameterTree.class, \"TypeParameter\", \"type\"),\n\n /**\n * Used for instances of {@link VariableTree}.\n */\n VARIABLE(VariableTree.class, \"Variable\", \"var\", \"vardecl\"),\n\n /**\n * Used for instances of {@link WhileLoopTree}.\n */\n WHILE_LOOP(WhileLoopTree.class, \"WhileLoop\", \"while\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * increment operator {@code ++}.\n */\n POSTFIX_INCREMENT(UnaryTree.class, \"PostfixIncrement\", \"e++\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * decrement operator {@code --}.\n */\n POSTFIX_DECREMENT(UnaryTree.class, \"PostfixDecrement\", \"e--\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * increment operator {@code ++}.\n */\n PREFIX_INCREMENT(UnaryTree.class, \"PrefixIncrement\", \"++e\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * decrement operator {@code --}.\n */\n PREFIX_DECREMENT(UnaryTree.class, \"PrefixDecrement\", \"--e\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary plus\n * operator {@code +}.\n */\n UNARY_PLUS(UnaryTree.class, \"UnaryPlus\", \"+e\", \"+\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary minus\n * operator {@code -}.\n */\n UNARY_MINUS(UnaryTree.class, \"UnaryMinus\", \"-e\", \"-\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing bitwise\n * complement operator {@code ~}.\n */\n BITWISE_COMPLEMENT(UnaryTree.class, \"BitwiseComplement\", \"~\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing logical\n * complement operator {@code !}.\n */\n LOGICAL_COMPLEMENT(UnaryTree.class, \"LogicalComlement\", \"!\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * multiplication {@code *}.\n */\n MULTIPLY(BinaryTree.class, \"Multiply\", \"mult\", \"*\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * division {@code /}.\n */\n DIVIDE(BinaryTree.class, \"Divide\", \"div\", \"/\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * remainder {@code %}.\n */\n REMAINDER(BinaryTree.class, \"Remainder\", \"rem\", \"%\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * addition or string concatenation {@code +}.\n */\n PLUS(BinaryTree.class, \"BinaryPlus\", \"e+e\", \"+\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * subtraction {@code -}.\n */\n MINUS(BinaryTree.class, \"BinaryMinus\", \"e-e\", \"-\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * left shift {@code <<}.\n */\n LEFT_SHIFT(BinaryTree.class, \"LeftShift\", \"<<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * right shift {@code >>}.\n */\n RIGHT_SHIFT(BinaryTree.class, \"RightShift\", \">>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * unsigned right shift {@code >>>}.\n */\n UNSIGNED_RIGHT_SHIFT(BinaryTree.class, \"UnsignedRightShift\", \">>>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than {@code <}.\n */\n LESS_THAN(BinaryTree.class, \"LessThan\", \"lt\", \"<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than {@code >}.\n */\n GREATER_THAN(BinaryTree.class, \"GreaterThan\", \"gt\", \">\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than-equal {@code <=}.\n */\n LESS_THAN_EQUAL(BinaryTree.class, \"LessThanEqual\", \"le\", \"<=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than-equal {@code >=}.\n */\n GREATER_THAN_EQUAL(BinaryTree.class, \"GreaterThanEqual\", \"ge\", \">=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * equal-to {@code ==}.\n */\n EQUAL_TO(BinaryTree.class, \"Equals\", \"equals\", \"==\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * not-equal-to {@code !=}.\n */\n NOT_EQUAL_TO(BinaryTree.class, \"NotEquals\", \"notequals\", \"!=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"and\" {@code &}.\n */\n AND(BinaryTree.class, \"And\", \"and\", \"&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"xor\" {@code ^}.\n */\n XOR(BinaryTree.class, \"Xor\", \"xor\", \"^\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"or\" {@code |}.\n */\n OR(BinaryTree.class, \"Or\", \"or\", \"|\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-and {@code &&}.\n */\n CONDITIONAL_AND(BinaryTree.class, \"ConditionalAnd\", \"&&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-or {@code ||}.\n */\n CONDITIONAL_OR(BinaryTree.class, \"ConditionalOr\", \"||\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * multiplication assignment {@code *=}.\n */\n MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class, \"MultiplyAssignment\", \"*=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * division assignment {@code /=}.\n */\n DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class, \"DivideAssignment\", \"/=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * remainder assignment {@code %=}.\n */\n REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class, \"RemainderAssignment\", \"%=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * addition or string concatenation assignment {@code +=}.\n */\n PLUS_ASSIGNMENT(CompoundAssignmentTree.class, \"PLusAssignment\", \"+=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * subtraction assignment {@code -=}.\n */\n MINUS_ASSIGNMENT(CompoundAssignmentTree.class, \"MinusAssignment\", \"-=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * left shift assignment {@code <<=}.\n */\n LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"LeftShiftAssignment\", \"<<=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * right shift assignment {@code >>=}.\n */\n RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"RightShiftAssignment\", \">>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * unsigned right shift assignment {@code >>>=}.\n */\n UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"UnsignedRightShiftAssignment\", \">>>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"and\" assignment {@code &=}.\n */\n AND_ASSIGNMENT(CompoundAssignmentTree.class, \"AndAssignment\", \"&=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"xor\" assignment {@code ^=}.\n */\n XOR_ASSIGNMENT(CompoundAssignmentTree.class, \"XorAssignment\", \"^=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"or\" assignment {@code |=}.\n */\n OR_ASSIGNMENT(CompoundAssignmentTree.class, \"OrAssignment\", \"|=\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code int}.\n */\n INT_LITERAL(LiteralTree.class, \"IntLiteral\", \"int\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code long}.\n */\n LONG_LITERAL(LiteralTree.class, \"LongLiteral\", \"long\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code float}.\n */\n FLOAT_LITERAL(LiteralTree.class, \"FloatLiteral\", \"float\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code double}.\n */\n DOUBLE_LITERAL(LiteralTree.class, \"DoubleLiteral\", \"double\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a boolean literal expression of type {@code boolean}.\n */\n BOOLEAN_LITERAL(LiteralTree.class, \"BooleanLiteral\", \"boolean\", \"bool\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a character literal expression of type {@code char}.\n */\n CHAR_LITERAL(LiteralTree.class, \"CharLiteral\", \"char\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a string literal expression of type {@link String}.\n */\n STRING_LITERAL(LiteralTree.class, \"StringLiteral\", \"string\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * the use of {@code null}.\n */\n NULL_LITERAL(LiteralTree.class, \"NullLiteral\", \"null\", \"literal\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an unbounded wildcard type argument.\n */\n UNBOUNDED_WILDCARD(WildcardTree.class, \"UnboundedWildcard\", \"?\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an extends bounded wildcard type argument.\n */\n EXTENDS_WILDCARD(WildcardTree.class, \"ExtendsWildcard\", \"?extends\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * a super bounded wildcard type argument.\n */\n SUPER_WILDCARD(WildcardTree.class, \"SuperWildcard\", \"?super\"),\n\n /**\n * Used for instances of {@link ErroneousTree}.\n */\n ERRONEOUS(ErroneousTree.class, \"Erroneous\", \"ERROR\", \"error\"),\n\n /**\n * Used for instances of {@link ClassTree} representing interfaces.\n */\n INTERFACE(ClassTree.class, \"Interface\", \"interface\"),\n\n /**\n * Used for instances of {@link ClassTree} representing enums.\n */\n ENUM(ClassTree.class, \"Enum\", \"enum\"),\n\n /**\n * Used for instances of {@link ClassTree} representing annotation types.\n */\n ANNOTATION_TYPE(ClassTree.class, \"AnnotationType\", \"At\"),\n\n /**\n * An implementation-reserved node. This is the not the node\n * you are looking for.\n */\n OTHER(null, \"Other\");\n\n\n\t\tKind(Class<? extends Tree> intf, String displayName, String... prefixAliases) {\n associatedInterface = intf;\n this.displayName = displayName;\n this.preferredPrefix = (displayName != null)? displayName : toString();\n this.preferredPrefixLowerCase = preferredPrefix.toLowerCase();\n if (prefixAliases == null) prefixAliases = new String[0];\n this.prefixAliases = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(prefixAliases)));\n Set<String> tmpPrefixAliasesLowerCase = new HashSet<String>();\n for(String e : prefixAliases) {\n \ttmpPrefixAliasesLowerCase.add(e.toLowerCase());\n }\n this.prefixAliasesLowerCase = Collections.unmodifiableSet(tmpPrefixAliasesLowerCase);\n }\n\n private final Class<? extends Tree> associatedInterface;\n \n private final String displayName;\n \n private final String preferredPrefix;\n\n private final String preferredPrefixLowerCase;\n\n private final Set<String> prefixAliases;\n \n private final Set<String> prefixAliasesLowerCase;\n\n\n public Class<? extends Tree> asInterface() {\n return associatedInterface;\n }\n\n public String getDisplayName() {\n\t\t\treturn displayName;\n\t\t}\n\n\t\tpublic String preferredPrefix() {\n \treturn preferredPrefix;\n }\n\n public boolean hasAliasPrefix(String prefix) {\n \treturn prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefix(String prefix) {\n \tif (prefix == null) return false;\n \treturn preferredPrefix.equals(prefix)\n \t\t\t|| prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefixIgnoreCase(String prefix) {\n \tif (prefix == null) return false;\n \tString prefixLowerCase = prefix.toLowerCase();\n \treturn preferredPrefixLowerCase.equals(prefixLowerCase)\n \t\t\t|| prefixAliasesLowerCase.contains(prefixLowerCase);\n }\n\n }\n\n /**\n * Gets the kind of this tree.\n *\n * @return the kind of this tree.\n */\n Kind getKind();\n\n /**\n * Accept method used to implement the visitor pattern. The\n * visitor pattern is used to implement operations on trees.\n *\n * @param <R> result type of this operation.\n * @param <D> type of additional data.\n */\n <R,D> R accept(TreeVisitor<R,D> visitor, D data);\n\n /**\n * @since jdk1.8-ARN\n */\n List<? extends ASTExtensionTree> getASTExtensions();\n\n /**\n * @since jdk1.8-ARN\n */\n List<ASTAnnotationTree> getASTAnnotations();\n \n \n}", "private Value immediate(Unit unit, Immediate v) {\n if (v instanceof soot.Local) {\n Local local = (Local) v;\n Type type = getLocalType(v.getType());\n VariableRef var = new VariableRef(local.getName(), new PointerType(type));\n Variable tmp = function.newVariable(type);\n function.add(new Load(tmp, var, !sootMethod.getActiveBody().getTraps().isEmpty()));\n return new VariableRef(tmp);\n } else if (v instanceof soot.jimple.IntConstant) {\n return new IntegerConstant(((soot.jimple.IntConstant) v).value);\n } else if (v instanceof soot.jimple.LongConstant) {\n return new IntegerConstant(((soot.jimple.LongConstant) v).value);\n } else if (v instanceof soot.jimple.FloatConstant) {\n return new FloatingPointConstant(((soot.jimple.FloatConstant) v).value);\n } else if (v instanceof soot.jimple.DoubleConstant) {\n return new FloatingPointConstant(((soot.jimple.DoubleConstant) v).value);\n } else if (v instanceof soot.jimple.NullConstant) {\n return new NullConstant(OBJECT_PTR);\n } else if (v instanceof soot.jimple.StringConstant) {\n String s = ((soot.jimple.StringConstant) v).value;\n Trampoline trampoline = new LdcString(className, s);\n trampolines.add(trampoline);\n return call(trampoline.getFunctionRef(), env);\n } else if (v instanceof soot.jimple.ClassConstant) {\n // ClassConstant is either the internal name of a class or the descriptor of an array\n String targetClassName = ((soot.jimple.ClassConstant) v).getValue();\n if (isArray(targetClassName) && isPrimitiveComponentType(targetClassName)) {\n String primitiveDesc = targetClassName.substring(1);\n Variable result = function.newVariable(OBJECT_PTR);\n function.add(new Load(result, new ConstantBitcast(\n new GlobalRef(\"array_\" + primitiveDesc, CLASS_PTR), new PointerType(OBJECT_PTR))));\n return result.ref();\n } else {\n FunctionRef fn = null;\n if (targetClassName.equals(this.className)) {\n fn = FunctionBuilder.ldcInternal(sootMethod.getDeclaringClass()).ref();\n } else {\n Trampoline trampoline = new LdcClass(className, ((soot.jimple.ClassConstant) v).getValue());\n trampolines.add(trampoline);\n fn = trampoline.getFunctionRef();\n }\n return call(fn, env);\n }\n }\n throw new IllegalArgumentException(\"Unknown Immediate type: \" + v.getClass());\n }", "public static void program(CommonTree ast, IRTree irt)\n {\n statements(ast, irt);\n }", "public Object visitIntegerConstant(GNode n) {\n xtc.type.Type result;\n \n result = cops.typeInteger(n.getString(0));\n \n return result.getConstant().bigIntValue().longValue();\n }", "public static TreeNode makeLiteral(Boolean booleanConstant) {\n return new BooleanNode(booleanConstant);\n }", "private void makeConstReps() {\n\t\tfor (CCTerm term : mConsts) {\n\t\t\tArrayNode node = mCongRoots.get(term.getRepresentative());\n\t\t\tnode.makeWeakRepresentative();\n\t\t}\n\t}", "public interface ASTPath\n{\n\tvoid debugSelf(IndentPrinter destination);\n\tvoid setParent(ASTChildList.ListKey key, ASTParent newParent);\n\tvoid compileSelf(LangCompiler compiler);\n\tASTBase getDeclaration();\n\tString getName();\n\tString getEnd();\n\tSpiritType getExpressionType();\n\n}", "public AST(RuleContext ctx){\n this.ctx = ctx;\n }", "Literal createLiteral();", "Literal createLiteral();", "Rule Const() {\n // Push 1 ConstNode onto the value stack\n StringVar constName = new StringVar(\"\");\n return Sequence(\n \"const \",\n FieldType(),\n Identifier(),\n actions.pop(),\n ACTION(constName.set(match())),\n \"= \",\n ConstValue(),\n Optional(ListSeparator()),\n WhiteSpace(),\n push(new IdentifierNode(constName.get())),\n actions.pushConstNode());\n }", "public static ConstantExpression constant(Object value, Class clazz) { throw Extensions.todo(); }", "RealConstant createRealConstant();", "public void flattenASTChangesToString(){\n\t\tthis.codeBlob = getCodeString();\n\t\tthis.compUnit = null;\n\t\tthis.rewriter = null;\n\t}", "private String node(String name) { return prefix + \"AST\" + name + \"Node\"; }", "@Override\n public void visit(BooleanConstantNode booleanConstantNode) {\n }", "ConstDecl createConstDecl();", "private ASTNode buildAST(String contents) throws JavaModelException {\n\t\treturn buildAST(contents, this.workingCopy);\n\t}", "public void visitDCONST(DCONST o){\n\t\t// There's nothing to be done here.\n\t}", "public static Transformer constantTransformer(Object constantToReturn) {\n return new ConstantTransformer(constantToReturn);\n }", "public interface ExpressionNode\n{\n /** Node id for matrix nodes (remain constant) */\n public static final int MATRIX_NODE = 1;\n /** Node id for addition nodes */\n public static final int ADDITION_NODE = 2;\n /** Node id for multiplication nodes */\n public static final int MULTIPLICATION_NODE = 3;\n\n /**\n * Returns the type of the node.ExpressionNode\n *\n * Each class derived from ExpressionNode representing a specific\n * role in the expression should return the type according to that\n * role.\n * \n * @return type of the node\n */\n public int getType();\n \n /**\n * Calculates and returns the value of the sub-expression represented by\n * the node.\n * \n * @return value of expression\n */\n public Matrix getValue();\n \n /**\n * Method needed for the visitor design pattern\n * \n * @param visitor\n * the visitor\n */\n public void accept(ExpressionNodeVisitor visitor);\n\n}", "public Literal getDeepLiteral(XDI3Segment contextNodeXri, Object literalData);", "@Override\n public boolean isConstantExpression() {\n return false;\n }", "ConstValue createConstValue();", "<C> RealLiteralExp<C> createRealLiteralExp();", "public void visitFCONST(FCONST o){\n\t\t// nothing to do here.\n\t}", "public JExpression createConstant(Outline outline, XmlString literal) {\n/* 237 */ JClass type = toType(outline, Aspect.EXPOSED);\n/* 238 */ for (CEnumConstant mem : this.members) {\n/* 239 */ if (mem.getLexicalValue().equals(literal.value))\n/* 240 */ return (JExpression)type.staticRef(mem.getName()); \n/* */ } \n/* 242 */ return null;\n/* */ }", "public LlvmValue visit(IntegerLiteral n) {\n return new LlvmIntegerLiteral(n.value);\n }", "void loadConstant(Object value, MethodVisitor mv) {\n if (value == null) {\n mv.visitInsn(Opcodes.ACONST_NULL);\n } else if (value instanceof String) {\n mv.visitLdcInsn(value);\n } else if (value instanceof Character) {\n String className = \"java/lang/Character\";\n mv.visitTypeInsn(Opcodes.NEW, className);\n mv.visitInsn(Opcodes.DUP);\n mv.visitLdcInsn(value);\n String methodType = \"(C)V\";\n mv.visitMethodInsn(Opcodes.INVOKESPECIAL, className, \"<init>\", methodType);\n } else if (value instanceof Number) {\n /** todo it would be more efficient to generate class constants */\n Number n = (Number) value;\n String className = BytecodeHelper.getClassInternalName(value.getClass().getName());\n mv.visitTypeInsn(Opcodes.NEW, className);\n mv.visitInsn(Opcodes.DUP);\n String methodType;\n if (n instanceof Integer) {\n //pushConstant(n.intValue());\n mv.visitLdcInsn(n);\n methodType = \"(I)V\";\n } else if (n instanceof Double) {\n mv.visitLdcInsn(n);\n methodType = \"(D)V\";\n } else if (n instanceof Float) {\n mv.visitLdcInsn(n);\n methodType = \"(F)V\";\n } else if (n instanceof Long) {\n mv.visitLdcInsn(n);\n methodType = \"(J)V\";\n } else if (n instanceof BigDecimal) {\n mv.visitLdcInsn(n.toString());\n methodType = \"(Ljava/lang/String;)V\";\n } else if (n instanceof BigInteger) {\n mv.visitLdcInsn(n.toString());\n methodType = \"(Ljava/lang/String;)V\";\n } else if (n instanceof Short) {\n mv.visitLdcInsn(n);\n methodType = \"(S)V\";\n } else if (n instanceof Byte) {\n mv.visitLdcInsn(n);\n methodType = \"(B)V\";\n } else {\n throw new ClassGeneratorException(\n \"Cannot generate bytecode for constant: \" + value\n + \" of type: \" + value.getClass().getName()\n + \". Numeric constant type not supported.\");\n }\n mv.visitMethodInsn(Opcodes.INVOKESPECIAL, className, \"<init>\", methodType);\n } else if (value instanceof Boolean) {\n Boolean bool = (Boolean) value;\n String text = (bool.booleanValue()) ? \"TRUE\" : \"FALSE\";\n mv.visitFieldInsn(Opcodes.GETSTATIC, \"java/lang/Boolean\", text, \"Ljava/lang/Boolean;\");\n } else if (value instanceof Class) {\n Class vc = (Class) value;\n if (vc.getName().equals(\"java.lang.Void\")) {\n // load nothing here for void\n } else {\n throw new ClassGeneratorException(\n \"Cannot generate bytecode for constant: \" + value + \" of type: \" + value.getClass().getName());\n }\n } else {\n throw new ClassGeneratorException(\n \"Cannot generate bytecode for constant: \" + value + \" of type: \" + value.getClass().getName());\n }\n }", "Syntax.Node ParseConstFactor(Token t) throws Exception{\n if(t.type==TokenType.INTEGER){\n return new Syntax.NodeInteger((int)t.token);\n }\n if(t.type==TokenType.DOUBLE){\n return new Syntax.NodeDouble((double)t.token);\n }\n if(t.type==TokenType.IDENTIFIER){\n return new Syntax.NodeVar((String)t.token);\n }\n if(t.token.equals(\"nil\")){\n //lexer.next();\n return new Syntax.NodeNil(\"nil\");\n }\n if (t.type==TokenType.BOOLEAN){\n return new Syntax.Nodeboolean((String) t.token);\n }\n\n throw new Exception(\"Error in ParseConstFactor !!! \");\n }", "@Nullable public abstract Object getConstantValue() throws CompileException;", "public static interface Resolver\n {\n Constant resolve(Constant constOrig);\n }", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "public ValueWrapper parseConstant(String t) {\n \tthrow new UnsupportedOperationException();\n }", "private void convert(AssignStatContext c, List<String> ssa) {\n\t\tString expr = getExpr(c.expr());\n\t\tString id = this.variableTrack.get(c.ID().getText());\n\t\tString newId = generateNewName(id);\n\t\tString constraint = \"(assert(= \" + newId + \" \" + expr + \"))\";\n\t\tssa.add(constraint);\n\t\t\n\t}", "public interface Token extends Serializable {\r\n\r\n\t/**\r\n\t * The \"const\" keyword\r\n\t */\r\n\tToken CONST = new Token(){\r\n\t\tprivate static final long serialVersionUID = -3891676043565611933L;\r\n\t};\r\n\t//TODO\r\n}", "public String toString() {\n\t\treturn \"(constant-value \" + constantValueIndex + \")\";\n\t}", "private InfixExpression getNode()\n{\n return (InfixExpression) ast_node;\n}", "public Literal setDeepLiteral(XDI3Segment contextNodeXri, Object literalData);", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 509,\n FQN=\"llvm::Module::getIFuncList\", NM=\"_ZNK4llvm6Module12getIFuncListEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module12getIFuncListEv\")\n //</editor-fold>\n public /*const*/ SymbolTableList<GlobalIFunc, Module> /*&*/ getIFuncList$Const() /*const*/ {\n return IFuncList;\n }", "public abstract TypeLiteral<?> toTypeLiteral(Type type);", "@Override\n\tpublic void setConstant(InterpreteConstants c) {\n\t\t\n\t}", "public Expression deepCopy (){\n return new LiteralExpression(_value);\n }", "TypeLiteralExp createTypeLiteralExp();", "public final ANTLRv3Parser.rewrite_tree_atom_return rewrite_tree_atom() throws RecognitionException {\r\n ANTLRv3Parser.rewrite_tree_atom_return retval = new ANTLRv3Parser.rewrite_tree_atom_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token d=null;\r\n Token CHAR_LITERAL162=null;\r\n Token TOKEN_REF163=null;\r\n Token ARG_ACTION164=null;\r\n Token RULE_REF165=null;\r\n Token STRING_LITERAL166=null;\r\n Token ACTION168=null;\r\n ANTLRv3Parser.id_return id167 =null;\r\n\r\n\r\n CommonTree d_tree=null;\r\n CommonTree CHAR_LITERAL162_tree=null;\r\n CommonTree TOKEN_REF163_tree=null;\r\n CommonTree ARG_ACTION164_tree=null;\r\n CommonTree RULE_REF165_tree=null;\r\n CommonTree STRING_LITERAL166_tree=null;\r\n CommonTree ACTION168_tree=null;\r\n RewriteRuleTokenStream stream_67=new RewriteRuleTokenStream(adaptor,\"token 67\");\r\n RewriteRuleTokenStream stream_TOKEN_REF=new RewriteRuleTokenStream(adaptor,\"token TOKEN_REF\");\r\n RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,\"token ARG_ACTION\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:389:5: ( CHAR_LITERAL | TOKEN_REF ( ARG_ACTION )? -> ^( TOKEN_REF ( ARG_ACTION )? ) | RULE_REF | STRING_LITERAL |d= '$' id -> LABEL[$d,$id.text] | ACTION )\r\n int alt78=6;\r\n switch ( input.LA(1) ) {\r\n case CHAR_LITERAL:\r\n {\r\n alt78=1;\r\n }\r\n break;\r\n case TOKEN_REF:\r\n {\r\n alt78=2;\r\n }\r\n break;\r\n case RULE_REF:\r\n {\r\n alt78=3;\r\n }\r\n break;\r\n case STRING_LITERAL:\r\n {\r\n alt78=4;\r\n }\r\n break;\r\n case 67:\r\n {\r\n alt78=5;\r\n }\r\n break;\r\n case ACTION:\r\n {\r\n alt78=6;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 78, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt78) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:389:9: CHAR_LITERAL\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n CHAR_LITERAL162=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_rewrite_tree_atom2870); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n CHAR_LITERAL162_tree = \r\n (CommonTree)adaptor.create(CHAR_LITERAL162)\r\n ;\r\n adaptor.addChild(root_0, CHAR_LITERAL162_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:6: TOKEN_REF ( ARG_ACTION )?\r\n {\r\n TOKEN_REF163=(Token)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_rewrite_tree_atom2877); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_TOKEN_REF.add(TOKEN_REF163);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:16: ( ARG_ACTION )?\r\n int alt77=2;\r\n int LA77_0 = input.LA(1);\r\n\r\n if ( (LA77_0==ARG_ACTION) ) {\r\n alt77=1;\r\n }\r\n switch (alt77) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:16: ARG_ACTION\r\n {\r\n ARG_ACTION164=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rewrite_tree_atom2879); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(ARG_ACTION164);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: ARG_ACTION, TOKEN_REF\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 390:28: -> ^( TOKEN_REF ( ARG_ACTION )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:31: ^( TOKEN_REF ( ARG_ACTION )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_TOKEN_REF.nextNode()\r\n , root_1);\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:390:43: ( ARG_ACTION )?\r\n if ( stream_ARG_ACTION.hasNext() ) {\r\n adaptor.addChild(root_1, \r\n stream_ARG_ACTION.nextNode()\r\n );\r\n\r\n }\r\n stream_ARG_ACTION.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n break;\r\n case 3 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:391:9: RULE_REF\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n RULE_REF165=(Token)match(input,RULE_REF,FOLLOW_RULE_REF_in_rewrite_tree_atom2900); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n RULE_REF165_tree = \r\n (CommonTree)adaptor.create(RULE_REF165)\r\n ;\r\n adaptor.addChild(root_0, RULE_REF165_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 4 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:392:6: STRING_LITERAL\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n STRING_LITERAL166=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2907); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n STRING_LITERAL166_tree = \r\n (CommonTree)adaptor.create(STRING_LITERAL166)\r\n ;\r\n adaptor.addChild(root_0, STRING_LITERAL166_tree);\r\n }\r\n\r\n }\r\n break;\r\n case 5 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:393:6: d= '$' id\r\n {\r\n d=(Token)match(input,67,FOLLOW_67_in_rewrite_tree_atom2916); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_67.add(d);\r\n\r\n\r\n pushFollow(FOLLOW_id_in_rewrite_tree_atom2918);\r\n id167=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id167.getTree());\r\n\r\n // AST REWRITE\r\n // elements: \r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 393:15: -> LABEL[$d,$id.text]\r\n {\r\n adaptor.addChild(root_0, \r\n (CommonTree)adaptor.create(LABEL, d, (id167!=null?input.toString(id167.start,id167.stop):null))\r\n );\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n break;\r\n case 6 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:394:4: ACTION\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n ACTION168=(Token)match(input,ACTION,FOLLOW_ACTION_in_rewrite_tree_atom2929); if (state.failed) return retval;\r\n if ( state.backtracking==0 ) {\r\n ACTION168_tree = \r\n (CommonTree)adaptor.create(ACTION168)\r\n ;\r\n adaptor.addChild(root_0, ACTION168_tree);\r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "IntConstant createIntConstant();", "public interface langBConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int BREAK = 12;\n /** RegularExpression Id. */\n int CLASS = 13;\n /** RegularExpression Id. */\n int CONSTRUCTOR = 14;\n /** RegularExpression Id. */\n int ELSE = 15;\n /** RegularExpression Id. */\n int EXTENDS = 16;\n /** RegularExpression Id. */\n int FOR = 17;\n /** RegularExpression Id. */\n int IF = 18;\n /** RegularExpression Id. */\n int THEN = 19;\n /** RegularExpression Id. */\n int INT = 20;\n /** RegularExpression Id. */\n int NEW = 21;\n /** RegularExpression Id. */\n int PRINT = 22;\n /** RegularExpression Id. */\n int READ = 23;\n /** RegularExpression Id. */\n int RETURN = 24;\n /** RegularExpression Id. */\n int STRING = 25;\n /** RegularExpression Id. */\n int SUPER = 26;\n /** RegularExpression Id. */\n int BOOLEAN = 27;\n /** RegularExpression Id. */\n int TRUE = 28;\n /** RegularExpression Id. */\n int FALSE = 29;\n /** RegularExpression Id. */\n int WHILE = 30;\n /** RegularExpression Id. */\n int SWITCH = 31;\n /** RegularExpression Id. */\n int CASE = 32;\n /** RegularExpression Id. */\n int int_constant = 33;\n /** RegularExpression Id. */\n int string_constant = 34;\n /** RegularExpression Id. */\n int null_constant = 35;\n /** RegularExpression Id. */\n int IDENT = 36;\n /** RegularExpression Id. */\n int LETTER = 37;\n /** RegularExpression Id. */\n int DIGIT = 38;\n /** RegularExpression Id. */\n int UNDERSCORE = 39;\n /** RegularExpression Id. */\n int LPAREN = 40;\n /** RegularExpression Id. */\n int RPAREN = 41;\n /** RegularExpression Id. */\n int LBRACE = 42;\n /** RegularExpression Id. */\n int RBRACE = 43;\n /** RegularExpression Id. */\n int LBRACKET = 44;\n /** RegularExpression Id. */\n int RBRACKET = 45;\n /** RegularExpression Id. */\n int SEMICOLON = 46;\n /** RegularExpression Id. */\n int COMMA = 47;\n /** RegularExpression Id. */\n int DOT = 48;\n /** RegularExpression Id. */\n int DDOT = 49;\n /** RegularExpression Id. */\n int QUESTIONMARK = 50;\n /** RegularExpression Id. */\n int ASSIGN = 51;\n /** RegularExpression Id. */\n int GT = 52;\n /** RegularExpression Id. */\n int LT = 53;\n /** RegularExpression Id. */\n int EQ = 54;\n /** RegularExpression Id. */\n int LE = 55;\n /** RegularExpression Id. */\n int GE = 56;\n /** RegularExpression Id. */\n int NEQ = 57;\n /** RegularExpression Id. */\n int PLUS = 58;\n /** RegularExpression Id. */\n int MINUS = 59;\n /** RegularExpression Id. */\n int STAR = 60;\n /** RegularExpression Id. */\n int SLASH = 61;\n /** RegularExpression Id. */\n int REM = 62;\n /** RegularExpression Id. */\n int OR = 63;\n /** RegularExpression Id. */\n int AND = 64;\n /** RegularExpression Id. */\n int INVALID_LEXICAL = 65;\n /** RegularExpression Id. */\n int INVALID_CONST = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int multilinecomment = 1;\n /** Lexical state. */\n int singlelinecomment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"/*\\\"\",\n \"\\\"//\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 9>\",\n \"<token of kind 10>\",\n \"<token of kind 11>\",\n \"\\\"parar\\\"\",\n \"\\\"classe\\\"\",\n \"\\\"construtor\\\"\",\n \"\\\"senao\\\"\",\n \"\\\"herda\\\"\",\n \"\\\"para\\\"\",\n \"\\\"se\\\"\",\n \"\\\"entao\\\"\",\n \"\\\"inteiro\\\"\",\n \"\\\"novo\\\"\",\n \"\\\"imprimir\\\"\",\n \"\\\"ler\\\"\",\n \"\\\"retornar\\\"\",\n \"\\\"texto\\\"\",\n \"\\\"super\\\"\",\n \"\\\"cara_coroa\\\"\",\n \"\\\"cara\\\"\",\n \"\\\"coroa\\\"\",\n \"\\\"enquanto\\\"\",\n \"\\\"trocar\\\"\",\n \"\\\"caso\\\"\",\n \"<int_constant>\",\n \"<string_constant>\",\n \"\\\"nulo\\\"\",\n \"<IDENT>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"<UNDERSCORE>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\"?\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"<INVALID_LEXICAL>\",\n \"<INVALID_CONST>\",\n };\n\n}", "public interface AstFactory\n{\n\tIdNode IdNode(Token t, String text);\n\tExtIdNode ExtIdNode(Token t, String text);\n\n\tAmbigNameNode AmbigNameNode(Token t, String text);\t // Deprecate? Never need to make ambigname \"manually\" via af? (constructed only by ScribbleParser)\n\tDataParamNode DataParamNode(Token t, String text);\n\tOpNode OpNode(Token t, String text);\n\tRecVarNode RecVarNode(Token t, String text);\n\tRoleNode RoleNode(Token t, String text);\n\tSigParamNode SigParamNode(Token t, String text);\n\n\tDataNameNode DataNameNode(Token t, List<IdNode> elems);\n\tGProtoNameNode GProtoNameNode(Token t, List<IdNode> elems);\n\tLProtoNameNode LProtoNameNode(Token t, List<IdNode> elems);\n\tModuleNameNode ModuleNameNode(Token t, List<IdNode> elems);\n\tSigNameNode SigNameNode(Token t, List<IdNode> elems);\n\t\n\tModule Module(Token t, ModuleDecl mdecl,\n\t\t\tList<? extends ImportDecl<?>> imports,\n\t\t\tList<? extends NonProtoDecl<?>> nonprotos,\n\t\t\tList<? extends ProtoDecl<?>> protos);\n\n\tModuleDecl ModuleDecl(Token t, ModuleNameNode fullname);\n\tImportModule ImportModule(Token t, ModuleNameNode modname,\n\t\t\tModuleNameNode alias); // alias == null for no alias (child not added)\n\n\tDataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);\n\tSigDecl SigDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, SigNameNode name);\n\tGProtoDecl GProtoDecl(Token t, ProtoModList mods, GProtoHeader header,\n\t\t\tGProtoDef def);\n\n\t// TODO: refactor to use ProtoModList, etc.\n\tProtoModList ProtoModList(Token t, List<ProtoModNode> mods);\n\tAuxMod AuxMod(Token t);\n\tExplicitMod ExplicitMod(Token t);\n\n\tGProtoHeader GProtocolHeader(Token t, GProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tRoleDeclList RoleDeclList(Token t, List<RoleDecl> ds);\n\tRoleDecl RoleDecl(Token t, RoleNode r);\n\tNonRoleParamDeclList NonRoleParamDeclList(Token t, \n\t\t\tList<NonRoleParamDecl<? extends NonRoleParamKind>> ds);\n\tDataParamDecl DataParamDecl(Token t, DataParamNode p);\n\tSigParamDecl SigParamDecl(Token t, SigParamNode p);\n\n\tGProtoDef GProtoDef(Token t, GProtoBlock block);\n\tGProtoBlock GProtoBlock(Token t, GInteractionSeq seq);\n\tGInteractionSeq GInteractionSeq(Token t, List<GSessionNode> elems); // CHECKME: ? extends GSessionNode ? -- and similar others?\n\n\tSigLitNode SigLitNode(Token t, OpNode op, PayElemList pay);\n\tPayElemList PayElemList(Token t, List<PayElem<?>> elems);\n\t<K extends PayElemKind> UnaryPayElem<K> UnaryPayElem(Token t, \n\t\t\tPayElemNameNode<K> name);\n\tGDelegPayElem GDelegPayElem(Token t, GProtoNameNode name, RoleNode r);\n\n\tGMsgTransfer GMsgTransfer(Token t, RoleNode src, MsgNode msg,\n\t\t\tList<RoleNode> dsts);\n\tGConnect GConnect(Token t, RoleNode src, MsgNode msg, RoleNode dst);\n\tGDisconnect GDisconnect(Token t, RoleNode left, RoleNode right);\n\tGWrap GWrap(Token t, RoleNode client, RoleNode server);\n\n\tGContinue GContinue(Token t, RecVarNode rv);\n\tGDo GDo(Token t, GProtoNameNode proto, NonRoleArgList args, RoleArgList rs);\n\n\tRoleArgList RoleArgList(Token t, List<RoleArg> rs);\n\tRoleArg RoleArg(Token t, RoleNode r);\n\tNonRoleArgList NonRoleArgList(Token t, List<NonRoleArg> args);\n\tNonRoleArg NonRoleArg(Token t, NonRoleArgNode arg);\n\n\tGChoice GChoice(Token t, RoleNode subj, List<GProtoBlock> blocks);\n\tGRecursion GRecursion(Token t, RecVarNode rv, GProtoBlock block);\n\n\t/*LProtoDecl LProtoDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def); // Not currently used -- local protos not yet parsed, only projected*/\n\n\tLProjectionDecl LProjectionDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def, GProtoNameNode fullname,\n\t\t\tRoleNode self); // del extends that of LProtoDecl\n\n\tLProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tLSelfDecl LSelfDecl(Token t, RoleNode r);\n\n\tLProtoDef LProtoDef(Token t, LProtoBlock block);\n\tLProtoBlock LProtoBlock(Token t, LInteractionSeq seq);\n\tLInteractionSeq LInteractionSeq(Token t, List<LSessionNode> elems);\n\n\t// Following take \"self\" param in case of parsed Token (not actually supported yet)\n\tLSend LSend(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLRecv LRecv(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLAcc LAcc(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLReq LReq(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLDisconnect LDisconnect(Token t, RoleNode self, RoleNode peer); \n\tLClientWrap LClientWrap(Token t, RoleNode client, RoleNode server);\n\tLServerWrap LServerWrap(Token t, RoleNode client, RoleNode server);\n\n\tLContinue LContinue(Token t, RecVarNode rv); \n\tLDo LDo(Token t, LProtoNameNode proto, NonRoleArgList as, RoleArgList rs);\n\n\tLChoice LChoice(Token t, RoleNode subj, List<LProtoBlock> blocks);\n\tLRecursion LRecursion(Token t, RecVarNode rv, LProtoBlock block);\n}", "private Expression convertToExpression(ExpressionPath expression, Object evaluavatedValue) {\n\t\tif (evaluavatedValue == null) {\n\t\t\treturn new Constant(EMPTY_STRING);\n\t\t}\n\t\tif (evaluavatedValue instanceof Collection) {\n\t\t\tObject object = ((Collection) evaluavatedValue).iterator().next();\n\t\t\tif (object instanceof GenericConfigAttribute) {\n\t\t\t\tGenericConfigAttribute attribute = (GenericConfigAttribute) object;\n\t\t\t\tif (attribute != null && attribute.getStringValue() != null) {\n\t\t\t\t\treturn new Constant(attribute.getStringValue());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn expression;\n\t\t} else {\n\t\t\treturn new Constant(evaluavatedValue.toString());\n\t\t}\n\t}", "public CodeTree toCodeTree() {\n List<Node> nodes = new ArrayList<Node>();\n for (int i = max(codeLengths); i >= 0; i--) { // Descend through code lengths\n List<Node> newNodes = new ArrayList<Node>();\n\n // Add leaves for symbols with positive code length i\n if (i > 0) {\n for (int j = 0; j < codeLengths.length; j++) {\n if (codeLengths[j] == i)\n newNodes.add(new Leaf(j)); //Isidedame ASCII reiksmes ilgiausio kodo\n }\n }\n\n // Merge pairs of nodes from the previous deeper layer\n for (int j = 0; j < nodes.size(); j += 2) {\n newNodes.add(new InternalNode(nodes.get(j), nodes.get(j + 1))); //Sujungia lapus i InternalNodes\n }\n nodes = newNodes;\n }\n return new CodeTree((InternalNode)nodes.get(0), codeLengths.length);\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 527,\n FQN=\"llvm::Module::getComdatSymbolTable\", NM=\"_ZNK4llvm6Module20getComdatSymbolTableEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module20getComdatSymbolTableEv\")\n //</editor-fold>\n public /*const*/StringMap<Comdat> /*&*/ getComdatSymbolTable$Const() /*const*/ {\n return ComdatSymTab;\n }", "public interface TreeInterface extends SymmetricDigraphInterface {\r\n /** Return parent of a tree node.\r\n * @precondition nonNull(node)\r\n */\r\n public IRNode getParent(IRNode node);\r\n\r\n /** The location is a value used by an IRSequence\r\n * to locate an element. For IRArray, it is an integer.\r\n * @precondition nonNull(node)\r\n */\r\n public IRLocation getLocation(IRNode node);\r\n\r\n /** Return the root of a subtree.\r\n */\r\n public IRNode getRoot(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with leaves and working toward the node given.\r\n * A postorder traversal.\r\n */\r\n public Iteratable<IRNode> bottomUp(IRNode subtree);\r\n\r\n /** Return an enumeration of nodes in the subtree\r\n * starting with this node and working toward the leaves.\r\n * A preorder traversal.\r\n */\r\n public Iteratable<IRNode> topDown(IRNode subtree);\r\n}", "static void constant(String code, String expected) {\n\t\tLexer lexer = new Lexer(code);\n\t\tAstGenerator generator = new AstGenerator();\n\t\tParseConstant<AstNode, Generator<AstNode>> pc =\n\t\t\t\tnew ParseConstant<>(lexer, generator);\n\t\tAstNode ast = pc.parse(null);\n\t\tString actual = ast.toString().replace(\"\\n\", \" \").replaceAll(\" +\", \" \");\n\t\tactual = actual.replaceAll(\"Class[0-9]+\", \"Class#\");\n//System.out.println(\"\\t\\t\\\"\" + actual.substring(23, actual.length() - 2) + \"\\\");\");\n\t\tassertEquals(expected, actual);\n\t}", "protected abstract T evalNonNullConstant(Constant constant, ProgramPoint pp);", "public interface LambdaVisitor<T> {\n T visit(ASTAbstraction node);\n T visit(ASTApplication node);\n T visit(ASTConstant node);\n T visit(ASTVariable node);\n}", "@Override\n\tpublic String visitArExpr(ArExprContext ctx) {\n\t\tint chNo=ctx.children.size();\n\t\tif(chNo == 3){\n\t\t\tParseTree cur = ctx.getChild(1);\n\t\t\tif(cur==ctx.MULT() || cur==ctx.DIV()|| cur==ctx.PLUS() || cur==ctx.MINUS()){\n\t\t\t\tString left = visit(ctx.getChild(0));\n\t\t\t\tString right = visit(ctx.getChild(2));\n\t\t\t\tif(!(right.equals(left) && right.equals(\"int\")) ){throw new RuntimeException(\"Arithmetic operations only with integers\");}\n\t\t\t\treturn(\"int\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn(visit(cur));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tParseTree cur=ctx.getChild(0);\n\t\t\tif (cur instanceof TerminalNode) {\t\t\t\t\n\t\t\t\tif (cur==ctx.INTEG()) return \"int\";\n\t\t\t\telse if (cur==ctx.CH()) return \"char\";\n\t\t\t\telse if(cur==ctx.ID()){\n\t\t\t\t\tString key=visitTerminal((TerminalNode)cur);\n\t\t\t\t\tRecord id= table.lookup(key);\n\t\t\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\t\t\treturn id.getReturnType();\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t}else {\n\t\t\t\tString type=visit(ctx.getChild(0));\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "private CompilationObject compile(AbstractSyntaxTree ast, String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue,\n Supplier< Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n HashMap<String, ProcessNode> processNodeMap = new HashMap<>();\n // HashMap<String, ProcessNode> dependencyMap = new HashMap<>();\n\n //System.out.println(\"\\nCOMPILER \"+ast.myString()+\" symb \"+symb.get()+\"\\n\");\n for (ProcessNode node : ast.getProcesses()) {\n //messageQueue.add(new LogMessage(\"Compile starting \"+node.getIdentifier()+\" s \"+symb.get()));\n //System.out.println(\"**COMPILER** Compiler Start node = \"+ node.myString());\n processNodeMap.put(node.getIdentifier(), (ProcessNode) node.copy());\n // dependencyMap.put(node.getIdentifier(), node);\n }\n\n AbstractSyntaxTree symbAST = ast.copy(); // to be used to build symbolic models\n //??????\n\n //System.out.println(\"symb \"+symb.get());\n if (!symb.get()) {\n ast = processAtomicAST(ast, z3Context, messageQueue);\n } else {\n //expander.expand(ast, messageQueue, z3Context); // use for error detection\n ast = symbAST;\n //ast = expander.expand(ast, messageQueue, z3Context);\n //System.out.println(\" COMPILER Before ReferenceReplacer \"+ast.processes2String());\n //ast = replacer.replaceReferences(ast, messageQueue);\n // If we replace the references then we lose the assignment information\n //System.out.println(\" COMPILER After ReferenceReplacer \"+ast.processes2String());\n\n }\n //\n //\n // ??????\n //store alphabet\n Set<String> alpha = ast.getAlphabet().stream().map(x -> x.getAction()).collect(Collectors.toSet());\n //System.out.println(\"Compiler alph = \"+alpha);\n\n //Having built the final AST now build the processes\n /*System.out.println(\"**COMPILER** Entering interpreter with ast for processes -> Types \"+\n ast.getProcesses().stream().map(x->\"\\n\"+x.getIdentifier()+\"->\"+x.getType())\n .reduce(\"\",(x,y)->x+\" \"+y)); */\n Interpreter.ProcessMapFull pmf = interpreter.interpret(ast,\n messageQueue, z3Context, alpha, symb.get());\n // Optional<Map<String, ProcessModel>> processMap = interpreter.interpret(ast,\n // messageQueue, z3Context, alpha, symb.get());\n\n //System.out.println(\" **COMPILER** before operation evaluation \"+processMap.keySet());\n List<OperationResult> opResults = new ArrayList<>();\n EquationEvaluator.EquationReturn eqResults = new EquationEvaluator.EquationReturn();\n if (pmf.getIsFull()) {\n\n //System.out.println(\" isPresent \"+pmf.getProcessMap().size()+\" \"+ast.getProcesses().size());\n // if (ast.getProcesses().size() <= processMap.get().size()) {\n //System.out.println(\"equal size\"); // not sure why <= and not ==\n opResults = evaluator.evaluateOperations(\n ast.getOperations(), pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(), code, z3Context, messageQueue, alpha);\n //System.out.println(\" **COMPILER** before equation evaluation \"+processMap.keySet());\n\n // HEAVY LIFTING need thread pool\n this.eqEvaluator = new EquationEvaluator(); // need to reset equationEvaluator else !!!!\n eqResults = eqEvaluator.evaluateEquations(\n pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(),\n ast.getEquations(), // one entry per equation\n z3Context, messageQueue, alpha);\n }\n\n\n //System.out.println(\"Compiler built pn \"+ pmf.getProcessMap().size());\n return new CompilationObject(pmf.getProcessMap(), opResults, eqResults.getResults());\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Constants.cpp\", line = 1351,\n FQN=\"llvm::UndefValue::destroyConstantImpl\", NM=\"_ZN4llvm10UndefValue19destroyConstantImplEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Constants.cpp -nm=_ZN4llvm10UndefValue19destroyConstantImplEv\")\n //</editor-fold>\n /*friend*//*package*//*private*/ void destroyConstantImpl() {\n // Free the constant and any dangling references to it.\n getContext().pImpl.UVConstants.erase(getType());\n }", "X86.Operand gen_source_operand(boolean imm_ok, X86.Reg temp);", "private static Object handleConstantsCoercion(ExprFilterSpecLookupable lookupable, Object constant)\n throws ExprValidationException {\n Class identNodeType = lookupable.getReturnType();\n if (!JavaClassHelper.isNumeric(identNodeType)) {\n return constant; // no coercion required, other type checking performed by expression this comes from\n }\n\n if (constant == null) {\n // null constant type\n return null;\n }\n\n if (!JavaClassHelper.canCoerce(constant.getClass(), identNodeType)) {\n throwConversionError(constant.getClass(), identNodeType, lookupable.getExpression());\n }\n\n Class identNodeTypeBoxed = JavaClassHelper.getBoxedType(identNodeType);\n return JavaClassHelper.coerceBoxed((Number) constant, identNodeTypeBoxed);\n }", "@Override\n public void compile(LinkedList<Token> theStack, Compiler c) throws CompilerException {\n\n\tVariableToken vt;\n\tvt = c.getGlobalVariable(this.getTokenString());\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getLocalVariable(this.getTokenString());\n\t }\n\t}\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getParameter(this.getTokenString());\n\t }\n\t}\n\n\tif (vt == null) {\n\t throw new CompilerException(\"The variable \\\"\" + this.getTokenString() + \"\\\" cannot be used in an expression, as it is not a known variable in the current context!\");\n\t} else {\n\t NumberTokenFactory ntf = new NumberTokenFactory();\n\n//\t\t\tNumberToken nt = (NumberToken) ntf.create(Integer.toString(vt.getVariableID()), 0);\n\t //nt.compile(theStack, c);//when we compile the variable, we add the ID of the variable on the bytecode stack of the compiler c. We use NumberTokenFactory to decide, whether the ID is actually 1 byte long or 2 bytes long and then we add those bytes to the compiler bytecode stack.\n\t //theStack.pop();//well... the previous call had the side effect of placing the \"NumberToken\" on the working stack \"theStack\", which is not what we want, so we're removing it from the working stack here!\n\t extended = CompilableToken.compileNumber(vt.getVariableID(), c);\n\n\t //boolean extended = false;\n\t\t\t/*\n\t if (nt instanceof ByteNumberToken) {\n\t extended = false;\n\t } else {\n\t extended = true;\n\t }\n\t */\n\t this.type = vt.getType();\n\t this.context = vt.getContext();\n\n\t c.getByteCode().push(this);\n\n\t //TODO: Following code should have been here for ages, it seems suspicious\n\t // (impossible)\n\t //that everything even worked without it\n\t theStack.push(this.type);\n\t /*\n\t if (this.getType() == BYTE) {\n\t c.getByteCode().push(new PushByteVariableOnStackByteCodeToken(extended));\n\t theStack.push(new ByteNumberToken(\"0\"));\n\t } else if (this.getType() == INT) {\n\t c.getByteCode().push(new PushIntegerVariableOnStackByteCodeToken(extended));\n\t theStack.push(new IntegerNumberToken(\"0\"));\n\t } else {\n\t System.err.println(\"Cannot compile a variable reference; unknown variable type for variable \\\"\" + this.getTokenString() + \".\\\"\");\n\n\t }\n\t */\n\t}\n\n }", "public final void rule__AstConstantVariable__ValueAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23201:1: ( ( ruleAstExpression ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23202:1: ( ruleAstExpression )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23202:1: ( ruleAstExpression )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23203:1: ruleAstExpression\n {\n before(grammarAccess.getAstConstantVariableAccess().getValueAstExpressionParserRuleCall_2_0()); \n pushFollow(FOLLOW_ruleAstExpression_in_rule__AstConstantVariable__ValueAssignment_246503);\n ruleAstExpression();\n\n state._fsp--;\n\n after(grammarAccess.getAstConstantVariableAccess().getValueAstExpressionParserRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
[ "0.5937476", "0.5792619", "0.57265633", "0.56598073", "0.56519073", "0.56228024", "0.560343", "0.5453849", "0.5345769", "0.53078026", "0.52737063", "0.52695554", "0.5226289", "0.5217832", "0.5211563", "0.5197202", "0.5157027", "0.51507723", "0.51114994", "0.50818455", "0.5078449", "0.50570995", "0.5050217", "0.5042036", "0.50200814", "0.5017009", "0.5009303", "0.49895105", "0.49579203", "0.4954891", "0.49396467", "0.49354857", "0.4919351", "0.49033943", "0.4887407", "0.48773402", "0.48532635", "0.483993", "0.4837127", "0.48328185", "0.48231682", "0.48198113", "0.48175716", "0.47943887", "0.4790249", "0.4784721", "0.4784721", "0.47537223", "0.47309774", "0.4729762", "0.47106504", "0.47078913", "0.47069654", "0.46891272", "0.46878076", "0.4684941", "0.46797636", "0.46770492", "0.4674837", "0.46661654", "0.46592584", "0.46526", "0.4652454", "0.4648452", "0.46452802", "0.463967", "0.4638814", "0.4624906", "0.4623085", "0.46150866", "0.46057007", "0.46044827", "0.460149", "0.45678478", "0.4558143", "0.45570284", "0.45564106", "0.45429647", "0.4540166", "0.4530797", "0.4530722", "0.45274127", "0.4526536", "0.45132554", "0.45131943", "0.45130754", "0.45047453", "0.45031124", "0.44954073", "0.44940367", "0.44937113", "0.44854197", "0.447282", "0.44693637", "0.4463083", "0.44577637", "0.44533655", "0.44510487", "0.4450671", "0.44503042" ]
0.61910146
0
Build call for eventSourceServiceCreateEventSource
public okhttp3.Call eventSourceServiceCreateEventSourceCall(String namespace, EventsourceCreateEventSourceRequest body, final ApiCallback _callback) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/api/v1/event-sources/{namespace}" .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "WithCreate withSource(EventChannelSource source);", "SourceBuilder createService();", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceCreateEventSourceValidateBeforeCall(String namespace, EventsourceCreateEventSourceRequest body, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceCreateEventSource(Async)\");\n }\n \n // verify the required parameter 'body' is set\n if (body == null) {\n throw new ApiException(\"Missing the required parameter 'body' when calling eventSourceServiceCreateEventSource(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceCreateEventSourceCall(namespace, body, _callback);\n return localVarCall;\n\n }", "EventChannelSource source();", "public DemoEventSource( T source ) {\n super(source);\n }", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "public AddEventSourceResult addEventSource(AddEventSourceRequest addEventSourceRequest) {\n ExecutionContext executionContext = createExecutionContext(addEventSourceRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<AddEventSourceRequest> request = null;\n Response<AddEventSourceResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new AddEventSourceRequestMarshaller().marshall(super.beforeMarshalling(addEventSourceRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<AddEventSourceResult, JsonUnmarshallerContext> unmarshaller =\n new AddEventSourceResultJsonUnmarshaller();\n JsonResponseHandler<AddEventSourceResult> responseHandler =\n new JsonResponseHandler<AddEventSourceResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public GetEventSourceResult getEventSource(GetEventSourceRequest getEventSourceRequest) {\n ExecutionContext executionContext = createExecutionContext(getEventSourceRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<GetEventSourceRequest> request = null;\n Response<GetEventSourceResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new GetEventSourceRequestMarshaller().marshall(super.beforeMarshalling(getEventSourceRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<GetEventSourceResult, JsonUnmarshallerContext> unmarshaller =\n new GetEventSourceResultJsonUnmarshaller();\n JsonResponseHandler<GetEventSourceResult> responseHandler =\n new JsonResponseHandler<GetEventSourceResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public static SourceBuilder builder() {\n return new SourceBuilder() {\n @Override\n public EventSource build(Context ctx,String... argv) {\n if (argv.length == 1) {\n return new HelloWorldSource(argv[0]);\n } else{\n return new HelloWorldSource();\n } \n }\n };\n }", "EventChannel create();", "public AbstractFoxEvent(Object source, String eventName) {\r\n super(source);\r\n this.eventName = eventName;\r\n this.createTimestamp = System.currentTimeMillis();\r\n }", "java.util.concurrent.Future<CreateEventIntegrationResult> createEventIntegrationAsync(CreateEventIntegrationRequest createEventIntegrationRequest);", "WithCreate withDestination(EventChannelDestination destination);", "EventChannel create(Context context);", "interface WithCreate\n extends DefinitionStages.WithSource,\n DefinitionStages.WithDestination,\n DefinitionStages.WithExpirationTimeIfNotActivatedUtc,\n DefinitionStages.WithFilter,\n DefinitionStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n EventChannel create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n EventChannel create(Context context);\n }", "public CreateLivePullStreamTaskRequest(CreateLivePullStreamTaskRequest source) {\n if (source.SourceType != null) {\n this.SourceType = new String(source.SourceType);\n }\n if (source.SourceUrls != null) {\n this.SourceUrls = new String[source.SourceUrls.length];\n for (int i = 0; i < source.SourceUrls.length; i++) {\n this.SourceUrls[i] = new String(source.SourceUrls[i]);\n }\n }\n if (source.DomainName != null) {\n this.DomainName = new String(source.DomainName);\n }\n if (source.AppName != null) {\n this.AppName = new String(source.AppName);\n }\n if (source.StreamName != null) {\n this.StreamName = new String(source.StreamName);\n }\n if (source.StartTime != null) {\n this.StartTime = new String(source.StartTime);\n }\n if (source.EndTime != null) {\n this.EndTime = new String(source.EndTime);\n }\n if (source.Operator != null) {\n this.Operator = new String(source.Operator);\n }\n if (source.PushArgs != null) {\n this.PushArgs = new String(source.PushArgs);\n }\n if (source.CallbackEvents != null) {\n this.CallbackEvents = new String[source.CallbackEvents.length];\n for (int i = 0; i < source.CallbackEvents.length; i++) {\n this.CallbackEvents[i] = new String(source.CallbackEvents[i]);\n }\n }\n if (source.VodLoopTimes != null) {\n this.VodLoopTimes = new String(source.VodLoopTimes);\n }\n if (source.VodRefreshType != null) {\n this.VodRefreshType = new String(source.VodRefreshType);\n }\n if (source.CallbackUrl != null) {\n this.CallbackUrl = new String(source.CallbackUrl);\n }\n if (source.ExtraCmd != null) {\n this.ExtraCmd = new String(source.ExtraCmd);\n }\n if (source.Comment != null) {\n this.Comment = new String(source.Comment);\n }\n if (source.ToUrl != null) {\n this.ToUrl = new String(source.ToUrl);\n }\n if (source.BackupSourceType != null) {\n this.BackupSourceType = new String(source.BackupSourceType);\n }\n if (source.BackupSourceUrl != null) {\n this.BackupSourceUrl = new String(source.BackupSourceUrl);\n }\n if (source.WatermarkList != null) {\n this.WatermarkList = new PullPushWatermarkInfo[source.WatermarkList.length];\n for (int i = 0; i < source.WatermarkList.length; i++) {\n this.WatermarkList[i] = new PullPushWatermarkInfo(source.WatermarkList[i]);\n }\n }\n if (source.VodLocalMode != null) {\n this.VodLocalMode = new Long(source.VodLocalMode);\n }\n if (source.RecordTemplateId != null) {\n this.RecordTemplateId = new String(source.RecordTemplateId);\n }\n }", "EventUse createEventUse();", "ConferenceScheduleBuilderService createEventsFromNetworkToEnd();", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "public Event createSubscribe(Address resource, String event, int expires);", "public\n CreateEvent()\n {}", "@Override\n public SoapEvent create(SoapEvent event) {\n throw new UnsupportedOperationException();\n }", "protected ServiceEvent(ServiceEvent event) {\n eventSenderClass=event.eventSenderClass;\n eventSenderID=event.eventSenderID;\n }", "StartEvent createStartEvent();", "String serialize(PushEventSource eventSource);", "public String buildMessage(Event event, Object[] params);", "public ContactStatusEvent(Object source)\n {\n super(source);\n }", "private GossipEvent buildEvent(final BaseEvent selfParent, final BaseEvent otherParent) {\n\n final BaseEventHashedData hashedData = new BaseEventHashedData(\n softwareVersion,\n selfId,\n EventUtils.getEventGeneration(selfParent),\n EventUtils.getEventGeneration(otherParent),\n EventUtils.getEventHash(selfParent),\n EventUtils.getEventHash(otherParent),\n EventUtils.getChildTimeCreated(time.now(), selfParent),\n transactionSupplier.getTransactions());\n hasher.digestSync(hashedData);\n\n final BaseEventUnhashedData unhashedData = new BaseEventUnhashedData(\n EventUtils.getCreatorId(otherParent),\n signer.sign(hashedData.getHash().getValue()).getSignatureBytes());\n final GossipEvent gossipEvent = new GossipEvent(hashedData, unhashedData);\n gossipEvent.buildDescriptor();\n return gossipEvent;\n }", "private void createEvents() {\n\t}", "public AnalyticsEvent build() {\n AnalyticsEvent purchaseEvent = null;\n if(isValid() && doBaseValidation()) {\n purchaseEvent = eventClient.createEvent(PURCHASE_EVENT_NAME);\n\n purchaseEvent.addAttribute(PURCHASE_EVENT_PRODUCT_ID_ATTR, productId);\n purchaseEvent.addAttribute(PURCHASE_EVENT_STORE_ATTR, store);\n purchaseEvent.addMetric(PURCHASE_EVENT_QUANTITY_METRIC, quantity);\n\n if(formattedItemPrice != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_PRICE_FORMATTED_ATTR, formattedItemPrice);\n }\n\n if(itemPrice != null) {\n purchaseEvent.addMetric(PURCHASE_EVENT_ITEM_PRICE_METRIC, itemPrice);\n }\n\n if(transactionId != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_TRANSACTION_ID_ATTR, transactionId);\n }\n\n if(currency != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_CURRENCY_ATTR, currency);\n }\n }\n \n return purchaseEvent;\n }", "Event createEvent();", "Event createEvent();", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }", "public ServiceConfig(ServiceConfig source) {\n if (source.Product != null) {\n this.Product = new String(source.Product);\n }\n if (source.UniqVpcId != null) {\n this.UniqVpcId = new String(source.UniqVpcId);\n }\n if (source.Url != null) {\n this.Url = new String(source.Url);\n }\n if (source.Path != null) {\n this.Path = new String(source.Path);\n }\n if (source.Method != null) {\n this.Method = new String(source.Method);\n }\n if (source.UpstreamId != null) {\n this.UpstreamId = new String(source.UpstreamId);\n }\n if (source.CosConfig != null) {\n this.CosConfig = new CosConfig(source.CosConfig);\n }\n }", "UsageEvents.Event buildEvent(String packageName, String className) {\n UsageEvents.Event event = new UsageEvents.Event();\n event.mPackage = getCachedStringRef(packageName);\n if (className != null) {\n event.mClass = getCachedStringRef(className);\n }\n return event;\n }", "public EventoWS() {\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceGetEventSourceValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceGetEventSource(Async)\");\n }\n \n // verify the required parameter 'name' is set\n if (name == null) {\n throw new ApiException(\"Missing the required parameter 'name' when calling eventSourceServiceGetEventSource(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceGetEventSourceCall(namespace, name, _callback);\n return localVarCall;\n\n }", "public ApplicationEvent(Object source) {\n super(source);\n this.timestamp = System.currentTimeMillis();\n }", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "public Event createOneShotPublish(Address resource, String event);", "private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }", "public EventObject(Object source) {\n\tif (source == null)\n\t throw new IllegalArgumentException(\"null source\");\n\n this.source = source;\n }", "EventUses createEventUses();", "ConferenceScheduleBuilderService startEvent();", "public TaskEventData(TaskEventData source) {\n if (source.Code != null) {\n this.Code = new Long(source.Code);\n }\n if (source.Message != null) {\n this.Message = new String(source.Message);\n }\n if (source.TaskId != null) {\n this.TaskId = new Long(source.TaskId);\n }\n if (source.TaskOrderId != null) {\n this.TaskOrderId = new String(source.TaskOrderId);\n }\n if (source.TaskCode != null) {\n this.TaskCode = new Long(source.TaskCode);\n }\n if (source.TaskCoinNumber != null) {\n this.TaskCoinNumber = new Long(source.TaskCoinNumber);\n }\n if (source.TaskType != null) {\n this.TaskType = new Long(source.TaskType);\n }\n if (source.TotalCoin != null) {\n this.TotalCoin = new Long(source.TotalCoin);\n }\n if (source.Attach != null) {\n this.Attach = new String(source.Attach);\n }\n if (source.DoneTimes != null) {\n this.DoneTimes = new Long(source.DoneTimes);\n }\n if (source.TotalTimes != null) {\n this.TotalTimes = new Long(source.TotalTimes);\n }\n if (source.TaskName != null) {\n this.TaskName = new String(source.TaskName);\n }\n if (source.GrowScore != null) {\n this.GrowScore = new Long(source.GrowScore);\n }\n }", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "protected void addBuildFunction(S source) {\n Function build =\n FunctionBuilder.of(source, \"build\", Purpose.build())\n .setReturnValue(new DataObject(new ObjectName(\"Widget\"), new PackageName(\"com.dummy\")))\n .addArgument(\n new DataObject(\n new ObjectName(\"BuildContext\"),\n new PackageName(\"com.dummy\"),\n new VariableName(\"context\")))\n .build();\n\n source.addFunction(build);\n }", "public ServiceEvent(ServiceID eventSenderID, Class eventSenderClass) {\n this.eventSenderID = eventSenderID;\n this.eventSenderClass = eventSenderClass;\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> create(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateMethod(), getCallOptions()), request);\n }", "public yandex.cloud.api.operation.OperationOuterClass.Operation create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateMethod(), getCallOptions(), request);\n }", "public ListEventSourcesResult listEventSources(ListEventSourcesRequest listEventSourcesRequest) {\n ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<ListEventSourcesRequest> request = null;\n Response<ListEventSourcesResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new ListEventSourcesRequestMarshaller().marshall(super.beforeMarshalling(listEventSourcesRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<ListEventSourcesResult, JsonUnmarshallerContext> unmarshaller =\n new ListEventSourcesResultJsonUnmarshaller();\n JsonResponseHandler<ListEventSourcesResult> responseHandler =\n new JsonResponseHandler<ListEventSourcesResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public Event createPublish(Address resource, String event, int expires);", "public EventBus build() {\n return new EventBus(this);\n }", "private StoreEvent(E source) {\n super(source);\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceEventSourcesLogsValidateBeforeCall(String namespace, String name, String eventSourceType, String eventName, String grep, String podLogOptionsContainer, Boolean podLogOptionsFollow, Boolean podLogOptionsPrevious, String podLogOptionsSinceSeconds, String podLogOptionsSinceTimeSeconds, Integer podLogOptionsSinceTimeNanos, Boolean podLogOptionsTimestamps, String podLogOptionsTailLines, String podLogOptionsLimitBytes, Boolean podLogOptionsInsecureSkipTLSVerifyBackend, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceEventSourcesLogs(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceEventSourcesLogsCall(namespace, name, eventSourceType, eventName, grep, podLogOptionsContainer, podLogOptionsFollow, podLogOptionsPrevious, podLogOptionsSinceSeconds, podLogOptionsSinceTimeSeconds, podLogOptionsSinceTimeNanos, podLogOptionsTimestamps, podLogOptionsTailLines, podLogOptionsLimitBytes, podLogOptionsInsecureSkipTLSVerifyBackend, _callback);\n return localVarCall;\n\n }", "public void buildStarted(BuildEvent event) {\n }", "@POST\n @Path(\"/source/\")\n @Consumes(\"application/json;charset=UTF-8\")\n @Produces(\"application/json;charset=UTF-8\")\n @RolesAllowed(Roles.ADMIN)\n @GZIP\n @NoCache\n public SourceVo createSource(SourceVo source) throws Exception {\n log.info(\"Creating source \" + source);\n return sourceService.createSource(new Source(source))\n .toVo(DataFilter.get());\n }", "Event generateEvent(int seed) throws Exception {\n return new Event(\n new Description(\"Event \" + seed),\n new StartTime(\"0900\"),\n new StartDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new EndTime(\"1100\"),\n new EndDate(Integer.toString((Integer.parseInt(\"200317\") + seed))),\n new Location(\"House of \" + seed),\n new UniqueTagList(new Tag(\"tag\" + Math.abs(seed)), new Tag(\"tag\" + Math.abs(seed + 1)))\n );\n }", "public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service, Throwable cause, Set unsatisfiedConditions) {\n if (kernel == null) throw new NullPointerException(\"kernel is null\");\n if (serviceName == null) throw new NullPointerException(\"name is null\");\n if (serviceFactory == null) throw new NullPointerException(\"serviceFactory is null\");\n if (classLoader == null) throw new NullPointerException(\"classLoader is null\");\n if (unsatisfiedConditions != null && cause != null) throw new IllegalArgumentException(\"Either unsatisfiedConditions or cause must be null\");\n if (cause != null && service != null) throw new IllegalArgumentException(\"A ServiceEvent can not carry both a cause and a service\");\n this.eventId = eventId;\n this.kernel = kernel;\n this.serviceName = serviceName;\n this.serviceFactory = serviceFactory;\n this.classLoader = classLoader;\n this.service = service;\n this.cause = cause;\n this.unsatisfiedConditions = unsatisfiedConditions;\n }", "@Test\n\tpublic void testSingleSourceConstruct() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_singleSource02.rq\", \"/tests/basic/query_singleSource02.ttl\", false);\n\t}", "public YahooWeatherEvent(Object source) {\n super(source);\n }", "public DescribeEventsRequest() {}", "public LogEvent(Object source, String message) {\n super(source);\n this.message = message + \"\\n\";\n }", "public Event subscribe(Address resource, String event, int expires, Content body);", "ConferenceScheduleBuilderService createEventsFromStartToLunch();", "BasicEvents createBasicEvents();", "static Event init(final String propertyName)\n {\n final LTProperties properties = Context.configuration().properties;\n final String defaultLogLevel = properties.getProperty(\"events.logging.default.level\", \"debug\");\n final String logLevel = properties.getProperty(\"events.logging.\" + propertyName + \".level\", defaultLogLevel).toLowerCase();\n\n final Event event;\n switch (logLevel) {\n case \"error\":\n event = new ERROR();\n break;\n\n case \"warn\":\n event = new WARN();\n break;\n\n case \"info\":\n event = new INFO();\n break;\n\n case \"debug\":\n event = new DEBUG();\n break;\n\n default:\n throw new IllegalArgumentException(\"Log level '\" + logLevel + \"' not supported.\");\n }\n\n return event;\n }", "public okhttp3.Call eventSourceServiceGetEventSourceCall(String namespace, String name, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/api/v1/event-sources/{namespace}/{name}\"\n .replaceAll(\"\\\\{\" + \"namespace\" + \"\\\\}\", localVarApiClient.escapeString(namespace.toString()))\n .replaceAll(\"\\\\{\" + \"name\" + \"\\\\}\", localVarApiClient.escapeString(name.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "public void targetStarted(BuildEvent event) {\n }", "public static Event startEvent(String accessToken, Integer eventId) {\n JsonObject jsonObject = new JsonObject();\n\n jsonObject.add(\"event\", new JsonObject());\n Log.i(Constants.TAG, \"jsonObject:\" + jsonObject.toString());\n\n try {\n JsonElement element = NetworkUtil.postWebService(jsonObject, NetworkUtil.EVENTS_URI + \"/\" + eventId + EVENTS_START_URI, accessToken);\n Log.i(Constants.TAG, \"result:\" + element.toString());\n if (element != null) {\n GsonBuilder jsonBuilder = new GsonBuilder();\n jsonBuilder.registerTypeAdapter(Event.class, new Event.EventDeserializer());\n Gson gson = jsonBuilder.create();\n\n Log.i(Constants.TAG, \"RETURNED : jsonObject:\" + element.getAsJsonObject().get(\"event\").toString());\n Event event = gson.fromJson(\n element.getAsJsonObject().get(\"event\"),\n Event.class\n );\n return event;\n } else {\n return null;\n }\n } catch (APICallException e) {\n Log.e(Constants.TAG, \"HTTP ERROR when starting event - STATUS:\" + e.getMessage(), e);\n return null;\n } catch (IOException e) {\n Log.e(Constants.TAG, \"IOException when starting event\", e);\n return null;\n } // end try-catch\n }", "Update withSource(EventChannelSource source);", "@Override\n public Event createSlotEventService(String discordId, String eventId,\n com.bot.insched.model.Event eventModel) {\n Calendar calendar = getCalendarbyId(discordId);\n if (calendar == null) {\n return null;\n }\n try {\n // event di google calendar\n Event eventCalendar = new Event();\n\n DateTimeFormatter dateFormatter = DateTimeFormatter.ISO_DATE_TIME;\n\n DateTime dateTime = new DateTime(eventModel.getStartTime().minusHours(7)\n .format(dateFormatter));\n eventCalendar.setStart(new EventDateTime().setDateTime(dateTime));\n dateTime = new DateTime(eventModel.getEndTime().minusHours(7).format(dateFormatter));\n eventCalendar.setEnd(new EventDateTime().setDateTime(dateTime));\n eventCalendar.setSummary(eventModel.getDescription());\n eventCalendar = calendar.events().insert(\"primary\", eventCalendar).execute();\n eventModel.setIdGoogleEvent(eventCalendar.getId());\n eventRepository.save(eventModel);\n return eventCalendar;\n\n } catch (Exception e) {\n log.error(\"------ Error when createSlotEventService: {}\", e.getMessage());\n return null;\n }\n }", "@Override\n\tpublic ServerSentEvent initEvent(Map<String, Object> params)\n\t\t\tthrows Exception {\n\t\treturn new CancelSupportServerSentEvent(params);\n\t\t\n\t}", "@Override\n\tpublic EventDto createEvent(EventDto event) {\n\t\tEventEntity eventEntity=new EventEntity();\n\t\tBeanUtils.copyProperties(event, eventEntity);\n\t\t\n\t\tString eventid=utils.generateEventId(20);\n\t\teventEntity.setEventid(eventid);\n\t\t\n\t\tEventEntity storedEvent=eventRepository.save(eventEntity);\n\t\t\n\t\tEventDto returnvalue=new EventDto();\n\t\tBeanUtils.copyProperties(storedEvent, returnvalue);\n\t\t\n\t\treturn returnvalue;\n\t}", "@WebMethod public Event createEvent(Date date, Team a, Team b) throws EventAlreadyExist;", "@Override\r\n\tpublic Element newEvent(String source, String type, int t) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(!mEventStarted) {\r\n\t\t\tmRoot = mDocument.createElement(\"slice\");\r\n\t\t\tmRoot.setAttribute(\"date\", Integer.toString(t));\r\n\t\t\tmDocument.appendChild(mRoot);\r\n\t\t} else if (t != mLastCycle) {\r\n\t\t\tthis.finishEvent();\r\n\t\t\tmRoot = mDocument.createElement(\"slice\");\r\n\t\t\tmRoot.setAttribute(\"date\", Integer.toString(t));\r\n\t\t\tmDocument.appendChild(mRoot);\r\n\t\t}\r\n\t\tmLastCycle = t;\r\n\t\tmEventStarted = true;\r\n\t\t\r\n\t\tmID++;\r\n\t\tmCurrentEvent = mDocument.createElement(\"event\");\r\n\t\tmCurrentEvent.setAttribute(\"id\", Integer.toString(mID));\r\n\t\tmCurrentEvent.setAttribute(\"source\", source);\r\n\t\tmCurrentEvent.setAttribute(\"date\", Integer.toString(t));\r\n\t\tElement typeElement = mDocument.createElement(\"type\");\r\n//\t\ttypeElement.setTextContent(type);\r\n\t\ttypeElement.appendChild(mDocument.createTextNode(type));\r\n\t\tmCurrentEvent.appendChild(typeElement);\r\n\t\tmRoot.appendChild(mCurrentEvent);\r\n\r\n\t\treturn mCurrentEvent;\r\n\t}", "public VfsSaxSource(VfsInputSource inputSource) {\r\n\t\tsuper(inputSource);\r\n\t}", "public static StreamBuilder configure() {\n return new EventStreamBuilder();\n }", "@Test\n public void testRegisterSource_NoServerSetup_NoErrors() throws Exception {\n Assume.assumeTrue(AdServicesInfo.INSTANCE.version() >= 5);\n\n assertThat(mMeasurementManager.registerSourceAsync(\n SOURCE_REGISTRATION_URI,\n /* inputEvent= */ null).get())\n .isNotNull();\n }", "public ModelService(ModelService source) {\n if (source.Id != null) {\n this.Id = new String(source.Id);\n }\n if (source.Cluster != null) {\n this.Cluster = new String(source.Cluster);\n }\n if (source.Name != null) {\n this.Name = new String(source.Name);\n }\n if (source.Runtime != null) {\n this.Runtime = new String(source.Runtime);\n }\n if (source.ModelUri != null) {\n this.ModelUri = new String(source.ModelUri);\n }\n if (source.Cpu != null) {\n this.Cpu = new Long(source.Cpu);\n }\n if (source.Memory != null) {\n this.Memory = new Long(source.Memory);\n }\n if (source.Gpu != null) {\n this.Gpu = new Long(source.Gpu);\n }\n if (source.GpuMemory != null) {\n this.GpuMemory = new Long(source.GpuMemory);\n }\n if (source.CreateTime != null) {\n this.CreateTime = new String(source.CreateTime);\n }\n if (source.UpdateTime != null) {\n this.UpdateTime = new String(source.UpdateTime);\n }\n if (source.ScaleMode != null) {\n this.ScaleMode = new String(source.ScaleMode);\n }\n if (source.Scaler != null) {\n this.Scaler = new Scaler(source.Scaler);\n }\n if (source.Status != null) {\n this.Status = new ServiceStatus(source.Status);\n }\n if (source.AccessToken != null) {\n this.AccessToken = new String(source.AccessToken);\n }\n if (source.ConfigId != null) {\n this.ConfigId = new String(source.ConfigId);\n }\n if (source.ConfigName != null) {\n this.ConfigName = new String(source.ConfigName);\n }\n if (source.ServeSeconds != null) {\n this.ServeSeconds = new Long(source.ServeSeconds);\n }\n if (source.ConfigVersion != null) {\n this.ConfigVersion = new String(source.ConfigVersion);\n }\n if (source.ResourceGroupId != null) {\n this.ResourceGroupId = new String(source.ResourceGroupId);\n }\n if (source.Exposes != null) {\n this.Exposes = new ExposeInfo[source.Exposes.length];\n for (int i = 0; i < source.Exposes.length; i++) {\n this.Exposes[i] = new ExposeInfo(source.Exposes[i]);\n }\n }\n if (source.Region != null) {\n this.Region = new String(source.Region);\n }\n if (source.ResourceGroupName != null) {\n this.ResourceGroupName = new String(source.ResourceGroupName);\n }\n if (source.Description != null) {\n this.Description = new String(source.Description);\n }\n if (source.GpuType != null) {\n this.GpuType = new String(source.GpuType);\n }\n if (source.LogTopicId != null) {\n this.LogTopicId = new String(source.LogTopicId);\n }\n }", "BasicEvent createBasicEvent();", "public EventBusConsumerFactory(Vertx vertx) {\n\t\tsuper();\n\t\tfinal MessageConsumer<String> consumer = vertx.eventBus().consumer(address);\n\t\tconsumer.handler(message -> {\n\t\t\tSystem.out.println(\"incoming message: \" + message.body());\n\t\t\tJsonObject reply = new JsonObject().put(\"message\", \"Replied Message\");\n\t\t\tmessage.reply(reply);\n\t\t});\n\t}", "SyslogEvent build() {\n\n miruLogEvent = parse(rawMessage, address.toString());\n return this;\n }", "WithCreate withFilter(EventChannelFilter filter);", "public void addEvents(EventSource... events) {\n for (EventSource e : events) {\n // Create a deep-copy of each addition.\n this.eventList.add(new EventSource(e));\n }\n notifyEventListListeners();\n }", "private SubmitConfigSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public void taskStarted(BuildEvent event) {\n }", "SourceBuilder createRestServiceLayers();", "public SubscriptionSourceBase(String vendorName) {\n\t\tthis.vendorName = vendorName;\n\t}", "protected void logEventCreation(final GossipEvent event) {\n logger.debug(CREATE_EVENT.getMarker(), \"Creating {}\", event::toString);\n }", "public Event() {\r\n\r\n\t}", "RemoteEvent createRemoteEvent();", "public Task(Task source) {\n if (source.Application != null) {\n this.Application = new Application(source.Application);\n }\n if (source.TaskName != null) {\n this.TaskName = new String(source.TaskName);\n }\n if (source.TaskInstanceNum != null) {\n this.TaskInstanceNum = new Long(source.TaskInstanceNum);\n }\n if (source.ComputeEnv != null) {\n this.ComputeEnv = new AnonymousComputeEnv(source.ComputeEnv);\n }\n if (source.EnvId != null) {\n this.EnvId = new String(source.EnvId);\n }\n if (source.RedirectInfo != null) {\n this.RedirectInfo = new RedirectInfo(source.RedirectInfo);\n }\n if (source.RedirectLocalInfo != null) {\n this.RedirectLocalInfo = new RedirectLocalInfo(source.RedirectLocalInfo);\n }\n if (source.InputMappings != null) {\n this.InputMappings = new InputMapping[source.InputMappings.length];\n for (int i = 0; i < source.InputMappings.length; i++) {\n this.InputMappings[i] = new InputMapping(source.InputMappings[i]);\n }\n }\n if (source.OutputMappings != null) {\n this.OutputMappings = new OutputMapping[source.OutputMappings.length];\n for (int i = 0; i < source.OutputMappings.length; i++) {\n this.OutputMappings[i] = new OutputMapping(source.OutputMappings[i]);\n }\n }\n if (source.OutputMappingConfigs != null) {\n this.OutputMappingConfigs = new OutputMappingConfig[source.OutputMappingConfigs.length];\n for (int i = 0; i < source.OutputMappingConfigs.length; i++) {\n this.OutputMappingConfigs[i] = new OutputMappingConfig(source.OutputMappingConfigs[i]);\n }\n }\n if (source.EnvVars != null) {\n this.EnvVars = new EnvVar[source.EnvVars.length];\n for (int i = 0; i < source.EnvVars.length; i++) {\n this.EnvVars[i] = new EnvVar(source.EnvVars[i]);\n }\n }\n if (source.Authentications != null) {\n this.Authentications = new Authentication[source.Authentications.length];\n for (int i = 0; i < source.Authentications.length; i++) {\n this.Authentications[i] = new Authentication(source.Authentications[i]);\n }\n }\n if (source.FailedAction != null) {\n this.FailedAction = new String(source.FailedAction);\n }\n if (source.MaxRetryCount != null) {\n this.MaxRetryCount = new Long(source.MaxRetryCount);\n }\n if (source.Timeout != null) {\n this.Timeout = new Long(source.Timeout);\n }\n if (source.MaxConcurrentNum != null) {\n this.MaxConcurrentNum = new Long(source.MaxConcurrentNum);\n }\n if (source.RestartComputeNode != null) {\n this.RestartComputeNode = new Boolean(source.RestartComputeNode);\n }\n if (source.ResourceMaxRetryCount != null) {\n this.ResourceMaxRetryCount = new Long(source.ResourceMaxRetryCount);\n }\n }", "@Override\n public String generateResourceLink(SoapEvent soapEvent) {\n return SLASH + WEB + SLASH + SOAP + SLASH + PROJECT + SLASH + soapEvent.getProjectId() + SLASH + PORT + SLASH +\n soapEvent.getPortId() + SLASH + OPERATION + SLASH + soapEvent.getOperationId();\n }", "public interface EventChannel {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the systemData property: The system metadata relating to Event Channel resource.\n *\n * @return the systemData value.\n */\n SystemData systemData();\n\n /**\n * Gets the source property: Source of the event channel. This represents a unique resource in the partner's\n * resource model.\n *\n * @return the source value.\n */\n EventChannelSource source();\n\n /**\n * Gets the destination property: Represents the destination of an event channel.\n *\n * @return the destination value.\n */\n EventChannelDestination destination();\n\n /**\n * Gets the provisioningState property: Provisioning state of the event channel.\n *\n * @return the provisioningState value.\n */\n EventChannelProvisioningState provisioningState();\n\n /**\n * Gets the partnerTopicReadinessState property: The readiness state of the corresponding partner topic.\n *\n * @return the partnerTopicReadinessState value.\n */\n PartnerTopicReadinessState partnerTopicReadinessState();\n\n /**\n * Gets the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this timer expires\n * while the corresponding partner topic is never activated, the event channel and corresponding partner topic are\n * deleted.\n *\n * @return the expirationTimeIfNotActivatedUtc value.\n */\n OffsetDateTime expirationTimeIfNotActivatedUtc();\n\n /**\n * Gets the filter property: Information about the filter for the event channel.\n *\n * @return the filter value.\n */\n EventChannelFilter filter();\n\n /**\n * Gets the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to remove any\n * ambiguity of the origin of creation of the partner topic for the customer.\n *\n * @return the partnerTopicFriendlyDescription value.\n */\n String partnerTopicFriendlyDescription();\n\n /**\n * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.EventChannelInner object.\n *\n * @return the inner object.\n */\n EventChannelInner innerModel();\n\n /** The entirety of the EventChannel definition. */\n interface Definition\n extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {\n }\n /** The EventChannel definition stages. */\n interface DefinitionStages {\n /** The first stage of the EventChannel definition. */\n interface Blank extends WithParentResource {\n }\n /** The stage of the EventChannel definition allowing to specify parent resource. */\n interface WithParentResource {\n /**\n * Specifies resourceGroupName, partnerNamespaceName.\n *\n * @param resourceGroupName The name of the resource group within the user's subscription.\n * @param partnerNamespaceName Name of the partner namespace.\n * @return the next definition stage.\n */\n WithCreate withExistingPartnerNamespace(String resourceGroupName, String partnerNamespaceName);\n }\n /**\n * The stage of the EventChannel definition which contains all the minimum required properties for the resource\n * to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithSource,\n DefinitionStages.WithDestination,\n DefinitionStages.WithExpirationTimeIfNotActivatedUtc,\n DefinitionStages.WithFilter,\n DefinitionStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n EventChannel create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n EventChannel create(Context context);\n }\n /** The stage of the EventChannel definition allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel definition allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n WithCreate withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel definition allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel definition allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n WithCreate withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel definition allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n WithCreate withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Begins update for the EventChannel resource.\n *\n * @return the stage of resource update.\n */\n EventChannel.Update update();\n\n /** The template for EventChannel update. */\n interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }\n /** The EventChannel update stages. */\n interface UpdateStages {\n /** The stage of the EventChannel update allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel update allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel update allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel update allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel update allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n Update withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n EventChannel refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n EventChannel refresh(Context context);\n}", "@WebMethod public void createEvent(String description, LocalDate eventDate) throws EventAlreadyExist;", "BuildClient createBuildClient();", "private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}" ]
[ "0.61927587", "0.6030037", "0.59942544", "0.5787025", "0.55602324", "0.5527626", "0.54650307", "0.54549277", "0.54364", "0.540004", "0.5353783", "0.5345163", "0.53404015", "0.52900565", "0.5268643", "0.5257062", "0.5179445", "0.5143278", "0.51272315", "0.5081003", "0.50503606", "0.5049669", "0.50411236", "0.5039895", "0.49792948", "0.49572033", "0.49541536", "0.49467894", "0.49416524", "0.49376464", "0.49362788", "0.4936089", "0.4927985", "0.4927985", "0.49204785", "0.4914433", "0.48835447", "0.48691642", "0.48504066", "0.48455656", "0.48452076", "0.48443303", "0.48422068", "0.47642875", "0.4763232", "0.4748357", "0.4730411", "0.4721084", "0.47103566", "0.47090137", "0.46961057", "0.46914855", "0.46907437", "0.46858543", "0.46732473", "0.4671548", "0.46660256", "0.46574998", "0.46431527", "0.46398133", "0.46211216", "0.4620166", "0.4616912", "0.4614217", "0.46050143", "0.45874473", "0.45869723", "0.45749798", "0.45711458", "0.45664173", "0.45517632", "0.45273164", "0.45227644", "0.45112473", "0.45106655", "0.44954965", "0.44927686", "0.44918883", "0.44914705", "0.44913957", "0.44912463", "0.44809878", "0.44737163", "0.44630232", "0.4461431", "0.44583717", "0.44524297", "0.44522023", "0.4448319", "0.44438624", "0.4439065", "0.44366205", "0.44335964", "0.44301638", "0.44272578", "0.4416298", "0.44143772", "0.441189", "0.44108886", "0.44097713" ]
0.5767461
4
verify the required parameter 'namespace' is set
@SuppressWarnings("rawtypes") private okhttp3.Call eventSourceServiceCreateEventSourceValidateBeforeCall(String namespace, EventsourceCreateEventSourceRequest body, final ApiCallback _callback) throws ApiException { if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling eventSourceServiceCreateEventSource(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling eventSourceServiceCreateEventSource(Async)"); } okhttp3.Call localVarCall = eventSourceServiceCreateEventSourceCall(namespace, body, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetNamespace();", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "void setNamespace(java.lang.String namespace);", "private NamespaceHelper() {}", "public boolean isNamespaceAware () {\n return true;\n }", "protected void validateNamespace(Namespace namespace) throws WikiException {\r\n\t\tcheckLength(namespace.getDefaultLabel(), 200);\r\n\t}", "void setNamespace(String namespace);", "boolean isNamespaceRunning(String namespace);", "public void testGetNamespaceURI() throws RepositoryException {\n String result = \"namespace\" ;\n String prefix =\"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespaceURI(prefix), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespaceURI(prefix), result);\n }", "java.lang.String getNamespace();", "@Test\n\tpublic void test_TCM__String_getNamespacePrefix() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect prefix\", attribute.getNamespacePrefix().equals(\"prefx\"));\n\t}", "@Test\n\tpublic void test_TCM__String_getNamespaceURI() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect URI\", attribute.getNamespaceURI().equals(\"http://some.other.place\"));\n\n\t}", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "boolean isNamespace(Object object);", "protected void validateNamespaceTranslation(Namespace namespace, String virtualWiki) throws WikiException {\r\n\t\tcheckLength(namespace.getLabel(virtualWiki), 200);\r\n\t}", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public final boolean isNamespaceAware() {\n return true;\n }", "public void testMemberNotTeamMemberForProjectValidator_NullNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator((String) null);\r\n fail(\"testMemberNotTeamMemberForProjectValidator_NullNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_NullNamespace.\");\r\n }\r\n }", "@Test\n public void testNamespace() throws Exception {\n NamespaceMeta ns1Meta = new NamespaceMeta.Builder().setName(\"ns1\").build();\n NamespaceMeta ns2Meta = new NamespaceMeta.Builder().setName(\"ns2\").build();\n NamespaceMeta anotherNsMeta = new NamespaceMeta.Builder().setName(\"anotherNs\").build();\n when(nsClient.list()).thenReturn(ImmutableList.of(ns1Meta, ns2Meta, anotherNsMeta));\n\n ResourceLookupContext resourceLookupContext = new ResourceLookupContext();\n resourceLookupContext.setResourceName(\"namespace\");\n // user is entering n and we expect the completion to show ns1 and ns2 as they start with n and not anotherNs\n resourceLookupContext.setUserInput(\"n\");\n resourceLookupContext.setResources(ImmutableMap.of(\"namespace\", Collections.emptyList()));\n List<String> resources = client.getResources(resourceLookupContext);\n Assert.assertEquals(2, resources.size());\n Assert.assertEquals(ImmutableList.of(\"ns1\", \"ns2\"), resources);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "public String getNamespace();", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public String getNamespace() {\n return namespace;\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static boolean isValidNamespace(CharSequence namespace) {\n if (namespace == null) {\n return false;\n }\n\n int position = 0;\n boolean start = true;\n\n while (position < namespace.length()) {\n char c = namespace.charAt(position++);\n if (start) {\n start = false;\n if (!isValidIdentifierStart(c)) {\n return false;\n }\n } else if (c == '.') {\n start = true;\n } else if (!isValidIdentifierAfterStart(c)) {\n return false;\n }\n }\n\n return !start;\n }", "public String getNamespace () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected boolean isMatchingNamespace(String rootElementNamespace)\n {\n if (namespacePattern != null)\n {\n return namespacePattern.matcher(rootElementNamespace == null ? \"\" : rootElementNamespace).matches();\n }\n else\n {\n return namespace == null ? rootElementNamespace == null : namespace.equals(rootElementNamespace);\n }\n }", "@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public void testMemberNotTeamMemberForProjectValidator_EmptyNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\" \");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_EmptyNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_EmptyNamespace.\");\r\n }\r\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }", "public boolean hasNamespace(final String namespace) {\n return rpcMethods.keySet().stream()\n .anyMatch(key -> key.toUpperCase().startsWith(namespace.toUpperCase()));\n }", "public void testGetNamespacePrefix() throws RepositoryException {\n String result = \"namespace\";\n String uri = \"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespacePrefix(uri), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefix(uri), result);\n }", "private static boolean _inNamespace(Resource resource, String namespace) {\n\t\tString resourceNamespace = resource.getNameSpace();\n\t\t\n\t\tif ( namespace.endsWith(\"/\") || namespace.endsWith(\"#\") ) {\n\t\t\treturn namespace.equals(resourceNamespace);\n\t\t}\n\t\telse {\n\t\t\treturn resourceNamespace != null && namespace.equals(resourceNamespace.replaceAll(\"(/|#)$\", \"\"));\n\t\t}\n\t}", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getTargetNamespace();", "public boolean hasNamespace() {\n return m_namespaces != null && m_namespaces.size() > 0;\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "void visit(Namespace namespace);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "@Test\n\tpublic void test_TCC___String_String_int_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", Attribute.ID_TYPE.ordinal(), namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "Namespaces namespaces();", "String getNamespaceStringValue(Object ns);", "public boolean isSetNs() {\n return this.ns != null;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "public boolean isTargetNamespace(String prefix) {\r\n return prefix.equals(getDefinitions().getTargetNamespace());\r\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public boolean addNamespaceToBPELDoc(String prefix, String namespace, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Adding namespace {} to BuildPlan {}\", namespace,\n\t\t\t\tbuildPlan.getBpelProcessElement().getAttribute(\"name\"));\n\t\tbuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:\" + prefix, namespace);\n\t\t// TODO make a real check\n\t\treturn true;\n\t}", "public boolean isNamespaceAware() {\n\t\ttry {\n\t\t\treturn parserImpl.getFeature(Constants.SAX_FEATURE_PREFIX\n\t\t\t\t\t\t\t\t\t\t + Constants.NAMESPACES_FEATURE);\n\t\t}\n\t\t catch (SAXException x) {\n\t\t\tthrow new IllegalStateException(x.getMessage());\n\t\t}\n\t}", "private boolean ensureXSDTypeNamespaceMappings(Object obj) {\r\n\t\t\r\n\t\tString targetNamespace = null;\r\n\t\t\r\n\t\tif (obj instanceof XSDNamedComponent ) {\r\n\t\t\tXSDNamedComponent namedComponent = (XSDNamedComponent) obj; \r\n\t\t\ttargetNamespace = namedComponent.getTargetNamespace();\r\n\t\t}\r\n\t\t\r\n\t\tif (targetNamespace == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Now check if the target namespace has a prefix mappings.\r\n\t\tString prefix = BPELUtils.getNamespacePrefix (modelObject, targetNamespace);\r\n\t\tif (prefix != null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// We have to map the namespace to a prefix. \r\n\t\tNamespaceMappingDialog dialog = new NamespaceMappingDialog(getShell(),modelObject);\r\n\t\tdialog.setNamespace( targetNamespace );\r\n\t\t\r\n\t\tif (dialog.open() == Window.CANCEL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// define the prefix\r\n\t\tBPELUtils.setPrefix( BPELUtils.getProcess(modelObject), targetNamespace, dialog.getPrefix()); \t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n \tpublic void whereClauseForNodeNamespace() {\n \t\tnode23.setNamespace(\"namespace\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.namespace\", \"'namespace'\"));\n \t}", "public void setTargetNamespace(String targetNamespace)\r\n {\r\n this.targetNamespace = targetNamespace;\r\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static boolean NamespaceNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NamespaceNodeTest\")) return false;\n if (!nextTokenIs(b, K_NAMESPACE_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMESPACE_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NAMESPACE_NODE, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@XmlElement(required = true, name = \"namespace\")\n public String getNamespace() {\n return namespace;\n }", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "@Test\n public void verifyReservedNS() throws IOException {\n NamespaceDescriptor ns = TestNamespace.admin.getNamespaceDescriptor(DEFAULT_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), DEFAULT_NAMESPACE.getName());\n ns = TestNamespace.admin.getNamespaceDescriptor(SYSTEM_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(2, TestNamespace.admin.listNamespaceDescriptors().length);\n // verify existence of system tables\n Set<TableName> systemTables = Sets.newHashSet(META_TABLE_NAME);\n HTableDescriptor[] descs = TestNamespace.admin.listTableDescriptorsByNamespace(SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(systemTables.size(), descs.length);\n for (HTableDescriptor desc : descs) {\n Assert.assertTrue(systemTables.contains(desc.getTableName()));\n }\n // verify system tables aren't listed\n Assert.assertEquals(0, TestNamespace.admin.listTables().length);\n // Try creating default and system namespaces.\n boolean exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(DEFAULT_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(SYSTEM_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n }", "private String getNamespace(Package pkg) {\n/* */ String nsUri;\n/* 223 */ if (pkg == null) return \"\";\n/* */ \n/* */ \n/* 226 */ XmlNamespace ns = pkg.<XmlNamespace>getAnnotation(XmlNamespace.class);\n/* 227 */ if (ns != null) {\n/* 228 */ nsUri = ns.value();\n/* */ } else {\n/* 230 */ nsUri = \"\";\n/* 231 */ } return nsUri;\n/* */ }", "String getReferenceNamespace();", "int getNamespaceUri();", "String getNamespacePrefix(Object ns);", "public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }", "public void testMemberNotTeamMemberForProjectValidator_UnknownNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\"unknown\");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_UnknownNamespace is failure.\");\r\n } catch (RegistrationValidationConfigurationException rvce) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_UnknownNamespace.\");\r\n }\r\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.362 -0500\", hash_original_method = \"1F62AD2938072A93E19EAFFCDA555D07\", hash_generated_method = \"E522C6EE17CC779935F0D04DE1F1F350\")\n \npublic NamespaceSupport ()\n {\n reset();\n }", "protected boolean compareNamespace(final XNode y, final ArrayReporter rep) {\n\t\tString ux = getNSUri();\n\t\tString uy = y.getNSUri();\n\t\tif (ux == null) {\n\t\t\tif (uy == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (ux.equals(uy)) {\n\t\t\treturn true;\n\t\t}\n\t\t//Namespace differs: &{0} and &{1}\n\t\trep.error(XDEF.XDEF288, getXDPosition(), y.getXDPosition());\n\t\treturn false;\n\t}", "public void testSetNamespacePrefix() throws RepositoryException{\n String prefix = \"prefix\";\n String uri =\"uri\";\n session.setNamespacePrefix(prefix, uri);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.setNamespacePrefix(prefix, uri);\n }", "public void setXmlns(String xmlns)\r\n\t{\r\n\t\tthis.xmlns = xmlns;\r\n\t}", "private boolean hasExtension(String namespace, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelExtensionsElement(), \"namespace\", namespace);\n\t}", "private void expectName(String namespace, String name)\n\t\t\tthrows XmpUnexpectedElementQualifiedNameException {\n\t\tif (!reader.get().getNamespaceURI().equals(namespace)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ namespace + \"' and found '\"\n\t\t\t\t\t+ reader.get().getNamespaceURI() + \"'\");\n\t\t}\n\t\tif (!reader.get().getLocalName().equals(name)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ name + \"' and found '\" + reader.get().getLocalName()\n\t\t\t\t\t+ \"'\");\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(\"namespace = \" + namespace);\n }", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "abstract XML addNamespace(Namespace ns);", "public void setNamespace(final String namespaceValue) {\n this.namespace = namespaceValue;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "protected static boolean isNamespaceAware(org.w3c.dom.Node node) {\n boolean ret=(node.getLocalName() != null);\n \n if (LOG.isLoggable(Level.FINEST)) {\n LOG.finest(\"Is node \"+node+\" namespace aware? \"+ret);\n LOG.finest(\"nodeName=\"+node.getNodeName());\n LOG.finest(\"localName=\"+node.getLocalName());\n LOG.finest(\"namespace=\"+node.getNamespaceURI());\n } \n \n return (ret);\n }", "@Test\n\tpublic void test_TCM__String_getQualifiedName() {\n final String prefix = \"prefx\";\n final String uri = \"http://some.other.place\";\n\n final Namespace namespace = Namespace.getNamespace(prefix, uri);\n\n final String attributeName = \"test\";\n final String attributeQName = prefix + ':' + attributeName;\n final String attributeValue = \"value\";\n\n final Attribute qulifiedAttribute = new Attribute(attributeName, attributeValue, namespace);\n assertEquals(\"incorrect qualified name\", qulifiedAttribute.getQualifiedName(), attributeQName);\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n assertEquals(\"incorrect qualified name\", attribute.getQualifiedName(), attributeName);\n\n\t}", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@BeforeClass\n public static void externalSchemaCheck() {\n assumeTrue(\"can access \" + NameSpace.DC.xsd, canConnect(NameSpace.DC.xsd));\n }", "@Test\n public void shouldInitializeFromPersistedContent() {\n namespaceRegistry.register(validPrefix1, validNamespaceUri1);\n namespaceRegistry.register(validPrefix2, validNamespaceUri2);\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n // Now set up the graph-based namespace registry ...\n GraphNamespaceRegistry registry2 = new GraphNamespaceRegistry(graph, pathToParentOfNamespaceNodes, uriPropertyName,\n additionalNamespaceProperties);\n // All namespaces should match ...\n Set<NamespaceRegistry.Namespace> all = namespaceRegistry.getNamespaces();\n Set<NamespaceRegistry.Namespace> all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n registry2.refresh();\n all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n }", "public String getTargetNamespace()\r\n {\r\n return targetNamespace;\r\n }" ]
[ "0.6993016", "0.688581", "0.67861503", "0.6746833", "0.6627405", "0.6627405", "0.6455587", "0.6414395", "0.6393416", "0.6349667", "0.62928563", "0.62866765", "0.6245286", "0.6231751", "0.62009007", "0.6150111", "0.6130819", "0.6126321", "0.6126321", "0.6126321", "0.6090523", "0.6077984", "0.6063936", "0.6041884", "0.60153145", "0.5992205", "0.59686756", "0.59628606", "0.59322995", "0.59308267", "0.5918374", "0.590845", "0.59074134", "0.5873534", "0.5857147", "0.5843202", "0.5814567", "0.58137727", "0.5799522", "0.5795164", "0.57769674", "0.577674", "0.57698965", "0.5764616", "0.57478666", "0.5747722", "0.5740817", "0.5727339", "0.56988436", "0.5681879", "0.56669235", "0.56618047", "0.56471306", "0.563229", "0.5617266", "0.55962396", "0.55917233", "0.55917233", "0.55917233", "0.5588478", "0.5586481", "0.5576537", "0.55501986", "0.5542011", "0.55409825", "0.5523567", "0.55087763", "0.5506672", "0.5503721", "0.55006534", "0.549637", "0.54763764", "0.5468605", "0.54656535", "0.5454136", "0.5428768", "0.5426498", "0.5420663", "0.5395233", "0.53942215", "0.5358733", "0.5352789", "0.5345346", "0.53398514", "0.53372836", "0.5324656", "0.5322933", "0.5313064", "0.53049266", "0.5299023", "0.5296107", "0.5288305", "0.5276734", "0.5275732", "0.5269305", "0.5217417", "0.51788265", "0.51619726", "0.51596355", "0.5148256", "0.51318115" ]
0.0
-1
Build call for eventSourceServiceDeleteEventSource
public okhttp3.Call eventSourceServiceDeleteEventSourceCall(String namespace, String name, String deleteOptionsGracePeriodSeconds, String deleteOptionsPreconditionsUid, String deleteOptionsPreconditionsResourceVersion, Boolean deleteOptionsOrphanDependents, String deleteOptionsPropagationPolicy, List<String> deleteOptionsDryRun, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/event-sources/{namespace}/{name}" .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); if (deleteOptionsGracePeriodSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteOptions.gracePeriodSeconds", deleteOptionsGracePeriodSeconds)); } if (deleteOptionsPreconditionsUid != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteOptions.preconditions.uid", deleteOptionsPreconditionsUid)); } if (deleteOptionsPreconditionsResourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteOptions.preconditions.resourceVersion", deleteOptionsPreconditionsResourceVersion)); } if (deleteOptionsOrphanDependents != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteOptions.orphanDependents", deleteOptionsOrphanDependents)); } if (deleteOptionsPropagationPolicy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteOptions.propagationPolicy", deleteOptionsPropagationPolicy)); } if (deleteOptionsDryRun != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "deleteOptions.dryRun", deleteOptionsDryRun)); } Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeEventSource(RemoveEventSourceRequest removeEventSourceRequest) {\n ExecutionContext executionContext = createExecutionContext(removeEventSourceRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<RemoveEventSourceRequest> request = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new RemoveEventSourceRequestMarshaller().marshall(super.beforeMarshalling(removeEventSourceRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n JsonResponseHandler<Void> responseHandler = new JsonResponseHandler<Void>(null);\n invoke(request, responseHandler, executionContext);\n\n } finally {\n \n endClientExecution(awsRequestMetrics, request, null, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> delete(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteMethod(), getCallOptions()), request);\n }", "java.util.concurrent.Future<DeleteEventIntegrationResult> deleteEventIntegrationAsync(DeleteEventIntegrationRequest deleteEventIntegrationRequest);", "int deleteByExample(EventDetail eventDetail);", "public yandex.cloud.api.operation.OperationOuterClass.Operation delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteMethod(), getCallOptions(), request);\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceDeleteEventSourceValidateBeforeCall(String namespace, String name, String deleteOptionsGracePeriodSeconds, String deleteOptionsPreconditionsUid, String deleteOptionsPreconditionsResourceVersion, Boolean deleteOptionsOrphanDependents, String deleteOptionsPropagationPolicy, List<String> deleteOptionsDryRun, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceDeleteEventSource(Async)\");\n }\n \n // verify the required parameter 'name' is set\n if (name == null) {\n throw new ApiException(\"Missing the required parameter 'name' when calling eventSourceServiceDeleteEventSource(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceDeleteEventSourceCall(namespace, name, deleteOptionsGracePeriodSeconds, deleteOptionsPreconditionsUid, deleteOptionsPreconditionsResourceVersion, deleteOptionsOrphanDependents, deleteOptionsPropagationPolicy, deleteOptionsDryRun, _callback);\n return localVarCall;\n\n }", "public void delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteMethod(), responseObserver);\n }", "public void delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteMethod(), getCallOptions()), request, responseObserver);\n }", "@RequestMapping(\"/externalids/delete\")\n public ApiStatus deleteExternalId(\n @RequestParam(required = true) Long id,\n @RequestParam(required = false, defaultValue = \"\") String sourcedb\n ) {\n LOG.info(\"Deleting Source: '{}' from ID: {}\", sourcedb, id);\n return jsonApi.deleteExternalId(id, sourcedb);\n }", "int deleteByExample(EventsWaitsSummaryByInstanceExample example);", "public void eventDelete(long eventID){\n Callback<Events> callback = new Callback<Events>() {\n @Override\n public void success(Events serverResponse, Response response2) {\n BusProvider.getInstance().post(produceEventServerResponse(serverResponse));\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.deleteEvent(eventID, callback);\n }", "void deleteEvent(ReadOnlyEvent target) throws EventNotFoundException;", "int deleteByExample(EventExample example);", "@DELETE\n @Path(\"/source/{id}\")\n @Consumes(\"application/json;charset=UTF-8\")\n @RolesAllowed(Roles.ADMIN)\n @GZIP\n @NoCache\n public void deleteSource(@PathParam(\"id\") Integer id) throws Exception {\n log.info(\"Deleting source \" + id);\n sourceService.deleteSource(id);\n }", "public ISFQuery delete(URI url) throws InvalidOrMissingParameterException \t{\n\t\tif (url == null) {\n\t\t\tthrow new InvalidOrMissingParameterException(\"url\");\n\t\t}\n\n\t\tSFApiQuery sfApiQuery = new SFApiQuery(this.client);\n\t\tsfApiQuery.setFrom(\"WebhookSubscriptions\");\n\t\tsfApiQuery.addIds(url);\n\t\tsfApiQuery.setHttpMethod(\"DELETE\");\n\t\treturn sfApiQuery;\n\t}", "public void deleteByEventId(Long eventId) {\n\r\n\t}", "@DELETE\n @Path(\"{ids : [0-9]+(,[0-9]+)*}\")\n public Response deleteEvent(@PathParam(\"ids\")\n String eventId) {\n try {\n EventHelper.deleteEvent(eventId, getWorkspaceOracle());\n } catch (AbpException e) {\n throw new WebApplicationException(e);\n } catch (NotAuthorizedException e) {\n throw new WebApplicationException(e);\n } catch (NumberFormatException e) {\n throw new WebApplicationException(e);\n } catch (BadRequestException e) {\n throw e;\n }\n return respondDelete();\n }", "void deleteEvent(Long id);", "int deleteByExample(TSourceChannelsExample example);", "@Override\r\n public void deleteEvent(EventBean event) throws BusinessLogicException{\n }", "<T> List<String> generateDeleteByIdScript(GremlinSource<T> source);", "void delete(\n String resourceGroupName,\n String searchServiceName,\n String sharedPrivateLinkResourceName,\n UUID clientRequestId,\n Context context);", "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>\n deleteService(com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request);\n }", "@Override\n public SoapEvent delete(String id) {\n throw new UnsupportedOperationException();\n }", "@RequestMapping(method=RequestMethod.DELETE)\n\tpublic ResponseEntity<List<GenericEvent>> deleteEvents(Locale locale, @RequestParam(value=\"eventLang\", required=false)String eventLang, @RequestParam(value=\"eventType\", required=false)EventType eventType, @RequestParam(value=\"after\", required=false)LocalDate startDate, @RequestParam(value=\"before\", required=false)LocalDate endDate) {\n\t\t\n\t\tboolean isSuccessful = eventsService.processDelete(TimeRange.createTimeRange(startDate, endDate), locale.getLanguage(), eventType);\t\n\t\t\n\t\tif(!isSuccessful) {\n\t\t\tthrow new NotFoundException();\n\t\t}\n\t\treturn new ResponseEntity<>(HttpStatus.NO_CONTENT);\n\t\t\n\t}", "@Override\n public Event delete(Ec2LaunchConfiguration oldResource) {\n return null;\n }", "public String delete_avpleadsource(String id ) throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\"delete_avpleadsource service operation started !\");\n\n\t\ttry{\n\t\t\tString method_return_message;\n\n\t\t\tmethod_return_message = AVPLeadSource_dao.delete_avpleadsource(id);\n\n \t\t\tlog.info(\" Object returned from delete_avpleadsource service method !\");\n\t\t\treturn method_return_message;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\"delete_avpleadsource service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "void deleteSharedEvents(String deletemember)\n {\n deleteMember=members.get(k);\n\n userRef.document(members.get(k)).collection(\"Events\")\n .whereEqualTo(\"title\",Title)\n .whereEqualTo(\"time\",Time)\n .whereEqualTo(\"duration\",Duration)\n .whereEqualTo(\"location\",Location)\n .whereEqualTo(\"eventDetails\",EventDetails)\n .whereEqualTo(\"date\",Date)\n .get()\n .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>()\n {\n @Override\n public void onSuccess(QuerySnapshot queryDocumentSnapshots)\n {\n if(!queryDocumentSnapshots.isEmpty())\n {\n List <DocumentSnapshot> list = queryDocumentSnapshots.getDocuments();\n for(DocumentSnapshot d:list)\n {\n //retrieves ID of event to be deleted\n ID = d.getId();\n }\n\n //Deleting event for shared members\n userRef.document(deleteMember).collection(\"Events\").document(ID).delete()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n k++;\n if(k<members.size())\n {\n deleteSharedEvents(members.get(k));\n }\n }\n });\n\n }\n\n }\n });\n\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String sqlManagedInstanceName, Context context);", "int deleteByExample(SvcStoreBeaconExample example);", "@Override\n\tpublic int deleteCallServiceByIds(String s) {\n\t\tList ids = new ArrayList();\n\t\tCollections.addAll(ids, s.split(\",\"));\n\t\treturn dgCallServiceMapper.deleteIds(ids);\n\t}", "public com.google.protobuf.Empty deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteServiceMethod(), getCallOptions(), request);\n }", "void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);", "public void delete(Long id) {\n log.debug(\"Request to delete SourceApprovEp : {}\", id);\n sourceApprovEpRepository.deleteById(id);\n sourceApprovEpSearchRepository.deleteById(id);\n }", "public abstract void delete(DataAction data, DataRequest source) throws ConnectorOperationException;", "default void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteServiceMethod(), responseObserver);\n }", "void delete(\n String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName, UUID clientRequestId);", "int deleteByExample(ProcurementSourceExample example);", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceUri, String endpointName, String serviceConfigurationName);", "public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>\n deleteAzureClient(com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteAzureClientMethod(), getCallOptions()), request);\n }", "@DeleteMapping(\"/event-actions/{id}\")\n @Timed\n public ResponseEntity<Void> deleteEventAction(@PathVariable Long id) {\n log.debug(\"REST request to delete EventAction : {}\", id);\n eventActionService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "net.zyuiop.ovhapi.api.objects.license.Task deleteServiceNameOptionLabel(java.lang.String serviceName, java.lang.String label) throws java.io.IOException;", "public void deleteCertificateRequest(UUID uuid) {\n log.debug(\"target: {}\", getTarget().getUri().toString());\n HashMap<String,Object> map = new HashMap<>();\n map.put(\"id\", uuid);\n Response obj = getTarget().path(\"tag-certificate-requests/{id}\").resolveTemplates(map).request(MediaType.APPLICATION_JSON).delete();\n if( !obj.getStatusInfo().getFamily().equals(Family.SUCCESSFUL)) {\n throw new WebApplicationException(\"Delete certificate request failed\");\n }\n }", "void delete(UnsubscribeRequest request);", "default void deleteAzureClient(\n com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureClientMethod(), responseObserver);\n }", "@Transactional\n @DeleteMapping(\"/{name}\")\n public ResponseEntity<Void> deleteEventTrigger(@PathVariable String name) {\n service.deleteEventTrigger(name);\n return new ResponseEntity<>(HttpStatus.OK);\n }", "int deleteByExample(CmstTransfdeviceExample example);", "public void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteServiceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public void delete(String namespace, String id, long version) throws StageException;", "protected Response delete(String csid, ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx)\r\n throws Exception {\r\n getRepositoryClient(ctx).delete(ctx, csid);\r\n return Response.status(HttpResponseCodes.SC_OK).build();\r\n }", "@Test\n\tpublic void testDeleteEvent() {\n\t\tEvent event = new Event();\n\t\ttry {\n\t\t\trequest.setParameter(\"eventId\",\"1001\");\n\t\t\trequest.setParameter(\"sessionId\",\"10001\");\n\t\t\tcontroller.deleteEvent(request, response);\n\t\t\tevent = eventDao.getEvent(1001, 10001);\n\t\t\tassertEquals(0,event.getEventid());\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n}", "private void deleteSubscription(RoutingContext routingContext) {\n LOGGER.debug(\"Info: deleteSubscription method started;\");\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String domain = request.getParam(JSON_DOMAIN);\n String usersha = request.getParam(JSON_USERSHA);\n String alias = request.getParam(JSON_ALIAS);\n String subsId = domain + \"/\" + usersha + \"/\" + alias;\n JsonObject requestJson = new JsonObject();\n String instanceID = request.getHeader(HEADER_HOST);\n requestJson.put(SUBSCRIPTION_ID, subsId);\n requestJson.put(JSON_INSTANCEID, instanceID);\n String subHeader = request.getHeader(HEADER_OPTIONS);\n String subscrtiptionType =\n subHeader != null && subHeader.contains(SubsType.STREAMING.getMessage())\n ? SubsType.STREAMING.getMessage()\n : SubsType.CALLBACK.getMessage();\n requestJson.put(SUB_TYPE, subscrtiptionType);\n JsonObject authInfo = (JsonObject) routingContext.data().get(\"authInfo\");\n if (requestJson.containsKey(SUB_TYPE)) {\n JsonObject jsonObj = requestJson.copy();\n jsonObj.put(JSON_CONSUMER, authInfo.getString(JSON_CONSUMER));\n Future<JsonObject> subsReq = subsService.deleteSubscription(jsonObj, databroker, database);\n subsReq.onComplete(subHandler -> {\n if (subHandler.succeeded()) {\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n subHandler.result().toString());\n } else {\n processBackendResponse(response, subHandler.cause().getMessage());\n }\n });\n } else {\n handleResponse(response, ResponseType.BadRequestData, MSG_SUB_TYPE_NOT_FOUND);\n }\n }", "boolean notifyDeleteService(InetAddress address, ContentEntry recording);", "void unsetServiceId();", "void deleteWorkflowRequest(String requestId) throws WorkflowException;", "void delete(UnsubscribeRequest request, ResultCapture<Void> extractor);", "private void removeSource(String sourceName) {\n\t\t\n\t}", "WithCreate withSource(EventChannelSource source);", "@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/dnses\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionDNS();", "void deleteEvent(String actorId, String objectId, Date eventTime);", "public void serviceRemoved(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"removed serivce: \" + event);\n\t\t}", "public void delete(Long id) {\n log.debug(\"Request to delete Applicationevent : {}\", id);\n applicationeventRepository.delete(id);\n }", "int deleteByExample(TbComEqpModelExample example);", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String sqlManagedInstanceName);", "String deleteDatasource(String dsID) throws RepoxException;", "public Request delete(String logStreamId) {\n Asserts.assertNotNull(logStreamId, \"log stream id\");\n\n String url = baseUrl\n .newBuilder()\n .addPathSegments(LOG_STREAMS_PATH)\n .addPathSegment(logStreamId)\n .build()\n .toString();\n\n VoidRequest request = new VoidRequest(client, url, \"DELETE\");\n request.addHeader(AUTHORIZATION_HEADER, \"Bearer \" + apiToken);\n return request;\n }", "public void onDeleteService(final ForwardEvent event) {\r\n\t\t// Get the listitem from the event's target (button)\r\n\t\t// parent(hbox)->parent(listcell)->parent(listitem)\r\n\t\tfinal Listitem li = (Listitem) event.getOrigin().getTarget().getParent().getParent().getParent();\r\n\t\tfinal MasterService service = (MasterService) li.getValue();\r\n\r\n\t\t// delete the service\r\n\t\tfinal IPaymentDAO paymentDAO = (IPaymentDAO) SpringUtil.getBean(\"paymentDAO\");\r\n\t\tpaymentDAO.deleteService(service);\r\n\t\tfinal ListModelList services = (ListModelList) page.getAttribute(\"serviceslist\");\r\n\t\tint indx = getListIndex(service, services);\r\n\t\tservices.remove(indx);\r\n\t\tpage.setAttribute(\"serviceslist\", services);\r\n\t\tfinal Listbox lstservice = (Listbox) Path.getComponent(page, \"lstservice\");\r\n\t\tlstservice.setModel(services);\r\n\t\tlstservice.invalidate();\r\n\t\tClients.evalJavaScript(\"$.jGrowl(\\\"Successfully Deleted the service\\\", {life:2000});\");\r\n\t}", "public abstract void deleteSAMEnvironment(String envName);", "void makeLinksWithStudiesDeleted(Long tenantId, Long dataSourceId);", "int deleteByExample(UploadStateRegDTOExample example);", "void removeSource(McastRoute route, HostId source);", "public void notifyDeleteRequestState (COPSPdpOSReqStateMan man);", "@Override\n\tpublic int snsDelete(SnsVO vo) {\n\t\treturn map.snsDelete(vo);\n\t}", "EventChannelSource source();", "public GetEventSourceResult getEventSource(GetEventSourceRequest getEventSourceRequest) {\n ExecutionContext executionContext = createExecutionContext(getEventSourceRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<GetEventSourceRequest> request = null;\n Response<GetEventSourceResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new GetEventSourceRequestMarshaller().marshall(super.beforeMarshalling(getEventSourceRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<GetEventSourceResult, JsonUnmarshallerContext> unmarshaller =\n new GetEventSourceResultJsonUnmarshaller();\n JsonResponseHandler<GetEventSourceResult> responseHandler =\n new JsonResponseHandler<GetEventSourceResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "int deleteByExample(TdxNoticeCertificateExample example);", "int deleteByExample(ReleaseSystemExample example);", "private void delete(String indexName, String typeName, QueryBuilder query) {\n SearchRequestBuilder searchRequestBuilder = nodeClient.prepareSearch(indexName).setTypes(typeName).setQuery(query)\n .setFetchSource(false);\n searchRequestBuilder.setFrom(0).setSize(1000);\n SearchResponse response = searchRequestBuilder.execute().actionGet();\n\n while (somethingFound(response)) {\n BulkRequestBuilder bulkRequestBuilder = nodeClient.prepareBulk().setRefreshPolicy(RefreshPolicy.IMMEDIATE);\n\n for (int i = 0; i < response.getHits().getHits().length; i++) {\n String id = response.getHits().getHits()[i].getId();\n bulkRequestBuilder.add(nodeClient.prepareDelete(indexName, typeName, id));\n }\n\n bulkRequestBuilder.execute().actionGet();\n\n if (response.getHits().getTotalHits() == response.getHits().getHits().length) {\n response = null;\n } else {\n response = searchRequestBuilder.execute().actionGet();\n }\n }\n }", "@Transactional\n public void deleteEvent(int id) {\n LOGGER.info(\"deleting event wit id {}\", id);\n Optional<Event> optionalEvent = eventRepository.findById(id);\n if (optionalEvent.isPresent()) {\n EventTO eventTO = mapperService.convertToEventTO(optionalEvent.get());\n eventRepository.deleteById(id);\n eventProducer.sendDeletedEvent(eventTO);\n }\n else {\n LOGGER.error(\"event with id {} has not been found\", id);\n throw new ResourceNotFoundException(\"Event has not been found\");\n }\n\n }", "public void deleteAzureClient(\n com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteAzureClientMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "@Override\n public void delete(ClientAuditTrailHolder oldObj_) throws Exception\n {\n\n }", "@DeleteProvider(type=CWVGameContractAddressSqlProvider.class, method=\"deleteByExample\")\r\n int deleteByExample(CWVGameContractAddressExample example);", "@DeleteProvider(type=AddressSqlProvider.class, method=\"deleteByExample\")\n int deleteByExample(AddressCriteria example);", "public ContactRemovedEvent(ContactQuery source,\n SourceContact contact)\n {\n super(source);\n\n this.contact = contact;\n }", "public void unsubscribeToCovRequest() {\n try {\n DeviceService.localDevice.send(bacnetDevice, new SubscribeCOVRequest(new UnsignedInteger(1), getObjectIdentifier(), null, null)).get();\n LOG.info(\"Unsubscription @: '\" + getObjectIdentifier() + \"' on: \" + bacnetDevice.getObjectIdentifier());\n } catch (BACnetException e) {\n LOG.warn(\"Can't unsubscribe : '\" + getObjectIdentifier() + \"' on: \" + bacnetDevice.getObjectIdentifier());\n }\n\n }", "void delete(ServiceSegmentModel serviceSegment);", "@Command(\"delete\")\n @NotifyChange({\"events\", \"selectedEvent\"})\n public void delete() {\n if(this.selectedEvent != null) {\n eventDao.delete(this.selectedEvent);\n this.selectedEvent = null;\n }\n }", "@DELETE\n @Path(\"/{id}/generation/{sourceKey}\")\n public Response cancelGeneration(@PathParam(\"id\") final Long id, @PathParam(\"sourceKey\") final String sourceKey) {\n service.cancelGeneration(id, sourceKey);\n return Response.ok().build();\n }", "@Override\n protected Response run(Object data) throws Exception {\n return (Response) HttpUtils.doRequest(services.createDeleteRequest(topicId)).result;\n }", "int deleteByExample(SwmsStockOutRecordDetailExample example);", "@Override\r\n\tpublic boolean delSource(int resourceid) {\n\t\treturn this.excuteDb(\"delete from resource where resource_id=?\",new Object[]{\r\n\t\t\t\tresourceid \r\n\t\t} );\r\n\t}", "int deleteByExample(XdSpxxExample example);", "@Override\n\tpublic void deleteSanCtn(Map<String, String> params) throws SQLException {\n\t\t\n\t}", "public ApiResponse<Void> deletePresenceSource(ApiRequest<Void> request) throws IOException {\n try {\n return pcapiClient.invoke(request, null);\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }", "LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);", "String deleteENH(String request) throws RemoteException;", "private DistributedClearOperation(OperationType op, RegionEventImpl event,\n RegionVersionVector rvv, Set<InternalDistributedMember> recipients) {\n super(event);\n this.rvv = rvv;\n operation = op;\n this.recipients = recipients;\n if (event != null) {\n operationTag = event.getVersionTag();\n }\n }", "public ISFQuery delete(URI url) throws InvalidOrMissingParameterException \t{\n\t\tif (url == null) {\n\t\t\tthrow new InvalidOrMissingParameterException(\"url\");\n\t\t}\n\n\t\tSFApiQuery sfApiQuery = new SFApiQuery(this.client);\n\t\tsfApiQuery.setFrom(\"FolderTemplates\");\n\t\tsfApiQuery.addIds(url);\n\t\tsfApiQuery.setHttpMethod(\"DELETE\");\n\t\treturn sfApiQuery;\n\t}", "public static Result deleteEventFrameworkConfiguration(int nodeId,\n\t\t\tString nodeName, String configName,\n\t\t\tString eventType){\n\t\t\n\n\t\tArrayList<String> listOfParentNodes;\n\t\ttry {\n\t\t\tlistOfParentNodes = nodeService.getParentNodeNames(nodeId + \"\");\n\n\t\t\tConfigurationContext configurationContext = null;\n\t\t\tif (listOfParentNodes != null) {\n\t\t\t\tconfigurationContext = getConfigurationContext(\n\t\t\t\t\t\tlistOfParentNodes, nodeName);\n\t\t\t}\n\n\t\t\tecConfigService.deleteEventFrameworkConfiguration(configurationContext, configName, eventType);\n\n\t\t} catch (ConfigPersistenceException\n\t\t\t\t| EventFrameworkConfigurationException e) {\n\t\t\tLogger.error(\"error in changing the status of Event config \" + e);\n\t\t}\n\t\treturn redirect(controllers.routes.EventConfigController\n\t\t\t\t.getEventConfig(nodeId, eventType));\n\t}", "void delete(String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);" ]
[ "0.571045", "0.5617511", "0.5564141", "0.5542229", "0.5529407", "0.54753613", "0.5363909", "0.5314532", "0.52950233", "0.52843493", "0.5255805", "0.5244537", "0.52215207", "0.5198153", "0.51676977", "0.51614153", "0.511746", "0.5096603", "0.498513", "0.4965182", "0.4887388", "0.48826766", "0.48680595", "0.4856547", "0.48487568", "0.48454276", "0.4844498", "0.48393992", "0.48253646", "0.48238447", "0.48161304", "0.48108622", "0.4810193", "0.47793338", "0.47618032", "0.47176787", "0.4713109", "0.4709634", "0.46996975", "0.46910003", "0.4682202", "0.46793586", "0.46792027", "0.467678", "0.46761087", "0.46438497", "0.46051195", "0.4600991", "0.45992675", "0.45905694", "0.4583151", "0.45794094", "0.45688695", "0.45661992", "0.4564185", "0.4564092", "0.45542", "0.45483637", "0.45462644", "0.45425466", "0.4525829", "0.45254385", "0.4516283", "0.4513878", "0.45016342", "0.45013237", "0.44983667", "0.44951588", "0.44911614", "0.44902056", "0.44893196", "0.44882903", "0.44852966", "0.4483781", "0.44782108", "0.44731078", "0.44633493", "0.44547367", "0.44542313", "0.44508672", "0.44506124", "0.44476104", "0.44414958", "0.4440495", "0.44367355", "0.44311315", "0.4430289", "0.44272414", "0.44219267", "0.44169483", "0.4414291", "0.44030765", "0.4401829", "0.4401015", "0.4397698", "0.43969488", "0.4394218", "0.43931824", "0.4390212", "0.43896952" ]
0.5539594
4
verify the required parameter 'namespace' is set
@SuppressWarnings("rawtypes") private okhttp3.Call eventSourceServiceDeleteEventSourceValidateBeforeCall(String namespace, String name, String deleteOptionsGracePeriodSeconds, String deleteOptionsPreconditionsUid, String deleteOptionsPreconditionsResourceVersion, Boolean deleteOptionsOrphanDependents, String deleteOptionsPropagationPolicy, List<String> deleteOptionsDryRun, final ApiCallback _callback) throws ApiException { if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling eventSourceServiceDeleteEventSource(Async)"); } // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling eventSourceServiceDeleteEventSource(Async)"); } okhttp3.Call localVarCall = eventSourceServiceDeleteEventSourceCall(namespace, name, deleteOptionsGracePeriodSeconds, deleteOptionsPreconditionsUid, deleteOptionsPreconditionsResourceVersion, deleteOptionsOrphanDependents, deleteOptionsPropagationPolicy, deleteOptionsDryRun, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetNamespace();", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "void setNamespace(java.lang.String namespace);", "private NamespaceHelper() {}", "public boolean isNamespaceAware () {\n return true;\n }", "protected void validateNamespace(Namespace namespace) throws WikiException {\r\n\t\tcheckLength(namespace.getDefaultLabel(), 200);\r\n\t}", "void setNamespace(String namespace);", "boolean isNamespaceRunning(String namespace);", "public void testGetNamespaceURI() throws RepositoryException {\n String result = \"namespace\" ;\n String prefix =\"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespaceURI(prefix), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespaceURI(prefix), result);\n }", "java.lang.String getNamespace();", "@Test\n\tpublic void test_TCM__String_getNamespacePrefix() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect prefix\", attribute.getNamespacePrefix().equals(\"prefx\"));\n\t}", "@Test\n\tpublic void test_TCM__String_getNamespaceURI() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect URI\", attribute.getNamespaceURI().equals(\"http://some.other.place\"));\n\n\t}", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "boolean isNamespace(Object object);", "protected void validateNamespaceTranslation(Namespace namespace, String virtualWiki) throws WikiException {\r\n\t\tcheckLength(namespace.getLabel(virtualWiki), 200);\r\n\t}", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public final boolean isNamespaceAware() {\n return true;\n }", "public void testMemberNotTeamMemberForProjectValidator_NullNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator((String) null);\r\n fail(\"testMemberNotTeamMemberForProjectValidator_NullNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_NullNamespace.\");\r\n }\r\n }", "@Test\n public void testNamespace() throws Exception {\n NamespaceMeta ns1Meta = new NamespaceMeta.Builder().setName(\"ns1\").build();\n NamespaceMeta ns2Meta = new NamespaceMeta.Builder().setName(\"ns2\").build();\n NamespaceMeta anotherNsMeta = new NamespaceMeta.Builder().setName(\"anotherNs\").build();\n when(nsClient.list()).thenReturn(ImmutableList.of(ns1Meta, ns2Meta, anotherNsMeta));\n\n ResourceLookupContext resourceLookupContext = new ResourceLookupContext();\n resourceLookupContext.setResourceName(\"namespace\");\n // user is entering n and we expect the completion to show ns1 and ns2 as they start with n and not anotherNs\n resourceLookupContext.setUserInput(\"n\");\n resourceLookupContext.setResources(ImmutableMap.of(\"namespace\", Collections.emptyList()));\n List<String> resources = client.getResources(resourceLookupContext);\n Assert.assertEquals(2, resources.size());\n Assert.assertEquals(ImmutableList.of(\"ns1\", \"ns2\"), resources);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "public String getNamespace();", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public String getNamespace() {\n return namespace;\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static boolean isValidNamespace(CharSequence namespace) {\n if (namespace == null) {\n return false;\n }\n\n int position = 0;\n boolean start = true;\n\n while (position < namespace.length()) {\n char c = namespace.charAt(position++);\n if (start) {\n start = false;\n if (!isValidIdentifierStart(c)) {\n return false;\n }\n } else if (c == '.') {\n start = true;\n } else if (!isValidIdentifierAfterStart(c)) {\n return false;\n }\n }\n\n return !start;\n }", "public String getNamespace () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected boolean isMatchingNamespace(String rootElementNamespace)\n {\n if (namespacePattern != null)\n {\n return namespacePattern.matcher(rootElementNamespace == null ? \"\" : rootElementNamespace).matches();\n }\n else\n {\n return namespace == null ? rootElementNamespace == null : namespace.equals(rootElementNamespace);\n }\n }", "@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public void testMemberNotTeamMemberForProjectValidator_EmptyNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\" \");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_EmptyNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_EmptyNamespace.\");\r\n }\r\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }", "public boolean hasNamespace(final String namespace) {\n return rpcMethods.keySet().stream()\n .anyMatch(key -> key.toUpperCase().startsWith(namespace.toUpperCase()));\n }", "public void testGetNamespacePrefix() throws RepositoryException {\n String result = \"namespace\";\n String uri = \"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespacePrefix(uri), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefix(uri), result);\n }", "private static boolean _inNamespace(Resource resource, String namespace) {\n\t\tString resourceNamespace = resource.getNameSpace();\n\t\t\n\t\tif ( namespace.endsWith(\"/\") || namespace.endsWith(\"#\") ) {\n\t\t\treturn namespace.equals(resourceNamespace);\n\t\t}\n\t\telse {\n\t\t\treturn resourceNamespace != null && namespace.equals(resourceNamespace.replaceAll(\"(/|#)$\", \"\"));\n\t\t}\n\t}", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getTargetNamespace();", "public boolean hasNamespace() {\n return m_namespaces != null && m_namespaces.size() > 0;\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "void visit(Namespace namespace);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "@Test\n\tpublic void test_TCC___String_String_int_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", Attribute.ID_TYPE.ordinal(), namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "Namespaces namespaces();", "String getNamespaceStringValue(Object ns);", "public boolean isSetNs() {\n return this.ns != null;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "public boolean isTargetNamespace(String prefix) {\r\n return prefix.equals(getDefinitions().getTargetNamespace());\r\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public boolean addNamespaceToBPELDoc(String prefix, String namespace, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Adding namespace {} to BuildPlan {}\", namespace,\n\t\t\t\tbuildPlan.getBpelProcessElement().getAttribute(\"name\"));\n\t\tbuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:\" + prefix, namespace);\n\t\t// TODO make a real check\n\t\treturn true;\n\t}", "public boolean isNamespaceAware() {\n\t\ttry {\n\t\t\treturn parserImpl.getFeature(Constants.SAX_FEATURE_PREFIX\n\t\t\t\t\t\t\t\t\t\t + Constants.NAMESPACES_FEATURE);\n\t\t}\n\t\t catch (SAXException x) {\n\t\t\tthrow new IllegalStateException(x.getMessage());\n\t\t}\n\t}", "private boolean ensureXSDTypeNamespaceMappings(Object obj) {\r\n\t\t\r\n\t\tString targetNamespace = null;\r\n\t\t\r\n\t\tif (obj instanceof XSDNamedComponent ) {\r\n\t\t\tXSDNamedComponent namedComponent = (XSDNamedComponent) obj; \r\n\t\t\ttargetNamespace = namedComponent.getTargetNamespace();\r\n\t\t}\r\n\t\t\r\n\t\tif (targetNamespace == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Now check if the target namespace has a prefix mappings.\r\n\t\tString prefix = BPELUtils.getNamespacePrefix (modelObject, targetNamespace);\r\n\t\tif (prefix != null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// We have to map the namespace to a prefix. \r\n\t\tNamespaceMappingDialog dialog = new NamespaceMappingDialog(getShell(),modelObject);\r\n\t\tdialog.setNamespace( targetNamespace );\r\n\t\t\r\n\t\tif (dialog.open() == Window.CANCEL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// define the prefix\r\n\t\tBPELUtils.setPrefix( BPELUtils.getProcess(modelObject), targetNamespace, dialog.getPrefix()); \t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n \tpublic void whereClauseForNodeNamespace() {\n \t\tnode23.setNamespace(\"namespace\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.namespace\", \"'namespace'\"));\n \t}", "public void setTargetNamespace(String targetNamespace)\r\n {\r\n this.targetNamespace = targetNamespace;\r\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static boolean NamespaceNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NamespaceNodeTest\")) return false;\n if (!nextTokenIs(b, K_NAMESPACE_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMESPACE_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NAMESPACE_NODE, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@XmlElement(required = true, name = \"namespace\")\n public String getNamespace() {\n return namespace;\n }", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "@Test\n public void verifyReservedNS() throws IOException {\n NamespaceDescriptor ns = TestNamespace.admin.getNamespaceDescriptor(DEFAULT_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), DEFAULT_NAMESPACE.getName());\n ns = TestNamespace.admin.getNamespaceDescriptor(SYSTEM_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(2, TestNamespace.admin.listNamespaceDescriptors().length);\n // verify existence of system tables\n Set<TableName> systemTables = Sets.newHashSet(META_TABLE_NAME);\n HTableDescriptor[] descs = TestNamespace.admin.listTableDescriptorsByNamespace(SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(systemTables.size(), descs.length);\n for (HTableDescriptor desc : descs) {\n Assert.assertTrue(systemTables.contains(desc.getTableName()));\n }\n // verify system tables aren't listed\n Assert.assertEquals(0, TestNamespace.admin.listTables().length);\n // Try creating default and system namespaces.\n boolean exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(DEFAULT_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(SYSTEM_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n }", "private String getNamespace(Package pkg) {\n/* */ String nsUri;\n/* 223 */ if (pkg == null) return \"\";\n/* */ \n/* */ \n/* 226 */ XmlNamespace ns = pkg.<XmlNamespace>getAnnotation(XmlNamespace.class);\n/* 227 */ if (ns != null) {\n/* 228 */ nsUri = ns.value();\n/* */ } else {\n/* 230 */ nsUri = \"\";\n/* 231 */ } return nsUri;\n/* */ }", "String getReferenceNamespace();", "int getNamespaceUri();", "String getNamespacePrefix(Object ns);", "public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }", "public void testMemberNotTeamMemberForProjectValidator_UnknownNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\"unknown\");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_UnknownNamespace is failure.\");\r\n } catch (RegistrationValidationConfigurationException rvce) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_UnknownNamespace.\");\r\n }\r\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.362 -0500\", hash_original_method = \"1F62AD2938072A93E19EAFFCDA555D07\", hash_generated_method = \"E522C6EE17CC779935F0D04DE1F1F350\")\n \npublic NamespaceSupport ()\n {\n reset();\n }", "protected boolean compareNamespace(final XNode y, final ArrayReporter rep) {\n\t\tString ux = getNSUri();\n\t\tString uy = y.getNSUri();\n\t\tif (ux == null) {\n\t\t\tif (uy == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (ux.equals(uy)) {\n\t\t\treturn true;\n\t\t}\n\t\t//Namespace differs: &{0} and &{1}\n\t\trep.error(XDEF.XDEF288, getXDPosition(), y.getXDPosition());\n\t\treturn false;\n\t}", "public void testSetNamespacePrefix() throws RepositoryException{\n String prefix = \"prefix\";\n String uri =\"uri\";\n session.setNamespacePrefix(prefix, uri);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.setNamespacePrefix(prefix, uri);\n }", "public void setXmlns(String xmlns)\r\n\t{\r\n\t\tthis.xmlns = xmlns;\r\n\t}", "private boolean hasExtension(String namespace, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelExtensionsElement(), \"namespace\", namespace);\n\t}", "private void expectName(String namespace, String name)\n\t\t\tthrows XmpUnexpectedElementQualifiedNameException {\n\t\tif (!reader.get().getNamespaceURI().equals(namespace)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ namespace + \"' and found '\"\n\t\t\t\t\t+ reader.get().getNamespaceURI() + \"'\");\n\t\t}\n\t\tif (!reader.get().getLocalName().equals(name)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ name + \"' and found '\" + reader.get().getLocalName()\n\t\t\t\t\t+ \"'\");\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(\"namespace = \" + namespace);\n }", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "abstract XML addNamespace(Namespace ns);", "public void setNamespace(final String namespaceValue) {\n this.namespace = namespaceValue;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "protected static boolean isNamespaceAware(org.w3c.dom.Node node) {\n boolean ret=(node.getLocalName() != null);\n \n if (LOG.isLoggable(Level.FINEST)) {\n LOG.finest(\"Is node \"+node+\" namespace aware? \"+ret);\n LOG.finest(\"nodeName=\"+node.getNodeName());\n LOG.finest(\"localName=\"+node.getLocalName());\n LOG.finest(\"namespace=\"+node.getNamespaceURI());\n } \n \n return (ret);\n }", "@Test\n\tpublic void test_TCM__String_getQualifiedName() {\n final String prefix = \"prefx\";\n final String uri = \"http://some.other.place\";\n\n final Namespace namespace = Namespace.getNamespace(prefix, uri);\n\n final String attributeName = \"test\";\n final String attributeQName = prefix + ':' + attributeName;\n final String attributeValue = \"value\";\n\n final Attribute qulifiedAttribute = new Attribute(attributeName, attributeValue, namespace);\n assertEquals(\"incorrect qualified name\", qulifiedAttribute.getQualifiedName(), attributeQName);\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n assertEquals(\"incorrect qualified name\", attribute.getQualifiedName(), attributeName);\n\n\t}", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@BeforeClass\n public static void externalSchemaCheck() {\n assumeTrue(\"can access \" + NameSpace.DC.xsd, canConnect(NameSpace.DC.xsd));\n }", "@Test\n public void shouldInitializeFromPersistedContent() {\n namespaceRegistry.register(validPrefix1, validNamespaceUri1);\n namespaceRegistry.register(validPrefix2, validNamespaceUri2);\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n // Now set up the graph-based namespace registry ...\n GraphNamespaceRegistry registry2 = new GraphNamespaceRegistry(graph, pathToParentOfNamespaceNodes, uriPropertyName,\n additionalNamespaceProperties);\n // All namespaces should match ...\n Set<NamespaceRegistry.Namespace> all = namespaceRegistry.getNamespaces();\n Set<NamespaceRegistry.Namespace> all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n registry2.refresh();\n all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n }", "public String getTargetNamespace()\r\n {\r\n return targetNamespace;\r\n }" ]
[ "0.6993016", "0.688581", "0.67861503", "0.6746833", "0.6627405", "0.6627405", "0.6455587", "0.6414395", "0.6393416", "0.6349667", "0.62928563", "0.62866765", "0.6245286", "0.6231751", "0.62009007", "0.6150111", "0.6130819", "0.6126321", "0.6126321", "0.6126321", "0.6090523", "0.6077984", "0.6063936", "0.6041884", "0.60153145", "0.5992205", "0.59686756", "0.59628606", "0.59322995", "0.59308267", "0.5918374", "0.590845", "0.59074134", "0.5873534", "0.5857147", "0.5843202", "0.5814567", "0.58137727", "0.5799522", "0.5795164", "0.57769674", "0.577674", "0.57698965", "0.5764616", "0.57478666", "0.5747722", "0.5740817", "0.5727339", "0.56988436", "0.5681879", "0.56669235", "0.56618047", "0.56471306", "0.563229", "0.5617266", "0.55962396", "0.55917233", "0.55917233", "0.55917233", "0.5588478", "0.5586481", "0.5576537", "0.55501986", "0.5542011", "0.55409825", "0.5523567", "0.55087763", "0.5506672", "0.5503721", "0.55006534", "0.549637", "0.54763764", "0.5468605", "0.54656535", "0.5454136", "0.5428768", "0.5426498", "0.5420663", "0.5395233", "0.53942215", "0.5358733", "0.5352789", "0.5345346", "0.53398514", "0.53372836", "0.5324656", "0.5322933", "0.5313064", "0.53049266", "0.5299023", "0.5296107", "0.5288305", "0.5276734", "0.5275732", "0.5269305", "0.5217417", "0.51788265", "0.51619726", "0.51596355", "0.5148256", "0.51318115" ]
0.0
-1
Build call for eventSourceServiceEventSourcesLogs
public okhttp3.Call eventSourceServiceEventSourcesLogsCall(String namespace, String name, String eventSourceType, String eventName, String grep, String podLogOptionsContainer, Boolean podLogOptionsFollow, Boolean podLogOptionsPrevious, String podLogOptionsSinceSeconds, String podLogOptionsSinceTimeSeconds, Integer podLogOptionsSinceTimeNanos, Boolean podLogOptionsTimestamps, String podLogOptionsTailLines, String podLogOptionsLimitBytes, Boolean podLogOptionsInsecureSkipTLSVerifyBackend, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/stream/event-sources/{namespace}/logs" .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); if (name != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); } if (eventSourceType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("eventSourceType", eventSourceType)); } if (eventName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("eventName", eventName)); } if (grep != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("grep", grep)); } if (podLogOptionsContainer != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.container", podLogOptionsContainer)); } if (podLogOptionsFollow != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.follow", podLogOptionsFollow)); } if (podLogOptionsPrevious != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.previous", podLogOptionsPrevious)); } if (podLogOptionsSinceSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.sinceSeconds", podLogOptionsSinceSeconds)); } if (podLogOptionsSinceTimeSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.sinceTime.seconds", podLogOptionsSinceTimeSeconds)); } if (podLogOptionsSinceTimeNanos != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.sinceTime.nanos", podLogOptionsSinceTimeNanos)); } if (podLogOptionsTimestamps != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.timestamps", podLogOptionsTimestamps)); } if (podLogOptionsTailLines != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.tailLines", podLogOptionsTailLines)); } if (podLogOptionsLimitBytes != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.limitBytes", podLogOptionsLimitBytes)); } if (podLogOptionsInsecureSkipTLSVerifyBackend != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("podLogOptions.insecureSkipTLSVerifyBackend", podLogOptionsInsecureSkipTLSVerifyBackend)); } Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onLogEvent(String date, String source, String level, String msg);", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceEventSourcesLogsValidateBeforeCall(String namespace, String name, String eventSourceType, String eventName, String grep, String podLogOptionsContainer, Boolean podLogOptionsFollow, Boolean podLogOptionsPrevious, String podLogOptionsSinceSeconds, String podLogOptionsSinceTimeSeconds, Integer podLogOptionsSinceTimeNanos, Boolean podLogOptionsTimestamps, String podLogOptionsTailLines, String podLogOptionsLimitBytes, Boolean podLogOptionsInsecureSkipTLSVerifyBackend, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceEventSourcesLogs(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceEventSourcesLogsCall(namespace, name, eventSourceType, eventName, grep, podLogOptionsContainer, podLogOptionsFollow, podLogOptionsPrevious, podLogOptionsSinceSeconds, podLogOptionsSinceTimeSeconds, podLogOptionsSinceTimeNanos, podLogOptionsTimestamps, podLogOptionsTailLines, podLogOptionsLimitBytes, podLogOptionsInsecureSkipTLSVerifyBackend, _callback);\n return localVarCall;\n\n }", "public IEventLog getEventLog();", "abstract protected void _log(TrackingEvent event) throws Exception;", "SyslogEvent build() {\n\n miruLogEvent = parse(rawMessage, address.toString());\n return this;\n }", "private LogEvent()\n\t{\n\t\tsuper();\n\t}", "EventChannelSource source();", "public void buildStarted(BuildEvent event) {\n }", "@Subscribe\n public void onActionEventStarted(RemoteExecutionActionEvent.Started event) {\n writeRemoteExecutionStateTraceEvents(event);\n }", "void initializeLogging();", "@Pointcut(\"execution(* *.logEvent(..))\")\n private void allLogEventMethods() {\n }", "public void targetStarted(BuildEvent event) {\n }", "public ListEventSourcesResult listEventSources(ListEventSourcesRequest listEventSourcesRequest) {\n ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<ListEventSourcesRequest> request = null;\n Response<ListEventSourcesResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new ListEventSourcesRequestMarshaller().marshall(super.beforeMarshalling(listEventSourcesRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<ListEventSourcesResult, JsonUnmarshallerContext> unmarshaller =\n new ListEventSourcesResultJsonUnmarshaller();\n JsonResponseHandler<ListEventSourcesResult> responseHandler =\n new JsonResponseHandler<ListEventSourcesResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public void logEvent(final LogEvent event) {\n loggerConfig.log(event);\n }", "private void collectLogs(Configuration config) {\r\n\t\tFileUtils loader = new FileUtils(DataCache.getInstance(config\r\n\t\t\t\t.getUniqueId()));\r\n\r\n\t\tfor (String l2 : config.getL2machines()){\r\n\t\t\ttry {\r\n\t\t\t\tloader.download(\"server-\" + l2 + LOG_EXT, config.getResultLocation());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlog.error(\"Failed to download logs for the test. \" + e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (String l1 : config.getL1machines()){\r\n\t\t\ttry {\r\n\t\t\t\tloader.download(\"client-\" + l1 + LOG_EXT, config.getResultLocation());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlog.error(\"Failed to download logs for the test. \" + e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (config.getLoadmachines().size() > 0) {\r\n\t\t\tfor (String load : config.getLoadmachines()){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tloader.download(\"load-\" + load + LOG_EXT, config.getResultLocation());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tlog.error(\"Failed to download logs for the test. \" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tList<String> regex = Arrays.asList(\".*gz\", \".*csv\", \".*log\");\r\n\t\tString finalZipName = config.getTestName() + \"-\" + config.getTestCase()\r\n\t\t\t\t+ \"-\" + config.getUniqueId() + LOG_EXT;\r\n\r\n\t\tFile results = new File(finalZipName);\r\n\t\ttry {\r\n\t\t\tloader.gzipFiles(config.getResultLocation(), regex, results);\r\n\t\t\tconfig.setResultLog(results.getAbsolutePath());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void log(String msg, int level, Date date, StackTraceElement trace) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}", "abstract protected void _log(Source src, OpLevel sev, String msg, Object... args) throws Exception;", "protected static ICacheEventLogger configureCacheEventLogger( Properties props )\n {\n ICacheEventLogger cacheEventLogger = AuxiliaryCacheConfigurator\n .parseCacheEventLogger( props, IRemoteHttpCacheConstants.HTTP_CACHE_SERVER_PREFIX );\n\n return cacheEventLogger;\n }", "public LogEvent(Object source, String message) {\n super(source);\n this.message = message + \"\\n\";\n }", "@Override\n public void logs() {\n \n }", "private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }", "@Override\n\tpublic void onApplicationEvent(ContextRefreshedEvent event) {\n\t\tlogger.info(\"XD Home: \" + environment.resolvePlaceholders(\"${XD_HOME}\"));\n\t\tlogger.info(\"Transport: \" + environment.resolvePlaceholders(\"${XD_TRANSPORT}\"));\n\t\tlogHadoopDistro();\n\t\tlogConfigLocations();\n\t\tif (isContainer) {\n\t\t\tlogContainerInfo();\n\t\t}\n\t\telse {\n\t\t\tlogAdminUI();\n\t\t}\n\t\tlogZkConnectString();\n\t\tlogZkNamespace();\n\t\tlogger.info(\"Analytics: \" + environment.resolvePlaceholders(\"${XD_ANALYTICS}\"));\n\t\tif (\"true\".equals(environment.getProperty(\"verbose\"))) {\n\t\t\tlogAllProperties();\n\t\t}\n\t}", "public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }", "public void logMessage(AsyncLoggerConfig asyncLoggerConfig, LogEvent event) {\n/* 65 */ asyncLoggerConfig.callAppendersInCurrentThread(event);\n/* */ }", "void setupFileLogging();", "@Override\n\tpublic void svnLogPrepare() {\n\t}", "private void recordPushLog(String configName) {\n PushLog pushLog = new PushLog();\n pushLog.setAppId(client.getAppId());\n pushLog.setConfig(configName);\n pushLog.setClient(IP4s.intToIp(client.getIp()) + \":\" + client.getPid());\n pushLog.setServer(serverHost.get());\n pushLog.setCtime(new Date());\n pushLogService.add(pushLog);\n }", "String serialize(PushEventSource eventSource);", "@Override\n public void append( LogEvent event ) {\n long eventTimestamp;\n if (event instanceof AbstractLoggingEvent) {\n eventTimestamp = ((AbstractLoggingEvent) event).getTimestamp();\n } else {\n eventTimestamp = System.currentTimeMillis();\n }\n LogEventRequest packedEvent = new LogEventRequest(Thread.currentThread().getName(), // Remember which thread this event belongs to\n event, eventTimestamp); // Remember the event time\n\n if (event instanceof AbstractLoggingEvent) {\n AbstractLoggingEvent dbLoggingEvent = (AbstractLoggingEvent) event;\n switch (dbLoggingEvent.getEventType()) {\n\n case START_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the test case id, which we will later pass to ATS agent\n testCaseState.setTestcaseId(eventProcessor.getTestCaseId());\n\n // clear last testcase id\n testCaseState.clearLastExecutedTestcaseId();\n\n //this event has already been through the queue\n return;\n }\n case END_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the last executed test case id\n testCaseState.setLastExecutedTestcaseId(testCaseState.getTestcaseId());\n\n // clear test case id\n testCaseState.clearTestcaseId();\n // this event has already been through the queue\n return;\n }\n case GET_CURRENT_TEST_CASE_STATE: {\n // get current test case id which will be passed to ATS agent\n ((GetCurrentTestCaseEvent) event).setTestCaseState(testCaseState);\n\n //this event should not go through the queue\n return;\n }\n case START_RUN:\n\n /* We synchronize the run start:\n * Here we make sure we are able to connect to the log DB.\n * We also check the integrity of the DB schema.\n * If we fail here, it does not make sense to run tests at all\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n Level level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n // create the queue logging thread and the DbEventRequestProcessor\n if (queueLogger == null) {\n initializeDbLogging(null);\n }\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, false);\n //this event has already been through the queue\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n return;\n case END_RUN: {\n /* We synchronize the run end.\n * This way if there are remaining log events in the Test Executor's queue,\n * the JVM will not be shutdown prior to committing all events in the DB, as\n * the END_RUN event is the last one in the queue\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n //this event has already been through the queue\n return;\n }\n case DELETE_TEST_CASE: {\n // tell the thread on the other side of the queue, that this test case is to be deleted\n // on first chance\n eventProcessor.requestTestcaseDeletion( ((DeleteTestCaseEvent) dbLoggingEvent).getTestCaseId());\n // this event is not going through the queue\n return;\n }\n default:\n // do nothing about this event\n break;\n }\n }\n\n passEventToLoggerQueue(packedEvent);\n }", "@Override\n protected void append(LoggingEvent event) {\n if (event.getMessage() instanceof WrsAccessLogEvent) {\n WrsAccessLogEvent wrsLogEvent = (WrsAccessLogEvent) event.getMessage();\n\n try {\n HttpServletRequest request = wrsLogEvent.getRequest();\n if (request != null) {\n String pageHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_PAGEHASH));\n String requestHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_REQUESTHASH));\n String sessionId = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_SESSION_ID));\n String requestUrl = request.getRequestURL().toString();\n String reqQuery = request.getQueryString();\n requestUrl += (reqQuery != null ? \"?\" + reqQuery : \"\");\n if (requestUrl.length()> 2000)\n requestUrl = requestUrl.substring(0, 2000);\n String bindingSetName = wrsLogEvent.getBindingSetName();\n if (bindingSetName != null && bindingSetName.length()> 255)\n bindingSetName = bindingSetName.substring(0, 255);\n String requestXML = wrsLogEvent.getRequestDoc()!=null ? Utils.serializeElement(wrsLogEvent.getRequestDoc()) : null;\n\n // log access\n if(AccessSqlLogger.getInstance().isEnabled()) {\n final AccessSqlLogger.LogRecord recordAccess = new AccessSqlLogger.LogRecord(\n sessionId\n , requestUrl\n , pageHash\n , requestHash\n , bindingSetName\n , requestXML\n , wrsLogEvent.getRowCount()\n , wrsLogEvent.getValueCount()\n , wrsLogEvent.getRsStartTime()\n , wrsLogEvent.getRsEndTime()\n , wrsLogEvent.getWriteDuration()\n , wrsLogEvent.getExecuteDuration()\n );\n AccessSqlLogger.getInstance().process(recordAccess);\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void taskStarted(BuildEvent event) {\n }", "public void configure() throws Exception {\n\t\t\n\t\tXPathBuilder xPathBuilder = new XPathBuilder\n\t\t\t\t(\"//audit-events/audit-event\");\n\n\t\tfrom(\"activemq:batch.events\").\n\t\t\tsplit(xPathBuilder).\n\t\t\tparallelProcessing().\n\t\t\tto(\"activemq:insurance.events\");\n\t}", "public LoggingXmlConfiguration(ConfigurationSource configSource) {\n super(configSource);\n }", "public interface DeployLogService {\n\n\t/**\n\t * write a RecordElement2 to DeployLogService2\n\t * \n\t * @param r\n\t * @throws OdenException\n\t */\n\tpublic void record(RecordElement2 r) throws OdenException;\n\n\t/**\n\t * search the record which are matched with every specified arguments.\n\t * \n\t * @param txid\n\t * @param host\n\t * @param agent\n\t * @param path\n\t * @param startdate\n\t * @param enddate\n\t * @param failonly\n\t * @return\n\t * @throws OdenException\n\t */\n\t// public List<RecordElement2> search(String txid, String host, String agent, String path,\n\t// String startdate, String enddate, boolean failonly) throws OdenException;\n\n\tpublic List<MiniRecordElement> search(String startdate, String enddate,\n\t\t\tString user, boolean failonly) throws OdenException;\n\n\tpublic RecordElement2 search(String txid, String user, String agent,\n\t\t\tString path, boolean failonly) throws OdenException;\n\n\t/**\n\t * get all date which having records.\n\t * \n\t * @return\n\t */\n\tpublic List<String> recordedDateList();\n}", "public MyLogs() {\n }", "public ContactStatusEvent(Object source)\n {\n super(source);\n }", "public void buildStarted(BuildEvent event) {\n startTime = System.currentTimeMillis();\n }", "public final void event(final JSONObject builddata) {\n logger.fine(\"Sending event\");\n\n // Gather data\n JSONObject payload = new JSONObject();\n String hostname = nullSafeGetString(builddata, \"hostname\");\n String number = nullSafeGetString(builddata, \"number\");\n String buildurl = nullSafeGetString(builddata, \"buildurl\");\n String job = nullSafeGetString(builddata, \"job\");\n long timestamp = builddata.getLong(\"timestamp\");\n String message = \"\";\n\n // Setting source_type_name here, to allow modification based on type of event\n payload.put(\"source_type_name\", \"jenkins\");\n\n // Build title\n StringBuilder title = new StringBuilder();\n title.append(job).append(\" build #\").append(number);\n if ( \"SUCCESS\".equals( builddata.get(\"result\") ) ) {\n title.append(\" succeeded\");\n payload.put(\"alert_type\", \"success\");\n message = \"%%% \\n [See results for build #\" + number + \"](\" + buildurl + \") \";\n } else if ( builddata.get(\"result\") != null ) {\n title.append(\" failed\");\n payload.put(\"alert_type\", \"failure\");\n message = \"%%% \\n [See results for build #\" + number + \"](\" + buildurl + \") \";\n } else {\n title.append(\" started\");\n payload.put(\"alert_type\", \"info\");\n message = \"%%% \\n [Follow build #\" + number + \" progress](\" + buildurl + \") \";\n // Remove source_type_name to keep started events from being rolled up\n payload.remove(\"source_type_name\");\n }\n title.append(\" on \").append(hostname);\n\n // Add duration\n if ( builddata.get(\"duration\") != null ) {\n message = message + durationToString(builddata.getDouble(\"duration\"));\n }\n\n // Close markdown\n message = message + \" \\n %%%\";\n\n // Build payload\n payload.put(\"title\", title.toString());\n payload.put(\"text\", message);\n payload.put(\"date_happened\", timestamp);\n payload.put(\"event_type\", builddata.get(\"event_type\"));\n payload.put(\"host\", hostname);\n payload.put(\"result\", builddata.get(\"result\"));\n payload.put(\"tags\", assembleTags(builddata));\n payload.put(\"aggregation_key\", job); // Used for job name in event rollups\n\n post(payload, this.EVENT);\n }", "private void setupLogging(BuildListener listener) {\n this.listener = listener;\n }", "public void viewLogs() {\n\t}", "void updateLocalCallLogs() {\n setIncludePairedCallLogs();\n buildCallLogsList();\n\n notifyCallDataChanged();\n }", "@Override\n\tpublic List<String> getEventLog() {\n\t\tif(network != null)\n\t\t\treturn Arrays.asList(\n\t\t\t\t\tnetwork.getErrorLog()\n\t\t\t\t\t.toArray(new String[0]));\n\t\telse\n\t\t\treturn new ArrayList<>();\n\t}", "public EventLogMessageEntry getEventLogMessage(int index);", "public String buildMessage(Event event, Object[] params);", "LogsQueryClient(AzureLogAnalyticsImpl serviceClient) {\n this.serviceClient = serviceClient;\n }", "public void log(String message, Severity sev, Object source) {\n\t\tfor(LoggerInterface logger: loggers) {\n\t\t\tlogger.log(message, sev, source);\n\t\t}\n\t}", "public LogInfluxClient build() {\n LogInfluxClient logStatsdClient = new LogInfluxClient();\n logStatsdClient.setSendSink(sendSink);\n logStatsdClient.setCommonTags(commonTags);\n return logStatsdClient;\n }", "public ListEventSourcesResult listEventSources() throws AmazonServiceException, AmazonClientException {\n return listEventSources(new ListEventSourcesRequest());\n }", "public DemoEventSource( T source ) {\n super(source);\n }", "public SearchLogs() {\n this(\"search_logs\", null);\n }", "public Slf4jLogService() {\n this(System.getProperties());\n }", "@Override\n public void onClick(View v) {\n \tToast.makeText(TaskActivity.this, \"Gathering Logs!\", Toast.LENGTH_SHORT).show();\n \t\n \tif(mStartGatherTime == 0) {\n\t \tmCalendarDates = ReadCalendar.readCalendarEvent(getApplicationContext());\n\t \tmLogText.setText(\"Events found over all time: \" + Integer.toString(mCalendarDates.size()));\n \t}\n \telse\n \t{\n \t\tmCalendarDates = ReadCalendar.readCalendarEvent(getApplicationContext(), mStartGatherTime, System.currentTimeMillis());\n \t\tString displayDate = String.valueOf(mSelectedDay) + \"/\" + \n\t \t\t\t\t\tString.valueOf(mSelectedMonth + 1) + \"/\" + String.valueOf(mSelectedYear);\n\t \tmLogText.setText(\"Events found since \" + displayDate + \": \" + Integer.toString(mCalendarDates.size()));\n \t}\n \t\n \t//DEBUG ONLY, REMOVE LATER\n \tfor(String dates : mCalendarDates)\n \t{\n \t\tLog.e(\"CALENDAR\", dates);\n \t}\n }", "private ArrayList<CallLogsData> getCallLogEntry() {\n ArrayList<CallLogsData> calllogsList = new ArrayList<CallLogsData>();\n try {\n File file = new File(mParentFolderPath + File.separator + ModulePath.FOLDER_CALLLOG\n + File.separator + ModulePath.NAME_CALLLOG);\n BufferedReader buffreader = new BufferedReader(new InputStreamReader(\n new FileInputStream(file)));\n String line = null;\n CallLogsData calllogData = null;\n while ((line = buffreader.readLine()) != null) {\n if (line.startsWith(CallLogsData.BEGIN_VCALL)) {\n calllogData = new CallLogsData();\n// MyLogger.logD(CLASS_TAG,\"startsWith(BEGIN_VCALL)\");\n }\n if (line.startsWith(CallLogsData.ID)) {\n calllogData.id = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(ID) = \" +calllogData.id);\n }\n\n if (line.startsWith(CallLogsData.SIMID)) {\n calllogData.simid = Utils.slot2SimId(Integer.parseInt(getColonString(line)),\n mContext);\n }\n if (line.startsWith(CallLogsData.NEW)) {\n calllogData.new_Type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(NEW) = \" +calllogData.new_Type);\n }\n if (line.startsWith(CallLogsData.TYPE)) {\n calllogData.type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(TYPE) = \" +calllogData.type);\n }\n if (line.startsWith(CallLogsData.DATE)) {\n String time = getColonString(line);\n// Date date = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").parse(time);\n// calllogData.date = date.getTime();\n\n calllogData.date = Utils.unParseDate(time);\n\n MyLogger.logD(CLASS_TAG, \"startsWith(DATE) = \" + calllogData.date);\n }\n if (line.startsWith(CallLogsData.NAME)) {\n calllogData.name = getColonString(line);\n// MyLogger.logD(CLASS_TAG,\"startsWith(NAME) = \" +calllogData.name);\n }\n if (line.startsWith(CallLogsData.NUMBER)) {\n calllogData.number = getColonString(line);\n// MyLogger.logD(CLASS_TAG,\"startsWith(NUMBER) = \"+calllogData.number);\n }\n if (line.startsWith(CallLogsData.DURATION)) {\n calllogData.duration = Long.parseLong(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(DURATION) = \"+calllogData.duration);\n }\n if (line.startsWith(CallLogsData.NMUBER_TYPE)) {\n calllogData.number_type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(NMUBER_TYPE) = \"+calllogData.number_type);\n }\n if (line.startsWith(CallLogsData.END_VCALL)) {\n// MyLogger.logD(CLASS_TAG,calllogData.toString());\n calllogsList.add(calllogData);\n MyLogger.logD(CLASS_TAG, \"startsWith(END_VCALL)\");\n }\n }\n buffreader.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n MyLogger.logE(CLASS_TAG, \"init failed\");\n }\n return calllogsList;\n }", "private void setupTasks(@Nonnull Project project, @Nonnull SourceSet sourceSet) {\n final MetadataEventsGeneratorPluginExtension extension =\n MetadataEventsGeneratorPluginExtension.create(project, getExtensionName(sourceSet));\n\n // By default, look for models in src/<sourceset>/pegasus (same as pegasus plugin).\n String inputPath = \"src\" + File.separatorChar + sourceSet.getName() + File.separatorChar + \"pegasus\";\n extension.getInputModels().setFrom(inputPath);\n\n // Use the same configuration as pegasus. Need to also include input models on the resolver path.\n extension.getResolverPaths().setFrom(getDataModelConfig(project, sourceSet), inputPath);\n\n final GenerateMetadataEventsTask generateMetadataEventsTask = project.getTasks()\n .create(sourceSet.getTaskName(\"generate\", \"metadataEventsSchema\"), GenerateMetadataEventsTask.class, task -> {\n task.getInputModelPaths().setFrom(extension.getInputModels());\n task.getResolverPath().setFrom(extension.getResolverPaths());\n task.getOutputDirectory().setFrom(extension.getOutputDir());\n task.getEntitiesAnnotationAllowList().set(extension.getEntitiesAnnotationAllowList());\n });\n\n final Path baseOutputPath = project.getRootProject()\n .getBuildDir()\n .toPath()\n .resolve(project.getName())\n .resolve(generateMetadataEventsTask.getName());\n extension.getOutputDir().setFrom(baseOutputPath.toFile());\n extension.getOutputDir().builtBy(generateMetadataEventsTask);\n\n // null if data template generation is not enabled.\n final GenerateDataTemplateTask dataTemplateTask =\n (GenerateDataTemplateTask) project.getTasks().findByName(sourceSet.getTaskName(\"generate\", \"dataTemplate\"));\n\n // Make a separate GenerateDataTemplateTask because the pegasus plugin does not easily allow for customization\n // (adding a second input directory - our generated events). This new task will actually override some of the common\n // models involve with the original task. We have to output to the same directory so the jar task finds them.\n // Do not generate avro for these events. Currently, we need to generate 1.4 and 1.7 internally, so we'll do that\n // in a different module / library than from where the models are defined.\n if (dataTemplateTask != null) {\n final Task eventsDataTemplate = project.getTasks()\n .create(sourceSet.getTaskName(\"generate\", \"metadataEventDataTemplate\"), GenerateDataTemplateTask.class,\n task -> {\n task.dependsOn(generateMetadataEventsTask);\n task.setInputDir(baseOutputPath.toFile());\n task.setDestinationDir(dataTemplateTask.getDestinationDir());\n task.setCodegenClasspath(dataTemplateTask.getCodegenClasspath());\n task.setResolverPath(\n project.files(baseOutputPath, extension.getInputModels(), extension.getResolverPaths()));\n dataTemplateTask.finalizedBy(task);\n });\n\n // make sure that java source files have been generated before compiling them\n final JavaPluginConvention javaPluginConvention = project.getConvention().getPlugin(JavaPluginConvention.class);\n final SourceSet targetSourceSet =\n javaPluginConvention.getSourceSets().getByName(sourceSet.getName() + \"GeneratedDataTemplate\");\n final Task compileTask = project.getTasks().getByName(targetSourceSet.getCompileJavaTaskName());\n compileTask.dependsOn(eventsDataTemplate);\n\n // Include PDL files in the data template jar, as other PDL files are also included.\n final Jar dataTemplateJarTask = (Jar) project.getTasks().findByPath(sourceSet.getName() + \"DataTemplateJar\");\n dataTemplateJarTask.dependsOn(eventsDataTemplate);\n dataTemplateJarTask.from(generateMetadataEventsTask.getOutputDirectory(), copySpec -> {\n copySpec.eachFile(fileCopyDetails -> {\n fileCopyDetails.setPath(\"pegasus\" + File.separator + fileCopyDetails.getPath());\n });\n });\n }\n }", "public void serializeLogs();", "private LogService()\n {\n logWriter = new CleanSweepLogWriterImpl();\n\n Calendar date = Calendar.getInstance();\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH)+1;\n int day = date.get(Calendar.DAY_OF_MONTH);\n\n todaysDate=\"\";\n if(day<10) {\n todaysDate += year + \"\" + month + \"0\" + day;\n }\n else\n {\n todaysDate += year + \"\" + month + \"\" + day;\n }\n\n }", "public CallLog[] getCallLogs();", "SourceBuilder createService();", "public void setLogEvents(boolean logEvents) {\n mLogEvents = logEvents;\n }", "public IisLogsDataSource withStreams(List<String> streams) {\n this.streams = streams;\n return this;\n }", "public static void main(String args[]){\n final Injector injector = Guice.createInjector(new FluxClientComponentModule(), new FluxClientInterceptorModule());\n SampleReplayEventOnStateWithMultipleReplayEvent SampleReplayEventOnStateWithMultipleReplayEvent = injector.getInstance(SampleReplayEventOnStateWithMultipleReplayEvent.class);\n SampleReplayEventOnStateWithMultipleReplayEvent.create(new StartEvent(\"example_multiple_replay_event_workflow_on_one_state\"));\n\n }", "WithCreate withSource(EventChannelSource source);", "public interface LogsService {\n /**\n * 保存日志\n *\n * @param userCustom\n * @param ipAddr\n * @param logAction\n * @param data\n * @param currentTime\n */\n void saveLogs(User userCustom, String ipAddr, String logAction, String data, long currentTime);\n\n /**\n * 获取所有日志\n *\n * @param loginUserId 用户\n * @return\n */\n List<Logs> findAll(String loginUserId, Integer limit);\n\n /**\n * 查询日志统计信息\n * @param uid\n * @return\n */\n List<CountInfoBean> findLogsInfo(String uid);\n\n /**\n * 查询分类统计信息\n * @param uid\n * @return\n */\n List<CountInfoBean> findCategoryInfo(String uid);\n}", "public void setupLoggingEndpoint() {\n HttpHandler handler = (httpExchange) -> {\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, serverLogsArray.toJSONString().length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(serverLogsArray.toJSONString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.loggingApiEndpoint, this.server.createContext(this.loggingApiEndpoint));\n this.setHandler(this.getLoggingApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.getLoggingApiEndpoint(), 0);\n }", "public ApplicationEvent(Object source) {\n super(source);\n this.timestamp = System.currentTimeMillis();\n }", "public interface LogsActions {\n void onLogsReceived(LogListResponse logListResponse);\n}", "@Override\n\tpublic void log(Level level, String message, Supplier<?>... paramSuppliers) {\n\n\t}", "public IisLogsDataSource() {\n }", "public GenLogServerConfig() {\n }", "private JavaUtilLogHandlers() { }", "private void logEvent(String operation, EntryEvent event) {\n}", "@Override\n public void publish(List<EthLog.LogResult> logs) {\n if (logs.isEmpty()) {\n log.warn(\"[KAFKA] logs is empty, ignore sending!\");\n return;\n }\n final long start = System.currentTimeMillis();\n log.info(\"[KAFKA] sending {} events\", logs.size());\n logs.stream()\n .map(logResult -> (EthLog.LogObject) logResult)\n .map(EventMessage::new)\n .filter(logMessage -> !logMessage.getTopics().isEmpty())\n .peek(logMessage -> log.debug(\"[KAFKA] sending event topic {}\", logMessage.getTopics().get(0)))\n .forEach(this::sendEvent);\n\n long tookMs = System.currentTimeMillis() - start;\n log.info(\"[KAFKA] sent {} messages in {} ms.\", logs.size(), tookMs);\n }", "protected void logEventCreation(final GossipEvent event) {\n logger.debug(CREATE_EVENT.getMarker(), \"Creating {}\", event::toString);\n }", "public TOpLogs() {\n this(DSL.name(\"t_op_logs\"), null);\n }", "abstract public LoggingService getLoggingService();", "public void processEvents(Events events) {\n\n log.info(\"events processed: [{}]\", events.toString());\n }", "String getLogStackTrace();", "private void createEvents() {\n\t}", "public void enableLogging();", "InternalEventDebugLogEntry(InternalEvent internalEvent) {\r\n _internalEvent = internalEvent ;\r\n }", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "private void initLoggers() {\n _logger = LoggerFactory.getInstance().createLogger();\n _build_logger = LoggerFactory.getInstance().createAntLogger();\n }", "public void messageLogged(BuildEvent event) {\n if (isEnabled()) {\n // Only buffer error messages\n if (event.getPriority() <= logLevel) {\n events.add(event);\n }\n }\n }", "abstract void initiateLog();", "private static void send() {\n Map<String, ArrayList<Event>> eventsByStream = new HashMap<>();\n for (Event event : QUEUE) {\n String stream = event.getStream();\n if (!eventsByStream.containsKey(stream) || eventsByStream.get(stream) == null) {\n eventsByStream.put(stream, new ArrayList<>());\n }\n eventsByStream.get(stream).add(event);\n }\n for (String stream : eventsByStream.keySet()) {\n if (Prefs.INSTANCE.isEventLoggingEnabled()) {\n sendEventsForStream(STREAM_CONFIGS.get(stream), eventsByStream.get(stream));\n }\n }\n }", "private void setupLogging() {\n\t\t// Ensure all JDK log messages are deferred until a target is registered\n\t\tLogger rootLogger = Logger.getLogger(\"\");\n\t\tHandlerUtils.wrapWithDeferredLogHandler(rootLogger, Level.SEVERE);\n\n\t\t// Set a suitable priority level on Spring Framework log messages\n\t\tLogger sfwLogger = Logger.getLogger(\"org.springframework\");\n\t\tsfwLogger.setLevel(Level.WARNING);\n\n\t\t// Set a suitable priority level on Roo log messages\n\t\t// (see ROO-539 and HandlerUtils.getLogger(Class))\n\t\tLogger rooLogger = Logger.getLogger(\"org.springframework.shell\");\n\t\trooLogger.setLevel(Level.FINE);\n\t}", "@Service\npublic interface LogService {\n\n List<Droplog> getDroplogByID(int traineeid) throws Exception;\n\n List<Exchangelog> getExchangelogByID(int traineeid) throws Exception;\n\n List<Rechargelog> getRechargelogByID(int traineeid) throws Exception;\n\n List<Rechargelog> getAllRechargelog() throws Exception;\n\n List<Subscribelog> getSubscribelogByID(int traineeid) throws Exception;\n\n List<Unsubscribelog> getUnsubscribelogByID(int traineeid) throws Exception;\n\n List<Subscribelog> getSubscribelogByCourse(int courseid) throws Exception;\n\n List<Unsubscribelog> getUnsubscribelogByCourse(int courseid) throws Exception;\n\n List<Droplog> getDroplogByCourse(int courseid) throws Exception;\n\n List<Settlelog> getSettlelogByinstitutionid(int institutionid) throws Exception;\n}", "@Override\n public void onChanged(@Nullable List<Event> events) {\n adapter.setEvents(events);\n for (Event event:events) {\n Log.e(\"** EVENT **\", \"CATEGORY: \" +event.getCategoryId() + \", Event : \" + event.getName());\n }\n }", "EventHubs eventHubs();", "@Test\n public void testHTTPSPublisherWithLogSink() throws Exception {\n setCarbonHome();\n logger.info(\"Test case for HTTPS output publisher with log sink.\");\n SiddhiManager siddhiManager = new SiddhiManager();\n siddhiManager.setExtension(\"xml-output-mapper\", XMLSinkMapper.class);\n String inStreamDefinition = \"Define stream FooStream (message String,method String,headers String);\"\n + \"@sink(type='log')\"\n + \"@sink(type='http',publisher.url='https://localhost:8009/abc',method='{{method}}',\"\n + \"headers='{{headers}}',\"\n + \"@map(type='xml', \"\n + \"@payload('{{message}}'))) \"\n + \"Define stream BarStream (message String,method String,headers String);\";\n String query = (\n \"@info(name = 'query') \"\n + \"from FooStream \"\n + \"select message,method,headers \"\n + \"insert into BarStream;\"\n );\n SiddhiAppRuntime siddhiAppRuntime = siddhiManager\n .createSiddhiAppRuntime(inStreamDefinition + query);\n InputHandler fooStream = siddhiAppRuntime.getInputHandler(\"FooStream\");\n siddhiAppRuntime.start();\n HttpsServerListenerHandler lst = new HttpsServerListenerHandler(8009);\n lst.run();\n fooStream.send(new Object[]{payload, \"POST\", \"'Name:John','Age:23'\"});\n while (!lst.getServerListener().isMessageArrive()) {\n Thread.sleep(10);\n }\n String eventData = lst.getServerListener().getData();\n Assert.assertEquals(eventData, expected);\n siddhiAppRuntime.shutdown();\n lst.shutdown();\n }", "@Override\n public void ProcessEvent(XMSEvent evt){\n FunctionLogger logger=new FunctionLogger(\"ProcessEvent\",this,myLogger);\n logger.args(evt);\n if(evt.getCall() == myInboundCall){\n ProcessInboundEvent(evt);\n } else if(evt.getCall() == myOutboundCall){\n ProcessOutboundEvent(evt);\n } else{\n logger.error(\"Event Received for an unknown Call. Ignoring\");\n }\n \n }", "abstract protected String getLogFileName();", "LogService getLogService( ) {\n\n return config.getLogService();\n }", "private Map<ImmutableTriple<String, Long, String>, LocalDateTime> getAllCreatedDateFromSource(\n List<SubmittedVariantEntity> duplicateSves) {\n Map<ImmutableTriple<String, Long, String>, LocalDateTime> targetToSourceCreatedDate = duplicateSves\n .stream().collect(Collectors.toMap(this::getKeyForCreatedDate,\n SubmittedVariantEntity::getCreatedDate,\n (cd1, cd2) -> Collections.min(Arrays.asList(cd1, cd2))));\n\n Map<String, List<SubmittedVariantEntity>> svesBySourceAssembly = duplicateSves\n .stream().collect(Collectors.groupingBy(\n sve -> Objects.isNull(sve.getRemappedFrom()) ? \"\" : sve.getRemappedFrom()));\n\n for (Map.Entry<String, List<SubmittedVariantEntity>> asmAndSves : svesBySourceAssembly.entrySet()) {\n String sourceAsm = asmAndSves.getKey();\n List<SubmittedVariantEntity> svesRemappedFromAsm = asmAndSves.getValue();\n\n // If not remapped, stick with the target created date\n if (sourceAsm.equals(\"\")) {\n continue;\n }\n\n // Otherwise query database for source SVEs with same accession in this assembly to get their created date\n List<Long> targetAccessions = svesRemappedFromAsm\n .stream()\n .map(SubmittedVariantEntity::getAccession)\n .collect(Collectors.toList());\n List<SubmittedVariantEntity> allSourceSvesInAsm = mongoTemplate.find(\n query(where(\"seq\").is(sourceAsm).and(\"accession\").in(targetAccessions)),\n SubmittedVariantEntity.class, collection);\n Map<Long, List<SubmittedVariantEntity>> sourceSvesByAccession = allSourceSvesInAsm\n .stream().collect(Collectors.groupingBy(SubmittedVariantEntity::getAccession));\n\n for (SubmittedVariantEntity sve : svesRemappedFromAsm) {\n List<SubmittedVariantEntity> sourceSves = sourceSvesByAccession.get(sve.getAccession());\n targetToSourceCreatedDate.put(getKeyForCreatedDate(sve), getCreatedDateFromSource(sve, sourceSves));\n }\n }\n\n return targetToSourceCreatedDate;\n }", "public String getRunLog();", "public synchronized void startUploadToS3Server() {\n\t\t LogEntry [] logEntrys = null;\n\t\t\ttry {\n if(ReportService.ACTION_UPLOAD_UB_LOG.equals(action)) {\n if (tags == null || times == null || zipEntryNames == null || \n tags.length != times.length || tags.length != zipEntryNames.length || \n zipEntryNames.length != tags.length || !isZipEntryNameAllowed(zipEntryNames)) {\n Log.d(TAG, \"Stop uploading UB log --> tags array or times array or zip entry array isn't allowed.\");\n return;\n }\n if(Common.DEBUG && tags != null && times != null && tags.length == times.length) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"[UB Report] Ready to upload --> \");\n for(int i=0; i<tags.length; i++) {\n sb.append(\"tag: \").append(tags[i]).append(\", time: \").append(times[i]).append(\" \");\n }\n Log.d(TAG,sb.toString());\n }\n logEntrys = new LogEntry[tags.length];\n for(int i=0; i<tags.length; i++)\n logEntrys[i] = new LogEntry(tags[i], times[i], getContext(), key, iv);\n }\n else {\n logEntrys = new LogEntry[1];\n \t\t\t\tif(file != null)\n \t\t\t\t logEntrys[0] = new LogEntry(file, getContext());\n \t\t\t\telse if (fromDropBox)\n \t\t\t\t logEntrys[0] = new LogEntry(tag, time, getContext(), key, iv);\n \t\t\t\tzipEntryNames = new String [1];\n \t\t\t\tzipEntryNames[0] = \"Logfile\";\n }\n \n upload(tag, msg, position, mUniqueMsg, logEntrys, zipEntryNames, triggerType, packageName, processName);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tLog.e(TAG, \"Fail to create LogEntry\", e);\n\t\t\t} finally {\n\t\t\t if(logEntrys != null) {\n for(LogEntry logEntry : logEntrys)\n logEntry.closeEntry();\n\t\t\t }\n\t\t\t}\n\t }", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "public static void logEvent(String eventType) {\n logEvent(eventType, null);\n }", "private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }" ]
[ "0.61052185", "0.58061445", "0.5236373", "0.5017946", "0.5012482", "0.49483293", "0.49478996", "0.49391958", "0.48664308", "0.4860384", "0.48469198", "0.48313382", "0.4830621", "0.4823264", "0.48157448", "0.48066926", "0.4805607", "0.48011038", "0.4799381", "0.4798579", "0.47875884", "0.47804615", "0.47794008", "0.47275582", "0.4718228", "0.4714903", "0.46923444", "0.46804875", "0.46774623", "0.46676856", "0.46631944", "0.46570322", "0.46490252", "0.4639184", "0.4637005", "0.46153885", "0.46137643", "0.4598763", "0.45960507", "0.45942706", "0.45936733", "0.45764917", "0.45697623", "0.45646143", "0.4554648", "0.45527536", "0.453679", "0.45258963", "0.45170966", "0.45033625", "0.44900492", "0.44894236", "0.4485657", "0.44801348", "0.44770995", "0.44730386", "0.44673756", "0.44616258", "0.4444995", "0.44385982", "0.44382763", "0.44368416", "0.44358015", "0.44272852", "0.4418013", "0.4417865", "0.44058836", "0.439743", "0.43954688", "0.43948615", "0.43944317", "0.4388478", "0.43811777", "0.4380662", "0.43615153", "0.4350169", "0.4349053", "0.43486288", "0.43432477", "0.43428954", "0.4333508", "0.4330908", "0.43268204", "0.43210885", "0.43133947", "0.43024522", "0.43017617", "0.4300085", "0.42935956", "0.4287956", "0.4281809", "0.4278117", "0.42689645", "0.42683464", "0.42648032", "0.4260727", "0.42602447", "0.42588726", "0.4257028", "0.4254278" ]
0.5573976
2
verify the required parameter 'namespace' is set
@SuppressWarnings("rawtypes") private okhttp3.Call eventSourceServiceEventSourcesLogsValidateBeforeCall(String namespace, String name, String eventSourceType, String eventName, String grep, String podLogOptionsContainer, Boolean podLogOptionsFollow, Boolean podLogOptionsPrevious, String podLogOptionsSinceSeconds, String podLogOptionsSinceTimeSeconds, Integer podLogOptionsSinceTimeNanos, Boolean podLogOptionsTimestamps, String podLogOptionsTailLines, String podLogOptionsLimitBytes, Boolean podLogOptionsInsecureSkipTLSVerifyBackend, final ApiCallback _callback) throws ApiException { if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling eventSourceServiceEventSourcesLogs(Async)"); } okhttp3.Call localVarCall = eventSourceServiceEventSourcesLogsCall(namespace, name, eventSourceType, eventName, grep, podLogOptionsContainer, podLogOptionsFollow, podLogOptionsPrevious, podLogOptionsSinceSeconds, podLogOptionsSinceTimeSeconds, podLogOptionsSinceTimeNanos, podLogOptionsTimestamps, podLogOptionsTailLines, podLogOptionsLimitBytes, podLogOptionsInsecureSkipTLSVerifyBackend, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetNamespace();", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "void setNamespace(java.lang.String namespace);", "private NamespaceHelper() {}", "public boolean isNamespaceAware () {\n return true;\n }", "protected void validateNamespace(Namespace namespace) throws WikiException {\r\n\t\tcheckLength(namespace.getDefaultLabel(), 200);\r\n\t}", "void setNamespace(String namespace);", "boolean isNamespaceRunning(String namespace);", "public void testGetNamespaceURI() throws RepositoryException {\n String result = \"namespace\" ;\n String prefix =\"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespaceURI(prefix), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespaceURI(prefix), result);\n }", "java.lang.String getNamespace();", "@Test\n\tpublic void test_TCM__String_getNamespacePrefix() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect prefix\", attribute.getNamespacePrefix().equals(\"prefx\"));\n\t}", "@Test\n\tpublic void test_TCM__String_getNamespaceURI() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect URI\", attribute.getNamespaceURI().equals(\"http://some.other.place\"));\n\n\t}", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "boolean isNamespace(Object object);", "protected void validateNamespaceTranslation(Namespace namespace, String virtualWiki) throws WikiException {\r\n\t\tcheckLength(namespace.getLabel(virtualWiki), 200);\r\n\t}", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public final boolean isNamespaceAware() {\n return true;\n }", "public void testMemberNotTeamMemberForProjectValidator_NullNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator((String) null);\r\n fail(\"testMemberNotTeamMemberForProjectValidator_NullNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_NullNamespace.\");\r\n }\r\n }", "@Test\n public void testNamespace() throws Exception {\n NamespaceMeta ns1Meta = new NamespaceMeta.Builder().setName(\"ns1\").build();\n NamespaceMeta ns2Meta = new NamespaceMeta.Builder().setName(\"ns2\").build();\n NamespaceMeta anotherNsMeta = new NamespaceMeta.Builder().setName(\"anotherNs\").build();\n when(nsClient.list()).thenReturn(ImmutableList.of(ns1Meta, ns2Meta, anotherNsMeta));\n\n ResourceLookupContext resourceLookupContext = new ResourceLookupContext();\n resourceLookupContext.setResourceName(\"namespace\");\n // user is entering n and we expect the completion to show ns1 and ns2 as they start with n and not anotherNs\n resourceLookupContext.setUserInput(\"n\");\n resourceLookupContext.setResources(ImmutableMap.of(\"namespace\", Collections.emptyList()));\n List<String> resources = client.getResources(resourceLookupContext);\n Assert.assertEquals(2, resources.size());\n Assert.assertEquals(ImmutableList.of(\"ns1\", \"ns2\"), resources);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "public String getNamespace();", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public String getNamespace() {\n return namespace;\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static boolean isValidNamespace(CharSequence namespace) {\n if (namespace == null) {\n return false;\n }\n\n int position = 0;\n boolean start = true;\n\n while (position < namespace.length()) {\n char c = namespace.charAt(position++);\n if (start) {\n start = false;\n if (!isValidIdentifierStart(c)) {\n return false;\n }\n } else if (c == '.') {\n start = true;\n } else if (!isValidIdentifierAfterStart(c)) {\n return false;\n }\n }\n\n return !start;\n }", "public String getNamespace () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected boolean isMatchingNamespace(String rootElementNamespace)\n {\n if (namespacePattern != null)\n {\n return namespacePattern.matcher(rootElementNamespace == null ? \"\" : rootElementNamespace).matches();\n }\n else\n {\n return namespace == null ? rootElementNamespace == null : namespace.equals(rootElementNamespace);\n }\n }", "@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public void testMemberNotTeamMemberForProjectValidator_EmptyNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\" \");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_EmptyNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_EmptyNamespace.\");\r\n }\r\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }", "public boolean hasNamespace(final String namespace) {\n return rpcMethods.keySet().stream()\n .anyMatch(key -> key.toUpperCase().startsWith(namespace.toUpperCase()));\n }", "public void testGetNamespacePrefix() throws RepositoryException {\n String result = \"namespace\";\n String uri = \"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespacePrefix(uri), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefix(uri), result);\n }", "private static boolean _inNamespace(Resource resource, String namespace) {\n\t\tString resourceNamespace = resource.getNameSpace();\n\t\t\n\t\tif ( namespace.endsWith(\"/\") || namespace.endsWith(\"#\") ) {\n\t\t\treturn namespace.equals(resourceNamespace);\n\t\t}\n\t\telse {\n\t\t\treturn resourceNamespace != null && namespace.equals(resourceNamespace.replaceAll(\"(/|#)$\", \"\"));\n\t\t}\n\t}", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getTargetNamespace();", "public boolean hasNamespace() {\n return m_namespaces != null && m_namespaces.size() > 0;\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "void visit(Namespace namespace);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "@Test\n\tpublic void test_TCC___String_String_int_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", Attribute.ID_TYPE.ordinal(), namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "Namespaces namespaces();", "String getNamespaceStringValue(Object ns);", "public boolean isSetNs() {\n return this.ns != null;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "public boolean isTargetNamespace(String prefix) {\r\n return prefix.equals(getDefinitions().getTargetNamespace());\r\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public boolean addNamespaceToBPELDoc(String prefix, String namespace, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Adding namespace {} to BuildPlan {}\", namespace,\n\t\t\t\tbuildPlan.getBpelProcessElement().getAttribute(\"name\"));\n\t\tbuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:\" + prefix, namespace);\n\t\t// TODO make a real check\n\t\treturn true;\n\t}", "public boolean isNamespaceAware() {\n\t\ttry {\n\t\t\treturn parserImpl.getFeature(Constants.SAX_FEATURE_PREFIX\n\t\t\t\t\t\t\t\t\t\t + Constants.NAMESPACES_FEATURE);\n\t\t}\n\t\t catch (SAXException x) {\n\t\t\tthrow new IllegalStateException(x.getMessage());\n\t\t}\n\t}", "private boolean ensureXSDTypeNamespaceMappings(Object obj) {\r\n\t\t\r\n\t\tString targetNamespace = null;\r\n\t\t\r\n\t\tif (obj instanceof XSDNamedComponent ) {\r\n\t\t\tXSDNamedComponent namedComponent = (XSDNamedComponent) obj; \r\n\t\t\ttargetNamespace = namedComponent.getTargetNamespace();\r\n\t\t}\r\n\t\t\r\n\t\tif (targetNamespace == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Now check if the target namespace has a prefix mappings.\r\n\t\tString prefix = BPELUtils.getNamespacePrefix (modelObject, targetNamespace);\r\n\t\tif (prefix != null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// We have to map the namespace to a prefix. \r\n\t\tNamespaceMappingDialog dialog = new NamespaceMappingDialog(getShell(),modelObject);\r\n\t\tdialog.setNamespace( targetNamespace );\r\n\t\t\r\n\t\tif (dialog.open() == Window.CANCEL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// define the prefix\r\n\t\tBPELUtils.setPrefix( BPELUtils.getProcess(modelObject), targetNamespace, dialog.getPrefix()); \t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n \tpublic void whereClauseForNodeNamespace() {\n \t\tnode23.setNamespace(\"namespace\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.namespace\", \"'namespace'\"));\n \t}", "public void setTargetNamespace(String targetNamespace)\r\n {\r\n this.targetNamespace = targetNamespace;\r\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static boolean NamespaceNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NamespaceNodeTest\")) return false;\n if (!nextTokenIs(b, K_NAMESPACE_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMESPACE_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NAMESPACE_NODE, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@XmlElement(required = true, name = \"namespace\")\n public String getNamespace() {\n return namespace;\n }", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "@Test\n public void verifyReservedNS() throws IOException {\n NamespaceDescriptor ns = TestNamespace.admin.getNamespaceDescriptor(DEFAULT_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), DEFAULT_NAMESPACE.getName());\n ns = TestNamespace.admin.getNamespaceDescriptor(SYSTEM_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(2, TestNamespace.admin.listNamespaceDescriptors().length);\n // verify existence of system tables\n Set<TableName> systemTables = Sets.newHashSet(META_TABLE_NAME);\n HTableDescriptor[] descs = TestNamespace.admin.listTableDescriptorsByNamespace(SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(systemTables.size(), descs.length);\n for (HTableDescriptor desc : descs) {\n Assert.assertTrue(systemTables.contains(desc.getTableName()));\n }\n // verify system tables aren't listed\n Assert.assertEquals(0, TestNamespace.admin.listTables().length);\n // Try creating default and system namespaces.\n boolean exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(DEFAULT_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(SYSTEM_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n }", "private String getNamespace(Package pkg) {\n/* */ String nsUri;\n/* 223 */ if (pkg == null) return \"\";\n/* */ \n/* */ \n/* 226 */ XmlNamespace ns = pkg.<XmlNamespace>getAnnotation(XmlNamespace.class);\n/* 227 */ if (ns != null) {\n/* 228 */ nsUri = ns.value();\n/* */ } else {\n/* 230 */ nsUri = \"\";\n/* 231 */ } return nsUri;\n/* */ }", "String getReferenceNamespace();", "int getNamespaceUri();", "String getNamespacePrefix(Object ns);", "public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }", "public void testMemberNotTeamMemberForProjectValidator_UnknownNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\"unknown\");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_UnknownNamespace is failure.\");\r\n } catch (RegistrationValidationConfigurationException rvce) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_UnknownNamespace.\");\r\n }\r\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.362 -0500\", hash_original_method = \"1F62AD2938072A93E19EAFFCDA555D07\", hash_generated_method = \"E522C6EE17CC779935F0D04DE1F1F350\")\n \npublic NamespaceSupport ()\n {\n reset();\n }", "protected boolean compareNamespace(final XNode y, final ArrayReporter rep) {\n\t\tString ux = getNSUri();\n\t\tString uy = y.getNSUri();\n\t\tif (ux == null) {\n\t\t\tif (uy == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (ux.equals(uy)) {\n\t\t\treturn true;\n\t\t}\n\t\t//Namespace differs: &{0} and &{1}\n\t\trep.error(XDEF.XDEF288, getXDPosition(), y.getXDPosition());\n\t\treturn false;\n\t}", "public void testSetNamespacePrefix() throws RepositoryException{\n String prefix = \"prefix\";\n String uri =\"uri\";\n session.setNamespacePrefix(prefix, uri);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.setNamespacePrefix(prefix, uri);\n }", "public void setXmlns(String xmlns)\r\n\t{\r\n\t\tthis.xmlns = xmlns;\r\n\t}", "private boolean hasExtension(String namespace, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelExtensionsElement(), \"namespace\", namespace);\n\t}", "private void expectName(String namespace, String name)\n\t\t\tthrows XmpUnexpectedElementQualifiedNameException {\n\t\tif (!reader.get().getNamespaceURI().equals(namespace)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ namespace + \"' and found '\"\n\t\t\t\t\t+ reader.get().getNamespaceURI() + \"'\");\n\t\t}\n\t\tif (!reader.get().getLocalName().equals(name)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ name + \"' and found '\" + reader.get().getLocalName()\n\t\t\t\t\t+ \"'\");\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(\"namespace = \" + namespace);\n }", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "abstract XML addNamespace(Namespace ns);", "public void setNamespace(final String namespaceValue) {\n this.namespace = namespaceValue;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "protected static boolean isNamespaceAware(org.w3c.dom.Node node) {\n boolean ret=(node.getLocalName() != null);\n \n if (LOG.isLoggable(Level.FINEST)) {\n LOG.finest(\"Is node \"+node+\" namespace aware? \"+ret);\n LOG.finest(\"nodeName=\"+node.getNodeName());\n LOG.finest(\"localName=\"+node.getLocalName());\n LOG.finest(\"namespace=\"+node.getNamespaceURI());\n } \n \n return (ret);\n }", "@Test\n\tpublic void test_TCM__String_getQualifiedName() {\n final String prefix = \"prefx\";\n final String uri = \"http://some.other.place\";\n\n final Namespace namespace = Namespace.getNamespace(prefix, uri);\n\n final String attributeName = \"test\";\n final String attributeQName = prefix + ':' + attributeName;\n final String attributeValue = \"value\";\n\n final Attribute qulifiedAttribute = new Attribute(attributeName, attributeValue, namespace);\n assertEquals(\"incorrect qualified name\", qulifiedAttribute.getQualifiedName(), attributeQName);\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n assertEquals(\"incorrect qualified name\", attribute.getQualifiedName(), attributeName);\n\n\t}", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@BeforeClass\n public static void externalSchemaCheck() {\n assumeTrue(\"can access \" + NameSpace.DC.xsd, canConnect(NameSpace.DC.xsd));\n }", "@Test\n public void shouldInitializeFromPersistedContent() {\n namespaceRegistry.register(validPrefix1, validNamespaceUri1);\n namespaceRegistry.register(validPrefix2, validNamespaceUri2);\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n // Now set up the graph-based namespace registry ...\n GraphNamespaceRegistry registry2 = new GraphNamespaceRegistry(graph, pathToParentOfNamespaceNodes, uriPropertyName,\n additionalNamespaceProperties);\n // All namespaces should match ...\n Set<NamespaceRegistry.Namespace> all = namespaceRegistry.getNamespaces();\n Set<NamespaceRegistry.Namespace> all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n registry2.refresh();\n all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n }", "public String getTargetNamespace()\r\n {\r\n return targetNamespace;\r\n }" ]
[ "0.6993016", "0.688581", "0.67861503", "0.6746833", "0.6627405", "0.6627405", "0.6455587", "0.6414395", "0.6393416", "0.6349667", "0.62928563", "0.62866765", "0.6245286", "0.6231751", "0.62009007", "0.6150111", "0.6130819", "0.6126321", "0.6126321", "0.6126321", "0.6090523", "0.6077984", "0.6063936", "0.6041884", "0.60153145", "0.5992205", "0.59686756", "0.59628606", "0.59322995", "0.59308267", "0.5918374", "0.590845", "0.59074134", "0.5873534", "0.5857147", "0.5843202", "0.5814567", "0.58137727", "0.5799522", "0.5795164", "0.57769674", "0.577674", "0.57698965", "0.5764616", "0.57478666", "0.5747722", "0.5740817", "0.5727339", "0.56988436", "0.5681879", "0.56669235", "0.56618047", "0.56471306", "0.563229", "0.5617266", "0.55962396", "0.55917233", "0.55917233", "0.55917233", "0.5588478", "0.5586481", "0.5576537", "0.55501986", "0.5542011", "0.55409825", "0.5523567", "0.55087763", "0.5506672", "0.5503721", "0.55006534", "0.549637", "0.54763764", "0.5468605", "0.54656535", "0.5454136", "0.5428768", "0.5426498", "0.5420663", "0.5395233", "0.53942215", "0.5358733", "0.5352789", "0.5345346", "0.53398514", "0.53372836", "0.5324656", "0.5322933", "0.5313064", "0.53049266", "0.5299023", "0.5296107", "0.5288305", "0.5276734", "0.5275732", "0.5269305", "0.5217417", "0.51788265", "0.51619726", "0.51596355", "0.5148256", "0.51318115" ]
0.0
-1
Build call for eventSourceServiceGetEventSource
public okhttp3.Call eventSourceServiceGetEventSourceCall(String namespace, String name, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/event-sources/{namespace}/{name}" .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GetEventSourceResult getEventSource(GetEventSourceRequest getEventSourceRequest) {\n ExecutionContext executionContext = createExecutionContext(getEventSourceRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<GetEventSourceRequest> request = null;\n Response<GetEventSourceResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new GetEventSourceRequestMarshaller().marshall(super.beforeMarshalling(getEventSourceRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<GetEventSourceResult, JsonUnmarshallerContext> unmarshaller =\n new GetEventSourceResultJsonUnmarshaller();\n JsonResponseHandler<GetEventSourceResult> responseHandler =\n new JsonResponseHandler<GetEventSourceResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "EventChannelSource source();", "public ListEventSourcesResult listEventSources(ListEventSourcesRequest listEventSourcesRequest) {\n ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<ListEventSourcesRequest> request = null;\n Response<ListEventSourcesResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new ListEventSourcesRequestMarshaller().marshall(super.beforeMarshalling(listEventSourcesRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<ListEventSourcesResult, JsonUnmarshallerContext> unmarshaller =\n new ListEventSourcesResultJsonUnmarshaller();\n JsonResponseHandler<ListEventSourcesResult> responseHandler =\n new JsonResponseHandler<ListEventSourcesResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "WithCreate withSource(EventChannelSource source);", "String serialize(PushEventSource eventSource);", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceGetEventSourceValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceGetEventSource(Async)\");\n }\n \n // verify the required parameter 'name' is set\n if (name == null) {\n throw new ApiException(\"Missing the required parameter 'name' when calling eventSourceServiceGetEventSource(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceGetEventSourceCall(namespace, name, _callback);\n return localVarCall;\n\n }", "public ListEventSourcesResult listEventSources() throws AmazonServiceException, AmazonClientException {\n return listEventSources(new ListEventSourcesRequest());\n }", "public AddEventSourceResult addEventSource(AddEventSourceRequest addEventSourceRequest) {\n ExecutionContext executionContext = createExecutionContext(addEventSourceRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<AddEventSourceRequest> request = null;\n Response<AddEventSourceResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new AddEventSourceRequestMarshaller().marshall(super.beforeMarshalling(addEventSourceRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<AddEventSourceResult, JsonUnmarshallerContext> unmarshaller =\n new AddEventSourceResultJsonUnmarshaller();\n JsonResponseHandler<AddEventSourceResult> responseHandler =\n new JsonResponseHandler<AddEventSourceResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "SourceBuilder createService();", "public DemoEventSource( T source ) {\n super(source);\n }", "public IEventCollector getSource();", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }", "@Bean(destroyMethod = \"close\")\n\tpublic IESHttpEventStore getESHttpEventStore(final QryConfig config) {\n\t\tfinal String url = config.getEventStoreProtocol() + \"://\" + config.getEventStoreHost() + \":\"\n\t\t\t\t+ config.getEventStoreHttpPort();\n\t\ttry {\n\t\t\tfinal CredentialsProvider credentialsProvider = new BasicCredentialsProvider();\n\t\t\tfinal UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(config.getEventStoreUser(),\n\t\t\t\t\tconfig.getEventStorePassword());\n\t\t\tcredentialsProvider.setCredentials(AuthScope.ANY, credentials);\n\t\t\tfinal SerDeserializerRegistry registry = SharedUtils.createRegistry();\n\t\t\tfinal ESHttpEventStore es = new ESHttpEventStore(Executors.defaultThreadFactory(), new URL(url),\n\t\t\t\t\tESEnvelopeType.JSON, registry, registry, credentialsProvider);\n\t\t\tes.open();\n\t\t\treturn es;\n\t\t} catch (final MalformedURLException ex) {\n\t\t\tthrow new RuntimeException(\"Failed to create URL: \" + url, ex);\n\t\t}\n\t}", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }", "public AbstractFoxEvent(Object source, String eventName) {\r\n super(source);\r\n this.eventName = eventName;\r\n this.createTimestamp = System.currentTimeMillis();\r\n }", "public com.google.api.servicemanagement.v1.ConfigSource.Builder getConfigSourceBuilder() {\n \n onChanged();\n return getConfigSourceFieldBuilder().getBuilder();\n }", "public ContactStatusEvent(Object source)\n {\n super(source);\n }", "public static SourceBuilder builder() {\n return new SourceBuilder() {\n @Override\n public EventSource build(Context ctx,String... argv) {\n if (argv.length == 1) {\n return new HelloWorldSource(argv[0]);\n } else{\n return new HelloWorldSource();\n } \n }\n };\n }", "Update withSource(EventChannelSource source);", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "@Test\n void shouldReturnEventSource() {\n server.setRoute(\"/sse\", exchange -> {\n exchange.getResponseHeaders().add(\"Content-Type\", \"text/event-stream\");\n exchange.getResponseHeaders().add(\"Connection\", \"keep-alive\");\n exchange.getResponseHeaders().add(\"Cache-Control\", \"no-cache\");\n exchange.sendResponseHeaders(200, 0);\n try (OutputStreamWriter writer = new OutputStreamWriter(exchange.getResponseBody())) {\n writer.write(\"data: {\\\"foo\\\":\\\"bar\\\"}\\n\\n\");\n }\n });\n // 2. Subscribe to page request events.\n page.navigate(server.EMPTY_PAGE);\n List<Request> requests = new ArrayList<>();\n page.onRequest(request -> requests.add(request));\n // 3. Connect to EventSource in browser and return first message.\n Object result = page.evaluate(\"() => {\\n\" +\n \" const eventSource = new EventSource('/sse');\\n\" +\n \" return new Promise(resolve => {\\n\" +\n \" eventSource.onmessage = e => resolve(JSON.parse(e.data));\\n\" +\n \" });\\n\" +\n \"}\");\n assertEquals(mapOf(\"foo\", \"bar\"), result);\n assertEquals(\"eventsource\", requests.get(0).resourceType());\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.api.servicemanagement.v1.ConfigSource, com.google.api.servicemanagement.v1.ConfigSource.Builder, com.google.api.servicemanagement.v1.ConfigSourceOrBuilder> \n getConfigSourceFieldBuilder() {\n if (configSourceBuilder_ == null) {\n configSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.google.api.servicemanagement.v1.ConfigSource, com.google.api.servicemanagement.v1.ConfigSource.Builder, com.google.api.servicemanagement.v1.ConfigSourceOrBuilder>(\n getConfigSource(),\n getParentForChildren(),\n isClean());\n configSource_ = null;\n }\n return configSourceBuilder_;\n }", "Collection<CalendarEvent> getActiveEvents(long when)\n{\n List<CalendarEvent> rslt = new ArrayList<CalendarEvent>();\n try {\n getAllEvents(when);\n rslt.addAll(cal_events);\n }\n catch (Exception e) {\n BasisLogger.logE(\"GOOGLECAL: problem getting events\",e);\n }\n return rslt;\n}", "public Observable getEvents(){\n QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();\n requestBuilder.sortDesc(\"startDate\");\n return makeObservable(requestBuilder);\n }", "public static ArrayList<DigitalNewspapers> getDigitalNewsSources(){\n\n Uri builtUri = Uri.parse(BASE_NEWSAPI_SOURCES_EP).buildUpon()\n .build();\n\n URL url = null;\n\n try {\n url = new URL(builtUri.toString());\n return doCall(url);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@java.lang.Deprecated\n public io.kubernetes.client.openapi.models.V1EventSource getDeprecatedSource();", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "public CreateLivePullStreamTaskRequest(CreateLivePullStreamTaskRequest source) {\n if (source.SourceType != null) {\n this.SourceType = new String(source.SourceType);\n }\n if (source.SourceUrls != null) {\n this.SourceUrls = new String[source.SourceUrls.length];\n for (int i = 0; i < source.SourceUrls.length; i++) {\n this.SourceUrls[i] = new String(source.SourceUrls[i]);\n }\n }\n if (source.DomainName != null) {\n this.DomainName = new String(source.DomainName);\n }\n if (source.AppName != null) {\n this.AppName = new String(source.AppName);\n }\n if (source.StreamName != null) {\n this.StreamName = new String(source.StreamName);\n }\n if (source.StartTime != null) {\n this.StartTime = new String(source.StartTime);\n }\n if (source.EndTime != null) {\n this.EndTime = new String(source.EndTime);\n }\n if (source.Operator != null) {\n this.Operator = new String(source.Operator);\n }\n if (source.PushArgs != null) {\n this.PushArgs = new String(source.PushArgs);\n }\n if (source.CallbackEvents != null) {\n this.CallbackEvents = new String[source.CallbackEvents.length];\n for (int i = 0; i < source.CallbackEvents.length; i++) {\n this.CallbackEvents[i] = new String(source.CallbackEvents[i]);\n }\n }\n if (source.VodLoopTimes != null) {\n this.VodLoopTimes = new String(source.VodLoopTimes);\n }\n if (source.VodRefreshType != null) {\n this.VodRefreshType = new String(source.VodRefreshType);\n }\n if (source.CallbackUrl != null) {\n this.CallbackUrl = new String(source.CallbackUrl);\n }\n if (source.ExtraCmd != null) {\n this.ExtraCmd = new String(source.ExtraCmd);\n }\n if (source.Comment != null) {\n this.Comment = new String(source.Comment);\n }\n if (source.ToUrl != null) {\n this.ToUrl = new String(source.ToUrl);\n }\n if (source.BackupSourceType != null) {\n this.BackupSourceType = new String(source.BackupSourceType);\n }\n if (source.BackupSourceUrl != null) {\n this.BackupSourceUrl = new String(source.BackupSourceUrl);\n }\n if (source.WatermarkList != null) {\n this.WatermarkList = new PullPushWatermarkInfo[source.WatermarkList.length];\n for (int i = 0; i < source.WatermarkList.length; i++) {\n this.WatermarkList[i] = new PullPushWatermarkInfo(source.WatermarkList[i]);\n }\n }\n if (source.VodLocalMode != null) {\n this.VodLocalMode = new Long(source.VodLocalMode);\n }\n if (source.RecordTemplateId != null) {\n this.RecordTemplateId = new String(source.RecordTemplateId);\n }\n }", "String getEventId();", "java.util.concurrent.Future<GetEventIntegrationResult> getEventIntegrationAsync(GetEventIntegrationRequest getEventIntegrationRequest);", "public DescribeEventsRequest withSourceType(SourceType sourceType) {\n this.sourceType = sourceType.toString();\n return this;\n }", "public EndpointID source() {\r\n\t\treturn source_;\r\n\t}", "public DescribeEventsRequest withSourceType(String sourceType) {\n this.sourceType = sourceType;\n return this;\n }", "@JsonProperty(\"EventSourceSystem\")\r\n\tpublic String getEventSourceSystem() {\r\n\t\treturn eventSourceSystem;\r\n\t}", "@Override\n public Representation get(Variant variant) {\n String xmlString;\n // First check if source in URI exists\n if (!validateKnownSource()) {\n return null;\n }\n // If credentials are provided, they need to be valid\n if (!isAnonymous() && !validateCredentials()) {\n return null;\n }\n Source source = dbManager.getSource(uriSource);\n // If source is private, check if current user is allowed to view\n if ((!source.isPublic()) && (!validateSourceOwnerOrAdmin())) {\n return null;\n }\n // If we make it here, we're all clear to send the XML: either source is public or source is\n // private but user is authorized to GET.\n if (variant.getMediaType().equals(MediaType.TEXT_XML)) {\n if ((this.startTime == null) || (this.endTime == null)) {\n // Some bad combination of options, so just fail\n setStatusMiscError(\"Request could not be understood.\");\n return null;\n }\n else {\n XMLGregorianCalendar startObj = null, endObj = null;\n int intervalMinutes = 0;\n // check if start timestamp is OK\n try {\n startObj = Tstamp.makeTimestamp(this.startTime);\n }\n catch (Exception e) {\n setStatusBadTimestamp(this.startTime);\n return null;\n }\n // check if end timestamp is OK\n try {\n endObj = Tstamp.makeTimestamp(this.endTime);\n }\n catch (Exception e) {\n setStatusBadTimestamp(this.endTime);\n return null;\n }\n\n if (this.interval != null) {\n // convert to integer\n try {\n intervalMinutes = Integer.valueOf(this.interval);\n }\n catch (NumberFormatException e) {\n setStatusBadSamplingInterval(this.interval);\n }\n }\n // build XML string\n try {\n xmlString = getCarbon(startObj, endObj, intervalMinutes);\n // if we get a null, then there is no SensorData for this range\n if (xmlString == null) {\n setStatusBadRange(startObj.toString(), endObj.toString());\n return null;\n }\n return super.getStringRepresentation(xmlString);\n }\n catch (JAXBException e) {\n setStatusInternalError(e);\n return null;\n }\n }\n }\n // Some MediaType other than text/xml requested\n else {\n return null;\n }\n }", "@SuppressWarnings(\"finally\")\n\tpublic Event getEvent(int event_id) throws Exception\n\t{\n\t\tEvent res = null;\n\n\t\tString eve_name=null, eve_type=null, eve_param=null, eve_deviceEP=null;\n\t\tshort eve_deviceId=-1, eve_id=-1, eve_proto=-1, eve_prod_id=-1;\n\t\tchar eve_logicOperator=' ';\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnection connection = openConnection();\n\t\t\tPreparedStatement queryingStatement;\n\t\t\tResultSet queryResult;\n\t\t\t\n\t\t\tqueryingStatement =connection.prepareStatement(k_selectEvent);\n\t\t\tqueryingStatement.setString(1, Integer.toString(event_id));\n\t\t\tqueryResult = queryingStatement.executeQuery();\n\t\t\t\t\t\n\t\t\tif (!queryResult.next())\n\t\t\t{\n\t\t\t\tthrow new SQLException(\"Wrong tables format - maximum ids fields weren't found!\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\teve_id = Short.parseShort(queryResult.getString(1));\n\t\t\t\teve_deviceId = Short.parseShort(queryResult.getString(2));\n\t\t\t\teve_proto = Short.parseShort(queryResult.getString(3));\n\t\t\t\teve_param = queryResult.getString(4);\n\t\t\t\teve_logicOperator = queryResult.getString(5).charAt(0);\n\t\t\t} \n\t\t\t\n\t\t\tqueryingStatement =connection.prepareStatement(k_selectEventProto);\n\t\t\tqueryingStatement.setString(1, Short.toString(eve_proto));\n\t\t\tqueryResult = queryingStatement.executeQuery();\n\t\t\t\t\t\n\t\t\tif (!queryResult.next())\n\t\t\t{\n\t\t\t\tthrow new SQLException(\"Wrong tables format - maximum ids fields weren't found!\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\teve_prod_id = Short.parseShort(queryResult.getString(2));\n\t\t\t\teve_name = queryResult.getString(3);\n\t\t\t\teve_type = queryResult.getString(5);\n\t\t\t} \n\t\t\t\n\t\t\tboolean isTriggered = false;\n\t\t\tboolean isEvent = true;\n\t\t\t\n\t\t\tActionEventProto eve_prototype = new ActionEventProto(eve_proto, eve_name, description, eve_type, supportedValues, min, max, eve_prod_id, eve_deviceEP, isEvent);\n\t\t\t//Action eveWithParamAndDevID = new Action(eve_id, eve_deviceId, eve_param, eve_prototype);\n\t\t\tEvent completeEvent = new Event(eve_id, eve_deviceId, eve_param, eve_prototype, eve_logicOperator, isTriggered);\n\t\t\tres = completeEvent;\n\t\t\t//res = new Event(eve_name, eve_type, eve_param, eve_logicOperator, eve_deviceEP, eve_deviceId);\n\t\t\t/*\n\t\t\t * NOTES:\n\t\t\t * 1. no need to create action and then deliver it to event.\n\t\t\t * 2. need to fetch isTriggered from DB in case that the event has already happened.\n\t\t\t * 3. need to fetch isEvent from DB to place in isEvent.\n\t\t\t * watch booleans isTriggered, and boolean isEvent in c'tors lines 747, 749.\n\t\t\t */\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tcloseConnection();\n\t\t\treturn res;\n\t\t}\n\t}", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceCreateEventSourceValidateBeforeCall(String namespace, EventsourceCreateEventSourceRequest body, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceCreateEventSource(Async)\");\n }\n \n // verify the required parameter 'body' is set\n if (body == null) {\n throw new ApiException(\"Missing the required parameter 'body' when calling eventSourceServiceCreateEventSource(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceCreateEventSourceCall(namespace, body, _callback);\n return localVarCall;\n\n }", "public okhttp3.Call eventSourceServiceCreateEventSourceCall(String namespace, EventsourceCreateEventSourceRequest body, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/api/v1/event-sources/{namespace}\"\n .replaceAll(\"\\\\{\" + \"namespace\" + \"\\\\}\", localVarApiClient.escapeString(namespace.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { };\n return localVarApiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "public YahooWeatherEvent(Object source) {\n super(source);\n }", "public String buildMessage(Event event, Object[] params);", "public IEventLog getEventLog();", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceEventSourcesLogsValidateBeforeCall(String namespace, String name, String eventSourceType, String eventName, String grep, String podLogOptionsContainer, Boolean podLogOptionsFollow, Boolean podLogOptionsPrevious, String podLogOptionsSinceSeconds, String podLogOptionsSinceTimeSeconds, Integer podLogOptionsSinceTimeNanos, Boolean podLogOptionsTimestamps, String podLogOptionsTailLines, String podLogOptionsLimitBytes, Boolean podLogOptionsInsecureSkipTLSVerifyBackend, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceEventSourcesLogs(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceEventSourcesLogsCall(namespace, name, eventSourceType, eventName, grep, podLogOptionsContainer, podLogOptionsFollow, podLogOptionsPrevious, podLogOptionsSinceSeconds, podLogOptionsSinceTimeSeconds, podLogOptionsSinceTimeNanos, podLogOptionsTimestamps, podLogOptionsTailLines, podLogOptionsLimitBytes, podLogOptionsInsecureSkipTLSVerifyBackend, _callback);\n return localVarCall;\n\n }", "@JsonProperty(\"EventSourceSystem\")\r\n\tpublic void setEventSourceSystem(String eventSourceSystem) {\r\n\t\tthis.eventSourceSystem = eventSourceSystem;\r\n\t}", "public List<EventSource> getEventList() {\n List<EventSource> result = new ArrayList<>();\n for (EventSource event : this.eventList) {\n // Create a deep-copy of each EventSource.\n result.add(new EventSource(event));\n }\n // Return an unmodifiable list.\n return Collections.unmodifiableList(result);\n }", "EventUse createEventUse();", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "public DescribeEventsRequest() {}", "public com.google.api.servicemanagement.v1.ConfigSourceOrBuilder getConfigSourceOrBuilder() {\n return getConfigSource();\n }", "public static EventClient getEventClient() {\n if (EVENT_CLIENT == null) {\n EVENT_CLIENT = new NetworkEventClient(\n NetworkProvider.SERVER_URL,\n new DefaultNetworkProvider());\n }\n return EVENT_CLIENT;\n }", "public String getEventId();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getSourceIdentifier() != null) sb.append(\"SourceIdentifier: \" + getSourceIdentifier() + \",\");\n if (getSourceType() != null) sb.append(\"SourceType: \" + getSourceType() + \",\");\n if (getStartTime() != null) sb.append(\"StartTime: \" + getStartTime() + \",\");\n if (getEndTime() != null) sb.append(\"EndTime: \" + getEndTime() + \",\");\n if (getDuration() != null) sb.append(\"Duration: \" + getDuration() + \",\");\n if (getEventCategories() != null) sb.append(\"EventCategories: \" + getEventCategories() + \",\");\n if (getMaxRecords() != null) sb.append(\"MaxRecords: \" + getMaxRecords() + \",\");\n if (getMarker() != null) sb.append(\"Marker: \" + getMarker() );\n sb.append(\"}\");\n return sb.toString();\n }", "public com.google.api.servicemanagement.v1.ConfigSource getConfigSource() {\n if (configSourceBuilder_ == null) {\n return configSource_ == null ? com.google.api.servicemanagement.v1.ConfigSource.getDefaultInstance() : configSource_;\n } else {\n return configSourceBuilder_.getMessage();\n }\n }", "@Override\n public Iterable<ConfigSource> getConfigSources(final ConfigSourceContext context,\n final KubernetesClientBuildConfig config) {\n boolean trustAll = getImplicitConverter(Boolean.class)\n .convert(context.getValue(\"quarkus.tls.trust-all\").getValue());\n TlsConfig tlsConfig = new TlsConfig();\n tlsConfig.trustAll = trustAll;\n KubernetesClient client = KubernetesClientUtils.createClient(config, tlsConfig);\n return new KubernetesConfigSourceFactory(client).getConfigSources(context);\n }", "@ApiMethod(name = \"getEvent\", path = \"event\")\n public Event getEvent(@Named(\"eventID\") long id) {\n logger.info(\"getting single event\");\n Event foundEvent = null;\n try {\n Entity eventDatastoreObject = datastoreService.get(KeyFactory.createKey(\"Event\", id));\n foundEvent = new Event((String) eventDatastoreObject.getProperty(\"name\"), (String) eventDatastoreObject.getProperty(\"details\"));\n } catch (EntityNotFoundException e) {\n e.printStackTrace();\n }\n\n return foundEvent;\n }", "public IEventDataSource openEventDataSource(String uriString, String... headerlines) throws IOException {\n return openEventDataSource(uriString, true, headerlines);\n }", "UsageEvents.Event buildEvent(String packageName, String className) {\n UsageEvents.Event event = new UsageEvents.Event();\n event.mPackage = getCachedStringRef(packageName);\n if (className != null) {\n event.mClass = getCachedStringRef(className);\n }\n return event;\n }", "public EventDetails getByEventName(String eventName);", "public EventObject(Object source) {\n\tif (source == null)\n\t throw new IllegalArgumentException(\"null source\");\n\n this.source = source;\n }", "DescribeEventsResult describeEvents(DescribeEventsRequest describeEventsRequest);", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceListEventSourcesValidateBeforeCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceListEventSources(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceListEventSourcesCall(namespace, listOptionsLabelSelector, listOptionsFieldSelector, listOptionsWatch, listOptionsAllowWatchBookmarks, listOptionsResourceVersion, listOptionsResourceVersionMatch, listOptionsTimeoutSeconds, listOptionsLimit, listOptionsContinue, _callback);\n return localVarCall;\n\n }", "AbstractList<Event> getEventByName(String eventName) {\r\n\t\treturn events;\r\n\t}", "public okhttp3.Call eventSourceServiceListEventSourcesCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/api/v1/event-sources/{namespace}\"\n .replaceAll(\"\\\\{\" + \"namespace\" + \"\\\\}\", localVarApiClient.escapeString(namespace.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (listOptionsLabelSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.labelSelector\", listOptionsLabelSelector));\n }\n\n if (listOptionsFieldSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.fieldSelector\", listOptionsFieldSelector));\n }\n\n if (listOptionsWatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.watch\", listOptionsWatch));\n }\n\n if (listOptionsAllowWatchBookmarks != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.allowWatchBookmarks\", listOptionsAllowWatchBookmarks));\n }\n\n if (listOptionsResourceVersion != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersion\", listOptionsResourceVersion));\n }\n\n if (listOptionsResourceVersionMatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersionMatch\", listOptionsResourceVersionMatch));\n }\n\n if (listOptionsTimeoutSeconds != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.timeoutSeconds\", listOptionsTimeoutSeconds));\n }\n\n if (listOptionsLimit != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.limit\", listOptionsLimit));\n }\n\n if (listOptionsContinue != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.continue\", listOptionsContinue));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "public void set_source(EndpointID source) {\r\n\t\tsource_ = source;\r\n\t}", "public final static SoundEvent getEvent(int soundType, NativeEntity source, int soundChannel, int soundIndex, float volume, float attenuation, float timeofs)\n\t{\n\tSoundEvent result = (SoundEvent) gRecycler.getObject();\n\n\tresult.fConsumed = false;\n\tresult.fType = soundType;\n\tresult.source = result.fSource = source;\n\tresult.fSoundChannel = soundChannel;\n\tresult.fSoundIndex = soundIndex;\n\tresult.fVolume = volume;\n\tresult.fAttenuation = attenuation;\n\tresult.fTimeOfs\t= timeofs;\n\t\n\treturn result;\n\t}", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "public com.vodafone.global.er.decoupling.binding.request.GetServiceRequest createGetServiceRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetServiceRequestImpl();\n }", "public static ApproxsimEvent getGeneric(Object source) {\n return new ApproxsimEvent(source, GENERIC);\n }", "Event getEvent();", "private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }", "private static OSS getClient(){\n ClientConfiguration conf = new ClientConfiguration();\n conf.setConnectionTimeout(15 * 1000); // connction time out default 15s\n conf.setSocketTimeout(15 * 1000); // socket timeout,default 15s\n conf.setMaxConcurrentRequest(5); // synchronous request number,default 5\n conf.setMaxErrorRetry(2); // retry,default 2\n OSSLog.enableLog(); //write local log file ,path is SDCard_path\\OSSLog\\logs.csv\n\n // using STS, safer method\n// OSSCredentialProvider credentialProvider = new\n//// OSSStsTokenCredentialProvider(\"LTAI4FcJvJqKBATQSHtdBWLQ\",\n//// \"Q6ocdnZ211qGhyrSJq2c5jMEMugoor\",\n//// \"<StsToken.SecurityToken>\");\n // deprecated method\n OSSCredentialProvider credentialProvider = new\n OSSPlainTextAKSKCredentialProvider(ACS_KEY_ID, ACS_KEY_SCT);\n\n OSS oss = new OSSClient(Factory.app(), END_POINT, credentialProvider, conf);\n return oss;\n }", "public static Event startEvent(String accessToken, Integer eventId) {\n JsonObject jsonObject = new JsonObject();\n\n jsonObject.add(\"event\", new JsonObject());\n Log.i(Constants.TAG, \"jsonObject:\" + jsonObject.toString());\n\n try {\n JsonElement element = NetworkUtil.postWebService(jsonObject, NetworkUtil.EVENTS_URI + \"/\" + eventId + EVENTS_START_URI, accessToken);\n Log.i(Constants.TAG, \"result:\" + element.toString());\n if (element != null) {\n GsonBuilder jsonBuilder = new GsonBuilder();\n jsonBuilder.registerTypeAdapter(Event.class, new Event.EventDeserializer());\n Gson gson = jsonBuilder.create();\n\n Log.i(Constants.TAG, \"RETURNED : jsonObject:\" + element.getAsJsonObject().get(\"event\").toString());\n Event event = gson.fromJson(\n element.getAsJsonObject().get(\"event\"),\n Event.class\n );\n return event;\n } else {\n return null;\n }\n } catch (APICallException e) {\n Log.e(Constants.TAG, \"HTTP ERROR when starting event - STATUS:\" + e.getMessage(), e);\n return null;\n } catch (IOException e) {\n Log.e(Constants.TAG, \"IOException when starting event\", e);\n return null;\n } // end try-catch\n }", "public Events getEventDetailsByEventId(int eventId);", "ConferenceScheduleBuilderService createEventsFromNetworkToEnd();", "public List<MessageSource> createMessageSources(){\n\n List<MessageSource> messageSourceList = new ArrayList<>();\n\n String messageSourceConfig = Configurations.map.getProperty(\"messageSourceChannels\");\n String[] sourceConfigArray = messageSourceConfig.split(\",\");\n\n for(String sourceConfig : sourceConfigArray) {\n MessageSource messageSource = null;\n\n // there is only file message source option for instance, but it's extendable\n if(sourceConfig.equals(\"file\")){\n messageSource = new FileSource();\n }\n\n if(messageSource != null){\n messageSourceList.add(messageSource);\n }\n }\n\n if(messageSourceList.size() == 0){\n return null;\n }\n\n return messageSourceList;\n }", "@GET\n @Path(\"/source/{id}\")\n @Produces(\"application/json;charset=UTF-8\")\n @GZIP\n @NoCache\n public SourceVo getSource(@PathParam(\"id\") Integer id) throws Exception {\n return sourceService.findById(id)\n .toVo(DataFilter.get());\n }", "public List<Events> getAllSystemEventsListForAll();", "private StoreEvent(E source) {\n super(source);\n }", "@Deprecated\n public V1NodeConfigSource getConfigSource() {\n return this.configSource!=null ?this.configSource.build():null;\n }", "public String buildConfigurationSourceOptions(String selectedSource) throws BaseException {\n listProductsCommand.invoke();\n\n List<String> sources = Arrays.asList(PreferencesAdaptor.CONFIGURE_BY_PREFERENCES, PreferencesAdaptor.CONFIGURE_BY_REQUEST, PreferencesAdaptor.CONFIGURE_BY_SESSION);\n\n listToOptionCommand.setOptionsArg(sources);\n listToOptionCommand.setSelectedArg(selectedSource);\n listToOptionCommand.setUnknownOptionArg(\"Source?\");\n listToOptionCommand.invoke();\n\n return listToOptionCommand.getOptionMarkupRet();\n }", "public okhttp3.Call eventSourceServiceWatchEventSourcesCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/api/v1/stream/event-sources/{namespace}\"\n .replaceAll(\"\\\\{\" + \"namespace\" + \"\\\\}\", localVarApiClient.escapeString(namespace.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (listOptionsLabelSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.labelSelector\", listOptionsLabelSelector));\n }\n\n if (listOptionsFieldSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.fieldSelector\", listOptionsFieldSelector));\n }\n\n if (listOptionsWatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.watch\", listOptionsWatch));\n }\n\n if (listOptionsAllowWatchBookmarks != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.allowWatchBookmarks\", listOptionsAllowWatchBookmarks));\n }\n\n if (listOptionsResourceVersion != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersion\", listOptionsResourceVersion));\n }\n\n if (listOptionsResourceVersionMatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersionMatch\", listOptionsResourceVersionMatch));\n }\n\n if (listOptionsTimeoutSeconds != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.timeoutSeconds\", listOptionsTimeoutSeconds));\n }\n\n if (listOptionsLimit != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.limit\", listOptionsLimit));\n }\n\n if (listOptionsContinue != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.continue\", listOptionsContinue));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "public void receiveResultGetProjectSources(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetProjectSourcesResponse result) {\r\n\t}", "private SearchSourceBuilder buildBaseSearchSource() {\n long histogramSearchStartTime = Math.max(0, context.start - ExtractorUtils.getHistogramIntervalMillis(context.aggs));\n\n SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()\n .size(0)\n .query(ExtractorUtils.wrapInTimeRangeQuery(context.query, context.timeField, histogramSearchStartTime, context.end));\n\n context.aggs.getAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n context.aggs.getPipelineAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n return searchSourceBuilder;\n }", "@Override\n public CoreEventInfo getEvent(final InternalEventKey key)\n throws CalFacadeException {\n HibSession sess = getSess();\n\n if (!cb.getSuperUser()) {\n sess.rollback();\n throw new CalFacadeAccessException();\n }\n\n if ((key == null) || !(key instanceof PrivateInternalEventKey)) {\n throwException(CalFacadeException.illegalObjectClass);\n }\n\n PrivateInternalEventKey ikey = (PrivateInternalEventKey)key;\n\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"from \");\n sb.append(BwEventObj.class.getName());\n sb.append(\" ev where ev.id=:id\");\n\n sess.createQuery(sb.toString());\n sess.setInt(\"id\", ikey.key);\n\n BwEvent ev = (BwEvent)sess.getUnique();\n\n if (ev == null) {\n return null;\n }\n\n CurrentAccess ca = new CurrentAccess(true);\n\n return new CoreEventInfo(ev, ca);\n }", "public ArrayList<AVPLeadSource> get_all_avpleadsource() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<AVPLeadSource> AVPLeadSource_list;\n\n\t\t\tAVPLeadSource_list = AVPLeadSource_dao.get_all_avpleadsource();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn AVPLeadSource_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "@Override\n public void getMosSource(String testTest, ArrayList<String> source) {\n\n }", "public ApplicationEvent(Object source) {\n super(source);\n this.timestamp = System.currentTimeMillis();\n }", "public DescribeEventsRequest withSourceIdentifier(String sourceIdentifier) {\n this.sourceIdentifier = sourceIdentifier;\n return this;\n }", "protected ServiceEvent(ServiceEvent event) {\n eventSenderClass=event.eventSenderClass;\n eventSenderID=event.eventSenderID;\n }", "@Nullable\n private Packet buildPacketForGet(@NonNull Event event) {\n if (event.getEncodedQuery().isEmpty()) return null;\n return new Packet(mApiUrl + event);\n }", "EventUses createEventUses();", "public List<Event> getEvents() {\n List<Event> events = new ArrayList<>();\n\n Query query = new Query(\"Event\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n String idString = entity.getKey().getName();\n UUID eventId = UUID.fromString(idString);\n String speaker = (String) entity.getProperty(\"speaker\");\n String organization = (String) entity.getProperty(\"organization\");\n String eventDate = (String) entity.getProperty(\"eventDate\");\n Location location = (Location) entity.getProperty(\"location\");\n List<String> amenities = getAmenities(eventId);\n String externalLink = (String) entity.getProperty(\"externalLink\");\n PublicType publicType = (PublicType) entity.getProperty(\"publicType\");\n long ownerId = (long) entity.getProperty(\"ownerId\");\n List<ThreadComment> thread = getThread(eventId);\n // long timeStamp = (long) entity.getProperty(\"timestamp\");\n\n Event event = new Event(eventId, speaker, organization, eventDate, location, amenities, externalLink,\n publicType, ownerId);\n event.copyThread(thread);\n events.add(event);\n // An exception can occur here for multiple reasons (Type casting error, any\n // property not existing, key error, etc...)\n } catch (Exception e) {\n System.err.println(\"Error reading event.\");\n System.err.println(entity.toString());\n e.printStackTrace();\n }\n }\n\n return events;\n }", "AbstractList<Event> getEventByCreateDate(Date d){\r\n\t\treturn events;\r\n\t}", "@Override\n public Collection<CoreEventInfo> getEvents(final Collection<BwCalendar> calendars,\n final FilterBase filter,\n final BwDateTime startDate, final BwDateTime endDate,\n final List<String> retrieveList,\n RecurringRetrievalMode recurRetrieval,\n final boolean freeBusy) throws CalFacadeException {\n recurRetrieval = defaultRecurringRetrieval(recurRetrieval,\n startDate, endDate);\n\n if (debug) {\n trace(\"getEvents for start=\" + startDate + \" end=\" + endDate);\n }\n\n Collection<String> colPaths = null;\n\n if (calendars != null) {\n colPaths = new ArrayList<String>();\n for (BwCalendar c: calendars) {\n colPaths.add(c.getPath());\n\n if (debug) {\n trace(\" calendar:\" + c.getPath());\n }\n }\n }\n\n FieldnamesList retrieveListFields = null;\n\n if (retrieveList != null) {\n // Convert property names to field names\n retrieveListFields = new FieldnamesList(retrieveList.size() +\n FieldNamesMap.reqFlds.size());\n\n for (String pname: retrieveList) {\n FieldNamesEntry fent = FieldNamesMap.getEntry(pname);\n\n if ((fent == null) || (fent.getMulti())) {\n // At this stage it seems better to be inefficient\n retrieveListFields = null;\n break;\n }\n\n retrieveListFields.add(fent);\n }\n\n if (retrieveListFields != null) {\n retrieveListFields.addAll(FieldNamesMap.reqFlds);\n }\n }\n\n /* eventsQuery covers some of what is outlined here.\n *\n * 1. Get events and annotations in range and satisfying the filter.\n * If there is a date range exclude the recurring master events as they\n * turn up later attached to the instances.\n *\n * If there is no date range we will not expand recurrences so we need\n * to send master events and overrrides.\n *\n * We also exclude overrides to recurring instances.\n *\n * If no date range was supplied we now have all the master events.\n * Otherwise we have all the non-recurring events\n * (XXX or recurring reference by an annotation???)\n *\n * 2. If there is a date range supplied, get all instances in date range and\n * add their masters to the set.\n *\n * 3. If there is a date range supplied, get all overrides in date range and\n * add their masters to the set.\n *\n * 4. For each event\n * 4a. if not recurring add to result\n * 4b. if recurring {\n * if expanding\n * find all instances (in range) and add to result set\n * else {\n * find all overrides (in override range if supplied)\n * find all instances (IF instance range)\n * attach them to the master\n * add master to set.\n * }\n * }\n *\n * Some points to remind ourselves. We have to fetch overides and instances\n * because the master may be out of the range of a date limited query - usually\n * is, but we need the master to construct a proxy.\n *\n * We could probably just use the overrides and instances obtained in\n * steps 2 and 3 except for the CalDAV complications which allow a different\n * date range for overrides and instances.\n */\n\n int desiredAccess = privRead;\n if (freeBusy) {\n // DORECUR - freebusy events must have enough info for expansion\n desiredAccess = privReadFreeBusy;\n }\n\n EventsQueryResult eqr = new EventsQueryResult();\n eqr.flt = new Filters(filter);\n eqr.colPaths = colPaths;\n\n eventsQuery(eqr, startDate, endDate,\n retrieveListFields,\n freeBusy,\n null, // master\n null, // masters\n null, // uids\n getEvents);\n\n Collection<CoreEventInfo> ceis = postGetEvents(eqr.es, desiredAccess,\n returnResultAlways,\n null);\n\n /* Now get the annotations - these are not overrides */\n eventsQuery(eqr, startDate, endDate,\n retrieveListFields,\n freeBusy,\n null, // master\n null, // masters\n null, // uids\n getAnnotations);\n\n if (!eqr.es.isEmpty()) {\n ceis.addAll(postGetEvents(eqr.es, desiredAccess, returnResultAlways,\n eqr.flt));\n }\n\n ceis = getRecurrences(eqr, ceis,\n startDate, endDate,\n retrieveListFields, recurRetrieval, desiredAccess,\n freeBusy);\n\n return buildVavail(ceis);\n }", "@Override\n public Object getEvent() {\n return eventObj;\n }", "public interface EventChannel {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the systemData property: The system metadata relating to Event Channel resource.\n *\n * @return the systemData value.\n */\n SystemData systemData();\n\n /**\n * Gets the source property: Source of the event channel. This represents a unique resource in the partner's\n * resource model.\n *\n * @return the source value.\n */\n EventChannelSource source();\n\n /**\n * Gets the destination property: Represents the destination of an event channel.\n *\n * @return the destination value.\n */\n EventChannelDestination destination();\n\n /**\n * Gets the provisioningState property: Provisioning state of the event channel.\n *\n * @return the provisioningState value.\n */\n EventChannelProvisioningState provisioningState();\n\n /**\n * Gets the partnerTopicReadinessState property: The readiness state of the corresponding partner topic.\n *\n * @return the partnerTopicReadinessState value.\n */\n PartnerTopicReadinessState partnerTopicReadinessState();\n\n /**\n * Gets the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this timer expires\n * while the corresponding partner topic is never activated, the event channel and corresponding partner topic are\n * deleted.\n *\n * @return the expirationTimeIfNotActivatedUtc value.\n */\n OffsetDateTime expirationTimeIfNotActivatedUtc();\n\n /**\n * Gets the filter property: Information about the filter for the event channel.\n *\n * @return the filter value.\n */\n EventChannelFilter filter();\n\n /**\n * Gets the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to remove any\n * ambiguity of the origin of creation of the partner topic for the customer.\n *\n * @return the partnerTopicFriendlyDescription value.\n */\n String partnerTopicFriendlyDescription();\n\n /**\n * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.EventChannelInner object.\n *\n * @return the inner object.\n */\n EventChannelInner innerModel();\n\n /** The entirety of the EventChannel definition. */\n interface Definition\n extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {\n }\n /** The EventChannel definition stages. */\n interface DefinitionStages {\n /** The first stage of the EventChannel definition. */\n interface Blank extends WithParentResource {\n }\n /** The stage of the EventChannel definition allowing to specify parent resource. */\n interface WithParentResource {\n /**\n * Specifies resourceGroupName, partnerNamespaceName.\n *\n * @param resourceGroupName The name of the resource group within the user's subscription.\n * @param partnerNamespaceName Name of the partner namespace.\n * @return the next definition stage.\n */\n WithCreate withExistingPartnerNamespace(String resourceGroupName, String partnerNamespaceName);\n }\n /**\n * The stage of the EventChannel definition which contains all the minimum required properties for the resource\n * to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithSource,\n DefinitionStages.WithDestination,\n DefinitionStages.WithExpirationTimeIfNotActivatedUtc,\n DefinitionStages.WithFilter,\n DefinitionStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n EventChannel create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n EventChannel create(Context context);\n }\n /** The stage of the EventChannel definition allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel definition allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n WithCreate withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel definition allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel definition allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n WithCreate withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel definition allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n WithCreate withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Begins update for the EventChannel resource.\n *\n * @return the stage of resource update.\n */\n EventChannel.Update update();\n\n /** The template for EventChannel update. */\n interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }\n /** The EventChannel update stages. */\n interface UpdateStages {\n /** The stage of the EventChannel update allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel update allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel update allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel update allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel update allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n Update withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n EventChannel refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n EventChannel refresh(Context context);\n}", "EventChannelDestination destination();", "EventChannel create(Context context);", "public interface Source {\n\n /**\n * Set the system identifier for this Source.\n * <p>\n * The system identifier is optional if the source does not get its data\n * from a URL, but it may still be useful to provide one. The application\n * can use a system identifier, for example, to resolve relative URIs and to\n * include in error messages and warnings.\n * </p>\n *\n * @param systemId\n * The system identifier as a URL string.\n */\n public void setSystemId(String systemId);\n\n /**\n * Get the system identifier that was set with setSystemId.\n *\n * @return The system identifier that was set with setSystemId, or null if\n * setSystemId was not called.\n */\n public String getSystemId();\n}", "private static String getEventString(final JobLogEvent event)\n {\n if (event == null) {\n return \"NullJobEvent\";\n }\n final StringBuilder sb = new StringBuilder();\n if (event.getScheduler() != null) {\n sb.append(\" Scheduler=\").append(event.getScheduler()).append(\"\\n\");\n }\n // if (event.getRunner() != null) {\n // sb.append(\" Runner=\").append(event.getRunner()).append(\"\\n\");\n // }\n if (event.getJob() != null) {\n sb.append(\" Job=\").append(event.getJob()).append(\"\\n\");\n }\n if (event.getJobDefinition() != null) {\n sb.append(\" Definition=\").append(event.getJobDefinition()).append(\"\\n\");\n }\n if (event.getJobResult() != null) {\n sb.append(\" Result=\").append(event.getJobResult()).append(\"\\n\");\n }\n if (event.getJobStatus() != null) {\n sb.append(\" Status=\").append(event.getJobStatus()).append(\"\\n\");\n }\n return sb.toString();\n }", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}" ]
[ "0.6801186", "0.61639225", "0.5588959", "0.551162", "0.53569", "0.52965385", "0.5269643", "0.51718843", "0.51714826", "0.50671226", "0.50239134", "0.496687", "0.49478102", "0.49397284", "0.4931789", "0.49157205", "0.48839682", "0.4883425", "0.48726964", "0.4794708", "0.47925127", "0.47918138", "0.47719976", "0.47587797", "0.47579646", "0.47574824", "0.4740361", "0.47293437", "0.47254735", "0.47148147", "0.47137704", "0.47013453", "0.4692246", "0.4684463", "0.4684083", "0.46738037", "0.46718037", "0.4653947", "0.46481475", "0.46407244", "0.4624659", "0.4624242", "0.46107146", "0.4610358", "0.4607679", "0.45995218", "0.4579674", "0.4563945", "0.45573732", "0.4543224", "0.45431182", "0.45331442", "0.4524077", "0.4514958", "0.45027444", "0.44957158", "0.44897464", "0.44890663", "0.4485786", "0.4482168", "0.44817233", "0.44784167", "0.4477389", "0.447597", "0.44758862", "0.44758818", "0.44718254", "0.4471427", "0.44708097", "0.44607273", "0.4450483", "0.4435196", "0.44348645", "0.4407606", "0.44065905", "0.4399374", "0.43964046", "0.43947437", "0.43938023", "0.4383932", "0.43814346", "0.43783918", "0.43769884", "0.43746445", "0.4367939", "0.4360638", "0.4351733", "0.43489963", "0.43391556", "0.4337143", "0.433237", "0.4327921", "0.43271434", "0.43266657", "0.43262818", "0.43204919", "0.43120536", "0.4308099", "0.4295557", "0.42943433" ]
0.53773415
4
verify the required parameter 'namespace' is set
@SuppressWarnings("rawtypes") private okhttp3.Call eventSourceServiceGetEventSourceValidateBeforeCall(String namespace, String name, final ApiCallback _callback) throws ApiException { if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling eventSourceServiceGetEventSource(Async)"); } // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling eventSourceServiceGetEventSource(Async)"); } okhttp3.Call localVarCall = eventSourceServiceGetEventSourceCall(namespace, name, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetNamespace();", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "void setNamespace(java.lang.String namespace);", "private NamespaceHelper() {}", "public boolean isNamespaceAware () {\n return true;\n }", "protected void validateNamespace(Namespace namespace) throws WikiException {\r\n\t\tcheckLength(namespace.getDefaultLabel(), 200);\r\n\t}", "void setNamespace(String namespace);", "boolean isNamespaceRunning(String namespace);", "public void testGetNamespaceURI() throws RepositoryException {\n String result = \"namespace\" ;\n String prefix =\"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespaceURI(prefix), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespaceURI(prefix), result);\n }", "java.lang.String getNamespace();", "@Test\n\tpublic void test_TCM__String_getNamespacePrefix() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect prefix\", attribute.getNamespacePrefix().equals(\"prefx\"));\n\t}", "@Test\n\tpublic void test_TCM__String_getNamespaceURI() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect URI\", attribute.getNamespaceURI().equals(\"http://some.other.place\"));\n\n\t}", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "boolean isNamespace(Object object);", "protected void validateNamespaceTranslation(Namespace namespace, String virtualWiki) throws WikiException {\r\n\t\tcheckLength(namespace.getLabel(virtualWiki), 200);\r\n\t}", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public final boolean isNamespaceAware() {\n return true;\n }", "public void testMemberNotTeamMemberForProjectValidator_NullNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator((String) null);\r\n fail(\"testMemberNotTeamMemberForProjectValidator_NullNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_NullNamespace.\");\r\n }\r\n }", "@Test\n public void testNamespace() throws Exception {\n NamespaceMeta ns1Meta = new NamespaceMeta.Builder().setName(\"ns1\").build();\n NamespaceMeta ns2Meta = new NamespaceMeta.Builder().setName(\"ns2\").build();\n NamespaceMeta anotherNsMeta = new NamespaceMeta.Builder().setName(\"anotherNs\").build();\n when(nsClient.list()).thenReturn(ImmutableList.of(ns1Meta, ns2Meta, anotherNsMeta));\n\n ResourceLookupContext resourceLookupContext = new ResourceLookupContext();\n resourceLookupContext.setResourceName(\"namespace\");\n // user is entering n and we expect the completion to show ns1 and ns2 as they start with n and not anotherNs\n resourceLookupContext.setUserInput(\"n\");\n resourceLookupContext.setResources(ImmutableMap.of(\"namespace\", Collections.emptyList()));\n List<String> resources = client.getResources(resourceLookupContext);\n Assert.assertEquals(2, resources.size());\n Assert.assertEquals(ImmutableList.of(\"ns1\", \"ns2\"), resources);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "public String getNamespace();", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public String getNamespace() {\n return namespace;\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static boolean isValidNamespace(CharSequence namespace) {\n if (namespace == null) {\n return false;\n }\n\n int position = 0;\n boolean start = true;\n\n while (position < namespace.length()) {\n char c = namespace.charAt(position++);\n if (start) {\n start = false;\n if (!isValidIdentifierStart(c)) {\n return false;\n }\n } else if (c == '.') {\n start = true;\n } else if (!isValidIdentifierAfterStart(c)) {\n return false;\n }\n }\n\n return !start;\n }", "public String getNamespace () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected boolean isMatchingNamespace(String rootElementNamespace)\n {\n if (namespacePattern != null)\n {\n return namespacePattern.matcher(rootElementNamespace == null ? \"\" : rootElementNamespace).matches();\n }\n else\n {\n return namespace == null ? rootElementNamespace == null : namespace.equals(rootElementNamespace);\n }\n }", "@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public void testMemberNotTeamMemberForProjectValidator_EmptyNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\" \");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_EmptyNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_EmptyNamespace.\");\r\n }\r\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }", "public boolean hasNamespace(final String namespace) {\n return rpcMethods.keySet().stream()\n .anyMatch(key -> key.toUpperCase().startsWith(namespace.toUpperCase()));\n }", "public void testGetNamespacePrefix() throws RepositoryException {\n String result = \"namespace\";\n String uri = \"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespacePrefix(uri), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefix(uri), result);\n }", "private static boolean _inNamespace(Resource resource, String namespace) {\n\t\tString resourceNamespace = resource.getNameSpace();\n\t\t\n\t\tif ( namespace.endsWith(\"/\") || namespace.endsWith(\"#\") ) {\n\t\t\treturn namespace.equals(resourceNamespace);\n\t\t}\n\t\telse {\n\t\t\treturn resourceNamespace != null && namespace.equals(resourceNamespace.replaceAll(\"(/|#)$\", \"\"));\n\t\t}\n\t}", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getTargetNamespace();", "public boolean hasNamespace() {\n return m_namespaces != null && m_namespaces.size() > 0;\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "void visit(Namespace namespace);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "@Test\n\tpublic void test_TCC___String_String_int_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", Attribute.ID_TYPE.ordinal(), namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "Namespaces namespaces();", "String getNamespaceStringValue(Object ns);", "public boolean isSetNs() {\n return this.ns != null;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "public boolean isTargetNamespace(String prefix) {\r\n return prefix.equals(getDefinitions().getTargetNamespace());\r\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public boolean addNamespaceToBPELDoc(String prefix, String namespace, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Adding namespace {} to BuildPlan {}\", namespace,\n\t\t\t\tbuildPlan.getBpelProcessElement().getAttribute(\"name\"));\n\t\tbuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:\" + prefix, namespace);\n\t\t// TODO make a real check\n\t\treturn true;\n\t}", "public boolean isNamespaceAware() {\n\t\ttry {\n\t\t\treturn parserImpl.getFeature(Constants.SAX_FEATURE_PREFIX\n\t\t\t\t\t\t\t\t\t\t + Constants.NAMESPACES_FEATURE);\n\t\t}\n\t\t catch (SAXException x) {\n\t\t\tthrow new IllegalStateException(x.getMessage());\n\t\t}\n\t}", "private boolean ensureXSDTypeNamespaceMappings(Object obj) {\r\n\t\t\r\n\t\tString targetNamespace = null;\r\n\t\t\r\n\t\tif (obj instanceof XSDNamedComponent ) {\r\n\t\t\tXSDNamedComponent namedComponent = (XSDNamedComponent) obj; \r\n\t\t\ttargetNamespace = namedComponent.getTargetNamespace();\r\n\t\t}\r\n\t\t\r\n\t\tif (targetNamespace == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Now check if the target namespace has a prefix mappings.\r\n\t\tString prefix = BPELUtils.getNamespacePrefix (modelObject, targetNamespace);\r\n\t\tif (prefix != null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// We have to map the namespace to a prefix. \r\n\t\tNamespaceMappingDialog dialog = new NamespaceMappingDialog(getShell(),modelObject);\r\n\t\tdialog.setNamespace( targetNamespace );\r\n\t\t\r\n\t\tif (dialog.open() == Window.CANCEL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// define the prefix\r\n\t\tBPELUtils.setPrefix( BPELUtils.getProcess(modelObject), targetNamespace, dialog.getPrefix()); \t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n \tpublic void whereClauseForNodeNamespace() {\n \t\tnode23.setNamespace(\"namespace\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.namespace\", \"'namespace'\"));\n \t}", "public void setTargetNamespace(String targetNamespace)\r\n {\r\n this.targetNamespace = targetNamespace;\r\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static boolean NamespaceNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NamespaceNodeTest\")) return false;\n if (!nextTokenIs(b, K_NAMESPACE_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMESPACE_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NAMESPACE_NODE, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@XmlElement(required = true, name = \"namespace\")\n public String getNamespace() {\n return namespace;\n }", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "@Test\n public void verifyReservedNS() throws IOException {\n NamespaceDescriptor ns = TestNamespace.admin.getNamespaceDescriptor(DEFAULT_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), DEFAULT_NAMESPACE.getName());\n ns = TestNamespace.admin.getNamespaceDescriptor(SYSTEM_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(2, TestNamespace.admin.listNamespaceDescriptors().length);\n // verify existence of system tables\n Set<TableName> systemTables = Sets.newHashSet(META_TABLE_NAME);\n HTableDescriptor[] descs = TestNamespace.admin.listTableDescriptorsByNamespace(SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(systemTables.size(), descs.length);\n for (HTableDescriptor desc : descs) {\n Assert.assertTrue(systemTables.contains(desc.getTableName()));\n }\n // verify system tables aren't listed\n Assert.assertEquals(0, TestNamespace.admin.listTables().length);\n // Try creating default and system namespaces.\n boolean exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(DEFAULT_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(SYSTEM_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n }", "private String getNamespace(Package pkg) {\n/* */ String nsUri;\n/* 223 */ if (pkg == null) return \"\";\n/* */ \n/* */ \n/* 226 */ XmlNamespace ns = pkg.<XmlNamespace>getAnnotation(XmlNamespace.class);\n/* 227 */ if (ns != null) {\n/* 228 */ nsUri = ns.value();\n/* */ } else {\n/* 230 */ nsUri = \"\";\n/* 231 */ } return nsUri;\n/* */ }", "String getReferenceNamespace();", "int getNamespaceUri();", "String getNamespacePrefix(Object ns);", "public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }", "public void testMemberNotTeamMemberForProjectValidator_UnknownNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\"unknown\");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_UnknownNamespace is failure.\");\r\n } catch (RegistrationValidationConfigurationException rvce) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_UnknownNamespace.\");\r\n }\r\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.362 -0500\", hash_original_method = \"1F62AD2938072A93E19EAFFCDA555D07\", hash_generated_method = \"E522C6EE17CC779935F0D04DE1F1F350\")\n \npublic NamespaceSupport ()\n {\n reset();\n }", "protected boolean compareNamespace(final XNode y, final ArrayReporter rep) {\n\t\tString ux = getNSUri();\n\t\tString uy = y.getNSUri();\n\t\tif (ux == null) {\n\t\t\tif (uy == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (ux.equals(uy)) {\n\t\t\treturn true;\n\t\t}\n\t\t//Namespace differs: &{0} and &{1}\n\t\trep.error(XDEF.XDEF288, getXDPosition(), y.getXDPosition());\n\t\treturn false;\n\t}", "public void testSetNamespacePrefix() throws RepositoryException{\n String prefix = \"prefix\";\n String uri =\"uri\";\n session.setNamespacePrefix(prefix, uri);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.setNamespacePrefix(prefix, uri);\n }", "public void setXmlns(String xmlns)\r\n\t{\r\n\t\tthis.xmlns = xmlns;\r\n\t}", "private boolean hasExtension(String namespace, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelExtensionsElement(), \"namespace\", namespace);\n\t}", "private void expectName(String namespace, String name)\n\t\t\tthrows XmpUnexpectedElementQualifiedNameException {\n\t\tif (!reader.get().getNamespaceURI().equals(namespace)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ namespace + \"' and found '\"\n\t\t\t\t\t+ reader.get().getNamespaceURI() + \"'\");\n\t\t}\n\t\tif (!reader.get().getLocalName().equals(name)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ name + \"' and found '\" + reader.get().getLocalName()\n\t\t\t\t\t+ \"'\");\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(\"namespace = \" + namespace);\n }", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "abstract XML addNamespace(Namespace ns);", "public void setNamespace(final String namespaceValue) {\n this.namespace = namespaceValue;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "protected static boolean isNamespaceAware(org.w3c.dom.Node node) {\n boolean ret=(node.getLocalName() != null);\n \n if (LOG.isLoggable(Level.FINEST)) {\n LOG.finest(\"Is node \"+node+\" namespace aware? \"+ret);\n LOG.finest(\"nodeName=\"+node.getNodeName());\n LOG.finest(\"localName=\"+node.getLocalName());\n LOG.finest(\"namespace=\"+node.getNamespaceURI());\n } \n \n return (ret);\n }", "@Test\n\tpublic void test_TCM__String_getQualifiedName() {\n final String prefix = \"prefx\";\n final String uri = \"http://some.other.place\";\n\n final Namespace namespace = Namespace.getNamespace(prefix, uri);\n\n final String attributeName = \"test\";\n final String attributeQName = prefix + ':' + attributeName;\n final String attributeValue = \"value\";\n\n final Attribute qulifiedAttribute = new Attribute(attributeName, attributeValue, namespace);\n assertEquals(\"incorrect qualified name\", qulifiedAttribute.getQualifiedName(), attributeQName);\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n assertEquals(\"incorrect qualified name\", attribute.getQualifiedName(), attributeName);\n\n\t}", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@BeforeClass\n public static void externalSchemaCheck() {\n assumeTrue(\"can access \" + NameSpace.DC.xsd, canConnect(NameSpace.DC.xsd));\n }", "@Test\n public void shouldInitializeFromPersistedContent() {\n namespaceRegistry.register(validPrefix1, validNamespaceUri1);\n namespaceRegistry.register(validPrefix2, validNamespaceUri2);\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n // Now set up the graph-based namespace registry ...\n GraphNamespaceRegistry registry2 = new GraphNamespaceRegistry(graph, pathToParentOfNamespaceNodes, uriPropertyName,\n additionalNamespaceProperties);\n // All namespaces should match ...\n Set<NamespaceRegistry.Namespace> all = namespaceRegistry.getNamespaces();\n Set<NamespaceRegistry.Namespace> all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n registry2.refresh();\n all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n }", "public String getTargetNamespace()\r\n {\r\n return targetNamespace;\r\n }" ]
[ "0.6993016", "0.688581", "0.67861503", "0.6746833", "0.6627405", "0.6627405", "0.6455587", "0.6414395", "0.6393416", "0.6349667", "0.62928563", "0.62866765", "0.6245286", "0.6231751", "0.62009007", "0.6150111", "0.6130819", "0.6126321", "0.6126321", "0.6126321", "0.6090523", "0.6077984", "0.6063936", "0.6041884", "0.60153145", "0.5992205", "0.59686756", "0.59628606", "0.59322995", "0.59308267", "0.5918374", "0.590845", "0.59074134", "0.5873534", "0.5857147", "0.5843202", "0.5814567", "0.58137727", "0.5799522", "0.5795164", "0.57769674", "0.577674", "0.57698965", "0.5764616", "0.57478666", "0.5747722", "0.5740817", "0.5727339", "0.56988436", "0.5681879", "0.56669235", "0.56618047", "0.56471306", "0.563229", "0.5617266", "0.55962396", "0.55917233", "0.55917233", "0.55917233", "0.5588478", "0.5586481", "0.5576537", "0.55501986", "0.5542011", "0.55409825", "0.5523567", "0.55087763", "0.5506672", "0.5503721", "0.55006534", "0.549637", "0.54763764", "0.5468605", "0.54656535", "0.5454136", "0.5428768", "0.5426498", "0.5420663", "0.5395233", "0.53942215", "0.5358733", "0.5352789", "0.5345346", "0.53398514", "0.53372836", "0.5324656", "0.5322933", "0.5313064", "0.53049266", "0.5299023", "0.5296107", "0.5288305", "0.5276734", "0.5275732", "0.5269305", "0.5217417", "0.51788265", "0.51619726", "0.51596355", "0.5148256", "0.51318115" ]
0.0
-1
Build call for eventSourceServiceListEventSources
public okhttp3.Call eventSourceServiceListEventSourcesCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/event-sources/{namespace}" .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); if (listOptionsLabelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.labelSelector", listOptionsLabelSelector)); } if (listOptionsFieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.fieldSelector", listOptionsFieldSelector)); } if (listOptionsWatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.watch", listOptionsWatch)); } if (listOptionsAllowWatchBookmarks != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.allowWatchBookmarks", listOptionsAllowWatchBookmarks)); } if (listOptionsResourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.resourceVersion", listOptionsResourceVersion)); } if (listOptionsResourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.resourceVersionMatch", listOptionsResourceVersionMatch)); } if (listOptionsTimeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.timeoutSeconds", listOptionsTimeoutSeconds)); } if (listOptionsLimit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.limit", listOptionsLimit)); } if (listOptionsContinue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.continue", listOptionsContinue)); } Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ListEventSourcesResult listEventSources(ListEventSourcesRequest listEventSourcesRequest) {\n ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<ListEventSourcesRequest> request = null;\n Response<ListEventSourcesResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new ListEventSourcesRequestMarshaller().marshall(super.beforeMarshalling(listEventSourcesRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<ListEventSourcesResult, JsonUnmarshallerContext> unmarshaller =\n new ListEventSourcesResultJsonUnmarshaller();\n JsonResponseHandler<ListEventSourcesResult> responseHandler =\n new JsonResponseHandler<ListEventSourcesResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public ListEventSourcesResult listEventSources() throws AmazonServiceException, AmazonClientException {\n return listEventSources(new ListEventSourcesRequest());\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceListEventSourcesValidateBeforeCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceListEventSources(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceListEventSourcesCall(namespace, listOptionsLabelSelector, listOptionsFieldSelector, listOptionsWatch, listOptionsAllowWatchBookmarks, listOptionsResourceVersion, listOptionsResourceVersionMatch, listOptionsTimeoutSeconds, listOptionsLimit, listOptionsContinue, _callback);\n return localVarCall;\n\n }", "public List<MessageSource> createMessageSources(){\n\n List<MessageSource> messageSourceList = new ArrayList<>();\n\n String messageSourceConfig = Configurations.map.getProperty(\"messageSourceChannels\");\n String[] sourceConfigArray = messageSourceConfig.split(\",\");\n\n for(String sourceConfig : sourceConfigArray) {\n MessageSource messageSource = null;\n\n // there is only file message source option for instance, but it's extendable\n if(sourceConfig.equals(\"file\")){\n messageSource = new FileSource();\n }\n\n if(messageSource != null){\n messageSourceList.add(messageSource);\n }\n }\n\n if(messageSourceList.size() == 0){\n return null;\n }\n\n return messageSourceList;\n }", "EventChannelSource source();", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceWatchEventSourcesValidateBeforeCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceWatchEventSources(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceWatchEventSourcesCall(namespace, listOptionsLabelSelector, listOptionsFieldSelector, listOptionsWatch, listOptionsAllowWatchBookmarks, listOptionsResourceVersion, listOptionsResourceVersionMatch, listOptionsTimeoutSeconds, listOptionsLimit, listOptionsContinue, _callback);\n return localVarCall;\n\n }", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }", "public String[] getAllSources() {\n return this.sourceList.toArray(new String[0]);\n }", "public List<Events> getAllSystemEventsListForAll();", "public static ArrayList<DigitalNewspapers> getDigitalNewsSources(){\n\n Uri builtUri = Uri.parse(BASE_NEWSAPI_SOURCES_EP).buildUpon()\n .build();\n\n URL url = null;\n\n try {\n url = new URL(builtUri.toString());\n return doCall(url);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public List<EventSource> getEventList() {\n List<EventSource> result = new ArrayList<>();\n for (EventSource event : this.eventList) {\n // Create a deep-copy of each EventSource.\n result.add(new EventSource(event));\n }\n // Return an unmodifiable list.\n return Collections.unmodifiableList(result);\n }", "@Override\n public void testCreateRequestListAllFilteredBySourceSystem(){\n }", "public void receiveResultGetProjectSources(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetProjectSourcesResponse result) {\r\n\t}", "public LSPSource[] getSources () {\r\n return sources;\r\n }", "public List<String> getSources() {\n\t\treturn this.sources;\n\t}", "public okhttp3.Call eventSourceServiceWatchEventSourcesCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/api/v1/stream/event-sources/{namespace}\"\n .replaceAll(\"\\\\{\" + \"namespace\" + \"\\\\}\", localVarApiClient.escapeString(namespace.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (listOptionsLabelSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.labelSelector\", listOptionsLabelSelector));\n }\n\n if (listOptionsFieldSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.fieldSelector\", listOptionsFieldSelector));\n }\n\n if (listOptionsWatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.watch\", listOptionsWatch));\n }\n\n if (listOptionsAllowWatchBookmarks != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.allowWatchBookmarks\", listOptionsAllowWatchBookmarks));\n }\n\n if (listOptionsResourceVersion != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersion\", listOptionsResourceVersion));\n }\n\n if (listOptionsResourceVersionMatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersionMatch\", listOptionsResourceVersionMatch));\n }\n\n if (listOptionsTimeoutSeconds != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.timeoutSeconds\", listOptionsTimeoutSeconds));\n }\n\n if (listOptionsLimit != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.limit\", listOptionsLimit));\n }\n\n if (listOptionsContinue != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.continue\", listOptionsContinue));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "@Override\n\tpublic List<String> getAllAGBSources() {\n\t\t\n\t\treturn allAGBSources;\n\t}", "public List<ServiceEvent> genEventQueue(){\n for(int i=0; i<serviceNum; i++){\n genEvent(i);\n }\n Collections.sort(eventQueue, new EventComparator());\n return eventQueue;\n }", "Collection<CalendarEvent> getActiveEvents(long when)\n{\n List<CalendarEvent> rslt = new ArrayList<CalendarEvent>();\n try {\n getAllEvents(when);\n rslt.addAll(cal_events);\n }\n catch (Exception e) {\n BasisLogger.logE(\"GOOGLECAL: problem getting events\",e);\n }\n return rslt;\n}", "AbstractList<Event> getEventByCreateDate(Date d){\r\n\t\treturn events;\r\n\t}", "@WebMethod public List<Event> getAllEvents();", "@Override\n public Collection<CoreEventInfo> getEvents(final Collection<BwCalendar> calendars,\n final FilterBase filter,\n final BwDateTime startDate, final BwDateTime endDate,\n final List<String> retrieveList,\n RecurringRetrievalMode recurRetrieval,\n final boolean freeBusy) throws CalFacadeException {\n recurRetrieval = defaultRecurringRetrieval(recurRetrieval,\n startDate, endDate);\n\n if (debug) {\n trace(\"getEvents for start=\" + startDate + \" end=\" + endDate);\n }\n\n Collection<String> colPaths = null;\n\n if (calendars != null) {\n colPaths = new ArrayList<String>();\n for (BwCalendar c: calendars) {\n colPaths.add(c.getPath());\n\n if (debug) {\n trace(\" calendar:\" + c.getPath());\n }\n }\n }\n\n FieldnamesList retrieveListFields = null;\n\n if (retrieveList != null) {\n // Convert property names to field names\n retrieveListFields = new FieldnamesList(retrieveList.size() +\n FieldNamesMap.reqFlds.size());\n\n for (String pname: retrieveList) {\n FieldNamesEntry fent = FieldNamesMap.getEntry(pname);\n\n if ((fent == null) || (fent.getMulti())) {\n // At this stage it seems better to be inefficient\n retrieveListFields = null;\n break;\n }\n\n retrieveListFields.add(fent);\n }\n\n if (retrieveListFields != null) {\n retrieveListFields.addAll(FieldNamesMap.reqFlds);\n }\n }\n\n /* eventsQuery covers some of what is outlined here.\n *\n * 1. Get events and annotations in range and satisfying the filter.\n * If there is a date range exclude the recurring master events as they\n * turn up later attached to the instances.\n *\n * If there is no date range we will not expand recurrences so we need\n * to send master events and overrrides.\n *\n * We also exclude overrides to recurring instances.\n *\n * If no date range was supplied we now have all the master events.\n * Otherwise we have all the non-recurring events\n * (XXX or recurring reference by an annotation???)\n *\n * 2. If there is a date range supplied, get all instances in date range and\n * add their masters to the set.\n *\n * 3. If there is a date range supplied, get all overrides in date range and\n * add their masters to the set.\n *\n * 4. For each event\n * 4a. if not recurring add to result\n * 4b. if recurring {\n * if expanding\n * find all instances (in range) and add to result set\n * else {\n * find all overrides (in override range if supplied)\n * find all instances (IF instance range)\n * attach them to the master\n * add master to set.\n * }\n * }\n *\n * Some points to remind ourselves. We have to fetch overides and instances\n * because the master may be out of the range of a date limited query - usually\n * is, but we need the master to construct a proxy.\n *\n * We could probably just use the overrides and instances obtained in\n * steps 2 and 3 except for the CalDAV complications which allow a different\n * date range for overrides and instances.\n */\n\n int desiredAccess = privRead;\n if (freeBusy) {\n // DORECUR - freebusy events must have enough info for expansion\n desiredAccess = privReadFreeBusy;\n }\n\n EventsQueryResult eqr = new EventsQueryResult();\n eqr.flt = new Filters(filter);\n eqr.colPaths = colPaths;\n\n eventsQuery(eqr, startDate, endDate,\n retrieveListFields,\n freeBusy,\n null, // master\n null, // masters\n null, // uids\n getEvents);\n\n Collection<CoreEventInfo> ceis = postGetEvents(eqr.es, desiredAccess,\n returnResultAlways,\n null);\n\n /* Now get the annotations - these are not overrides */\n eventsQuery(eqr, startDate, endDate,\n retrieveListFields,\n freeBusy,\n null, // master\n null, // masters\n null, // uids\n getAnnotations);\n\n if (!eqr.es.isEmpty()) {\n ceis.addAll(postGetEvents(eqr.es, desiredAccess, returnResultAlways,\n eqr.flt));\n }\n\n ceis = getRecurrences(eqr, ceis,\n startDate, endDate,\n retrieveListFields, recurRetrieval, desiredAccess,\n freeBusy);\n\n return buildVavail(ceis);\n }", "@Override\n public Iterable<ConfigSource> getConfigSources(final ConfigSourceContext context,\n final KubernetesClientBuildConfig config) {\n boolean trustAll = getImplicitConverter(Boolean.class)\n .convert(context.getValue(\"quarkus.tls.trust-all\").getValue());\n TlsConfig tlsConfig = new TlsConfig();\n tlsConfig.trustAll = trustAll;\n KubernetesClient client = KubernetesClientUtils.createClient(config, tlsConfig);\n return new KubernetesConfigSourceFactory(client).getConfigSources(context);\n }", "@Override\n protected void initializeEventList()\n {\n }", "public FilterSource[] getFilterSources();", "AbstractList<Event> getEventByName(String eventName) {\r\n\t\treturn events;\r\n\t}", "@Override\n public void getMosSource(String testTest, ArrayList<String> source) {\n\n }", "public WindowListChangeEvent(Object eventSource) {\n super(eventSource); \n }", "java.util.concurrent.Future<ListEventIntegrationsResult> listEventIntegrationsAsync(ListEventIntegrationsRequest listEventIntegrationsRequest);", "public Observable getEvents(){\n QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();\n requestBuilder.sortDesc(\"startDate\");\n return makeObservable(requestBuilder);\n }", "public static List<Pair<String, SourceBuilder>> getSourceBuilders() {\n List<Pair<String, SourceBuilder>> builders =\n new ArrayList<Pair<String, SourceBuilder>>();\n builders.add(new Pair<String, SourceBuilder>(\"helloWorldSource\", builder()));\n return builders;\n }", "public ArrayList<Event> getEvents(){return new ArrayList<Event>(events);}", "public ArrayList<AVPLeadSource> get_all_avpleadsource() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<AVPLeadSource> AVPLeadSource_list;\n\n\t\t\tAVPLeadSource_list = AVPLeadSource_dao.get_all_avpleadsource();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn AVPLeadSource_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "protected static List<EventMeta> listEvents(\n NotificationServiceGrpc.NotificationServiceBlockingStub serviceStub,\n String namespace,\n String sender,\n List<String> keys,\n long version,\n String eventType,\n long startTime,\n Integer timeoutSeconds)\n throws Exception {\n NotificationServiceOuterClass.ListEventsRequest request =\n NotificationServiceOuterClass.ListEventsRequest.newBuilder()\n .addAllKeys(keys)\n .setStartVersion(version)\n .setEventType(eventType)\n .setStartTime(startTime)\n .setNamespace(namespace)\n .setSender(sender)\n .setTimeoutSeconds(timeoutSeconds)\n .build();\n return parseEventsFromResponse(serviceStub.listEvents(request));\n }", "public void addEvents(EventSource... events) {\n for (EventSource e : events) {\n // Create a deep-copy of each addition.\n this.eventList.add(new EventSource(e));\n }\n notifyEventListListeners();\n }", "public void processOffers(List<OfferPublishedEvent> events) {\n }", "List<FinancingSourceEntity> getAllFinancingSource();", "public DataSourceListType invokeQueryDatasources() throws TsResponseException {\n checkSignedIn();\n final String url = getUriBuilder().path(QUERY_DATA_SOURCES).build(m_siteId).toString();\n final TsResponse response = get(url);\n return response.getDatasources();\n }", "private void getEcoleList(){\r\n\t\tEcoleRequestFactory rf = GWT.create(EcoleRequestFactory.class);\r\n\t\trf.initialize(this.getEventBus(), new EventSourceRequestTransport(this.getEventBus()));\r\n\t\tEcoleRequestContext rc = rf.ecoleRequest();\r\n\t\trc.listAllActive().fire(new Receiver<List<EcoleProxy>>(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess(List<EcoleProxy> response){\r\n\t\t\t\tgetView().setEcoleAddList(response);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(ServerFailure error){\r\n\t\t\t\tWindow.alert(error.getMessage());\r\n\t\t\t}\r\n\t\t});\r\n\t}", "DescribeEventsResult describeEvents(DescribeEventsRequest describeEventsRequest);", "public List<Event> getEvents() {\n List<Event> events = new ArrayList<>();\n\n Query query = new Query(\"Event\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n String idString = entity.getKey().getName();\n UUID eventId = UUID.fromString(idString);\n String speaker = (String) entity.getProperty(\"speaker\");\n String organization = (String) entity.getProperty(\"organization\");\n String eventDate = (String) entity.getProperty(\"eventDate\");\n Location location = (Location) entity.getProperty(\"location\");\n List<String> amenities = getAmenities(eventId);\n String externalLink = (String) entity.getProperty(\"externalLink\");\n PublicType publicType = (PublicType) entity.getProperty(\"publicType\");\n long ownerId = (long) entity.getProperty(\"ownerId\");\n List<ThreadComment> thread = getThread(eventId);\n // long timeStamp = (long) entity.getProperty(\"timestamp\");\n\n Event event = new Event(eventId, speaker, organization, eventDate, location, amenities, externalLink,\n publicType, ownerId);\n event.copyThread(thread);\n events.add(event);\n // An exception can occur here for multiple reasons (Type casting error, any\n // property not existing, key error, etc...)\n } catch (Exception e) {\n System.err.println(\"Error reading event.\");\n System.err.println(entity.toString());\n e.printStackTrace();\n }\n }\n\n return events;\n }", "@Override\n public List<PartitionedThermostatEvent> listByStartDateAndStatus(Calendar eventStartDateBefore, Status eventStatus) {\n\n String sql = \" select t from PartitionedThermostatEvent t where groupEventId in (select e.id from EcpCoreLSEvent e where e.startDate < :event_before_date and e.status = :event_status)\";\n Map<String, Object> paramVals = new HashMap<String, Object>();\n paramVals.put(\"event_before_date\", eventStartDateBefore);\n paramVals.put(\"event_status\", eventStatus);\n List<PartitionedThermostatEvent> events = listByQuery(sql, paramVals);\n return events;\n }", "WithCreate withSource(EventChannelSource source);", "public void setSources (LSPSource[] sources) {\r\n this.sources = sources;\r\n }", "void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}", "@LogExceptions\n public synchronized List<Event> getEvents(String date) throws SQLException {\n Connection conn = DatabaseConnection.getConnection();\n \n try(PreparedStatement stmt = \n conn.prepareStatement(SELECT_EVENT_DATE))\n {\n stmt.setString(1, date);\n evtList.clear();\n try(ResultSet rs = stmt.executeQuery()) {\n while(rs.next()) {\n Event event = new Event();\n event.setID(rs.getInt(1));\n event.setEvent(rs.getString(2));\n event.setDescription(rs.getString(3));\n event.setLocation(rs.getString(4));\n event.setDate(rs.getString(5));\n event.setStart(rs.getString(9));\n event.setEnd(rs.getString(10));\n evtList.add(event);\n }\n } \n } \n return evtList;\n }", "public String buildConfigurationSourceOptions(String selectedSource) throws BaseException {\n listProductsCommand.invoke();\n\n List<String> sources = Arrays.asList(PreferencesAdaptor.CONFIGURE_BY_PREFERENCES, PreferencesAdaptor.CONFIGURE_BY_REQUEST, PreferencesAdaptor.CONFIGURE_BY_SESSION);\n\n listToOptionCommand.setOptionsArg(sources);\n listToOptionCommand.setSelectedArg(selectedSource);\n listToOptionCommand.setUnknownOptionArg(\"Source?\");\n listToOptionCommand.invoke();\n\n return listToOptionCommand.getOptionMarkupRet();\n }", "public static ArrayList<Event> getEvents(String accessToken) {\n final ArrayList<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();\n try {\n JsonObject eventsJson = getWebService(params, EVENTS_URI, accessToken).getAsJsonObject();\n Log.i(Constants.TAG, \"RESULT: \" + eventsJson.toString());\n if (eventsJson != null) {\n GsonBuilder builder = new GsonBuilder();\n builder.registerTypeAdapter(Event.class, new Event.EventDeserializer());\n\n Gson gson = builder.create();\n ArrayList<Event> eventList = gson.fromJson(\n eventsJson.get(\"events\"),\n new TypeToken<ArrayList<Event>>() {\n }.getType());\n return eventList;\n } else {\n return null;\n } // end if-else\n } catch (APICallException e) {\n Log.e(Constants.TAG, \"HTTP ERROR when getting events - STATUS:\" + e.getMessage(), e);\n return null;\n } catch (IOException e) {\n Log.e(Constants.TAG, \"IOException when getting events\", e);\n return null;\n } // end try-catch\n }", "public String toString() {\n String allSources = \"\";\n for (String source : sourceList) {\n allSources += \"\\n\" + source;\n Log.d(\"wattdroid\", \"returning source...\" + source);\n }\n return allSources;\n }", "public List<Event> getEventsList() {\n List<Event> eventDetails = eventRepository.findAll();\n return eventDetails;\n }", "public ContactStatusEvent(Object source)\n {\n super(source);\n }", "SourceBuilder createService();", "@Override\n public void testCreateRequestListSomeFilteredBySourceSystem(){\n }", "private void createEvents() {\n\t}", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinksResponse> list(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinksRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListMethod(), getCallOptions()), request);\n }", "public ListFunctionsRequest(ListFunctionsRequest source) {\n if (source.Order != null) {\n this.Order = new String(source.Order);\n }\n if (source.Orderby != null) {\n this.Orderby = new String(source.Orderby);\n }\n if (source.Offset != null) {\n this.Offset = new Long(source.Offset);\n }\n if (source.Limit != null) {\n this.Limit = new Long(source.Limit);\n }\n if (source.SearchKey != null) {\n this.SearchKey = new String(source.SearchKey);\n }\n if (source.Namespace != null) {\n this.Namespace = new String(source.Namespace);\n }\n if (source.Description != null) {\n this.Description = new String(source.Description);\n }\n if (source.Filters != null) {\n this.Filters = new Filter[source.Filters.length];\n for (int i = 0; i < source.Filters.length; i++) {\n this.Filters[i] = new Filter(source.Filters[i]);\n }\n }\n }", "@Override\n public void customEventOccurred(CustomEvent event)\n {\n Source source = (Source)event.getSource();\n Cloner cloner = new Cloner();\n final Source clonedSource = cloner.deepClone(source);\n \n // Create wrapper for source clone:\n final TagsSource sourceLogic = new TagsSource(clonedSource);\n \n // Create and render progress information dialog:\n sourceLogic.off(SourceEvent.THREAD_PROGRESS);\n final ProgressInformationDialog progressInformationDialog =\n new ProgressInformationDialog(sourceLogic, SourceEvent.THREAD_PROGRESS);\n progressInformationDialog.render(\"Progress information\", Main.mainForm);\n \n sourceLogic.off(SourceEvent.THREAD_ERROR);\n sourceLogic.on(SourceEvent.THREAD_ERROR, new ThreadErrorEventHandler());\n \n // Subscribe on model's source initialization event:\n sourceLogic.off(SourceEvent.SOURCE_INITIALIZED);\n sourceLogic.on(SourceEvent.SOURCE_INITIALIZED, new CustomEventListener()\n {\n @Override\n public void customEventOccurred(CustomEvent evt)\n {\n progressInformationDialog.close();\n \n if (clonedSource.getTypeId() == SourcesTypes.INTOOLS_EXPORT_DOCUMENT.ID)\n DialogsFactory.produceIntoolsExportDataSourceDialog(sourceLogic, true, \"Edit selected Intools export data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.ALARM_AND_TRIP_SCHEDULE.ID)\n DialogsFactory.produceDocumentDataSourceDialog(sourceLogic, true, \"Edit selected document data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.DCS_VARIABLE_TABLE.ID)\n DialogsFactory.produceDcsVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected DCS Variable Table data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.ESD_VARIABLE_TABLE.ID)\n DialogsFactory.produceEsdVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected ESD Variable Table data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.FGS_VARIABLE_TABLE.ID)\n DialogsFactory.produceFgsVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected FGS Variable Table data source\");\n }// customEventOccurred\n });// on\n \n // Execute initialization thread:\n sourceLogic.initialize();\n }", "private Sources(Builder b)\n {\n super(NAMESPACE, ELEMENT);\n\n for (MediaSource ms: b.mediaSources)\n {\n addChildExtension(ms);\n }\n }", "private void queryEvents() {\n ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n // include data referred by user key\n query.include(Event.KEY_HOST);\n // limit query to latest 20 items\n query.setLimit(30);\n // order posts by creation date (newest first)\n query.addDescendingOrder(\"createdAt\");\n // start an asynchronous call for events\n query.findInBackground(new FindCallback<Event>() {\n @Override\n public void done(List<Event> events, com.parse.ParseException e) {\n\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n // for debugging purposes let's print every event description to logcat\n for (Event event : events) {\n Log.i(TAG, \"Event: \" + event.getDescription() + \", username: \" + event.getHost().getUsername());\n }\n\n // save received events to list and notify adapter of new data\n allEvents.addAll(events);\n }\n\n });\n }", "public void addSources(String[] sources) {\n if ( ! this.correlatedSources.isEmpty()) {\n throw new IllegalArgumentException(\"CORE: correlated sources have already been declared in this clause\");\n }\n this.correlatedSources.addAll(Arrays.asList(sources));\n }", "java.util.List<java.lang.String>\n getSourceFileList();", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "public IEventCollector getSource();", "ObservableList<ReadOnlyEvent> getFilteredEventList();", "public static void eventList() {\n\t\tfor (Map.Entry<Calendar, TreeSet<Event>> entry : calendarToEvent.entrySet()) {\n\t\t\tTreeSet<Event> value = entry.getValue();\n\t\t\tfor (Event e: value) {\n\t\t\t\tSystem.out.println(e.toString());\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceEventSourcesLogsValidateBeforeCall(String namespace, String name, String eventSourceType, String eventName, String grep, String podLogOptionsContainer, Boolean podLogOptionsFollow, Boolean podLogOptionsPrevious, String podLogOptionsSinceSeconds, String podLogOptionsSinceTimeSeconds, Integer podLogOptionsSinceTimeNanos, Boolean podLogOptionsTimestamps, String podLogOptionsTailLines, String podLogOptionsLimitBytes, Boolean podLogOptionsInsecureSkipTLSVerifyBackend, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceEventSourcesLogs(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceEventSourcesLogsCall(namespace, name, eventSourceType, eventName, grep, podLogOptionsContainer, podLogOptionsFollow, podLogOptionsPrevious, podLogOptionsSinceSeconds, podLogOptionsSinceTimeSeconds, podLogOptionsSinceTimeNanos, podLogOptionsTimestamps, podLogOptionsTailLines, podLogOptionsLimitBytes, podLogOptionsInsecureSkipTLSVerifyBackend, _callback);\n return localVarCall;\n\n }", "public void setRequestSourceElements(List<RequestSourceElement> requestSourceElements)\n {\n this.requestSourceElements = requestSourceElements;\n }", "private List<Event> getEventsOnDate(Date date) {\r\n List<Event> eventsOnDate = new ArrayList<>();\r\n for (Event event : this.events) {\r\n if (event.getDate().equals(date)) {\r\n eventsOnDate.add(event);\r\n }\r\n }\r\n\r\n return eventsOnDate;\r\n }", "public static List<EventEntity> getEvents(int partnerId) {\n int size = lstEvents.size();\n // List<EventEntity> eventPartners = new ArrayList<EventEntity>();\n List<EventEntity> allPartners = new ArrayList<>();\n\n for (int i = 0; i < size; i++) {\n EventEntity entity = lstEvents.get(i);\n if (entity.getPartnerId() == 0 || entity.getPartnerId() == partnerId) {\n allPartners.add(entity);\n }\n /*\n * if (entity.getPartnerId() == partnerId) {\n * eventPartners.add(entity); onlyPartner = true; }\n */\n }\n List<EventEntity> retEvents;\n /*\n * if (onlyPartner) { retEvents = eventPartners; } else {\n */\n retEvents = allPartners;\n // }\n\n return retEvents;\n }", "public static String buildTypeSourceWhereFilter() {\n PDCOptionData pcOptions = PDCOptionData.getInstance();\n StringBuilder buffer = new StringBuilder();\n String returnValue = null;\n\n for (int i = 0; i < pcOptions.getTypeSourceChosenList().size(); i++) {\n buffer.append(\" '\" + pcOptions.getTypeSourceChosenList().get(i)\n + \"' \");\n\n if (i != pcOptions.getTypeSourceChosenCount() - 1) {\n buffer.append(\", \");\n }\n }\n\n if (pcOptions.getTypeSourceChosenCount() > 0) {\n returnValue = \" and ts in (\" + buffer.toString() + \") \";\n } else {\n returnValue = \"\";\n }\n\n return returnValue;\n }", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }", "public List<String> getSourceList() {\n return this.sourceList; \n }", "@Override\n public void onChanged(@Nullable List<Event> events) {\n adapter.setEvents(events);\n for (Event event:events) {\n Log.e(\"** EVENT **\", \"CATEGORY: \" +event.getCategoryId() + \", Event : \" + event.getName());\n }\n }", "private void buildSourceTable()\n {\n // validate\n Util.argCheckNull(_dt);\n\n // get entities\n try\n {\n DataSourceDobj ds = _dt.getSourceDataSource();\n Util.argCheckNull(ds);\n Vector entities = ds.getEntities();\n\n // iterate entities\n EntityDobj ent;\n for(int i = 0; entities != null && i < entities.size(); i++)\n {\n // get the entity\n ent = (EntityDobj)entities.elementAt(i);\n\n // add to source table if not in target table\n if(ent != null)\n {\n // search target list\n boolean inTarget = false;\n TransferEntity te;\n for(int j = 0; !inTarget && j < _lstTarget.getDefaultModel().getSize(); j++)\n {\n te = (TransferEntity)_lstTarget.getDefaultModel().getElementAt(j);\n if(te != null && te.getSourceEntityName().equalsIgnoreCase(ent.getName()))\n inTarget = true;\n }\n\n // if !inTarget add to source\n if(!inTarget)\n _lstSource.addItem(ent);\n }\n }\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"TransferEntitiesPanel.buildSourceTable: \" + e.toString());\n }\n }", "public Collection<SapEvent> getEvents(final SessionContext ctx)\n\t{\n\t\treturn EVENTSHANDLER.getValues( ctx, this );\n\t}", "@Override\n public void eventList(ArrayList<EventModel> eventList) {\n for (int i = 0; i < eventList.size(); i++) {\n //Log.e(\"tag\", \"eventList.getStrName:-\" + eventList.get(i).getStrName());\n }\n\n }", "java.util.List<java.lang.String>\n getSourcepathList();", "@Override\n\tpublic ArrayList<EventSignUp> requestEventList(String sqlQuery)\n\t\t\tthrows ClassNotFoundException, SQLException, IOException {\n\t\treturn null;\n\t}", "public SourceLister(String []srcDirs) {\n this.srcDirs = srcDirs;\n }", "public ArrayList<String> getEventIdsList(){\n return this.eventIdsList;\n }", "@Nonnull \r\n\tpublic static <T> List<List<T>> invokeAll(\r\n\t\t\t@Nonnull final Observable<? extends T>... sources) throws InterruptedException {\r\n\t\treturn invokeAll(Arrays.asList(sources), scheduler());\r\n\t}", "public List<EventMeta> listEvents(\n String namespace, List<String> keys, long version, String eventType, long startTime, String sender)\n throws Exception {\n return listEvents(\n notificationServiceStub,\n StringUtils.isEmpty(namespace) ? defaultNamespace : namespace,\n sender,\n keys,\n version,\n eventType,\n startTime,\n 0);\n }", "java.util.List<java.lang.String>\n getSourcepathList();", "public EventsListAdapter(List<Event> events) {\n this.events = events;\n }", "@Override\r\n public List<Events> findAllEvents() {\r\n return em.createNamedQuery(\"Events.findAll\").getResultList();\r\n }", "private void initEventList() {\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.add(Calendar.MINUTE, -1 * 60 * 12);\n startTime = calendar.getTimeInMillis();\n stopTime = System.currentTimeMillis();\n mSearchType = 0;\n eventType = AVIOCTRLDEFs.AVIOCTRL_EVENT_ALL;\n searchEventList(startTime, stopTime, eventType, mCameraChannel);\n }", "public DescribeEventsRequest() {}", "@RequestMapping(value = \"/txsource\", method = RequestMethod.GET)\n public\n @ResponseBody\n Collection<Description> getTxSourceList(Locale locale) {\n return Collections2.transform(\n translationSourceService.getTranslationSourceList(),\n Description.fromDescriptible(strings, locale)\n );\n }", "@WebMethod public ArrayList<Event> getEvents(LocalDate date);", "public java.util.List<org.landxml.schema.landXML11.SourceDataDocument.SourceData> getSourceDataList()\r\n {\r\n final class SourceDataList extends java.util.AbstractList<org.landxml.schema.landXML11.SourceDataDocument.SourceData>\r\n {\r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData get(int i)\r\n { return SurfaceImpl.this.getSourceDataArray(i); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData set(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.setSourceDataArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n { SurfaceImpl.this.insertNewSourceData(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData remove(int i)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.removeSourceData(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfSourceDataArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new SourceDataList();\r\n }\r\n }", "public List<Event> getEvents(int orgId) throws SQLException{\n\t\tlogger.info(\"[Organization] getEvents({})\", orgId);\n\t\t\n\n\t\tQueryBuilder<Event, Integer> queryBuilder = DB.eventDao.queryBuilder();\n\t\tWhere<Event, Integer> where = queryBuilder.where();\n\t\twhere.eq(\"organization_id\", orgId);\n\t\n\t\t\n\t\tqueryBuilder.orderBy(\"date\", true);\n\t\t\n\t\tPreparedQuery<Event> preparedQuery = queryBuilder.prepare();\n\n\t\t\n\t\treturn DB.eventDao.query(preparedQuery);\n\t}", "public static List<Event> loadEvents() throws JSONException {\n \t\t\n \t\tString data = getJSON(Constants.GOOGLEEVENTS);\n \t\t\n \t\tJSONObject json_obj = new JSONObject(data).getJSONObject(\"feed\");\n \t\tJSONArray json_arr = json_obj.getJSONArray(\"entry\");\n \t\t\t\n \t\tList<Event> events = new ArrayList<Event>();\n \t\t\t\n \t\t//Collection the right content from JSON\n \t\tfor (int i = 0; i < json_arr.length(); i++){\n \t\t\tString title = json_arr.getJSONObject(i).getJSONObject(\"title\").optString(\"$t\");\n \t\t\tString description = json_arr.getJSONObject(i).getJSONObject(\"content\").optString(\"$t\");\n \t\t\tString time = json_arr.getJSONObject(i).getJSONArray(\"gd$when\").getJSONObject(0).optString(\"startTime\");\n \t\t\tString where = json_arr.getJSONObject(i).getJSONArray(\"gd$where\").getJSONObject(0).optString(\"valueString\");\n \t\t\t\t\n \t\t\t//If time is not an all day event\n \t\t\tif(time.length() > \"1967-09-03\".length()){\n \t\t\t\ttime = fromDate(time);\n \t\t\t}\n \t\t\t\n \t\t\t//Add events if it has i title\n \t\t\tif (!title.equals(\"\")){\n \t\t\t\tevents.add(new Event(title, description, where, time + \". \"));\n \t\t\t}\n \t\t}\t\n \t\treturn events;\n \t}", "public EventsDTO getEvents();", "public EventList getEventList(String date) {\n for (EventList e : events) {\n if (e.getDate().equals(date)) {\n return e;\n }\n }\n return null;\n }", "public void setEventList(List<EventSource> events) {\n this.eventList.reset(events);\n notifyEventListListeners();\n }", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "@GET\n @Path(\"/all\")\n @Produces(\"application/json;charset=UTF-8\")\n @GZIP\n @NoCache\n public List<SourceVo> getAllSources(\n @QueryParam(\"lang\") String lang,\n @QueryParam(\"limit\") @DefaultValue(\"1000\") int limit) {\n DataFilter dataFilter = DataFilter.get().lang(lang);\n return sourceService.getSources().stream()\n .limit(limit)\n .map(p -> p.toVo(dataFilter))\n .sorted(sourceNameComparator(lang))\n .collect(Collectors.toList());\n }", "public void list(yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinksRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.logging.v1.SinkServiceOuterClass.ListSinksResponse> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMethod(), responseObserver);\n }", "@WebMethod public Vector<Event> getEvents(Date date);", "@GET(\"v2/top-headlines?country=us&apiKey=\"+ Common.API_KEY)\n Call<Website>getSources();" ]
[ "0.68312323", "0.64351845", "0.5932536", "0.5589551", "0.55779135", "0.5519292", "0.5462693", "0.5460508", "0.5368733", "0.53452975", "0.5323298", "0.5322998", "0.53169674", "0.5287788", "0.527041", "0.52669454", "0.52258986", "0.5218451", "0.5187499", "0.5187189", "0.51294625", "0.51117617", "0.51101804", "0.5059197", "0.505567", "0.50549185", "0.49747795", "0.49607468", "0.49571338", "0.49530935", "0.49383318", "0.4929615", "0.49250242", "0.4867458", "0.48613915", "0.4859257", "0.48543018", "0.4848734", "0.48437458", "0.4842457", "0.48386055", "0.4838273", "0.483049", "0.48257253", "0.4817596", "0.48166966", "0.4802283", "0.48017964", "0.48001006", "0.4794954", "0.47946548", "0.47939113", "0.47908312", "0.47893375", "0.47874528", "0.47832835", "0.47795627", "0.47794205", "0.47723904", "0.47596028", "0.47538984", "0.4749708", "0.47290725", "0.47234794", "0.47223413", "0.47196978", "0.47158092", "0.47110125", "0.47081104", "0.47000834", "0.46975464", "0.4697461", "0.46972755", "0.46828622", "0.4681474", "0.46812943", "0.46752113", "0.46687856", "0.4665701", "0.4659699", "0.4654281", "0.46443316", "0.46436933", "0.46418825", "0.46397662", "0.46340564", "0.46304113", "0.46255982", "0.46217778", "0.46215156", "0.46124834", "0.4612324", "0.45945635", "0.45908523", "0.45904186", "0.45897347", "0.45866308", "0.45860583", "0.45806107", "0.4579616" ]
0.55432034
5
verify the required parameter 'namespace' is set
@SuppressWarnings("rawtypes") private okhttp3.Call eventSourceServiceListEventSourcesValidateBeforeCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException { if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling eventSourceServiceListEventSources(Async)"); } okhttp3.Call localVarCall = eventSourceServiceListEventSourcesCall(namespace, listOptionsLabelSelector, listOptionsFieldSelector, listOptionsWatch, listOptionsAllowWatchBookmarks, listOptionsResourceVersion, listOptionsResourceVersionMatch, listOptionsTimeoutSeconds, listOptionsLimit, listOptionsContinue, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetNamespace();", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "void setNamespace(java.lang.String namespace);", "private NamespaceHelper() {}", "public boolean isNamespaceAware () {\n return true;\n }", "protected void validateNamespace(Namespace namespace) throws WikiException {\r\n\t\tcheckLength(namespace.getDefaultLabel(), 200);\r\n\t}", "void setNamespace(String namespace);", "boolean isNamespaceRunning(String namespace);", "public void testGetNamespaceURI() throws RepositoryException {\n String result = \"namespace\" ;\n String prefix =\"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespaceURI(prefix), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespaceURI(prefix), result);\n }", "java.lang.String getNamespace();", "@Test\n\tpublic void test_TCM__String_getNamespacePrefix() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect prefix\", attribute.getNamespacePrefix().equals(\"prefx\"));\n\t}", "@Test\n\tpublic void test_TCM__String_getNamespaceURI() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect URI\", attribute.getNamespaceURI().equals(\"http://some.other.place\"));\n\n\t}", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "boolean isNamespace(Object object);", "protected void validateNamespaceTranslation(Namespace namespace, String virtualWiki) throws WikiException {\r\n\t\tcheckLength(namespace.getLabel(virtualWiki), 200);\r\n\t}", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public final boolean isNamespaceAware() {\n return true;\n }", "public void testMemberNotTeamMemberForProjectValidator_NullNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator((String) null);\r\n fail(\"testMemberNotTeamMemberForProjectValidator_NullNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_NullNamespace.\");\r\n }\r\n }", "@Test\n public void testNamespace() throws Exception {\n NamespaceMeta ns1Meta = new NamespaceMeta.Builder().setName(\"ns1\").build();\n NamespaceMeta ns2Meta = new NamespaceMeta.Builder().setName(\"ns2\").build();\n NamespaceMeta anotherNsMeta = new NamespaceMeta.Builder().setName(\"anotherNs\").build();\n when(nsClient.list()).thenReturn(ImmutableList.of(ns1Meta, ns2Meta, anotherNsMeta));\n\n ResourceLookupContext resourceLookupContext = new ResourceLookupContext();\n resourceLookupContext.setResourceName(\"namespace\");\n // user is entering n and we expect the completion to show ns1 and ns2 as they start with n and not anotherNs\n resourceLookupContext.setUserInput(\"n\");\n resourceLookupContext.setResources(ImmutableMap.of(\"namespace\", Collections.emptyList()));\n List<String> resources = client.getResources(resourceLookupContext);\n Assert.assertEquals(2, resources.size());\n Assert.assertEquals(ImmutableList.of(\"ns1\", \"ns2\"), resources);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "public String getNamespace();", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public String getNamespace() {\n return namespace;\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static boolean isValidNamespace(CharSequence namespace) {\n if (namespace == null) {\n return false;\n }\n\n int position = 0;\n boolean start = true;\n\n while (position < namespace.length()) {\n char c = namespace.charAt(position++);\n if (start) {\n start = false;\n if (!isValidIdentifierStart(c)) {\n return false;\n }\n } else if (c == '.') {\n start = true;\n } else if (!isValidIdentifierAfterStart(c)) {\n return false;\n }\n }\n\n return !start;\n }", "public String getNamespace () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected boolean isMatchingNamespace(String rootElementNamespace)\n {\n if (namespacePattern != null)\n {\n return namespacePattern.matcher(rootElementNamespace == null ? \"\" : rootElementNamespace).matches();\n }\n else\n {\n return namespace == null ? rootElementNamespace == null : namespace.equals(rootElementNamespace);\n }\n }", "@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public void testMemberNotTeamMemberForProjectValidator_EmptyNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\" \");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_EmptyNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_EmptyNamespace.\");\r\n }\r\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }", "public boolean hasNamespace(final String namespace) {\n return rpcMethods.keySet().stream()\n .anyMatch(key -> key.toUpperCase().startsWith(namespace.toUpperCase()));\n }", "public void testGetNamespacePrefix() throws RepositoryException {\n String result = \"namespace\";\n String uri = \"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespacePrefix(uri), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefix(uri), result);\n }", "private static boolean _inNamespace(Resource resource, String namespace) {\n\t\tString resourceNamespace = resource.getNameSpace();\n\t\t\n\t\tif ( namespace.endsWith(\"/\") || namespace.endsWith(\"#\") ) {\n\t\t\treturn namespace.equals(resourceNamespace);\n\t\t}\n\t\telse {\n\t\t\treturn resourceNamespace != null && namespace.equals(resourceNamespace.replaceAll(\"(/|#)$\", \"\"));\n\t\t}\n\t}", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getTargetNamespace();", "public boolean hasNamespace() {\n return m_namespaces != null && m_namespaces.size() > 0;\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "void visit(Namespace namespace);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "@Test\n\tpublic void test_TCC___String_String_int_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", Attribute.ID_TYPE.ordinal(), namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "Namespaces namespaces();", "String getNamespaceStringValue(Object ns);", "public boolean isSetNs() {\n return this.ns != null;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "public boolean isTargetNamespace(String prefix) {\r\n return prefix.equals(getDefinitions().getTargetNamespace());\r\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public boolean addNamespaceToBPELDoc(String prefix, String namespace, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Adding namespace {} to BuildPlan {}\", namespace,\n\t\t\t\tbuildPlan.getBpelProcessElement().getAttribute(\"name\"));\n\t\tbuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:\" + prefix, namespace);\n\t\t// TODO make a real check\n\t\treturn true;\n\t}", "public boolean isNamespaceAware() {\n\t\ttry {\n\t\t\treturn parserImpl.getFeature(Constants.SAX_FEATURE_PREFIX\n\t\t\t\t\t\t\t\t\t\t + Constants.NAMESPACES_FEATURE);\n\t\t}\n\t\t catch (SAXException x) {\n\t\t\tthrow new IllegalStateException(x.getMessage());\n\t\t}\n\t}", "private boolean ensureXSDTypeNamespaceMappings(Object obj) {\r\n\t\t\r\n\t\tString targetNamespace = null;\r\n\t\t\r\n\t\tif (obj instanceof XSDNamedComponent ) {\r\n\t\t\tXSDNamedComponent namedComponent = (XSDNamedComponent) obj; \r\n\t\t\ttargetNamespace = namedComponent.getTargetNamespace();\r\n\t\t}\r\n\t\t\r\n\t\tif (targetNamespace == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Now check if the target namespace has a prefix mappings.\r\n\t\tString prefix = BPELUtils.getNamespacePrefix (modelObject, targetNamespace);\r\n\t\tif (prefix != null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// We have to map the namespace to a prefix. \r\n\t\tNamespaceMappingDialog dialog = new NamespaceMappingDialog(getShell(),modelObject);\r\n\t\tdialog.setNamespace( targetNamespace );\r\n\t\t\r\n\t\tif (dialog.open() == Window.CANCEL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// define the prefix\r\n\t\tBPELUtils.setPrefix( BPELUtils.getProcess(modelObject), targetNamespace, dialog.getPrefix()); \t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n \tpublic void whereClauseForNodeNamespace() {\n \t\tnode23.setNamespace(\"namespace\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.namespace\", \"'namespace'\"));\n \t}", "public void setTargetNamespace(String targetNamespace)\r\n {\r\n this.targetNamespace = targetNamespace;\r\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static boolean NamespaceNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NamespaceNodeTest\")) return false;\n if (!nextTokenIs(b, K_NAMESPACE_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMESPACE_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NAMESPACE_NODE, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@XmlElement(required = true, name = \"namespace\")\n public String getNamespace() {\n return namespace;\n }", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "@Test\n public void verifyReservedNS() throws IOException {\n NamespaceDescriptor ns = TestNamespace.admin.getNamespaceDescriptor(DEFAULT_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), DEFAULT_NAMESPACE.getName());\n ns = TestNamespace.admin.getNamespaceDescriptor(SYSTEM_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(2, TestNamespace.admin.listNamespaceDescriptors().length);\n // verify existence of system tables\n Set<TableName> systemTables = Sets.newHashSet(META_TABLE_NAME);\n HTableDescriptor[] descs = TestNamespace.admin.listTableDescriptorsByNamespace(SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(systemTables.size(), descs.length);\n for (HTableDescriptor desc : descs) {\n Assert.assertTrue(systemTables.contains(desc.getTableName()));\n }\n // verify system tables aren't listed\n Assert.assertEquals(0, TestNamespace.admin.listTables().length);\n // Try creating default and system namespaces.\n boolean exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(DEFAULT_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(SYSTEM_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n }", "private String getNamespace(Package pkg) {\n/* */ String nsUri;\n/* 223 */ if (pkg == null) return \"\";\n/* */ \n/* */ \n/* 226 */ XmlNamespace ns = pkg.<XmlNamespace>getAnnotation(XmlNamespace.class);\n/* 227 */ if (ns != null) {\n/* 228 */ nsUri = ns.value();\n/* */ } else {\n/* 230 */ nsUri = \"\";\n/* 231 */ } return nsUri;\n/* */ }", "String getReferenceNamespace();", "int getNamespaceUri();", "String getNamespacePrefix(Object ns);", "public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }", "public void testMemberNotTeamMemberForProjectValidator_UnknownNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\"unknown\");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_UnknownNamespace is failure.\");\r\n } catch (RegistrationValidationConfigurationException rvce) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_UnknownNamespace.\");\r\n }\r\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.362 -0500\", hash_original_method = \"1F62AD2938072A93E19EAFFCDA555D07\", hash_generated_method = \"E522C6EE17CC779935F0D04DE1F1F350\")\n \npublic NamespaceSupport ()\n {\n reset();\n }", "protected boolean compareNamespace(final XNode y, final ArrayReporter rep) {\n\t\tString ux = getNSUri();\n\t\tString uy = y.getNSUri();\n\t\tif (ux == null) {\n\t\t\tif (uy == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (ux.equals(uy)) {\n\t\t\treturn true;\n\t\t}\n\t\t//Namespace differs: &{0} and &{1}\n\t\trep.error(XDEF.XDEF288, getXDPosition(), y.getXDPosition());\n\t\treturn false;\n\t}", "public void testSetNamespacePrefix() throws RepositoryException{\n String prefix = \"prefix\";\n String uri =\"uri\";\n session.setNamespacePrefix(prefix, uri);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.setNamespacePrefix(prefix, uri);\n }", "public void setXmlns(String xmlns)\r\n\t{\r\n\t\tthis.xmlns = xmlns;\r\n\t}", "private boolean hasExtension(String namespace, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelExtensionsElement(), \"namespace\", namespace);\n\t}", "private void expectName(String namespace, String name)\n\t\t\tthrows XmpUnexpectedElementQualifiedNameException {\n\t\tif (!reader.get().getNamespaceURI().equals(namespace)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ namespace + \"' and found '\"\n\t\t\t\t\t+ reader.get().getNamespaceURI() + \"'\");\n\t\t}\n\t\tif (!reader.get().getLocalName().equals(name)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ name + \"' and found '\" + reader.get().getLocalName()\n\t\t\t\t\t+ \"'\");\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(\"namespace = \" + namespace);\n }", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "abstract XML addNamespace(Namespace ns);", "public void setNamespace(final String namespaceValue) {\n this.namespace = namespaceValue;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "protected static boolean isNamespaceAware(org.w3c.dom.Node node) {\n boolean ret=(node.getLocalName() != null);\n \n if (LOG.isLoggable(Level.FINEST)) {\n LOG.finest(\"Is node \"+node+\" namespace aware? \"+ret);\n LOG.finest(\"nodeName=\"+node.getNodeName());\n LOG.finest(\"localName=\"+node.getLocalName());\n LOG.finest(\"namespace=\"+node.getNamespaceURI());\n } \n \n return (ret);\n }", "@Test\n\tpublic void test_TCM__String_getQualifiedName() {\n final String prefix = \"prefx\";\n final String uri = \"http://some.other.place\";\n\n final Namespace namespace = Namespace.getNamespace(prefix, uri);\n\n final String attributeName = \"test\";\n final String attributeQName = prefix + ':' + attributeName;\n final String attributeValue = \"value\";\n\n final Attribute qulifiedAttribute = new Attribute(attributeName, attributeValue, namespace);\n assertEquals(\"incorrect qualified name\", qulifiedAttribute.getQualifiedName(), attributeQName);\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n assertEquals(\"incorrect qualified name\", attribute.getQualifiedName(), attributeName);\n\n\t}", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@BeforeClass\n public static void externalSchemaCheck() {\n assumeTrue(\"can access \" + NameSpace.DC.xsd, canConnect(NameSpace.DC.xsd));\n }", "@Test\n public void shouldInitializeFromPersistedContent() {\n namespaceRegistry.register(validPrefix1, validNamespaceUri1);\n namespaceRegistry.register(validPrefix2, validNamespaceUri2);\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n // Now set up the graph-based namespace registry ...\n GraphNamespaceRegistry registry2 = new GraphNamespaceRegistry(graph, pathToParentOfNamespaceNodes, uriPropertyName,\n additionalNamespaceProperties);\n // All namespaces should match ...\n Set<NamespaceRegistry.Namespace> all = namespaceRegistry.getNamespaces();\n Set<NamespaceRegistry.Namespace> all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n registry2.refresh();\n all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n }", "public String getTargetNamespace()\r\n {\r\n return targetNamespace;\r\n }" ]
[ "0.6993016", "0.688581", "0.67861503", "0.6746833", "0.6627405", "0.6627405", "0.6455587", "0.6414395", "0.6393416", "0.6349667", "0.62928563", "0.62866765", "0.6245286", "0.6231751", "0.62009007", "0.6150111", "0.6130819", "0.6126321", "0.6126321", "0.6126321", "0.6090523", "0.6077984", "0.6063936", "0.6041884", "0.60153145", "0.5992205", "0.59686756", "0.59628606", "0.59322995", "0.59308267", "0.5918374", "0.590845", "0.59074134", "0.5873534", "0.5857147", "0.5843202", "0.5814567", "0.58137727", "0.5799522", "0.5795164", "0.57769674", "0.577674", "0.57698965", "0.5764616", "0.57478666", "0.5747722", "0.5740817", "0.5727339", "0.56988436", "0.5681879", "0.56669235", "0.56618047", "0.56471306", "0.563229", "0.5617266", "0.55962396", "0.55917233", "0.55917233", "0.55917233", "0.5588478", "0.5586481", "0.5576537", "0.55501986", "0.5542011", "0.55409825", "0.5523567", "0.55087763", "0.5506672", "0.5503721", "0.55006534", "0.549637", "0.54763764", "0.5468605", "0.54656535", "0.5454136", "0.5428768", "0.5426498", "0.5420663", "0.5395233", "0.53942215", "0.5358733", "0.5352789", "0.5345346", "0.53398514", "0.53372836", "0.5324656", "0.5322933", "0.5313064", "0.53049266", "0.5299023", "0.5296107", "0.5288305", "0.5276734", "0.5275732", "0.5269305", "0.5217417", "0.51788265", "0.51619726", "0.51596355", "0.5148256", "0.51318115" ]
0.0
-1
Build call for eventSourceServiceUpdateEventSource
public okhttp3.Call eventSourceServiceUpdateEventSourceCall(String namespace, String name, EventsourceUpdateEventSourceRequest body, final ApiCallback _callback) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/api/v1/event-sources/{namespace}/{name}" .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())) .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Update withSource(EventChannelSource source);", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }", "EventChannel.Update update();", "public DCAEServiceObject(DCAEServiceObject source, DCAEServiceRequest updateRequest) {\n // Immutable fields\n this.setServiceId(source.getServiceId());\n this.setCreated(source.getCreated());\n\n // Mutable fields\n this.setTypeId(updateRequest.getTypeId());\n this.setVnfId(updateRequest.getVnfId());\n this.setVnfType(updateRequest.getVnfType());\n this.setVnfLocation(updateRequest.getVnfLocation());\n this.setDeploymentRef(updateRequest.getDeploymentRef());\n this.setModified(DateTime.now(DateTimeZone.UTC));\n // Assumption here is that you are here from the PUT which means that the service is RUNNING.\n this.setStatus(DCAEServiceStatus.RUNNING);\n }", "java.util.concurrent.Future<UpdateEventIntegrationResult> updateEventIntegrationAsync(UpdateEventIntegrationRequest updateEventIntegrationRequest);", "EventChannelSource source();", "WithCreate withSource(EventChannelSource source);", "public UpdateFunctionCodeRequest(UpdateFunctionCodeRequest source) {\n if (source.FunctionName != null) {\n this.FunctionName = new String(source.FunctionName);\n }\n if (source.Handler != null) {\n this.Handler = new String(source.Handler);\n }\n if (source.CosBucketName != null) {\n this.CosBucketName = new String(source.CosBucketName);\n }\n if (source.CosObjectName != null) {\n this.CosObjectName = new String(source.CosObjectName);\n }\n if (source.ZipFile != null) {\n this.ZipFile = new String(source.ZipFile);\n }\n if (source.Namespace != null) {\n this.Namespace = new String(source.Namespace);\n }\n if (source.CosBucketRegion != null) {\n this.CosBucketRegion = new String(source.CosBucketRegion);\n }\n if (source.InstallDependency != null) {\n this.InstallDependency = new String(source.InstallDependency);\n }\n if (source.EnvId != null) {\n this.EnvId = new String(source.EnvId);\n }\n if (source.Publish != null) {\n this.Publish = new String(source.Publish);\n }\n if (source.Code != null) {\n this.Code = new Code(source.Code);\n }\n if (source.CodeSource != null) {\n this.CodeSource = new String(source.CodeSource);\n }\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> update(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.UpdateSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getUpdateMethod(), getCallOptions()), request);\n }", "public GetEventSourceResult getEventSource(GetEventSourceRequest getEventSourceRequest) {\n ExecutionContext executionContext = createExecutionContext(getEventSourceRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<GetEventSourceRequest> request = null;\n Response<GetEventSourceResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new GetEventSourceRequestMarshaller().marshall(super.beforeMarshalling(getEventSourceRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<GetEventSourceResult, JsonUnmarshallerContext> unmarshaller =\n new GetEventSourceResultJsonUnmarshaller();\n JsonResponseHandler<GetEventSourceResult> responseHandler =\n new JsonResponseHandler<GetEventSourceResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceUpdateEventSourceValidateBeforeCall(String namespace, String name, EventsourceUpdateEventSourceRequest body, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceUpdateEventSource(Async)\");\n }\n \n // verify the required parameter 'name' is set\n if (name == null) {\n throw new ApiException(\"Missing the required parameter 'name' when calling eventSourceServiceUpdateEventSource(Async)\");\n }\n \n // verify the required parameter 'body' is set\n if (body == null) {\n throw new ApiException(\"Missing the required parameter 'body' when calling eventSourceServiceUpdateEventSource(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceUpdateEventSourceCall(namespace, name, body, _callback);\n return localVarCall;\n\n }", "public AddEventSourceResult addEventSource(AddEventSourceRequest addEventSourceRequest) {\n ExecutionContext executionContext = createExecutionContext(addEventSourceRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<AddEventSourceRequest> request = null;\n Response<AddEventSourceResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new AddEventSourceRequestMarshaller().marshall(super.beforeMarshalling(addEventSourceRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<AddEventSourceResult, JsonUnmarshallerContext> unmarshaller =\n new AddEventSourceResultJsonUnmarshaller();\n JsonResponseHandler<AddEventSourceResult> responseHandler =\n new JsonResponseHandler<AddEventSourceResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public CreateLivePullStreamTaskRequest(CreateLivePullStreamTaskRequest source) {\n if (source.SourceType != null) {\n this.SourceType = new String(source.SourceType);\n }\n if (source.SourceUrls != null) {\n this.SourceUrls = new String[source.SourceUrls.length];\n for (int i = 0; i < source.SourceUrls.length; i++) {\n this.SourceUrls[i] = new String(source.SourceUrls[i]);\n }\n }\n if (source.DomainName != null) {\n this.DomainName = new String(source.DomainName);\n }\n if (source.AppName != null) {\n this.AppName = new String(source.AppName);\n }\n if (source.StreamName != null) {\n this.StreamName = new String(source.StreamName);\n }\n if (source.StartTime != null) {\n this.StartTime = new String(source.StartTime);\n }\n if (source.EndTime != null) {\n this.EndTime = new String(source.EndTime);\n }\n if (source.Operator != null) {\n this.Operator = new String(source.Operator);\n }\n if (source.PushArgs != null) {\n this.PushArgs = new String(source.PushArgs);\n }\n if (source.CallbackEvents != null) {\n this.CallbackEvents = new String[source.CallbackEvents.length];\n for (int i = 0; i < source.CallbackEvents.length; i++) {\n this.CallbackEvents[i] = new String(source.CallbackEvents[i]);\n }\n }\n if (source.VodLoopTimes != null) {\n this.VodLoopTimes = new String(source.VodLoopTimes);\n }\n if (source.VodRefreshType != null) {\n this.VodRefreshType = new String(source.VodRefreshType);\n }\n if (source.CallbackUrl != null) {\n this.CallbackUrl = new String(source.CallbackUrl);\n }\n if (source.ExtraCmd != null) {\n this.ExtraCmd = new String(source.ExtraCmd);\n }\n if (source.Comment != null) {\n this.Comment = new String(source.Comment);\n }\n if (source.ToUrl != null) {\n this.ToUrl = new String(source.ToUrl);\n }\n if (source.BackupSourceType != null) {\n this.BackupSourceType = new String(source.BackupSourceType);\n }\n if (source.BackupSourceUrl != null) {\n this.BackupSourceUrl = new String(source.BackupSourceUrl);\n }\n if (source.WatermarkList != null) {\n this.WatermarkList = new PullPushWatermarkInfo[source.WatermarkList.length];\n for (int i = 0; i < source.WatermarkList.length; i++) {\n this.WatermarkList[i] = new PullPushWatermarkInfo(source.WatermarkList[i]);\n }\n }\n if (source.VodLocalMode != null) {\n this.VodLocalMode = new Long(source.VodLocalMode);\n }\n if (source.RecordTemplateId != null) {\n this.RecordTemplateId = new String(source.RecordTemplateId);\n }\n }", "interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }", "public yandex.cloud.api.operation.OperationOuterClass.Operation update(yandex.cloud.api.logging.v1.SinkServiceOuterClass.UpdateSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getUpdateMethod(), getCallOptions(), request);\n }", "interface UpdateStages {\n /** The stage of the EventChannel update allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel update allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel update allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel update allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel update allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n Update withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }", "public ContactStatusEvent(Object source)\n {\n super(source);\n }", "SourceBuilder createService();", "public void update(@Observes FirePushEventsEnum event) {\n switch(event) {\n case NODE_EVENT:\n this.nodeEventUpdateRequest.set(true);\n break;\n case RUN_TASK_EVENT:\n this.runTaskEventUpdateRequest.set(true);\n break;\n }\n }", "void updateSharedEvents(String updatemember, final Event updatedevent)\n {\n updateMember=members.get(k);\n updatedSharedEvent=updatedevent;\n //To update event for shared members\n userRef.document(updateMember).collection(\"Events\")\n .whereEqualTo(\"title\",Title)\n .whereEqualTo(\"time\",Time)\n .whereEqualTo(\"duration\",Duration)\n .whereEqualTo(\"location\",Location)\n .whereEqualTo(\"eventDetails\",EventDetails)\n .whereEqualTo(\"date\",Date)\n .get()\n .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>()\n {\n @Override\n public void onSuccess(QuerySnapshot queryDocumentSnapshots)\n {\n if(!queryDocumentSnapshots.isEmpty())\n {\n List <DocumentSnapshot> list = queryDocumentSnapshots.getDocuments();\n for(DocumentSnapshot d:list)\n {\n //retrieves ID for the event in a event member\n ID = d.getId();\n }\n\n //Updates event\n userRef.document(updateMember).collection(\"Events\").document(ID).set(updatedSharedEvent)\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n k++;\n if(k<members.size())\n {\n updateSharedEvents(members.get(k),updatedSharedEvent);\n }\n }\n });\n\n }\n\n }\n });\n }", "Update withDestination(EventChannelDestination destination);", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }", "public DemoEventSource( T source ) {\n super(source);\n }", "EventChannel refresh(Context context);", "public UpdateService() {\n super(\"UpdateService\");\n }", "Update withFilter(EventChannelFilter filter);", "@Override\n\tpublic void streamingServiceListUpdate() {\n\t\t\n\t}", "@Override\n public SoapEvent update(String id, SoapEvent event) {\n throw new UnsupportedOperationException();\n }", "protected ServiceEvent(ServiceEvent event) {\n eventSenderClass=event.eventSenderClass;\n eventSenderID=event.eventSenderID;\n }", "UpdateOperationConfiguration build();", "@Override\r\n\tpublic void update(EventBean[] arg0, EventBean[] arg1) {\n\t\tEODQuote q = (EODQuote)arg0[0].getUnderlying();\r\n\t\t/*if ( q.getTimestamp() < Utility.getInstance().getCurrentTime() )\r\n\t\t{\r\n\t\t\tUtility.getInstance().info(\"Old event ignoring \"+q.toString());\r\n\t\t\treturn;\r\n\t\t}*/\r\n\t\t\tpfm.generateExits(q);\r\n\t\t\t\t\t\r\n\t\t}", "private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }", "public ServiceConfig(ServiceConfig source) {\n if (source.Product != null) {\n this.Product = new String(source.Product);\n }\n if (source.UniqVpcId != null) {\n this.UniqVpcId = new String(source.UniqVpcId);\n }\n if (source.Url != null) {\n this.Url = new String(source.Url);\n }\n if (source.Path != null) {\n this.Path = new String(source.Path);\n }\n if (source.Method != null) {\n this.Method = new String(source.Method);\n }\n if (source.UpstreamId != null) {\n this.UpstreamId = new String(source.UpstreamId);\n }\n if (source.CosConfig != null) {\n this.CosConfig = new CosConfig(source.CosConfig);\n }\n }", "public void update(yandex.cloud.api.logging.v1.SinkServiceOuterClass.UpdateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateMethod(), responseObserver);\n }", "public void update(yandex.cloud.api.logging.v1.SinkServiceOuterClass.UpdateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getUpdateMethod(), getCallOptions()), request, responseObserver);\n }", "public String buildMessage(Event event, Object[] params);", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "Source updateDatasourceZ3950Timestamp(Source ds) throws RepoxException;", "String serialize(PushEventSource eventSource);", "public UpdateRequest() {\n super(ServiceType.UPDATE);\n }", "@Override\n\tprotected void processPostUpdateStream(KStream<String, Event> events) {\n\n\t}", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "@Test(expected = Exception.class)\n public void updateEvent_bothArgumentsNull_throwsException() throws UpdateException {\n\n this.scheduleService.updateEvent(null, null);\n }", "public static SourceBuilder builder() {\n return new SourceBuilder() {\n @Override\n public EventSource build(Context ctx,String... argv) {\n if (argv.length == 1) {\n return new HelloWorldSource(argv[0]);\n } else{\n return new HelloWorldSource();\n } \n }\n };\n }", "private SubmitConfigSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public ListEventSourcesResult listEventSources(ListEventSourcesRequest listEventSourcesRequest) {\n ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<ListEventSourcesRequest> request = null;\n Response<ListEventSourcesResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new ListEventSourcesRequestMarshaller().marshall(super.beforeMarshalling(listEventSourcesRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<ListEventSourcesResult, JsonUnmarshallerContext> unmarshaller =\n new ListEventSourcesResultJsonUnmarshaller();\n JsonResponseHandler<ListEventSourcesResult> responseHandler =\n new JsonResponseHandler<ListEventSourcesResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public ApplicationEvent(Object source) {\n super(source);\n this.timestamp = System.currentTimeMillis();\n }", "@Override\n public void onApplicationEvent(final ApplicationReadyEvent event) {\n if (environment.equalsIgnoreCase(\"PROD\")) {\n logger.info(\"Application event start up\");\n\n List<UpdateFile> clientFileList = getClientFileList();\n ResponseEntity<UpdateFilesRQ> updateFileResponse = fileUpdaterRequestSender.getServerFileList();\n\n rSyncFileUpdaterProvider\n .setRemoteMainFolder(Objects.requireNonNull(updateFileResponse.getBody()).getMainFolder())\n .processComparing(updateFileResponse.getBody().getUpdateFile(), clientFileList);\n\n fileSystemWatcher.start();\n logger.info(\"Started fileSystemWatcher service\");\n\n filePoolerServerListener.initiateSynchronizeTime();\n filePoolerServerListener.triggerPoolerService();\n logger.info(\"Triggered filePoolerServerListener service\");\n }\n }", "DescribeServiceUpdatesResult describeServiceUpdates(DescribeServiceUpdatesRequest describeServiceUpdatesRequest);", "<T> List<String> generateUpdateScript(GremlinSource<T> source);", "public EntityUpdateEvent(String entityName, Set<Long> ids) {\r\n\t\tthis.entityName = entityName;\r\n\t\tthis.ids = ids;\r\n\t}", "public MethodExecutionEvent(Object source) {\n super(source);\n }", "public static String buildRequestForUpdate() throws Exception {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"<sfdc:sObjects xmlns:sfdc='sfdc' type='\" + cmbSObjectType.getText() + \"'>\");\n\t\tsb.append(\"<sfdc:sObject>\");\n\t\tMap<String, String> fields = callDescribeSObject(cmbSObjectType.getText());\n\n\t\tfor (String key : fields.keySet()) {\n\t\t\tsb.append(\"<sfdc:\" + key + \">\");\n\t\t\tif (fields.get(key).equals(\"boolean\")) {\n\t\t\t\tsb.append(true);\n\t\t\t} else if (fields.get(key).equals(\"id\")) {\n\t\t\t\tsb.append(\"0012800000uQ6LXAA0\");\n\t\t\t} else if (fields.get(key).equals(\"double\")) {\n\t\t\t\tsb.append(3.1542);\n\t\t\t} else if (fields.get(key).equals(\"int\")) {\n\t\t\t\tsb.append(1);\n\t\t\t} else if (fields.get(key).equals(\"float\")) {\n\t\t\t\tsb.append(2147483648L);\n\t\t\t} else {\n\t\t\t\tsb.append(\"value\");\n\t\t\t}\n\t\t\tsb.append(\"</sfdc:\" + key + \">\");\n\t\t}\n\t\tsb.append(\"</sfdc:sObject>\");\n\t\tsb.append(\"</sfdc:sObjects>\");\n\t\tStringBuilder sb1 = new StringBuilder();\n\t\tsb1.append(\"<root>\");\n\t\tsb1.append(\"<allOrNone>\" + \"0\" + \"</allOrNone>\" + \"<allowFieldTruncate>\" + \"0\" + \"</allowFieldTruncate>\"\n\t\t\t\t+ sb.toString());\n\t\tsb1.append(\"</root>\");\n\n\t\treturn sb1.toString();\n\t}", "private ApplicationAddressReqType buildUpdateApplicationAddressChangeRequest(\n UpdateApplicationAddressForm updateApplicationAddressForm) {\n System.out.println(\"inside buildUpdateApplicationAddressChangeRequest\");\n ApplicationAddressReqType applicationAddressReqType = new ApplicationAddressReqType();\n AuditAdmin audit = new AuditAdmin();\n audit.setLastModifiedUser(\"erinkklein FQT Attor\");\n applicationAddressReqType.setAudit(audit);\n System.out.println(audit.getLastModifiedUser());\n \n LifecycleAdmin lifecycle= new LifecycleAdmin();\n lifecycle.setBeginDate(\"1595704744\");\n lifecycle.setEndDate(\"1595704744\");\n applicationAddressReqType.setLifeCycle(lifecycle);\n applicationAddressReqType.setChangeCustomerNumber(updateApplicationAddressForm.getCustomerNumber());\n applicationAddressReqType.setNoticeActionCd(\"addressChange\");\n applicationAddressReqType.setRegistrationNumber(updateApplicationAddressForm.getRegistrationNumber());\n applicationAddressReqType.setRequestIdentifier(updateApplicationAddressForm.getPairId());\n \n List<AddressChangeSupportData> addressSupportingDataArray = new ArrayList<AddressChangeSupportData>();\n \n AddressChangeSupportData addressSupportingData = new AddressChangeSupportData();\n addressSupportingData.setNameLineText(updateApplicationAddressForm.getCommonName());\n \n addressSupportingData.setSignature(updateApplicationAddressForm.getSubmitterSignature());\n addressSupportingDataArray.add(addressSupportingData);\n applicationAddressReqType.setSupportData(addressSupportingDataArray);\n System.out.println(applicationAddressReqType.getChangeCustomerNumber());\n \n return applicationAddressReqType;\n }", "public void serviceUpdate(AxisEvent axisEvent, AxisService axisService) {\n int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(tenantId);\n\n CGAgentAdminService csgAgentAdminService = new CGAgentAdminService();\n try {\n String status = csgAgentAdminService.getServiceStatus(axisService.getName());\n if (status != null && CGConstant.CG_SERVICE_STATUS_AUTO_MATIC.equals(status)) {\n csgAgentAdminService.doServiceUpdate(axisService.getName(), axisEvent.getEventType());\n }\n } catch (CGException e) {\n log.error(\"Error while updating the service event for the service '\" + axisService.getName() + \"'\");\n }\n }", "public YahooWeatherEvent(Object source) {\n super(source);\n }", "interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }", "EventChannel refresh();", "@Override\n\tprotected void updateTargetRequest() {\n\t}", "public void eventUpdate(long eventID, String name, String description, String date, String startTime, String endTime){\n Callback<Events> callback = new Callback<Events>() {\n @Override\n public void success(Events serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceEventServerResponse(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.updateEvent(eventID, name, description, date, startTime, endTime, callback);\n }", "ConferenceScheduleBuilderService startEvent();", "public Update() {\n super(OcNotify.NAMESPACE, \"update\");\n }", "public ServiceEvent(ServiceID eventSenderID, Class eventSenderClass) {\n this.eventSenderID = eventSenderID;\n this.eventSenderClass = eventSenderClass;\n }", "public AbstractFoxEvent(Object source, String eventName) {\r\n super(source);\r\n this.eventName = eventName;\r\n this.createTimestamp = System.currentTimeMillis();\r\n }", "@Override\n\tpublic ServerSentEvent initEvent(Map<String, Object> params)\n\t\t\tthrows Exception {\n\t\treturn new CancelSupportServerSentEvent(params);\n\t\t\n\t}", "UsageEvents.Event buildEvent(String packageName, String className) {\n UsageEvents.Event event = new UsageEvents.Event();\n event.mPackage = getCachedStringRef(packageName);\n if (className != null) {\n event.mClass = getCachedStringRef(className);\n }\n return event;\n }", "@Override\n public void execute() {\n eslClient.getEventNotificationService().register(newEventNotificationConfig(URL)\n .forEvent(EVENT1)\n .forEvent(EVENT2)\n .forEvent(EVENT3));\n\n // Get the registered event notifications\n eventNotificationConfig = eslClient.getEventNotificationService().getEventNotificationConfig();\n }", "protected void addBuildFunction(S source) {\n Function build =\n FunctionBuilder.of(source, \"build\", Purpose.build())\n .setReturnValue(new DataObject(new ObjectName(\"Widget\"), new PackageName(\"com.dummy\")))\n .addArgument(\n new DataObject(\n new ObjectName(\"BuildContext\"),\n new PackageName(\"com.dummy\"),\n new VariableName(\"context\")))\n .build();\n\n source.addFunction(build);\n }", "public UpgradeDBInstanceEngineVersionRequest(UpgradeDBInstanceEngineVersionRequest source) {\n if (source.InstanceId != null) {\n this.InstanceId = new String(source.InstanceId);\n }\n if (source.EngineVersion != null) {\n this.EngineVersion = new String(source.EngineVersion);\n }\n if (source.WaitSwitch != null) {\n this.WaitSwitch = new Long(source.WaitSwitch);\n }\n if (source.UpgradeSubversion != null) {\n this.UpgradeSubversion = new Long(source.UpgradeSubversion);\n }\n if (source.MaxDelayTime != null) {\n this.MaxDelayTime = new Long(source.MaxDelayTime);\n }\n }", "public static ApproxsimEvent getRegionUpdated(Object source) {\n return new ApproxsimEvent(source, REGIONUPDATED);\n }", "interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }", "public static ApproxsimEvent getGridUpdated(Object source) {\n return new ApproxsimEvent(source, GRIDUPDATED);\n }", "@Override\n\tpublic void fileDeliveryServiceListUpdate() {\n\t\t\n\t}", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "@Override\n public void onServiceEventUpdate(int event, int value, String deviceId) {\n String cameraId = getKeyByValue(mCameraIdManager.getDeviceId(), deviceId);\n LogHelper.d(TAG, \"onServiceEventUpdate device id : \" + deviceId + \",cameraId : \"\n + cameraId + \",all device id : \" + mCameraIdManager.getDeviceId());\n if (cameraId != null) {\n mCurrentMode.onServiceEventUpdate(event, value, cameraId);\n mRemoteTouchFocus.setRemoteOrientation(value);\n }\n }", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "public void actionPerformed( ActionEvent event )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addInfo(\n \"Software \" + name + \" location \" + locationName + \" update in progress ...\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" location \" + locationName + \" update requested.\" );\n // start the update thread\n final UpdateLocationThread updateThread = new UpdateLocationThread();\n updateThread.locationName = locationName;\n updateThread.start();\n // sync with the client\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), new Runnable()\n {\n public void run()\n {\n if ( updateThread.ended )\n {\n if ( updateThread.failure )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addError(\n updateThread.message, parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add( updateThread.message );\n }\n else\n {\n KalumetConsoleApplication.getApplication().getLogPane().addConfirm(\n \"Software \" + name + \" location \" + locationName + \" updated.\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" location \" + locationName + \" updated.\" );\n }\n }\n else\n {\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), this );\n }\n }\n } );\n }", "@Override\n protected void update(List<Event> result, Ec2LaunchConfiguration oldResource, Ec2LaunchConfiguration newResource) {\n \n }", "@Override\n public Event updateSlotEventService(String discordId,\n String newData, com.bot.insched.model.Event eventModel) {\n Calendar calendar = getCalendarbyId(discordId);\n if (calendar == null) {\n return null;\n }\n try {\n // event di google calendar\n String eventId = eventModel.getIdGoogleEvent();\n Event eventCalendar = getEventService(discordId, eventId);\n\n // cek eventnya sudah ada atau belum di google calendar\n log.warn(\"######### : CalendarEvent {}\", eventCalendar);\n if (eventCalendar == null) {\n eventCalendar = createSlotEventService(discordId, eventId, eventModel);\n eventId = eventCalendar.getId();\n }\n List<EventAttendee> attendeeList = eventCalendar.getAttendees();\n if (attendeeList == null) {\n attendeeList = new ArrayList<EventAttendee>();\n }\n\n // cek kapasitas\n if (eventModel.getCapacity() < attendeeList.size()) {\n return null;\n }\n EventAttendee attendee = new EventAttendee();\n attendee.setEmail(newData);\n attendeeList.add(attendee);\n eventCalendar.setAttendees(attendeeList);\n Event newEvent = calendar.events().update(\"primary\", eventId, eventCalendar).execute();\n return newEvent;\n\n } catch (Exception e) {\n log.error(\"------ Error when updateSlotEventService: {}\", e.getMessage());\n return null;\n }\n }", "interface PrivateEndpointConnectionsService {\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_04_01_preview.PrivateEndpointConnections get\" })\n @GET(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}\")\n Observable<Response<ResponseBody>> get(@Path(\"subscriptionId\") String subscriptionId, @Path(\"resourceGroupName\") String resourceGroupName, @Path(\"parentType\") String parentType, @Path(\"parentName\") String parentName, @Path(\"privateEndpointConnectionName\") String privateEndpointConnectionName, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_04_01_preview.PrivateEndpointConnections update\" })\n @PUT(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}\")\n Observable<Response<ResponseBody>> update(@Path(\"subscriptionId\") String subscriptionId, @Path(\"resourceGroupName\") String resourceGroupName, @Path(\"parentType\") String parentType, @Path(\"parentName\") String parentName, @Path(\"privateEndpointConnectionName\") String privateEndpointConnectionName, @Body PrivateEndpointConnectionInner privateEndpointConnection, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_04_01_preview.PrivateEndpointConnections beginUpdate\" })\n @PUT(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}\")\n Observable<Response<ResponseBody>> beginUpdate(@Path(\"subscriptionId\") String subscriptionId, @Path(\"resourceGroupName\") String resourceGroupName, @Path(\"parentType\") String parentType, @Path(\"parentName\") String parentName, @Path(\"privateEndpointConnectionName\") String privateEndpointConnectionName, @Body PrivateEndpointConnectionInner privateEndpointConnection, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_04_01_preview.PrivateEndpointConnections delete\" })\n @HTTP(path = \"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}\", method = \"DELETE\", hasBody = true)\n Observable<Response<ResponseBody>> delete(@Path(\"subscriptionId\") String subscriptionId, @Path(\"resourceGroupName\") String resourceGroupName, @Path(\"parentType\") String parentType, @Path(\"parentName\") String parentName, @Path(\"privateEndpointConnectionName\") String privateEndpointConnectionName, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_04_01_preview.PrivateEndpointConnections beginDelete\" })\n @HTTP(path = \"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}\", method = \"DELETE\", hasBody = true)\n Observable<Response<ResponseBody>> beginDelete(@Path(\"subscriptionId\") String subscriptionId, @Path(\"resourceGroupName\") String resourceGroupName, @Path(\"parentType\") String parentType, @Path(\"parentName\") String parentName, @Path(\"privateEndpointConnectionName\") String privateEndpointConnectionName, @Query(\"api-version\") String apiVersion, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_04_01_preview.PrivateEndpointConnections listByResource\" })\n @GET(\"subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections\")\n Observable<Response<ResponseBody>> listByResource(@Path(\"subscriptionId\") String subscriptionId, @Path(\"resourceGroupName\") String resourceGroupName, @Path(\"parentType\") String parentType, @Path(\"parentName\") String parentName, @Query(\"api-version\") String apiVersion, @Query(\"$filter\") String filter, @Query(\"$top\") Integer top, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: com.microsoft.azure.management.eventgrid.v2020_04_01_preview.PrivateEndpointConnections listByResourceNext\" })\n @GET\n Observable<Response<ResponseBody>> listByResourceNext(@Url String nextUrl, @Header(\"accept-language\") String acceptLanguage, @Header(\"User-Agent\") String userAgent);\n\n }", "Source updateDatasourceHttp(Source ds) throws RepoxException;", "public interface EsConnection {\n\n /**\n * Write events to a stream\n * <p>\n * When writing events to a stream the {@link eventstore.core.ExpectedVersion} choice can\n * make a very large difference in the observed behavior. For example, if no stream exists\n * and ExpectedVersion.Any is used, a new stream will be implicitly created when appending.\n * <p>\n * There are also differences in idempotency between different types of calls.\n * If you specify an ExpectedVersion aside from ExpectedVersion.Any the Event Store\n * will give you an idempotency guarantee. If using ExpectedVersion.Any the Event Store\n * will do its best to provide idempotency but does not guarantee idempotency\n *\n * @param stream name of the stream to write events to\n * @param expectedVersion expected version of the stream to write to, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param events events to append to the stream\n * @param credentials optional user credentials to perform operation with.\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<WriteResult> writeEvents(\n String stream,\n ExpectedVersion expectedVersion,\n Collection<EventData> events,\n UserCredentials credentials);\n\n /**\n * Write events to a stream\n * <p>\n * When writing events to a stream the {@link eventstore.core.ExpectedVersion} choice can\n * make a very large difference in the observed behavior. For example, if no stream exists\n * and ExpectedVersion.Any is used, a new stream will be implicitly created when appending.\n * <p>\n * There are also differences in idempotency between different types of calls.\n * If you specify an ExpectedVersion aside from ExpectedVersion.Any the Event Store\n * will give you an idempotency guarantee. If using ExpectedVersion.Any the Event Store\n * will do its best to provide idempotency but does not guarantee idempotency\n *\n * @param stream name of the stream to write events to\n * @param expectedVersion expected version of the stream to write to, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param events events to append to the stream\n * @param credentials optional user credentials to perform operation with.\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<WriteResult> writeEvents(\n String stream,\n ExpectedVersion expectedVersion,\n Collection<EventData> events,\n UserCredentials credentials,\n boolean requireMaster);\n\n /**\n * Deletes a stream from the Event Store\n *\n * @param stream name of the stream to delete\n * @param expectedVersion optional expected version that the stream should have when being deleted, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param credentials optional user credentials to perform operation with.\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<DeleteResult> deleteStream(\n String stream,\n ExpectedVersion.Existing expectedVersion,\n UserCredentials credentials);\n\n /**\n * Deletes a stream from the Event Store\n *\n * @param stream name of the stream to delete\n * @param expectedVersion optional expected version that the stream should have when being deleted, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param hardDelete Indicator for tombstoning vs soft-deleting the stream. Tombstoned streams can never be recreated. Soft-deleted streams can be written to again, but the EventNumber sequence will not start from 0.\n * @param credentials optional user credentials to perform operation with.\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<DeleteResult> deleteStream(\n String stream,\n ExpectedVersion.Existing expectedVersion,\n boolean hardDelete,\n UserCredentials credentials);\n\n /**\n * Deletes a stream from the Event Store\n *\n * @param stream name of the stream to delete\n * @param expectedVersion optional expected version that the stream should have when being deleted, or <code>ExpectedVersion.Any</code> if <code>null</code>\n * @param hardDelete Indicator for tombstoning vs soft-deleting the stream. Tombstoned streams can never be recreated. Soft-deleted streams can be written to again, but the EventNumber sequence will not start from 0.\n * @param credentials optional user credentials to perform operation with.\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} that the caller can await on\n */\n Future<DeleteResult> deleteStream(\n String stream,\n ExpectedVersion.Existing expectedVersion,\n boolean hardDelete,\n UserCredentials credentials,\n boolean requireMaster);\n\n /**\n * Starts a transaction in the event store on a given stream asynchronously\n * <p>\n * A {@link eventstore.j.EsTransaction} allows the calling of multiple writes with multiple\n * round trips over long periods of time between the caller and the event store. This method\n * is only available through the TCP interface and no equivalent exists for the RESTful interface.\n *\n * @param stream The stream to start a transaction on\n * @param expectedVersion The expected version of the stream at the time of starting the transaction\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing an actual transaction\n */\n Future<EsTransaction> startTransaction(\n String stream,\n ExpectedVersion expectedVersion,\n UserCredentials credentials);\n\n /**\n * Starts a transaction in the event store on a given stream asynchronously\n * <p>\n * A {@link eventstore.j.EsTransaction} allows the calling of multiple writes with multiple\n * round trips over long periods of time between the caller and the event store. This method\n * is only available through the TCP interface and no equivalent exists for the RESTful interface.\n *\n * @param stream The stream to start a transaction on\n * @param expectedVersion The expected version of the stream at the time of starting the transaction\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing an actual transaction\n */\n Future<EsTransaction> startTransaction(\n String stream,\n ExpectedVersion expectedVersion,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Continues transaction by provided transaction ID.\n * <p>\n * A {@link eventstore.j.EsTransaction} allows the calling of multiple writes with multiple\n * round trips over long periods of time between the caller and the event store. This method\n * is only available through the TCP interface and no equivalent exists for the RESTful interface.\n *\n * @param transactionId The transaction ID that needs to be continued.\n * @param credentials The optional user credentials to perform operation with\n * @return A transaction for given id\n */\n EsTransaction continueTransaction(long transactionId, UserCredentials credentials);\n\n\n /**\n * Reads a single event from a stream at event number\n *\n * @param stream name of the stream to read from\n * @param eventNumber optional event number to read, or EventNumber.Last for reading latest event, EventNumber.Last if null\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing an event\n */\n Future<Event> readEvent(\n String stream,\n EventNumber eventNumber,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads a single event from a stream at event number\n *\n * @param stream name of the stream to read from\n * @param eventNumber optional event number to read, or EventNumber.Last for reading latest event, EventNumber.Last if null\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing an event\n */\n Future<Event> readEvent(\n String stream,\n EventNumber eventNumber,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Reads count events from a stream forwards (e.g. oldest to newest) starting from event number\n *\n * @param stream name of stream to read from\n * @param fromNumber optional event number to read, EventNumber.First if null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadStreamEventsCompleted> readStreamEventsForward(\n String stream,\n EventNumber.Exact fromNumber,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads count events from a stream forwards (e.g. oldest to newest) starting from event number\n *\n * @param stream name of stream to read from\n * @param fromNumber optional event number to read, EventNumber.First if null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadStreamEventsCompleted> readStreamEventsForward(\n String stream,\n EventNumber.Exact fromNumber,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Reads count events from from a stream backwards (e.g. newest to oldest) starting from event number\n *\n * @param stream name of stream to read from\n * @param fromNumber optional event number to read, EventNumber.Last if null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadStreamEventsCompleted> readStreamEventsBackward(\n String stream,\n EventNumber fromNumber,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads count events from from a stream backwards (e.g. newest to oldest) starting from event number\n *\n * @param stream name of stream to read from\n * @param fromNumber optional event number to read, EventNumber.Last if null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadStreamEventsCompleted> readStreamEventsBackward(\n String stream,\n EventNumber fromNumber,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Reads all events in the node forward (e.g. beginning to end) starting from position\n *\n * @param fromPosition optional position to start reading from, Position.First of null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadAllEventsCompleted> readAllEventsForward(\n Position fromPosition,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads all events in the node forward (e.g. beginning to end) starting from position\n *\n * @param fromPosition optional position to start reading from, Position.First of null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadAllEventsCompleted> readAllEventsForward(\n Position fromPosition,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Reads all events in the node backwards (e.g. end to beginning) starting from position\n *\n * @param fromPosition optional position to start reading from, Position.Last of null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadAllEventsCompleted> readAllEventsBackward(\n Position fromPosition,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Reads all events in the node backwards (e.g. end to beginning) starting from position\n *\n * @param fromPosition optional position to start reading from, Position.Last of null\n * @param maxCount maximum count of items to read\n * @param resolveLinkTos whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param requireMaster Require Event Store to refuse operation if it is not master\n * @return A {@link scala.concurrent.Future} containing the results of the read operation\n */\n Future<ReadAllEventsCompleted> readAllEventsBackward(\n Position fromPosition,\n int maxCount,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean requireMaster);\n\n\n /**\n * Subscribes to a single event stream. New events\n * written to the stream while the subscription is active will be\n * pushed to the client.\n *\n * @param stream The stream to subscribe to\n * @param observer A {@link eventstore.akka.SubscriptionObserver} to handle a new event received over the subscription\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link java.io.Closeable} representing the subscription which can be closed.\n */\n Closeable subscribeToStream(\n String stream,\n SubscriptionObserver<Event> observer,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n\n /**\n * Subscribes to a single event stream. Existing events from\n * lastCheckpoint onwards are read from the stream\n * and presented to the user of <code>SubscriptionObserver</code>\n * as if they had been pushed.\n * <p>\n * Once the end of the stream is read the subscription is\n * transparently (to the user) switched to push new events as\n * they are written.\n * <p>\n * If events have already been received and resubscription from the same point\n * is desired, use the event number of the last event processed which\n * appeared on the subscription.\n *\n * @param stream The stream to subscribe to\n * @param observer A {@link eventstore.akka.SubscriptionObserver} to handle a new event received over the subscription\n * @param fromEventNumberExclusive The event number from which to start, or <code>null</code> to read all events.\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link java.io.Closeable} representing the subscription which can be closed.\n */\n Closeable subscribeToStreamFrom(\n String stream,\n SubscriptionObserver<Event> observer,\n Long fromEventNumberExclusive,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n /**\n * Subscribes to all events in the Event Store. New events written to the stream\n * while the subscription is active will be pushed to the client.\n *\n * @param observer A {@link eventstore.akka.SubscriptionObserver} to handle a new event received over the subscription\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link java.io.Closeable} representing the subscription which can be closed.\n */\n Closeable subscribeToAll(\n SubscriptionObserver<IndexedEvent> observer,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n\n /**\n * Subscribes to a all events. Existing events from position\n * onwards are read from the Event Store and presented to the user of\n * <code>SubscriptionObserver</code> as if they had been pushed.\n * <p>\n * Once the end of the stream is read the subscription is\n * transparently (to the user) switched to push new events as\n * they are written.\n * <p>\n * If events have already been received and resubscription from the same point\n * is desired, use the position representing the last event processed which\n * appeared on the subscription.\n *\n * @param observer A {@link eventstore.akka.SubscriptionObserver} to handle a new event received over the subscription\n * @param fromPositionExclusive The position from which to start, or <code>null</code> to read all events\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link java.io.Closeable} representing the subscription which can be closed.\n */\n Closeable subscribeToAllFrom(\n SubscriptionObserver<IndexedEvent> observer,\n Position.Exact fromPositionExclusive,\n boolean resolveLinkTos,\n UserCredentials credentials);\n\n\n// TODO support stream not found\n// Future<Unit> setStreamMetadata(String stream, int expectedMetastreamVersion, StreamMetadata metadata, UserCredentials credentials);\n// Future<StreamMetadataResult> getStreamMetadataAsync(String stream, UserCredentials credentials);\n// Future<RawStreamMetadataResult> getStreamMetadataAsRawBytesAsync(String stream, UserCredentials credentials); TODO\n\n /**\n * Sets the metadata for a stream.\n *\n * @param stream The name of the stream for which to set metadata.\n * @param expectedMetastreamVersion The expected version for the write to the metadata stream.\n * @param metadata A byte array representing the new metadata.\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} representing the operation\n */\n Future<WriteResult> setStreamMetadata(\n String stream,\n ExpectedVersion expectedMetastreamVersion,\n byte[] metadata,\n UserCredentials credentials);\n\n /**\n * Reads the metadata for a stream as a byte array.\n *\n * @param stream The name of the stream for which to read metadata.\n * @param credentials The optional user credentials to perform operation with\n * @return A {@link scala.concurrent.Future} containing the metadata as byte array.\n */\n Future<byte[]> getStreamMetadataBytes(String stream, UserCredentials credentials);\n\n /**\n * Creates a Source you can use to subscribe to a single event stream. Existing events from\n * event number onwards are read from the stream and presented to the user of\n * <code>Source</code> as if they had been pushed.\n * <p>\n * Once the end of the stream is read the <code>Source</code> transparently (to the user)\n * switches to push new events as they are written.\n * <p>\n * If events have already been received and resubscription from the same point\n * is desired, use the event number of the last event processed.\n *\n * @param stream The stream to subscribe to\n * @param fromEventNumberExclusive The event number from which to start, or <code>null</code> to read all events.\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param infinite Whether to subscribe to the future events upon reading all current\n * @return A {@link akka.stream.javadsl.Source} representing the stream\n */\n Source<Event, NotUsed> streamSource(\n String stream,\n EventNumber fromEventNumberExclusive,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean infinite);\n\n /**\n * Creates a Source you can use to subscribes to all events. Existing events from position\n * onwards are read from the Event Store and presented to the user of\n * <code>Source</code> as if they had been pushed.\n * <p>\n * Once the end of the stream is read the <code>Source</code> transparently (to the user)\n * switches to push new events as they are written.\n * <p>\n * If events have already been received and resubscription from the same point\n * is desired, use the position representing the last event processed.\n *\n * @param fromPositionExclusive The position from which to start, or <code>null</code> to read all events\n * @param resolveLinkTos Whether to resolve LinkTo events automatically\n * @param credentials The optional user credentials to perform operation with\n * @param infinite Whether to subscribe to the future events upon reading all current\n * @return A {@link akka.stream.javadsl.Source} representing all streams\n */\n Source<IndexedEvent, NotUsed> allStreamsSource(\n Position fromPositionExclusive,\n boolean resolveLinkTos,\n UserCredentials credentials,\n boolean infinite);\n\n /**\n * Asynchronously create a persistent subscription group on a stream\n *\n * @param stream The name of the stream to create the persistent subscription on\n * @param groupName The name of the group to create\n * @param settings The {@link PersistentSubscriptionSettings} for the subscription, or <code>null</code> for defaults\n * @param credentials The credentials to be used for this operation\n * @return A {@link scala.concurrent.Future} representing the operation\n */\n Future<scala.Unit> createPersistentSubscription(\n String stream,\n String groupName,\n PersistentSubscriptionSettings settings,\n UserCredentials credentials);\n\n /**\n * Asynchronously update a persistent subscription group on a stream\n *\n * @param stream The name of the stream to create the persistent subscription on\n * @param groupName The name of the group to create\n * @param settings The {@link PersistentSubscriptionSettings} for the subscription, or <code>null</code> for defaults\n * @param credentials The credentials to be used for this operation, or <code>null</code> for default\n * @return A {@link scala.concurrent.Future} representing the operation\n */\n Future<scala.Unit> updatePersistentSubscription(\n String stream,\n String groupName,\n PersistentSubscriptionSettings settings,\n UserCredentials credentials);\n\n /**\n * Asynchronously delete a persistent subscription group on a stream\n *\n * @param stream The name of the stream to create the persistent subscription on\n * @param groupName The name of the group to create\n * @param credentials The credentials to be used for this operation, or <code>null</code> for default\n * @return A {@link scala.concurrent.Future} representing the operation\n */\n Future<scala.Unit> deletePersistentSubscription(\n String stream,\n String groupName,\n UserCredentials credentials);\n}", "public void buildStarted(BuildEvent event) {\n }", "public interface GsoapCallEventListener {\n void onEventSend(int eventType, String... data);\n}", "public okhttp3.Call eventSourceServiceWatchEventSourcesCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/api/v1/stream/event-sources/{namespace}\"\n .replaceAll(\"\\\\{\" + \"namespace\" + \"\\\\}\", localVarApiClient.escapeString(namespace.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (listOptionsLabelSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.labelSelector\", listOptionsLabelSelector));\n }\n\n if (listOptionsFieldSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.fieldSelector\", listOptionsFieldSelector));\n }\n\n if (listOptionsWatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.watch\", listOptionsWatch));\n }\n\n if (listOptionsAllowWatchBookmarks != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.allowWatchBookmarks\", listOptionsAllowWatchBookmarks));\n }\n\n if (listOptionsResourceVersion != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersion\", listOptionsResourceVersion));\n }\n\n if (listOptionsResourceVersionMatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersionMatch\", listOptionsResourceVersionMatch));\n }\n\n if (listOptionsTimeoutSeconds != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.timeoutSeconds\", listOptionsTimeoutSeconds));\n }\n\n if (listOptionsLimit != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.limit\", listOptionsLimit));\n }\n\n if (listOptionsContinue != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.continue\", listOptionsContinue));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "void update(Object source, Object reason, T arg);", "public void actionPerformed( ActionEvent event )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addInfo(\n \"Software \" + name + \" update in progress ...\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" update requested.\" );\n // start the update thread\n final UpdateThread updateThread = new UpdateThread();\n updateThread.start();\n // sync with the client\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), new Runnable()\n {\n public void run()\n {\n if ( updateThread.ended )\n {\n if ( updateThread.failure )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addError(\n updateThread.message, parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add( updateThread.message );\n }\n else\n {\n KalumetConsoleApplication.getApplication().getLogPane().addConfirm(\n \"Software \" + name + \" updated.\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" updated.\" );\n }\n }\n else\n {\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), this );\n }\n }\n } );\n }", "public EventCondition(EventCondition source) {\n if (source.AlarmNotifyPeriod != null) {\n this.AlarmNotifyPeriod = new String(source.AlarmNotifyPeriod);\n }\n if (source.AlarmNotifyType != null) {\n this.AlarmNotifyType = new String(source.AlarmNotifyType);\n }\n if (source.EventID != null) {\n this.EventID = new String(source.EventID);\n }\n if (source.EventDisplayName != null) {\n this.EventDisplayName = new String(source.EventDisplayName);\n }\n if (source.RuleID != null) {\n this.RuleID = new String(source.RuleID);\n }\n }", "public void set_source(EndpointID source) {\r\n\t\tsource_ = source;\r\n\t}", "@Override\n\tprotected List<Object> buildInvokeParameters(Object stateful, String event, List<Object> parmList) { Add the Entity and Event to the parm list to pass to the Controller\n\t\t// TODO : Inspect method signature - make entity and event optional\n\t\t//\n\t\tArrayList<Object> invokeParmList = new ArrayList<Object>(parmList.size() + 1);\n\t\tinvokeParmList.add(event);\n\t\tinvokeParmList.addAll(parmList);\n\t\t\n\t\treturn invokeParmList;\n\t}", "SyslogEvent build() {\n\n miruLogEvent = parse(rawMessage, address.toString());\n return this;\n }", "SourceControl.Update update();", "@Override\n\t\tpublic void EnergySourceChanged(EnergyProducerOrConsumer changedSource) {\n\t\t\t\n\t\t}", "@Override\n public void onStateUpdated(VertexStateUpdate event) {\n enqueueAndScheduleNextEvent(new VertexManagerEventOnVertexStateUpdate(event));\n }", "public Event subscribe(Address resource, String event, int expires, Content body);", "EventUse createEventUse();", "EventChannel apply(Context context);", "long request(MarketDataRequest inRequest,\n boolean inStreamEvents);", "public void targetStarted(BuildEvent event) {\n }", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();" ]
[ "0.642601", "0.57760584", "0.5775878", "0.5487476", "0.53890187", "0.5381526", "0.5309064", "0.51737845", "0.5147602", "0.5137577", "0.51023734", "0.5096194", "0.50918", "0.5039576", "0.50224835", "0.5005851", "0.49711892", "0.49119735", "0.48932686", "0.48510084", "0.48474663", "0.4826847", "0.48150802", "0.48106053", "0.48075122", "0.48072505", "0.47859743", "0.47590813", "0.4740674", "0.47353408", "0.47242817", "0.47057715", "0.4665265", "0.46620786", "0.46501157", "0.4644472", "0.46423268", "0.46296275", "0.46193215", "0.4606526", "0.46036822", "0.45919955", "0.45222402", "0.45222032", "0.45212775", "0.45202678", "0.45019978", "0.44820735", "0.44787845", "0.44768208", "0.44746074", "0.44482577", "0.44469094", "0.44398057", "0.4435594", "0.44303983", "0.4424359", "0.4423707", "0.4422073", "0.44152573", "0.44138724", "0.44047865", "0.44003022", "0.4392146", "0.43789983", "0.4366042", "0.43634248", "0.436248", "0.4357406", "0.43566802", "0.43483308", "0.43431973", "0.43404633", "0.43385535", "0.43369278", "0.43340787", "0.43340334", "0.43338752", "0.43331835", "0.4332643", "0.4330141", "0.43234763", "0.4319852", "0.43192175", "0.43161938", "0.4314331", "0.43142638", "0.43068126", "0.43063813", "0.42974114", "0.42959577", "0.4294586", "0.42923877", "0.42865995", "0.42848492", "0.42834365", "0.4282417", "0.42822778", "0.42820013", "0.4276037" ]
0.46727735
32
verify the required parameter 'namespace' is set
@SuppressWarnings("rawtypes") private okhttp3.Call eventSourceServiceUpdateEventSourceValidateBeforeCall(String namespace, String name, EventsourceUpdateEventSourceRequest body, final ApiCallback _callback) throws ApiException { if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling eventSourceServiceUpdateEventSource(Async)"); } // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling eventSourceServiceUpdateEventSource(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling eventSourceServiceUpdateEventSource(Async)"); } okhttp3.Call localVarCall = eventSourceServiceUpdateEventSourceCall(namespace, name, body, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetNamespace();", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "void setNamespace(java.lang.String namespace);", "private NamespaceHelper() {}", "public boolean isNamespaceAware () {\n return true;\n }", "protected void validateNamespace(Namespace namespace) throws WikiException {\r\n\t\tcheckLength(namespace.getDefaultLabel(), 200);\r\n\t}", "void setNamespace(String namespace);", "boolean isNamespaceRunning(String namespace);", "public void testGetNamespaceURI() throws RepositoryException {\n String result = \"namespace\" ;\n String prefix =\"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespaceURI(prefix), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespaceURI(prefix), result);\n }", "java.lang.String getNamespace();", "@Test\n\tpublic void test_TCM__String_getNamespacePrefix() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect prefix\", attribute.getNamespacePrefix().equals(\"prefx\"));\n\t}", "@Test\n\tpublic void test_TCM__String_getNamespaceURI() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect URI\", attribute.getNamespaceURI().equals(\"http://some.other.place\"));\n\n\t}", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "boolean isNamespace(Object object);", "protected void validateNamespaceTranslation(Namespace namespace, String virtualWiki) throws WikiException {\r\n\t\tcheckLength(namespace.getLabel(virtualWiki), 200);\r\n\t}", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public final boolean isNamespaceAware() {\n return true;\n }", "public void testMemberNotTeamMemberForProjectValidator_NullNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator((String) null);\r\n fail(\"testMemberNotTeamMemberForProjectValidator_NullNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_NullNamespace.\");\r\n }\r\n }", "@Test\n public void testNamespace() throws Exception {\n NamespaceMeta ns1Meta = new NamespaceMeta.Builder().setName(\"ns1\").build();\n NamespaceMeta ns2Meta = new NamespaceMeta.Builder().setName(\"ns2\").build();\n NamespaceMeta anotherNsMeta = new NamespaceMeta.Builder().setName(\"anotherNs\").build();\n when(nsClient.list()).thenReturn(ImmutableList.of(ns1Meta, ns2Meta, anotherNsMeta));\n\n ResourceLookupContext resourceLookupContext = new ResourceLookupContext();\n resourceLookupContext.setResourceName(\"namespace\");\n // user is entering n and we expect the completion to show ns1 and ns2 as they start with n and not anotherNs\n resourceLookupContext.setUserInput(\"n\");\n resourceLookupContext.setResources(ImmutableMap.of(\"namespace\", Collections.emptyList()));\n List<String> resources = client.getResources(resourceLookupContext);\n Assert.assertEquals(2, resources.size());\n Assert.assertEquals(ImmutableList.of(\"ns1\", \"ns2\"), resources);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "public String getNamespace();", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public String getNamespace() {\n return namespace;\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static boolean isValidNamespace(CharSequence namespace) {\n if (namespace == null) {\n return false;\n }\n\n int position = 0;\n boolean start = true;\n\n while (position < namespace.length()) {\n char c = namespace.charAt(position++);\n if (start) {\n start = false;\n if (!isValidIdentifierStart(c)) {\n return false;\n }\n } else if (c == '.') {\n start = true;\n } else if (!isValidIdentifierAfterStart(c)) {\n return false;\n }\n }\n\n return !start;\n }", "public String getNamespace () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected boolean isMatchingNamespace(String rootElementNamespace)\n {\n if (namespacePattern != null)\n {\n return namespacePattern.matcher(rootElementNamespace == null ? \"\" : rootElementNamespace).matches();\n }\n else\n {\n return namespace == null ? rootElementNamespace == null : namespace.equals(rootElementNamespace);\n }\n }", "@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public void testMemberNotTeamMemberForProjectValidator_EmptyNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\" \");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_EmptyNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_EmptyNamespace.\");\r\n }\r\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }", "public boolean hasNamespace(final String namespace) {\n return rpcMethods.keySet().stream()\n .anyMatch(key -> key.toUpperCase().startsWith(namespace.toUpperCase()));\n }", "public void testGetNamespacePrefix() throws RepositoryException {\n String result = \"namespace\";\n String uri = \"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespacePrefix(uri), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefix(uri), result);\n }", "private static boolean _inNamespace(Resource resource, String namespace) {\n\t\tString resourceNamespace = resource.getNameSpace();\n\t\t\n\t\tif ( namespace.endsWith(\"/\") || namespace.endsWith(\"#\") ) {\n\t\t\treturn namespace.equals(resourceNamespace);\n\t\t}\n\t\telse {\n\t\t\treturn resourceNamespace != null && namespace.equals(resourceNamespace.replaceAll(\"(/|#)$\", \"\"));\n\t\t}\n\t}", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getTargetNamespace();", "public boolean hasNamespace() {\n return m_namespaces != null && m_namespaces.size() > 0;\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "void visit(Namespace namespace);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "@Test\n\tpublic void test_TCC___String_String_int_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", Attribute.ID_TYPE.ordinal(), namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "Namespaces namespaces();", "String getNamespaceStringValue(Object ns);", "public boolean isSetNs() {\n return this.ns != null;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "public boolean isTargetNamespace(String prefix) {\r\n return prefix.equals(getDefinitions().getTargetNamespace());\r\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public boolean addNamespaceToBPELDoc(String prefix, String namespace, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Adding namespace {} to BuildPlan {}\", namespace,\n\t\t\t\tbuildPlan.getBpelProcessElement().getAttribute(\"name\"));\n\t\tbuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:\" + prefix, namespace);\n\t\t// TODO make a real check\n\t\treturn true;\n\t}", "public boolean isNamespaceAware() {\n\t\ttry {\n\t\t\treturn parserImpl.getFeature(Constants.SAX_FEATURE_PREFIX\n\t\t\t\t\t\t\t\t\t\t + Constants.NAMESPACES_FEATURE);\n\t\t}\n\t\t catch (SAXException x) {\n\t\t\tthrow new IllegalStateException(x.getMessage());\n\t\t}\n\t}", "private boolean ensureXSDTypeNamespaceMappings(Object obj) {\r\n\t\t\r\n\t\tString targetNamespace = null;\r\n\t\t\r\n\t\tif (obj instanceof XSDNamedComponent ) {\r\n\t\t\tXSDNamedComponent namedComponent = (XSDNamedComponent) obj; \r\n\t\t\ttargetNamespace = namedComponent.getTargetNamespace();\r\n\t\t}\r\n\t\t\r\n\t\tif (targetNamespace == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Now check if the target namespace has a prefix mappings.\r\n\t\tString prefix = BPELUtils.getNamespacePrefix (modelObject, targetNamespace);\r\n\t\tif (prefix != null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// We have to map the namespace to a prefix. \r\n\t\tNamespaceMappingDialog dialog = new NamespaceMappingDialog(getShell(),modelObject);\r\n\t\tdialog.setNamespace( targetNamespace );\r\n\t\t\r\n\t\tif (dialog.open() == Window.CANCEL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// define the prefix\r\n\t\tBPELUtils.setPrefix( BPELUtils.getProcess(modelObject), targetNamespace, dialog.getPrefix()); \t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n \tpublic void whereClauseForNodeNamespace() {\n \t\tnode23.setNamespace(\"namespace\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.namespace\", \"'namespace'\"));\n \t}", "public void setTargetNamespace(String targetNamespace)\r\n {\r\n this.targetNamespace = targetNamespace;\r\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static boolean NamespaceNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NamespaceNodeTest\")) return false;\n if (!nextTokenIs(b, K_NAMESPACE_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMESPACE_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NAMESPACE_NODE, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@XmlElement(required = true, name = \"namespace\")\n public String getNamespace() {\n return namespace;\n }", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "@Test\n public void verifyReservedNS() throws IOException {\n NamespaceDescriptor ns = TestNamespace.admin.getNamespaceDescriptor(DEFAULT_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), DEFAULT_NAMESPACE.getName());\n ns = TestNamespace.admin.getNamespaceDescriptor(SYSTEM_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(2, TestNamespace.admin.listNamespaceDescriptors().length);\n // verify existence of system tables\n Set<TableName> systemTables = Sets.newHashSet(META_TABLE_NAME);\n HTableDescriptor[] descs = TestNamespace.admin.listTableDescriptorsByNamespace(SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(systemTables.size(), descs.length);\n for (HTableDescriptor desc : descs) {\n Assert.assertTrue(systemTables.contains(desc.getTableName()));\n }\n // verify system tables aren't listed\n Assert.assertEquals(0, TestNamespace.admin.listTables().length);\n // Try creating default and system namespaces.\n boolean exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(DEFAULT_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(SYSTEM_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n }", "private String getNamespace(Package pkg) {\n/* */ String nsUri;\n/* 223 */ if (pkg == null) return \"\";\n/* */ \n/* */ \n/* 226 */ XmlNamespace ns = pkg.<XmlNamespace>getAnnotation(XmlNamespace.class);\n/* 227 */ if (ns != null) {\n/* 228 */ nsUri = ns.value();\n/* */ } else {\n/* 230 */ nsUri = \"\";\n/* 231 */ } return nsUri;\n/* */ }", "String getReferenceNamespace();", "int getNamespaceUri();", "String getNamespacePrefix(Object ns);", "public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }", "public void testMemberNotTeamMemberForProjectValidator_UnknownNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\"unknown\");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_UnknownNamespace is failure.\");\r\n } catch (RegistrationValidationConfigurationException rvce) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_UnknownNamespace.\");\r\n }\r\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.362 -0500\", hash_original_method = \"1F62AD2938072A93E19EAFFCDA555D07\", hash_generated_method = \"E522C6EE17CC779935F0D04DE1F1F350\")\n \npublic NamespaceSupport ()\n {\n reset();\n }", "protected boolean compareNamespace(final XNode y, final ArrayReporter rep) {\n\t\tString ux = getNSUri();\n\t\tString uy = y.getNSUri();\n\t\tif (ux == null) {\n\t\t\tif (uy == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (ux.equals(uy)) {\n\t\t\treturn true;\n\t\t}\n\t\t//Namespace differs: &{0} and &{1}\n\t\trep.error(XDEF.XDEF288, getXDPosition(), y.getXDPosition());\n\t\treturn false;\n\t}", "public void testSetNamespacePrefix() throws RepositoryException{\n String prefix = \"prefix\";\n String uri =\"uri\";\n session.setNamespacePrefix(prefix, uri);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.setNamespacePrefix(prefix, uri);\n }", "public void setXmlns(String xmlns)\r\n\t{\r\n\t\tthis.xmlns = xmlns;\r\n\t}", "private boolean hasExtension(String namespace, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelExtensionsElement(), \"namespace\", namespace);\n\t}", "private void expectName(String namespace, String name)\n\t\t\tthrows XmpUnexpectedElementQualifiedNameException {\n\t\tif (!reader.get().getNamespaceURI().equals(namespace)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ namespace + \"' and found '\"\n\t\t\t\t\t+ reader.get().getNamespaceURI() + \"'\");\n\t\t}\n\t\tif (!reader.get().getLocalName().equals(name)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ name + \"' and found '\" + reader.get().getLocalName()\n\t\t\t\t\t+ \"'\");\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(\"namespace = \" + namespace);\n }", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "abstract XML addNamespace(Namespace ns);", "public void setNamespace(final String namespaceValue) {\n this.namespace = namespaceValue;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "protected static boolean isNamespaceAware(org.w3c.dom.Node node) {\n boolean ret=(node.getLocalName() != null);\n \n if (LOG.isLoggable(Level.FINEST)) {\n LOG.finest(\"Is node \"+node+\" namespace aware? \"+ret);\n LOG.finest(\"nodeName=\"+node.getNodeName());\n LOG.finest(\"localName=\"+node.getLocalName());\n LOG.finest(\"namespace=\"+node.getNamespaceURI());\n } \n \n return (ret);\n }", "@Test\n\tpublic void test_TCM__String_getQualifiedName() {\n final String prefix = \"prefx\";\n final String uri = \"http://some.other.place\";\n\n final Namespace namespace = Namespace.getNamespace(prefix, uri);\n\n final String attributeName = \"test\";\n final String attributeQName = prefix + ':' + attributeName;\n final String attributeValue = \"value\";\n\n final Attribute qulifiedAttribute = new Attribute(attributeName, attributeValue, namespace);\n assertEquals(\"incorrect qualified name\", qulifiedAttribute.getQualifiedName(), attributeQName);\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n assertEquals(\"incorrect qualified name\", attribute.getQualifiedName(), attributeName);\n\n\t}", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@BeforeClass\n public static void externalSchemaCheck() {\n assumeTrue(\"can access \" + NameSpace.DC.xsd, canConnect(NameSpace.DC.xsd));\n }", "@Test\n public void shouldInitializeFromPersistedContent() {\n namespaceRegistry.register(validPrefix1, validNamespaceUri1);\n namespaceRegistry.register(validPrefix2, validNamespaceUri2);\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n // Now set up the graph-based namespace registry ...\n GraphNamespaceRegistry registry2 = new GraphNamespaceRegistry(graph, pathToParentOfNamespaceNodes, uriPropertyName,\n additionalNamespaceProperties);\n // All namespaces should match ...\n Set<NamespaceRegistry.Namespace> all = namespaceRegistry.getNamespaces();\n Set<NamespaceRegistry.Namespace> all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n registry2.refresh();\n all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n }", "public String getTargetNamespace()\r\n {\r\n return targetNamespace;\r\n }" ]
[ "0.6993016", "0.688581", "0.67861503", "0.6746833", "0.6627405", "0.6627405", "0.6455587", "0.6414395", "0.6393416", "0.6349667", "0.62928563", "0.62866765", "0.6245286", "0.6231751", "0.62009007", "0.6150111", "0.6130819", "0.6126321", "0.6126321", "0.6126321", "0.6090523", "0.6077984", "0.6063936", "0.6041884", "0.60153145", "0.5992205", "0.59686756", "0.59628606", "0.59322995", "0.59308267", "0.5918374", "0.590845", "0.59074134", "0.5873534", "0.5857147", "0.5843202", "0.5814567", "0.58137727", "0.5799522", "0.5795164", "0.57769674", "0.577674", "0.57698965", "0.5764616", "0.57478666", "0.5747722", "0.5740817", "0.5727339", "0.56988436", "0.5681879", "0.56669235", "0.56618047", "0.56471306", "0.563229", "0.5617266", "0.55962396", "0.55917233", "0.55917233", "0.55917233", "0.5588478", "0.5586481", "0.5576537", "0.55501986", "0.5542011", "0.55409825", "0.5523567", "0.55087763", "0.5506672", "0.5503721", "0.55006534", "0.549637", "0.54763764", "0.5468605", "0.54656535", "0.5454136", "0.5428768", "0.5426498", "0.5420663", "0.5395233", "0.53942215", "0.5358733", "0.5352789", "0.5345346", "0.53398514", "0.53372836", "0.5324656", "0.5322933", "0.5313064", "0.53049266", "0.5299023", "0.5296107", "0.5288305", "0.5276734", "0.5275732", "0.5269305", "0.5217417", "0.51788265", "0.51619726", "0.51596355", "0.5148256", "0.51318115" ]
0.0
-1
Build call for eventSourceServiceWatchEventSources
public okhttp3.Call eventSourceServiceWatchEventSourcesCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/stream/event-sources/{namespace}" .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); if (listOptionsLabelSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.labelSelector", listOptionsLabelSelector)); } if (listOptionsFieldSelector != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.fieldSelector", listOptionsFieldSelector)); } if (listOptionsWatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.watch", listOptionsWatch)); } if (listOptionsAllowWatchBookmarks != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.allowWatchBookmarks", listOptionsAllowWatchBookmarks)); } if (listOptionsResourceVersion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.resourceVersion", listOptionsResourceVersion)); } if (listOptionsResourceVersionMatch != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.resourceVersionMatch", listOptionsResourceVersionMatch)); } if (listOptionsTimeoutSeconds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.timeoutSeconds", listOptionsTimeoutSeconds)); } if (listOptionsLimit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.limit", listOptionsLimit)); } if (listOptionsContinue != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("listOptions.continue", listOptionsContinue)); } Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EventChannelSource source();", "public void buildStarted(BuildEvent event) {\n }", "private EventProcessorBuilder baseConfig(MockEventSender es) {\n return sendEvents().eventSender(senderFactory(es));\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceWatchEventSourcesValidateBeforeCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceWatchEventSources(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceWatchEventSourcesCall(namespace, listOptionsLabelSelector, listOptionsFieldSelector, listOptionsWatch, listOptionsAllowWatchBookmarks, listOptionsResourceVersion, listOptionsResourceVersionMatch, listOptionsTimeoutSeconds, listOptionsLimit, listOptionsContinue, _callback);\n return localVarCall;\n\n }", "WithCreate withSource(EventChannelSource source);", "public void targetStarted(BuildEvent event) {\n }", "SourceBuilder createService();", "public ListEventSourcesResult listEventSources(ListEventSourcesRequest listEventSourcesRequest) {\n ExecutionContext executionContext = createExecutionContext(listEventSourcesRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<ListEventSourcesRequest> request = null;\n Response<ListEventSourcesResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new ListEventSourcesRequestMarshaller().marshall(super.beforeMarshalling(listEventSourcesRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<ListEventSourcesResult, JsonUnmarshallerContext> unmarshaller =\n new ListEventSourcesResultJsonUnmarshaller();\n JsonResponseHandler<ListEventSourcesResult> responseHandler =\n new JsonResponseHandler<ListEventSourcesResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "Update withSource(EventChannelSource source);", "@Override\n public void onApplicationEvent(final ApplicationReadyEvent event) {\n if (environment.equalsIgnoreCase(\"PROD\")) {\n logger.info(\"Application event start up\");\n\n List<UpdateFile> clientFileList = getClientFileList();\n ResponseEntity<UpdateFilesRQ> updateFileResponse = fileUpdaterRequestSender.getServerFileList();\n\n rSyncFileUpdaterProvider\n .setRemoteMainFolder(Objects.requireNonNull(updateFileResponse.getBody()).getMainFolder())\n .processComparing(updateFileResponse.getBody().getUpdateFile(), clientFileList);\n\n fileSystemWatcher.start();\n logger.info(\"Started fileSystemWatcher service\");\n\n filePoolerServerListener.initiateSynchronizeTime();\n filePoolerServerListener.triggerPoolerService();\n logger.info(\"Triggered filePoolerServerListener service\");\n }\n }", "private void createEvents() {\n\t}", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "public static SourceBuilder builder() {\n return new SourceBuilder() {\n @Override\n public EventSource build(Context ctx,String... argv) {\n if (argv.length == 1) {\n return new HelloWorldSource(argv[0]);\n } else{\n return new HelloWorldSource();\n } \n }\n };\n }", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }", "public void taskStarted(BuildEvent event) {\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceEventSourcesLogsValidateBeforeCall(String namespace, String name, String eventSourceType, String eventName, String grep, String podLogOptionsContainer, Boolean podLogOptionsFollow, Boolean podLogOptionsPrevious, String podLogOptionsSinceSeconds, String podLogOptionsSinceTimeSeconds, Integer podLogOptionsSinceTimeNanos, Boolean podLogOptionsTimestamps, String podLogOptionsTailLines, String podLogOptionsLimitBytes, Boolean podLogOptionsInsecureSkipTLSVerifyBackend, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceEventSourcesLogs(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceEventSourcesLogsCall(namespace, name, eventSourceType, eventName, grep, podLogOptionsContainer, podLogOptionsFollow, podLogOptionsPrevious, podLogOptionsSinceSeconds, podLogOptionsSinceTimeSeconds, podLogOptionsSinceTimeNanos, podLogOptionsTimestamps, podLogOptionsTailLines, podLogOptionsLimitBytes, podLogOptionsInsecureSkipTLSVerifyBackend, _callback);\n return localVarCall;\n\n }", "@Override\n public Iterable<ConfigSource> getConfigSources(final ConfigSourceContext context,\n final KubernetesClientBuildConfig config) {\n boolean trustAll = getImplicitConverter(Boolean.class)\n .convert(context.getValue(\"quarkus.tls.trust-all\").getValue());\n TlsConfig tlsConfig = new TlsConfig();\n tlsConfig.trustAll = trustAll;\n KubernetesClient client = KubernetesClientUtils.createClient(config, tlsConfig);\n return new KubernetesConfigSourceFactory(client).getConfigSources(context);\n }", "@SuppressWarnings(\"rawtypes\")\n private okhttp3.Call eventSourceServiceListEventSourcesValidateBeforeCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n if (namespace == null) {\n throw new ApiException(\"Missing the required parameter 'namespace' when calling eventSourceServiceListEventSources(Async)\");\n }\n \n\n okhttp3.Call localVarCall = eventSourceServiceListEventSourcesCall(namespace, listOptionsLabelSelector, listOptionsFieldSelector, listOptionsWatch, listOptionsAllowWatchBookmarks, listOptionsResourceVersion, listOptionsResourceVersionMatch, listOptionsTimeoutSeconds, listOptionsLimit, listOptionsContinue, _callback);\n return localVarCall;\n\n }", "ConferenceScheduleBuilderService createEventsFromStartToLunch();", "public void buildStarted(BuildEvent event) {\n startTime = System.currentTimeMillis();\n }", "public ContactStatusEvent(Object source)\n {\n super(source);\n }", "public CreateLivePullStreamTaskRequest(CreateLivePullStreamTaskRequest source) {\n if (source.SourceType != null) {\n this.SourceType = new String(source.SourceType);\n }\n if (source.SourceUrls != null) {\n this.SourceUrls = new String[source.SourceUrls.length];\n for (int i = 0; i < source.SourceUrls.length; i++) {\n this.SourceUrls[i] = new String(source.SourceUrls[i]);\n }\n }\n if (source.DomainName != null) {\n this.DomainName = new String(source.DomainName);\n }\n if (source.AppName != null) {\n this.AppName = new String(source.AppName);\n }\n if (source.StreamName != null) {\n this.StreamName = new String(source.StreamName);\n }\n if (source.StartTime != null) {\n this.StartTime = new String(source.StartTime);\n }\n if (source.EndTime != null) {\n this.EndTime = new String(source.EndTime);\n }\n if (source.Operator != null) {\n this.Operator = new String(source.Operator);\n }\n if (source.PushArgs != null) {\n this.PushArgs = new String(source.PushArgs);\n }\n if (source.CallbackEvents != null) {\n this.CallbackEvents = new String[source.CallbackEvents.length];\n for (int i = 0; i < source.CallbackEvents.length; i++) {\n this.CallbackEvents[i] = new String(source.CallbackEvents[i]);\n }\n }\n if (source.VodLoopTimes != null) {\n this.VodLoopTimes = new String(source.VodLoopTimes);\n }\n if (source.VodRefreshType != null) {\n this.VodRefreshType = new String(source.VodRefreshType);\n }\n if (source.CallbackUrl != null) {\n this.CallbackUrl = new String(source.CallbackUrl);\n }\n if (source.ExtraCmd != null) {\n this.ExtraCmd = new String(source.ExtraCmd);\n }\n if (source.Comment != null) {\n this.Comment = new String(source.Comment);\n }\n if (source.ToUrl != null) {\n this.ToUrl = new String(source.ToUrl);\n }\n if (source.BackupSourceType != null) {\n this.BackupSourceType = new String(source.BackupSourceType);\n }\n if (source.BackupSourceUrl != null) {\n this.BackupSourceUrl = new String(source.BackupSourceUrl);\n }\n if (source.WatermarkList != null) {\n this.WatermarkList = new PullPushWatermarkInfo[source.WatermarkList.length];\n for (int i = 0; i < source.WatermarkList.length; i++) {\n this.WatermarkList[i] = new PullPushWatermarkInfo(source.WatermarkList[i]);\n }\n }\n if (source.VodLocalMode != null) {\n this.VodLocalMode = new Long(source.VodLocalMode);\n }\n if (source.RecordTemplateId != null) {\n this.RecordTemplateId = new String(source.RecordTemplateId);\n }\n }", "EventUses createEventUses();", "private void notifyListeners() \n\t{\n\t\tSystem.out.println(\"Event Source: Notifying all listeners\");\n\n\t\tfor(IListener listener : listeners)\n\t\t{\n\t\t\tlistener.eventOccured(new Event(this));//passing and object of source\n\t\t}\n\n\t}", "private void triggerDiscoveryAndScheduleEventService(UUID serviceUuid) {\n triggerDiscovery(serviceUuid);\n subscribeAndScheduleEventService(serviceUuid);\n }", "@Override\n public Collection<CoreEventInfo> getEvents(final Collection<BwCalendar> calendars,\n final FilterBase filter,\n final BwDateTime startDate, final BwDateTime endDate,\n final List<String> retrieveList,\n RecurringRetrievalMode recurRetrieval,\n final boolean freeBusy) throws CalFacadeException {\n recurRetrieval = defaultRecurringRetrieval(recurRetrieval,\n startDate, endDate);\n\n if (debug) {\n trace(\"getEvents for start=\" + startDate + \" end=\" + endDate);\n }\n\n Collection<String> colPaths = null;\n\n if (calendars != null) {\n colPaths = new ArrayList<String>();\n for (BwCalendar c: calendars) {\n colPaths.add(c.getPath());\n\n if (debug) {\n trace(\" calendar:\" + c.getPath());\n }\n }\n }\n\n FieldnamesList retrieveListFields = null;\n\n if (retrieveList != null) {\n // Convert property names to field names\n retrieveListFields = new FieldnamesList(retrieveList.size() +\n FieldNamesMap.reqFlds.size());\n\n for (String pname: retrieveList) {\n FieldNamesEntry fent = FieldNamesMap.getEntry(pname);\n\n if ((fent == null) || (fent.getMulti())) {\n // At this stage it seems better to be inefficient\n retrieveListFields = null;\n break;\n }\n\n retrieveListFields.add(fent);\n }\n\n if (retrieveListFields != null) {\n retrieveListFields.addAll(FieldNamesMap.reqFlds);\n }\n }\n\n /* eventsQuery covers some of what is outlined here.\n *\n * 1. Get events and annotations in range and satisfying the filter.\n * If there is a date range exclude the recurring master events as they\n * turn up later attached to the instances.\n *\n * If there is no date range we will not expand recurrences so we need\n * to send master events and overrrides.\n *\n * We also exclude overrides to recurring instances.\n *\n * If no date range was supplied we now have all the master events.\n * Otherwise we have all the non-recurring events\n * (XXX or recurring reference by an annotation???)\n *\n * 2. If there is a date range supplied, get all instances in date range and\n * add their masters to the set.\n *\n * 3. If there is a date range supplied, get all overrides in date range and\n * add their masters to the set.\n *\n * 4. For each event\n * 4a. if not recurring add to result\n * 4b. if recurring {\n * if expanding\n * find all instances (in range) and add to result set\n * else {\n * find all overrides (in override range if supplied)\n * find all instances (IF instance range)\n * attach them to the master\n * add master to set.\n * }\n * }\n *\n * Some points to remind ourselves. We have to fetch overides and instances\n * because the master may be out of the range of a date limited query - usually\n * is, but we need the master to construct a proxy.\n *\n * We could probably just use the overrides and instances obtained in\n * steps 2 and 3 except for the CalDAV complications which allow a different\n * date range for overrides and instances.\n */\n\n int desiredAccess = privRead;\n if (freeBusy) {\n // DORECUR - freebusy events must have enough info for expansion\n desiredAccess = privReadFreeBusy;\n }\n\n EventsQueryResult eqr = new EventsQueryResult();\n eqr.flt = new Filters(filter);\n eqr.colPaths = colPaths;\n\n eventsQuery(eqr, startDate, endDate,\n retrieveListFields,\n freeBusy,\n null, // master\n null, // masters\n null, // uids\n getEvents);\n\n Collection<CoreEventInfo> ceis = postGetEvents(eqr.es, desiredAccess,\n returnResultAlways,\n null);\n\n /* Now get the annotations - these are not overrides */\n eventsQuery(eqr, startDate, endDate,\n retrieveListFields,\n freeBusy,\n null, // master\n null, // masters\n null, // uids\n getAnnotations);\n\n if (!eqr.es.isEmpty()) {\n ceis.addAll(postGetEvents(eqr.es, desiredAccess, returnResultAlways,\n eqr.flt));\n }\n\n ceis = getRecurrences(eqr, ceis,\n startDate, endDate,\n retrieveListFields, recurRetrieval, desiredAccess,\n freeBusy);\n\n return buildVavail(ceis);\n }", "public ListEventSourcesResult listEventSources() throws AmazonServiceException, AmazonClientException {\n return listEventSources(new ListEventSourcesRequest());\n }", "@Override\n public void testCreateRequestListAllFilteredBySourceSystem(){\n }", "@Override\n public void customEventOccurred(CustomEvent event)\n {\n Source source = (Source)event.getSource();\n Cloner cloner = new Cloner();\n final Source clonedSource = cloner.deepClone(source);\n \n // Create wrapper for source clone:\n final TagsSource sourceLogic = new TagsSource(clonedSource);\n \n // Create and render progress information dialog:\n sourceLogic.off(SourceEvent.THREAD_PROGRESS);\n final ProgressInformationDialog progressInformationDialog =\n new ProgressInformationDialog(sourceLogic, SourceEvent.THREAD_PROGRESS);\n progressInformationDialog.render(\"Progress information\", Main.mainForm);\n \n sourceLogic.off(SourceEvent.THREAD_ERROR);\n sourceLogic.on(SourceEvent.THREAD_ERROR, new ThreadErrorEventHandler());\n \n // Subscribe on model's source initialization event:\n sourceLogic.off(SourceEvent.SOURCE_INITIALIZED);\n sourceLogic.on(SourceEvent.SOURCE_INITIALIZED, new CustomEventListener()\n {\n @Override\n public void customEventOccurred(CustomEvent evt)\n {\n progressInformationDialog.close();\n \n if (clonedSource.getTypeId() == SourcesTypes.INTOOLS_EXPORT_DOCUMENT.ID)\n DialogsFactory.produceIntoolsExportDataSourceDialog(sourceLogic, true, \"Edit selected Intools export data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.ALARM_AND_TRIP_SCHEDULE.ID)\n DialogsFactory.produceDocumentDataSourceDialog(sourceLogic, true, \"Edit selected document data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.DCS_VARIABLE_TABLE.ID)\n DialogsFactory.produceDcsVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected DCS Variable Table data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.ESD_VARIABLE_TABLE.ID)\n DialogsFactory.produceEsdVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected ESD Variable Table data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.FGS_VARIABLE_TABLE.ID)\n DialogsFactory.produceFgsVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected FGS Variable Table data source\");\n }// customEventOccurred\n });// on\n \n // Execute initialization thread:\n sourceLogic.initialize();\n }", "private void setupTasks(@Nonnull Project project, @Nonnull SourceSet sourceSet) {\n final MetadataEventsGeneratorPluginExtension extension =\n MetadataEventsGeneratorPluginExtension.create(project, getExtensionName(sourceSet));\n\n // By default, look for models in src/<sourceset>/pegasus (same as pegasus plugin).\n String inputPath = \"src\" + File.separatorChar + sourceSet.getName() + File.separatorChar + \"pegasus\";\n extension.getInputModels().setFrom(inputPath);\n\n // Use the same configuration as pegasus. Need to also include input models on the resolver path.\n extension.getResolverPaths().setFrom(getDataModelConfig(project, sourceSet), inputPath);\n\n final GenerateMetadataEventsTask generateMetadataEventsTask = project.getTasks()\n .create(sourceSet.getTaskName(\"generate\", \"metadataEventsSchema\"), GenerateMetadataEventsTask.class, task -> {\n task.getInputModelPaths().setFrom(extension.getInputModels());\n task.getResolverPath().setFrom(extension.getResolverPaths());\n task.getOutputDirectory().setFrom(extension.getOutputDir());\n task.getEntitiesAnnotationAllowList().set(extension.getEntitiesAnnotationAllowList());\n });\n\n final Path baseOutputPath = project.getRootProject()\n .getBuildDir()\n .toPath()\n .resolve(project.getName())\n .resolve(generateMetadataEventsTask.getName());\n extension.getOutputDir().setFrom(baseOutputPath.toFile());\n extension.getOutputDir().builtBy(generateMetadataEventsTask);\n\n // null if data template generation is not enabled.\n final GenerateDataTemplateTask dataTemplateTask =\n (GenerateDataTemplateTask) project.getTasks().findByName(sourceSet.getTaskName(\"generate\", \"dataTemplate\"));\n\n // Make a separate GenerateDataTemplateTask because the pegasus plugin does not easily allow for customization\n // (adding a second input directory - our generated events). This new task will actually override some of the common\n // models involve with the original task. We have to output to the same directory so the jar task finds them.\n // Do not generate avro for these events. Currently, we need to generate 1.4 and 1.7 internally, so we'll do that\n // in a different module / library than from where the models are defined.\n if (dataTemplateTask != null) {\n final Task eventsDataTemplate = project.getTasks()\n .create(sourceSet.getTaskName(\"generate\", \"metadataEventDataTemplate\"), GenerateDataTemplateTask.class,\n task -> {\n task.dependsOn(generateMetadataEventsTask);\n task.setInputDir(baseOutputPath.toFile());\n task.setDestinationDir(dataTemplateTask.getDestinationDir());\n task.setCodegenClasspath(dataTemplateTask.getCodegenClasspath());\n task.setResolverPath(\n project.files(baseOutputPath, extension.getInputModels(), extension.getResolverPaths()));\n dataTemplateTask.finalizedBy(task);\n });\n\n // make sure that java source files have been generated before compiling them\n final JavaPluginConvention javaPluginConvention = project.getConvention().getPlugin(JavaPluginConvention.class);\n final SourceSet targetSourceSet =\n javaPluginConvention.getSourceSets().getByName(sourceSet.getName() + \"GeneratedDataTemplate\");\n final Task compileTask = project.getTasks().getByName(targetSourceSet.getCompileJavaTaskName());\n compileTask.dependsOn(eventsDataTemplate);\n\n // Include PDL files in the data template jar, as other PDL files are also included.\n final Jar dataTemplateJarTask = (Jar) project.getTasks().findByPath(sourceSet.getName() + \"DataTemplateJar\");\n dataTemplateJarTask.dependsOn(eventsDataTemplate);\n dataTemplateJarTask.from(generateMetadataEventsTask.getOutputDirectory(), copySpec -> {\n copySpec.eachFile(fileCopyDetails -> {\n fileCopyDetails.setPath(\"pegasus\" + File.separator + fileCopyDetails.getPath());\n });\n });\n }\n }", "ConferenceScheduleBuilderService startEvent();", "public void receiveResultGetProjectSources(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetProjectSourcesResponse result) {\r\n\t}", "BasicEvents createBasicEvents();", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "ConferenceScheduleBuilderService createEventsFromNetworkToEnd();", "public static List<Pair<String, SourceBuilder>> getSourceBuilders() {\n List<Pair<String, SourceBuilder>> builders =\n new ArrayList<Pair<String, SourceBuilder>>();\n builders.add(new Pair<String, SourceBuilder>(\"helloWorldSource\", builder()));\n return builders;\n }", "public final void event(final JSONObject builddata) {\n logger.fine(\"Sending event\");\n\n // Gather data\n JSONObject payload = new JSONObject();\n String hostname = nullSafeGetString(builddata, \"hostname\");\n String number = nullSafeGetString(builddata, \"number\");\n String buildurl = nullSafeGetString(builddata, \"buildurl\");\n String job = nullSafeGetString(builddata, \"job\");\n long timestamp = builddata.getLong(\"timestamp\");\n String message = \"\";\n\n // Setting source_type_name here, to allow modification based on type of event\n payload.put(\"source_type_name\", \"jenkins\");\n\n // Build title\n StringBuilder title = new StringBuilder();\n title.append(job).append(\" build #\").append(number);\n if ( \"SUCCESS\".equals( builddata.get(\"result\") ) ) {\n title.append(\" succeeded\");\n payload.put(\"alert_type\", \"success\");\n message = \"%%% \\n [See results for build #\" + number + \"](\" + buildurl + \") \";\n } else if ( builddata.get(\"result\") != null ) {\n title.append(\" failed\");\n payload.put(\"alert_type\", \"failure\");\n message = \"%%% \\n [See results for build #\" + number + \"](\" + buildurl + \") \";\n } else {\n title.append(\" started\");\n payload.put(\"alert_type\", \"info\");\n message = \"%%% \\n [Follow build #\" + number + \" progress](\" + buildurl + \") \";\n // Remove source_type_name to keep started events from being rolled up\n payload.remove(\"source_type_name\");\n }\n title.append(\" on \").append(hostname);\n\n // Add duration\n if ( builddata.get(\"duration\") != null ) {\n message = message + durationToString(builddata.getDouble(\"duration\"));\n }\n\n // Close markdown\n message = message + \" \\n %%%\";\n\n // Build payload\n payload.put(\"title\", title.toString());\n payload.put(\"text\", message);\n payload.put(\"date_happened\", timestamp);\n payload.put(\"event_type\", builddata.get(\"event_type\"));\n payload.put(\"host\", hostname);\n payload.put(\"result\", builddata.get(\"result\"));\n payload.put(\"tags\", assembleTags(builddata));\n payload.put(\"aggregation_key\", job); // Used for job name in event rollups\n\n post(payload, this.EVENT);\n }", "EventHubs eventHubs();", "public ApplicationEvent(Object source) {\n super(source);\n this.timestamp = System.currentTimeMillis();\n }", "void addChangeListener(Consumer<ConfigurationSourceChangeEvent> changeListener);", "@Override\n protected void initializeEventList()\n {\n }", "public Observable getEvents(){\n QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();\n requestBuilder.sortDesc(\"startDate\");\n return makeObservable(requestBuilder);\n }", "@Inject\n public EventService(BackgroundTaskRunnerService taskRunner) {\n this.taskRunner = taskRunner;\n final ConcurrentMap<EventType, List<EventListener<? extends Event>>> tmp = new ConcurrentHashMap<>();\n for (EventType eventType : EventType.values()) {\n tmp.put(eventType, new CopyOnWriteArrayList<>());\n }\n this.eventListeners = tmp;\n }", "public List<Events> getAllSystemEventsListForAll();", "@Override\r\n protected Map<String, Object> executeImpl(SiteInfo singleSite, String eventName,\r\n WebScriptRequest req, JSONObject json, Status status, Cache cache) \r\n {\n Date fromDate = parseDate(req.getParameter(\"from\"));\r\n Date toDate = parseDate(req.getParameter(\"to\"));\r\n \r\n // What should we do about repeating events? First or all?\r\n boolean repeatingFirstOnly = true;\r\n String repeatingEvents = req.getParameter(\"repeating\");\r\n if (repeatingEvents != null)\r\n {\r\n if (\"first\".equals(repeatingEvents))\r\n {\r\n repeatingFirstOnly = true;\r\n }\r\n else if (\"all\".equals(repeatingEvents))\r\n {\r\n repeatingFirstOnly = false;\r\n }\r\n }\r\n else\r\n {\r\n // Fall back to the icky old way of guessing it from \r\n // the format of the from date, which differs between uses!\r\n if (fromDate != null)\r\n {\r\n String fromDateS = req.getParameter(\"from\");\r\n if (fromDateS.indexOf('-') != -1)\r\n {\r\n // Apparently this is the site calendar dashlet...\r\n repeatingFirstOnly = true;\r\n }\r\n if (fromDateS.indexOf('/') != -1)\r\n {\r\n // This is something else, wants all events in range\r\n repeatingFirstOnly = false;\r\n }\r\n }\r\n }\r\n \r\n // One site, or all the user's ones?\r\n List<SiteInfo> sites = new ArrayList<SiteInfo>();\r\n if (singleSite != null)\r\n {\r\n // Just one\r\n sites.add(singleSite);\r\n }\r\n else\r\n {\r\n // All their sites (with optional limit)\r\n int max = 0;\r\n String strMax = req.getParameter(\"size\");\r\n if (strMax != null && strMax.length() != 0)\r\n {\r\n max = Integer.parseInt(strMax);\r\n }\r\n sites = siteService.listSites(AuthenticationUtil.getRunAsUser(), max);\r\n }\r\n \r\n // We need to know the Site Names, and the NodeRefs of the calendar containers\r\n String[] siteShortNames = new String[sites.size()];\r\n Map<NodeRef, SiteInfo> containerLookup = new HashMap<NodeRef, SiteInfo>();\r\n for (int i=0; i<sites.size(); i++)\r\n {\r\n SiteInfo site = sites.get(i);\r\n siteShortNames[i] = site.getShortName();\r\n \r\n try\r\n {\r\n containerLookup.put(\r\n siteService.getContainer(site.getShortName(), CalendarServiceImpl.CALENDAR_COMPONENT), \r\n site);\r\n }\r\n catch (AccessDeniedException e)\r\n {\r\n // You can see the site, but not the calendar, so skip it\r\n // This means you won't have any events in it anyway\r\n }\r\n }\r\n \r\n \r\n // Get the entries for the list\r\n PagingRequest paging = buildPagingRequest(req);\r\n PagingResults<CalendarEntry> entries = \r\n calendarService.listCalendarEntries(siteShortNames, fromDate, toDate, paging);\r\n\r\n boolean resortNeeded = false;\r\n List<Map<String, Object>> results = new ArrayList<Map<String,Object>>();\r\n for (CalendarEntry entry : entries.getPage())\r\n {\r\n // Build the object\r\n Map<String, Object> result = new HashMap<String, Object>();\r\n result.put(RESULT_NAME, entry.getSystemName());\r\n result.put(RESULT_TITLE, entry.getTitle());\r\n result.put(\"description\", entry.getDescription());\r\n result.put(\"where\", entry.getLocation());\r\n result.put(RESULT_START, entry.getStart());\r\n result.put(RESULT_END, entry.getEnd());\r\n result.put(\"duration\", buildDuration(entry));\r\n result.put(\"tags\", entry.getTags());\r\n result.put(\"isoutlook\", entry.isOutlook());\r\n result.put(\"allday\", CalendarEntryDTO.isAllDay(entry));\r\n \r\n // Identify the site\r\n SiteInfo site = containerLookup.get(entry.getContainerNodeRef());\r\n result.put(\"site\", site);\r\n result.put(\"siteName\", site.getShortName());\r\n result.put(\"siteTitle\", site.getTitle());\r\n \r\n // Replace nulls with blank strings for the JSON\r\n for (String key : result.keySet())\r\n {\r\n if (result.get(key) == null)\r\n {\r\n result.put(key, \"\");\r\n }\r\n }\r\n \r\n // Save this one\r\n results.add(result);\r\n \r\n // Handle recurring as needed\r\n boolean orderChanged = handleRecurring(entry, result, results, fromDate, repeatingFirstOnly);\r\n if (orderChanged)\r\n {\r\n resortNeeded = true;\r\n }\r\n }\r\n \r\n // If the recurring events meant dates changed, re-sort\r\n if (resortNeeded)\r\n {\r\n Collections.sort(results, new Comparator<Map<String, Object>>() \r\n {\r\n public int compare(Map<String, Object> resultA,\r\n Map<String, Object> resultB) \r\n {\r\n Date startA = (Date)resultA.get(RESULT_START);\r\n Date startB = (Date)resultB.get(RESULT_START);\r\n \r\n int cmp = startA.compareTo(startB);\r\n if (cmp == 0)\r\n {\r\n Date endA = (Date)resultA.get(RESULT_END);\r\n Date endB = (Date)resultB.get(RESULT_END);\r\n cmp = endA.compareTo(endB);\r\n if (cmp == 0)\r\n {\r\n String nameA = (String)resultA.get(RESULT_NAME);\r\n String nameB = (String)resultB.get(RESULT_NAME);\r\n return nameA.compareTo(nameB);\r\n }\r\n return cmp;\r\n }\r\n return cmp;\r\n }\r\n });\r\n }\r\n \r\n // All done\r\n Map<String, Object> model = new HashMap<String, Object>();\r\n model.put(\"events\", results);\r\n return model;\r\n }", "protected void AddEvents()\r\n {\r\n INotifyPropertyChanged propParent = (INotifyPropertyChanged)getProxyParent();\r\n propParent.getPropertyChanged().addObservers(filterPropertyChanges);\r\n }", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }", "@Override\n public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException {\n\n // EnvVars gets Jenkins Build Vars\n final EnvVars env = run.getEnvironment(listener);\n\n // Get Global Plugin Config settings from Descriptor\n\n String deployNameEnv = env.expand(deploymentName);\n String overOpsURL = getDescriptor().getOverOpsURL();\n String overOpsSID = getDescriptor().getOverOpsSID();\n String overOpsUser = getDescriptor().getOverOpsUser();\n String overOpsPWD = Secret.toString(getDescriptor().getOverOpsPWD());\n String overOpsAPIKey = Secret.toString(getDescriptor().getOverOpsAPIKey());\n\n // if url is api.overops.com then replace with app.overops.com; otherwise leave alone\n String eventURL = API_PATTERN.matcher(overOpsURL).replaceAll(\"app.overops.com\");\n\n // Time Formatter for OverOps REST API\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd'T'HH:mm\").withZone(ZoneId.of(\"UTC\"));\n\n // Get Dates for OverOps REST API Calls\n\n Calendar now = Calendar.getInstance();\n now.setTime(new Date());\n now.add(Calendar.MINUTE, 10); // adds 10 minutes just in case time settings are off a little\n String toStamp = formatter.format(now.getTime().toInstant());\n\n Calendar before = Calendar.getInstance();\n before.setTime(new Date());\n before.add(Calendar.HOUR_OF_DAY, -queryLookback);\n String fromStamp = formatter.format(before.getTime().toInstant());\n\n Client apiClient = ClientBuilder.newClient();\n\n\n String usernameAndPassword = overOpsUser + ':' + overOpsPWD;\n String authorizationHeaderValue;\n String keyName;\n String viewId = null;\n int x = 1;\n\n if (overOpsAPIKey == null || overOpsAPIKey.isEmpty()) {\n keyName = \"Authorization\";\n authorizationHeaderValue = \"Basic \" + getEncoder().encodeToString(usernameAndPassword.getBytes(StandardCharsets.UTF_8));\n } else {\n keyName = \"X-API-Key\";\n authorizationHeaderValue = overOpsAPIKey;\n }\n\n // Get View ID for All Events\n\n try {\n\n Response getViewResponse = apiClient\n .target(overOpsURL)\n .path(\"api/v1/services/\" + overOpsSID + \"/views\")\n .request(MediaType.APPLICATION_JSON)\n .header(keyName, authorizationHeaderValue).get();\n\n if (getViewResponse.getStatus() == 200) {\n JSONObject getViewResult = getViewResponse.readEntity(JSONObject.class);\n JSONArray views = getViewResult.getJSONArray(\"views\");\n\n for (int i = 0; i < views.size(); i++) {\n if (views.getJSONObject(i).get(\"name\").equals(\"All Events\")) {\n viewId = views.getJSONObject(i).getString(\"id\");\n }\n }\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n listener.getLogger().println(\"Checking OverOps for errors in deployment \" + deployNameEnv);\n\n // Query OverOps for events matching app and deployment\n\n List<OOReportEvent> eventsList = new ArrayList<>();\n List<OOReportEvent> newEventsList = new ArrayList<>();\n\n while (x <= retryCount) {\n eventsList.clear();\n newEventsList.clear();\n listener.getLogger().println(\"\\nOverOps Query #\" + x + \" from OverOps Jenkins Plugin\");\n listener.getLogger().println(\"Waiting \" + retryInt + \" seconds.\");\n TimeUnit.SECONDS.sleep(retryInt);\n\n try {\n\n Response response = apiClient.target(overOpsURL)\n .path(\"api/v1/services/\" + overOpsSID + \"/views/\" + viewId + \"/events\")\n .queryParam(\"from\", fromStamp)\n .queryParam(\"to\", toStamp)\n .queryParam(\"deployment\", deployNameEnv)\n .queryParam(\"app\", applicationName)\n .request(MediaType.APPLICATION_JSON)\n .header(keyName, authorizationHeaderValue).get();\n\n if (showResults) {\n listener.getLogger().println(\"API Call: \" + response.toString() + '\\n');\n }\n\n if (response.getStatus() == 200) {\n\n JSONObject result = response.readEntity(JSONObject.class);\n JSONArray events = result.getJSONArray(\"events\");\n\n if (showResults) {\n listener.getLogger().println(events.size() + \" Events\");\n listener.getLogger().println(result);\n }\n\n for (int i = 0; i < events.size(); i++) {\n\n String eventId = events.getJSONObject(i).getString(\"id\");\n String tpkString = (overOpsSID + '#' + eventId + \"#1\");\n String tpkLink = getEncoder().encodeToString(tpkString.getBytes(StandardCharsets.UTF_8));\n\n\n eventsList.add(new OOReportEvent(events.getJSONObject(i).get(\"summary\").toString(),\n events.getJSONObject(i).get(\"introduced_by\").toString(),\n eventURL + \"/tale.html?event=\" + tpkLink));\n\n if (deploymentName.equals(events.getJSONObject(i).get(\"introduced_by\"))) {\n newEventsList.add(new OOReportEvent(events.getJSONObject(i).get(\"summary\").toString(),\n events.getJSONObject(i).get(\"introduced_by\").toString(),\n eventURL + \"/tale.html?event=\" + tpkLink));\n }\n\n }\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n // Validate Query results\n listener.getLogger().println(\"\\n\");\n listener.getLogger().println(\"OverOps found \" + eventsList.size() + \" events in \" + applicationName + \" deployment \" + deployNameEnv);\n\n if (eventsList.size() > maxEventCount && maxEventCount != -1) {\n\n listener.getLogger().println(\"Event threshold \" + maxEventCount + \" Exceeded\");\n\n if (markUnstable) {\n listener.getLogger().println(\"OverOps Query results in Unstable build\");\n run.setResult(Result.UNSTABLE);\n }\n\n x = retryCount;\n }\n\n listener.getLogger().println(\"\\n\");\n listener.getLogger().println(\"OverOps found \" + newEventsList.size() + \" new events in \" + applicationName + \" deployment \" + deployNameEnv);\n\n if (newEventsList.size() > maxNewEventCount && maxNewEventCount != -1) {\n\n listener.getLogger().println(\"New Event threshold \" + maxNewEventCount + \" Exceeded\");\n\n if (markUnstable) {\n listener.getLogger().println(\"OverOps Query results in Unstable build\");\n listener.getLogger().println(\"\\n\");\n run.setResult(Result.UNSTABLE);\n }\n\n for (OOReportEvent event : newEventsList) {\n listener.getLogger().println(event.getEventSummary() + \" Introduced by: \" + event.getIntroducedBy() + \" \" + event.getARCLink());\n }\n\n x = retryCount;\n }\n\n listener.getLogger().println(\"New Events Introduced by \" + deployNameEnv + \": \" + newEventsList.size());\n\n x++;\n\n }\n\n\n OverOpsBuildAction buildAction = new OverOpsBuildAction(eventsList, newEventsList, run);\n run.addAction(buildAction);\n\n listener.getLogger().println();\n listener.getLogger().println(\"Total Events found in OverOps for build \" + deployNameEnv + \": \" + eventsList.size());\n listener.getLogger().println(\"New Events Introduced by \" + deployNameEnv + \": \" + newEventsList.size());\n }", "public List<ServiceEvent> genEventQueue(){\n for(int i=0; i<serviceNum; i++){\n genEvent(i);\n }\n Collections.sort(eventQueue, new EventComparator());\n return eventQueue;\n }", "protected void addBuildFunction(S source) {\n Function build =\n FunctionBuilder.of(source, \"build\", Purpose.build())\n .setReturnValue(new DataObject(new ObjectName(\"Widget\"), new PackageName(\"com.dummy\")))\n .addArgument(\n new DataObject(\n new ObjectName(\"BuildContext\"),\n new PackageName(\"com.dummy\"),\n new VariableName(\"context\")))\n .build();\n\n source.addFunction(build);\n }", "@Test\n public void eventFilterTest() {\n // TODO: test eventFilter\n }", "public interface WatchService {\n @DataSource(DataSourceType.WRITE)\n public int addWatchForm(WatchForm watchForm);\n\n @DataSource(DataSourceType.READ)\n public WatchFormDto queryLastWatchFormByName(String name);\n\n @DataSource(DataSourceType.READ)\n public WatchFormDto queryWatchFormByOpenId(String openId);\n\n @DataSource(DataSourceType.READ)\n public List<WatchFormDto> queryLastWatchFormByNameWeek(String name);\n\n\n @DataSource(DataSourceType.READ)\n public List<WatchFormDto> queryLastWatchFormByNameMonth(String name);\n\n @DataSource(DataSourceType.READ)\n public Long queryAvgWatchFormByNameDay(String name,int day);\n\n @DataSource(DataSourceType.READ)\n public WatchZheXian queryLastWatchFormByOpenIdWeek(String openId);\n\n @DataSource(DataSourceType.READ)\n public WatchZheXian queryLastWatchFormByOpenIdMonth(String openId);\n\n @DataSource(DataSourceType.READ)\n public Long queryAvgWatchFormByOpenIdDay(String openId,int day);\n\n @DataSource(DataSourceType.READ)\n public WatchAllChildren queryOneTeacherAllChildrenByOpenIdWeek(String openId);\n\n @DataSource(DataSourceType.READ)\n public WatchAllChildren queryOneTeacherAllChildrenByOpenIdMonth(String openId);\n @DataSource(DataSourceType.READ)\n public WatchAllChildren queryAllChildrenByOpenIdMonth();\n @DataSource(DataSourceType.READ)\n public WatchAllChildren queryAllChildrenByOpenIdWeek();\n}", "Collection<CalendarEvent> getActiveEvents(long when)\n{\n List<CalendarEvent> rslt = new ArrayList<CalendarEvent>();\n try {\n getAllEvents(when);\n rslt.addAll(cal_events);\n }\n catch (Exception e) {\n BasisLogger.logE(\"GOOGLECAL: problem getting events\",e);\n }\n return rslt;\n}", "private void processWatchers(MethodSpec.Builder createdMethodBuilder) {\n createdMethodBuilder\n .addStatement(\"Proto p = $T.cast(vue().$L().getComponentExportedTypePrototype())\",\n Js.class, \"$options\");\n getMethodsWithAnnotation(component, Watch.class)\n .forEach(method -> processWatcher(createdMethodBuilder, method));\n }", "@Test\n public void test02SendEvents() throws Exception{\n Event event1 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event1.getId());\n Event event2 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event2.getId());\n Event event3 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Yesterday\")));\n assertNotNull(event3.getId());\n Event event4 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event4.getId());\n Event event5 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event5.getId());\n Event event6 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Today\")));\n assertNotNull(event6.getId());\n Event event7 = restService.registerEvent(createEvent(\"ACCOUNTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event7.getId());\n Event event8 = restService.registerEvent(createEvent(\"TRANSACTIONS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event8.getId());\n Event event9 = restService.registerEvent(createEvent(\"PRODUCTS\", createMap(Object.class, \"date\", \"Tomorrow\", \"premise\", \"PC2\")));\n assertNotNull(event9.getId());\n delay(10);\n\n //yesterday events\n List<CallbackData> list = restService.findCallbackInstancesBy(event1.getId(), null, null, null, 0, 0);\n// assertEquals(5, list.size());\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event2.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event3.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //today\n list = restService.findCallbackInstancesBy(event4.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n list = restService.findCallbackInstancesBy(event5.getId(), null, null, null, 0, 0);\n assertEquals(1, list.size());\n list = restService.findCallbackInstancesBy(event6.getId(), null, null, null, 0, 0);\n assertEquals(4, list.size());\n //premise\n list = restService.findCallbackInstancesBy(event7.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n list = restService.findCallbackInstancesBy(event8.getId(), null, null, null, 0, 0);\n assertEquals(2, list.size());\n list = restService.findCallbackInstancesBy(event9.getId(), null, null, null, 0, 0);\n assertEquals(5, list.size());\n\n //Event status check\n EventEntity evt = eventRepo.eventById(Long.parseLong(event1.getId()));\n assertEquals(evt.getStatus(), Constants.EVENT_INSTANCE_STATUS_PROCESSED);\n assertEquals(evt.getId(), Long.parseLong(event1.getId()));\n\n }", "private void initEventList() {\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.add(Calendar.MINUTE, -1 * 60 * 12);\n startTime = calendar.getTimeInMillis();\n stopTime = System.currentTimeMillis();\n mSearchType = 0;\n eventType = AVIOCTRLDEFs.AVIOCTRL_EVENT_ALL;\n searchEventList(startTime, stopTime, eventType, mCameraChannel);\n }", "private void initializeEvents() {\r\n\t}", "public WindowListChangeEvent(Object eventSource) {\n super(eventSource); \n }", "@Override\n public void testCreateRequestListSomeFilteredBySourceSystem(){\n }", "public okhttp3.Call eventSourceServiceListEventSourcesCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException {\n Object localVarPostBody = null;\n\n // create path and map variables\n String localVarPath = \"/api/v1/event-sources/{namespace}\"\n .replaceAll(\"\\\\{\" + \"namespace\" + \"\\\\}\", localVarApiClient.escapeString(namespace.toString()));\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n if (listOptionsLabelSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.labelSelector\", listOptionsLabelSelector));\n }\n\n if (listOptionsFieldSelector != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.fieldSelector\", listOptionsFieldSelector));\n }\n\n if (listOptionsWatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.watch\", listOptionsWatch));\n }\n\n if (listOptionsAllowWatchBookmarks != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.allowWatchBookmarks\", listOptionsAllowWatchBookmarks));\n }\n\n if (listOptionsResourceVersion != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersion\", listOptionsResourceVersion));\n }\n\n if (listOptionsResourceVersionMatch != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.resourceVersionMatch\", listOptionsResourceVersionMatch));\n }\n\n if (listOptionsTimeoutSeconds != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.timeoutSeconds\", listOptionsTimeoutSeconds));\n }\n\n if (listOptionsLimit != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.limit\", listOptionsLimit));\n }\n\n if (listOptionsContinue != null) {\n localVarQueryParams.addAll(localVarApiClient.parameterToPair(\"listOptions.continue\", listOptionsContinue));\n }\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, String> localVarCookieParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) {\n localVarHeaderParams.put(\"Accept\", localVarAccept);\n }\n\n final String[] localVarContentTypes = {\n \n };\n final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n String[] localVarAuthNames = new String[] { };\n return localVarApiClient.buildCall(localVarPath, \"GET\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);\n }", "public DemoEventSource( T source ) {\n super(source);\n }", "@Override\n\tpublic void subTypeForServiceTypeAdded(ServiceEvent arg0) {\n\n\t}", "public List<MessageSource> createMessageSources(){\n\n List<MessageSource> messageSourceList = new ArrayList<>();\n\n String messageSourceConfig = Configurations.map.getProperty(\"messageSourceChannels\");\n String[] sourceConfigArray = messageSourceConfig.split(\",\");\n\n for(String sourceConfig : sourceConfigArray) {\n MessageSource messageSource = null;\n\n // there is only file message source option for instance, but it's extendable\n if(sourceConfig.equals(\"file\")){\n messageSource = new FileSource();\n }\n\n if(messageSource != null){\n messageSourceList.add(messageSource);\n }\n }\n\n if(messageSourceList.size() == 0){\n return null;\n }\n\n return messageSourceList;\n }", "ScheduledEvents getScheduledEvents();", "public interface EventRepositoryService {\n\n EventDeploymentBuilder createDeployment();\n\n void deleteDeployment(String deploymentId);\n\n EventDefinitionQuery createEventDefinitionQuery();\n \n ChannelDefinitionQuery createChannelDefinitionQuery();\n\n /**\n * Changes the category of a deployment.\n * \n * @param deploymentId\n * The id of the deployment of which the category will be changed.\n * @param category\n * The new category.\n */\n void setDeploymentCategory(String deploymentId, String category);\n\n /**\n * Changes the tenant id of a deployment.\n * \n * @param deploymentId\n * The id of the deployment of which the tenant identifier will be changed.\n * @param newTenantId\n * The new tenant identifier.\n */\n void setDeploymentTenantId(String deploymentId, String newTenantId);\n \n /**\n * Changes the parent deployment id of a deployment. This is used to move deployments to a different app deployment parent.\n * \n * @param deploymentId\n * The id of the deployment of which the parent deployment identifier will be changed.\n * @param newParentDeploymentId\n * The new parent deployment identifier.\n */\n void changeDeploymentParentDeploymentId(String deploymentId, String newParentDeploymentId);\n\n List<String> getDeploymentResourceNames(String deploymentId);\n\n InputStream getResourceAsStream(String deploymentId, String resourceName);\n\n EventDeploymentQuery createDeploymentQuery();\n\n EventDefinition getEventDefinition(String eventDefinitionId);\n\n InputStream getEventDefinitionResource(String eventDefinitionId);\n\n void setEventDefinitionCategory(String eventDefinitionId, String category);\n \n ChannelDefinition getChannelDefinition(String channelDefinitionId);\n\n InputStream getChannelDefinitionResource(String channelDefinitionId);\n\n void setChannelDefinitionCategory(String channelDefinitionId, String category);\n \n EventModel getEventModelById(String eventDefinitionId);\n\n EventModel getEventModelByKey(String eventDefinitionKey);\n \n EventModel getEventModelByKey(String eventDefinitionKey, String tenantId);\n\n EventModel getEventModelByKeyAndParentDeploymentId(String eventDefinitionKey, String parentDeploymentId);\n\n EventModel getEventModelByKeyAndParentDeploymentId(String eventDefinitionKey, String parentDeploymentId, String tenantId);\n \n ChannelModel getChannelModelById(String channelDefinitionId);\n\n ChannelModel getChannelModelByKey(String channelDefinitionKey);\n \n ChannelModel getChannelModelByKey(String channelDefinitionKey, String tenantId);\n\n ChannelModel getChannelModelByKeyAndParentDeploymentId(String channelDefinitionKey, String parentDeploymentId);\n\n ChannelModel getChannelModelByKeyAndParentDeploymentId(String channelDefinitionKey, String parentDeploymentId, String tenantId);\n \n /**\n * Programmatically build and register a new {@link EventModel}.\n */\n EventModelBuilder createEventModelBuilder();\n \n InboundChannelModelBuilder createInboundChannelModelBuilder();\n \n OutboundChannelModelBuilder createOutboundChannelModelBuilder();\n}", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "@Override\n public void handleEvents(List<Event> processorEvents) {\n\n }", "private void configureNotificationEventPublisher() throws APIManagementException {\n\n Map<String, String> properties = new HashMap<>();\n if (ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService() != null) {\n APIManagerConfiguration configuration =\n ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService()\n .getAPIManagerConfiguration();\n if (configuration.getEventHubConfigurationDto().getEventHubPublisherConfiguration() != null &&\n configuration.getEventHubConfigurationDto().isEnabled()) {\n EventHubConfigurationDto eventHubConfigurationDto = configuration.getEventHubConfigurationDto();\n EventHubConfigurationDto.EventHubPublisherConfiguration eventHubPublisherConfiguration =\n eventHubConfigurationDto.getEventHubPublisherConfiguration();\n properties.put(APIConstants.RECEIVER_URL, eventHubPublisherConfiguration.getReceiverUrlGroup());\n properties.put(APIConstants.AUTHENTICATOR_URL, eventHubPublisherConfiguration.getAuthUrlGroup());\n properties.put(APIConstants.USERNAME, eventHubConfigurationDto.getUsername());\n properties.put(APIConstants.PASSWORD, eventHubConfigurationDto.getPassword());\n properties.put(APIConstants.PROTOCOL, eventHubPublisherConfiguration.getType());\n properties.put(APIConstants.PUBLISHING_MODE, APIConstants.NON_BLOCKING);\n properties.put(APIConstants.PUBLISHING_TIME_OUT, \"0\");\n for (String key : eventHubPublisherConfiguration.getProperties().keySet()) {\n properties.put(key, eventHubPublisherConfiguration.getProperties().get(key));\n }\n properties.put(APIConstants.IS_ENABLED,\n Boolean.toString(configuration.getEventHubConfigurationDto().isEnabled()));\n try {\n ServiceReferenceHolder.getInstance().getEventPublisherFactory().configure(properties);\n } catch (EventPublisherException e) {\n throw new APIManagementException(e);\n }\n } else {\n log.info(\"Wso2Event Publisher not enabled.\");\n }\n } else {\n log.info(\"api-manager.xml not loaded. Wso2Event Publisher will not be enabled.\");\n }\n }", "public interface WatchedConfigurationSource {\n /**\n * Add {@link WatchedUpdateListener} listener\n * \n * @param l\n */\n public void addUpdateListener(WatchedUpdateListener l);\n\n /**\n * Remove {@link WatchedUpdateListener} listener\n * \n * @param l\n */\n public void removeUpdateListener(WatchedUpdateListener l);\n\n /**\n * Get a snapshot of the latest configuration data.<BR>\n * \n * Note: The correctness of this data is only as good as the underlying config source's view of the data.\n */\n public Map<String, Object> getCurrentData() throws Exception;\n}", "public com.google.api.servicemanagement.v1.ConfigSource.Builder getConfigSourceBuilder() {\n \n onChanged();\n return getConfigSourceFieldBuilder().getBuilder();\n }", "@Subscribe\n public void onActionEventStarted(RemoteExecutionActionEvent.Started event) {\n writeRemoteExecutionStateTraceEvents(event);\n }", "public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValue()){\n if(trigger.getServer()!=this) { // do not send own events...\n if(trigger.getMethod()!=null){ // its a local event\n if(trigger.getMethod().isAnnotationPresent(ES.class)){\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }else {\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }", "@Test\n public void testNear()\n {\n String sName = \"near-client-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "public MethodExecutionEvent(Object source) {\n super(source);\n }", "private Sources(Builder b)\n {\n super(NAMESPACE, ELEMENT);\n\n for (MediaSource ms: b.mediaSources)\n {\n addChildExtension(ms);\n }\n }", "public void configure() throws Exception {\n\t\t\n\t\tXPathBuilder xPathBuilder = new XPathBuilder\n\t\t\t\t(\"//audit-events/audit-event\");\n\n\t\tfrom(\"activemq:batch.events\").\n\t\t\tsplit(xPathBuilder).\n\t\t\tparallelProcessing().\n\t\t\tto(\"activemq:insurance.events\");\n\t}", "@Override\n\tpublic List generateScheduledEventData(List<Meeting> meetings) {\n\t\treturn null;\n\t}", "private SearchSourceBuilder buildBaseSearchSource() {\n long histogramSearchStartTime = Math.max(0, context.start - ExtractorUtils.getHistogramIntervalMillis(context.aggs));\n\n SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()\n .size(0)\n .query(ExtractorUtils.wrapInTimeRangeQuery(context.query, context.timeField, histogramSearchStartTime, context.end));\n\n context.aggs.getAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n context.aggs.getPipelineAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n return searchSourceBuilder;\n }", "public void onLogEvent(String date, String source, String level, String msg);", "public interface Source {\n /**\n * A listener for changes.\n */\n public interface SourceListener {\n public void added(Source source,\n JavaProject javaProject, String name);\n\n public void removed(Source source,\n JavaProject javaProject, String name);\n\n public void changed(Source source,\n JavaProject javaProject, String name);\n }\n\n public void addListener(SourceListener listener);\n\n public void removeListener(SourceListener listener);\n\n /**\n * Find and return all custom contexts; usually called just before calling\n * addListener(this).\n * \n * @param javaProject the java context to find custom module contexts for\n */\n public Set<String> get(JavaProject javaProject, ProgressMonitor progressMonitor);\n \n public abstract boolean isListeningForChanges();\n \n public abstract void listenForChanges(boolean listenForChanges);\n}", "private SubmitConfigSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public IEventCollector getSource();", "public static void main(String args[]){\n final Injector injector = Guice.createInjector(new FluxClientComponentModule(), new FluxClientInterceptorModule());\n SampleReplayEventOnStateWithMultipleReplayEvent SampleReplayEventOnStateWithMultipleReplayEvent = injector.getInstance(SampleReplayEventOnStateWithMultipleReplayEvent.class);\n SampleReplayEventOnStateWithMultipleReplayEvent.create(new StartEvent(\"example_multiple_replay_event_workflow_on_one_state\"));\n\n }", "public void addEvents(EventSource... events) {\n for (EventSource e : events) {\n // Create a deep-copy of each addition.\n this.eventList.add(new EventSource(e));\n }\n notifyEventListListeners();\n }", "Spliterator<Event> subscribe(String origin, String type, Instant since, Consumer<Event> callback);", "protected abstract void collectFires(Collection<Object> evAndListeners);", "interface UpdateStages {\n /** The stage of the EventChannel update allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel update allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel update allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel update allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel update allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n Update withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }", "EventUse createEventUse();", "public void processOffers(List<OfferPublishedEvent> events) {\n }", "public void buildBegin(MonitorEvent event)\n {\n }", "public void propertiesChanged(AntProjectEvent ev) {\n }", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "public YahooWeatherEvent(Object source) {\n super(source);\n }", "protected void gatherSources(Collection<String> templateNames,\n File sourceDir, boolean recurse)\n throws IOException {\n gatherSources(templateNames, sourceDir, null, recurse);\n }", "@Override\n public void setIncludeSources(Collection<File> sources) throws InterruptedException\n {\n Collection<File> files = populateIncludedSourceFiles(sources);\n \n super.setIncludeSources(files.toArray(new File[files.size()]));\n }", "public void setSourceChanges(Map<Component, Class> sourceChanges)\n {\n this.sourceChanges = sourceChanges;\n }", "@Override\n public void onChanged(List<Event> events) {\n if(mScheduler == null){\n mScheduler = new Scheduler(events, Calendar.getInstance(), null);\n } else mScheduler.setEvents(events);\n }", "public DescribeEventsRequest() {}", "@Override\n\tpublic String[] getConsumedToolEventNames() {\n\t\treturn new String[] { \"DummyToolEvent\" };\n\t}" ]
[ "0.5494782", "0.5220826", "0.5189177", "0.51769537", "0.51708853", "0.5128981", "0.5085266", "0.5073037", "0.50236726", "0.5015958", "0.49671897", "0.49438554", "0.49325", "0.49258712", "0.49090096", "0.49061054", "0.49020636", "0.4836276", "0.4834193", "0.47395125", "0.473895", "0.47310245", "0.47048894", "0.4675437", "0.46751505", "0.46657667", "0.46551278", "0.46499795", "0.4648903", "0.46256924", "0.46208397", "0.4601828", "0.45979965", "0.45949176", "0.4594153", "0.45692843", "0.45660037", "0.45605385", "0.45595115", "0.45566913", "0.45538357", "0.4552761", "0.45418334", "0.45411703", "0.45378312", "0.45378274", "0.4530298", "0.4523029", "0.45178342", "0.4507483", "0.45066524", "0.4505954", "0.4495326", "0.44909024", "0.447613", "0.44747493", "0.44693014", "0.44623992", "0.4449644", "0.4435088", "0.4424574", "0.44183505", "0.441416", "0.4410661", "0.4400812", "0.43970543", "0.43942994", "0.43919453", "0.43790856", "0.43776694", "0.43721002", "0.43706787", "0.43693185", "0.43636382", "0.43597677", "0.4351357", "0.43504944", "0.4349936", "0.43453765", "0.43388486", "0.43294507", "0.43293503", "0.4328321", "0.43188405", "0.4318194", "0.43171158", "0.43128937", "0.430524", "0.4303442", "0.4300912", "0.43006375", "0.4295121", "0.42938846", "0.42736942", "0.4272573", "0.4263083", "0.42607036", "0.4256588", "0.42526388", "0.42480195" ]
0.4941828
12
verify the required parameter 'namespace' is set
@SuppressWarnings("rawtypes") private okhttp3.Call eventSourceServiceWatchEventSourcesValidateBeforeCall(String namespace, String listOptionsLabelSelector, String listOptionsFieldSelector, Boolean listOptionsWatch, Boolean listOptionsAllowWatchBookmarks, String listOptionsResourceVersion, String listOptionsResourceVersionMatch, String listOptionsTimeoutSeconds, String listOptionsLimit, String listOptionsContinue, final ApiCallback _callback) throws ApiException { if (namespace == null) { throw new ApiException("Missing the required parameter 'namespace' when calling eventSourceServiceWatchEventSources(Async)"); } okhttp3.Call localVarCall = eventSourceServiceWatchEventSourcesCall(namespace, listOptionsLabelSelector, listOptionsFieldSelector, listOptionsWatch, listOptionsAllowWatchBookmarks, listOptionsResourceVersion, listOptionsResourceVersionMatch, listOptionsTimeoutSeconds, listOptionsLimit, listOptionsContinue, _callback); return localVarCall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetNamespace();", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "@Test\n\tpublic void test_TCM__OrgJdomNamespace_getNamespace() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tfinal Namespace ns2 = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tassertTrue(\"incorrect Namespace\", attr.getNamespace().equals(ns2));\n\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "void setNamespace(java.lang.String namespace);", "private NamespaceHelper() {}", "public boolean isNamespaceAware () {\n return true;\n }", "protected void validateNamespace(Namespace namespace) throws WikiException {\r\n\t\tcheckLength(namespace.getDefaultLabel(), 200);\r\n\t}", "void setNamespace(String namespace);", "boolean isNamespaceRunning(String namespace);", "public void testGetNamespaceURI() throws RepositoryException {\n String result = \"namespace\" ;\n String prefix =\"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespaceURI(prefix), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespaceURI(prefix), result);\n }", "java.lang.String getNamespace();", "@Test\n\tpublic void test_TCM__String_getNamespacePrefix() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect prefix\", attribute.getNamespacePrefix().equals(\"prefx\"));\n\t}", "@Test\n\tpublic void test_TCM__String_getNamespaceURI() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect URI\", attribute.getNamespaceURI().equals(\"http://some.other.place\"));\n\n\t}", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "String getNamespace();", "String getNamespace();", "String getNamespace();", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "boolean isNamespace(Object object);", "protected void validateNamespaceTranslation(Namespace namespace, String virtualWiki) throws WikiException {\r\n\t\tcheckLength(namespace.getLabel(virtualWiki), 200);\r\n\t}", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public final boolean isNamespaceAware() {\n return true;\n }", "public void testMemberNotTeamMemberForProjectValidator_NullNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator((String) null);\r\n fail(\"testMemberNotTeamMemberForProjectValidator_NullNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_NullNamespace.\");\r\n }\r\n }", "@Test\n public void testNamespace() throws Exception {\n NamespaceMeta ns1Meta = new NamespaceMeta.Builder().setName(\"ns1\").build();\n NamespaceMeta ns2Meta = new NamespaceMeta.Builder().setName(\"ns2\").build();\n NamespaceMeta anotherNsMeta = new NamespaceMeta.Builder().setName(\"anotherNs\").build();\n when(nsClient.list()).thenReturn(ImmutableList.of(ns1Meta, ns2Meta, anotherNsMeta));\n\n ResourceLookupContext resourceLookupContext = new ResourceLookupContext();\n resourceLookupContext.setResourceName(\"namespace\");\n // user is entering n and we expect the completion to show ns1 and ns2 as they start with n and not anotherNs\n resourceLookupContext.setUserInput(\"n\");\n resourceLookupContext.setResources(ImmutableMap.of(\"namespace\", Collections.emptyList()));\n List<String> resources = client.getResources(resourceLookupContext);\n Assert.assertEquals(2, resources.size());\n Assert.assertEquals(ImmutableList.of(\"ns1\", \"ns2\"), resources);\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "public String getNamespace();", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public String getNamespace() {\n return namespace;\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public static boolean isValidNamespace(CharSequence namespace) {\n if (namespace == null) {\n return false;\n }\n\n int position = 0;\n boolean start = true;\n\n while (position < namespace.length()) {\n char c = namespace.charAt(position++);\n if (start) {\n start = false;\n if (!isValidIdentifierStart(c)) {\n return false;\n }\n } else if (c == '.') {\n start = true;\n } else if (!isValidIdentifierAfterStart(c)) {\n return false;\n }\n }\n\n return !start;\n }", "public String getNamespace () throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected boolean isMatchingNamespace(String rootElementNamespace)\n {\n if (namespacePattern != null)\n {\n return namespacePattern.matcher(rootElementNamespace == null ? \"\" : rootElementNamespace).matches();\n }\n else\n {\n return namespace == null ? rootElementNamespace == null : namespace.equals(rootElementNamespace);\n }\n }", "@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public void testMemberNotTeamMemberForProjectValidator_EmptyNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\" \");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_EmptyNamespace is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_EmptyNamespace.\");\r\n }\r\n }", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }", "public boolean hasNamespace(final String namespace) {\n return rpcMethods.keySet().stream()\n .anyMatch(key -> key.toUpperCase().startsWith(namespace.toUpperCase()));\n }", "public void testGetNamespacePrefix() throws RepositoryException {\n String result = \"namespace\";\n String uri = \"prefix\";\n \n sessionControl.expectAndReturn(session.getNamespacePrefix(uri), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefix(uri), result);\n }", "private static boolean _inNamespace(Resource resource, String namespace) {\n\t\tString resourceNamespace = resource.getNameSpace();\n\t\t\n\t\tif ( namespace.endsWith(\"/\") || namespace.endsWith(\"#\") ) {\n\t\t\treturn namespace.equals(resourceNamespace);\n\t\t}\n\t\telse {\n\t\t\treturn resourceNamespace != null && namespace.equals(resourceNamespace.replaceAll(\"(/|#)$\", \"\"));\n\t\t}\n\t}", "@Test\n\tpublic void testGetNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// if we successfully created a new namespace we'll be able to get it from FluidDB\n\t\tNamespace gotNamespace = testNamespace.getNamespace(newName);\n\t\tassertEquals(newNamespace.getId(), gotNamespace.getId());\n\t\tgotNamespace.delete();\n\t}", "@Updatable\n public String getNamespace() {\n return namespace;\n }", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getTargetNamespace();", "public boolean hasNamespace() {\n return m_namespaces != null && m_namespaces.size() > 0;\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "void visit(Namespace namespace);", "@Override\n\tpublic String getNamespace() {\n\t\treturn nameSpace;\n\t}", "@Test\n\tpublic void test_TCC___String_String_int_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", Attribute.ID_TYPE.ordinal(), namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "Namespaces namespaces();", "String getNamespaceStringValue(Object ns);", "public boolean isSetNs() {\n return this.ns != null;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace() {\n return namespace;\n }", "public String getNamespace()\n {\n return NAMESPACE;\n }", "public boolean isTargetNamespace(String prefix) {\r\n return prefix.equals(getDefinitions().getTargetNamespace());\r\n }", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "protected final Namespace getNamespace()\n {\n return m_namespace;\n }", "public String getNamespace() {\n return this.namespace;\n }", "public boolean addNamespaceToBPELDoc(String prefix, String namespace, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Adding namespace {} to BuildPlan {}\", namespace,\n\t\t\t\tbuildPlan.getBpelProcessElement().getAttribute(\"name\"));\n\t\tbuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:\" + prefix, namespace);\n\t\t// TODO make a real check\n\t\treturn true;\n\t}", "public boolean isNamespaceAware() {\n\t\ttry {\n\t\t\treturn parserImpl.getFeature(Constants.SAX_FEATURE_PREFIX\n\t\t\t\t\t\t\t\t\t\t + Constants.NAMESPACES_FEATURE);\n\t\t}\n\t\t catch (SAXException x) {\n\t\t\tthrow new IllegalStateException(x.getMessage());\n\t\t}\n\t}", "private boolean ensureXSDTypeNamespaceMappings(Object obj) {\r\n\t\t\r\n\t\tString targetNamespace = null;\r\n\t\t\r\n\t\tif (obj instanceof XSDNamedComponent ) {\r\n\t\t\tXSDNamedComponent namedComponent = (XSDNamedComponent) obj; \r\n\t\t\ttargetNamespace = namedComponent.getTargetNamespace();\r\n\t\t}\r\n\t\t\r\n\t\tif (targetNamespace == null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// Now check if the target namespace has a prefix mappings.\r\n\t\tString prefix = BPELUtils.getNamespacePrefix (modelObject, targetNamespace);\r\n\t\tif (prefix != null) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t// We have to map the namespace to a prefix. \r\n\t\tNamespaceMappingDialog dialog = new NamespaceMappingDialog(getShell(),modelObject);\r\n\t\tdialog.setNamespace( targetNamespace );\r\n\t\t\r\n\t\tif (dialog.open() == Window.CANCEL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// define the prefix\r\n\t\tBPELUtils.setPrefix( BPELUtils.getProcess(modelObject), targetNamespace, dialog.getPrefix()); \t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n \tpublic void whereClauseForNodeNamespace() {\n \t\tnode23.setNamespace(\"namespace\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.namespace\", \"'namespace'\"));\n \t}", "public void setTargetNamespace(String targetNamespace)\r\n {\r\n this.targetNamespace = targetNamespace;\r\n }", "@Nullable public String getNamespace() {\n return namespace;\n }", "public static boolean NamespaceNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NamespaceNodeTest\")) return false;\n if (!nextTokenIs(b, K_NAMESPACE_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMESPACE_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NAMESPACE_NODE, L_PAR, R_PAR);\n p = r; // pin = 2\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@XmlElement(required = true, name = \"namespace\")\n public String getNamespace() {\n return namespace;\n }", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "@Test\r\n\tpublic void testBogus() {\n\t\tassertLookup(\"bogus.phony.fake.namespace\",\"bogus.phony.fake.namespace\");\r\n\t}", "@Test\n\tpublic void testGetNamespaceNames() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t// check the change happens at FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// delete the namespace\n\t\tnewNamespace.delete();\n\t\t// this *won't* mean the namespace is removed from the local object\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\t// need to update from FluidDB\n\t\ttestNamespace.getItem();\n\t\tassertEquals(false, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t}", "@Test\n\tpublic void testCreateNamespace() throws FOMException, FluidException, JSONException, IOException {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\tString newName = UUID.randomUUID().toString();\n\t\tNamespace newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\tassertEquals(newName, newNamespace.getName());\n\t\tassertEquals(\"This is a test namespace\", newNamespace.getDescription());\n\t\tassertEquals(true, newNamespace.getId().length()>0);\n\t\tassertEquals(true, TestUtils.contains(testNamespace.getNamespaceNames(), newName));\n\t\tnewNamespace.delete();\n\t\t// Lets make sure validation works correctly...\n\t\tnewName = \"this is wrong\"; // e.g. space is an invalid character\n\t\tString msg = \"\";\n\t\ttry {\n\t\t newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n\t\t} catch (FOMException ex) {\n\t\t msg = ex.getMessage();\n\t\t}\n\t\tassertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t\t// the new name is too long\n\t\tnewName = \"foobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspamfoobarbazhamandeggscheeseandpicklespamspamspamspam\";\n\t\tmsg = \"\";\n try {\n newNamespace = testNamespace.createNamespace(newName, \"This is a test namespace\");\n } catch (FOMException ex) {\n msg = ex.getMessage();\n }\n assertEquals(\"Invalid name (incorrect characters or too long)\", msg);\n\t}", "@Test\n public void verifyReservedNS() throws IOException {\n NamespaceDescriptor ns = TestNamespace.admin.getNamespaceDescriptor(DEFAULT_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), DEFAULT_NAMESPACE.getName());\n ns = TestNamespace.admin.getNamespaceDescriptor(SYSTEM_NAMESPACE.getName());\n Assert.assertNotNull(ns);\n Assert.assertEquals(ns.getName(), SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(2, TestNamespace.admin.listNamespaceDescriptors().length);\n // verify existence of system tables\n Set<TableName> systemTables = Sets.newHashSet(META_TABLE_NAME);\n HTableDescriptor[] descs = TestNamespace.admin.listTableDescriptorsByNamespace(SYSTEM_NAMESPACE.getName());\n Assert.assertEquals(systemTables.size(), descs.length);\n for (HTableDescriptor desc : descs) {\n Assert.assertTrue(systemTables.contains(desc.getTableName()));\n }\n // verify system tables aren't listed\n Assert.assertEquals(0, TestNamespace.admin.listTables().length);\n // Try creating default and system namespaces.\n boolean exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(DEFAULT_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n exceptionCaught = false;\n try {\n TestNamespace.admin.createNamespace(SYSTEM_NAMESPACE);\n } catch (IOException exp) {\n TestNamespace.LOG.warn(exp.toString(), exp);\n exceptionCaught = true;\n } finally {\n Assert.assertTrue(exceptionCaught);\n }\n }", "private String getNamespace(Package pkg) {\n/* */ String nsUri;\n/* 223 */ if (pkg == null) return \"\";\n/* */ \n/* */ \n/* 226 */ XmlNamespace ns = pkg.<XmlNamespace>getAnnotation(XmlNamespace.class);\n/* 227 */ if (ns != null) {\n/* 228 */ nsUri = ns.value();\n/* */ } else {\n/* 230 */ nsUri = \"\";\n/* 231 */ } return nsUri;\n/* */ }", "String getReferenceNamespace();", "int getNamespaceUri();", "String getNamespacePrefix(Object ns);", "public void testGetNamespacePrefixes() throws RepositoryException {\n String result[] = { \"prefix1\", \"prefix2\" };\n \n sessionControl.expectAndReturn(session.getNamespacePrefixes(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getNamespacePrefixes(), result);\n }", "public void testMemberNotTeamMemberForProjectValidator_UnknownNamespace() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator(\"unknown\");\r\n fail(\"testMemberNotTeamMemberForProjectValidator_UnknownNamespace is failure.\");\r\n } catch (RegistrationValidationConfigurationException rvce) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_UnknownNamespace.\");\r\n }\r\n }", "public void setNamespaces(java.util.Map<String,String> namespaces) {\n _namespaces = namespaces;\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.362 -0500\", hash_original_method = \"1F62AD2938072A93E19EAFFCDA555D07\", hash_generated_method = \"E522C6EE17CC779935F0D04DE1F1F350\")\n \npublic NamespaceSupport ()\n {\n reset();\n }", "protected boolean compareNamespace(final XNode y, final ArrayReporter rep) {\n\t\tString ux = getNSUri();\n\t\tString uy = y.getNSUri();\n\t\tif (ux == null) {\n\t\t\tif (uy == null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (ux.equals(uy)) {\n\t\t\treturn true;\n\t\t}\n\t\t//Namespace differs: &{0} and &{1}\n\t\trep.error(XDEF.XDEF288, getXDPosition(), y.getXDPosition());\n\t\treturn false;\n\t}", "public void testSetNamespacePrefix() throws RepositoryException{\n String prefix = \"prefix\";\n String uri =\"uri\";\n session.setNamespacePrefix(prefix, uri);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.setNamespacePrefix(prefix, uri);\n }", "public void setXmlns(String xmlns)\r\n\t{\r\n\t\tthis.xmlns = xmlns;\r\n\t}", "private boolean hasExtension(String namespace, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelExtensionsElement(), \"namespace\", namespace);\n\t}", "private void expectName(String namespace, String name)\n\t\t\tthrows XmpUnexpectedElementQualifiedNameException {\n\t\tif (!reader.get().getNamespaceURI().equals(namespace)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ namespace + \"' and found '\"\n\t\t\t\t\t+ reader.get().getNamespaceURI() + \"'\");\n\t\t}\n\t\tif (!reader.get().getLocalName().equals(name)) {\n\t\t\tthrow new XmpUnexpectedElementQualifiedNameException(\"Expected '\"\n\t\t\t\t\t+ name + \"' and found '\" + reader.get().getLocalName()\n\t\t\t\t\t+ \"'\");\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.println(\"namespace = \" + namespace);\n }", "private static java.lang.String generatePrefix(java.lang.String namespace) {\n if(namespace.equals(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\")){\n return \"ns1\";\n }\n return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }", "abstract XML addNamespace(Namespace ns);", "public void setNamespace(final String namespaceValue) {\n this.namespace = namespaceValue;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "protected static boolean isNamespaceAware(org.w3c.dom.Node node) {\n boolean ret=(node.getLocalName() != null);\n \n if (LOG.isLoggable(Level.FINEST)) {\n LOG.finest(\"Is node \"+node+\" namespace aware? \"+ret);\n LOG.finest(\"nodeName=\"+node.getNodeName());\n LOG.finest(\"localName=\"+node.getLocalName());\n LOG.finest(\"namespace=\"+node.getNamespaceURI());\n } \n \n return (ret);\n }", "@Test\n\tpublic void test_TCM__String_getQualifiedName() {\n final String prefix = \"prefx\";\n final String uri = \"http://some.other.place\";\n\n final Namespace namespace = Namespace.getNamespace(prefix, uri);\n\n final String attributeName = \"test\";\n final String attributeQName = prefix + ':' + attributeName;\n final String attributeValue = \"value\";\n\n final Attribute qulifiedAttribute = new Attribute(attributeName, attributeValue, namespace);\n assertEquals(\"incorrect qualified name\", qulifiedAttribute.getQualifiedName(), attributeQName);\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n assertEquals(\"incorrect qualified name\", attribute.getQualifiedName(), attributeName);\n\n\t}", "public String namespaceString(String plainString) throws RuntimeException {\n \tif(plainString.startsWith(NAME_SPACE_PREFIX)) {\n \t\treturn (plainString.replace(NAME_SPACE_PREFIX, nameSpaceThreadLocale.get())); \t\t\n \t}\n \tif(plainString.startsWith(SCENARIO_NAME_SPACE_PREFIX)) {\n \t\tif(cucumberManager.getCurrentScenarioGlobals() == null) {\n \t\t\tthrow new ScenarioNameSpaceAccessOutsideScenarioScopeException(\"You cannot fetch a Scneario namespace outside the scope of a scenario\");\n \t\t}\n \t\treturn (plainString.replace(SCENARIO_NAME_SPACE_PREFIX, cucumberManager.getCurrentScenarioGlobals().getNameSpace())); \t\t\n \t}\n \telse {\n \t\treturn plainString;\n \t}\n }", "@BeforeClass\n public static void externalSchemaCheck() {\n assumeTrue(\"can access \" + NameSpace.DC.xsd, canConnect(NameSpace.DC.xsd));\n }", "@Test\n public void shouldInitializeFromPersistedContent() {\n namespaceRegistry.register(validPrefix1, validNamespaceUri1);\n namespaceRegistry.register(validPrefix2, validNamespaceUri2);\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n // Now set up the graph-based namespace registry ...\n GraphNamespaceRegistry registry2 = new GraphNamespaceRegistry(graph, pathToParentOfNamespaceNodes, uriPropertyName,\n additionalNamespaceProperties);\n // All namespaces should match ...\n Set<NamespaceRegistry.Namespace> all = namespaceRegistry.getNamespaces();\n Set<NamespaceRegistry.Namespace> all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n\n registry2.refresh();\n all2 = registry2.getNamespaces();\n assertThat(all, is(all2));\n assertThat(registry2.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));\n assertThat(registry2.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));\n }", "public String getTargetNamespace()\r\n {\r\n return targetNamespace;\r\n }" ]
[ "0.6993016", "0.688581", "0.67861503", "0.6746833", "0.6627405", "0.6627405", "0.6455587", "0.6414395", "0.6393416", "0.6349667", "0.62928563", "0.62866765", "0.6245286", "0.6231751", "0.62009007", "0.6150111", "0.6130819", "0.6126321", "0.6126321", "0.6126321", "0.6090523", "0.6077984", "0.6063936", "0.6041884", "0.60153145", "0.5992205", "0.59686756", "0.59628606", "0.59322995", "0.59308267", "0.5918374", "0.590845", "0.59074134", "0.5873534", "0.5857147", "0.5843202", "0.5814567", "0.58137727", "0.5799522", "0.5795164", "0.57769674", "0.577674", "0.57698965", "0.5764616", "0.57478666", "0.5747722", "0.5740817", "0.5727339", "0.56988436", "0.5681879", "0.56669235", "0.56618047", "0.56471306", "0.563229", "0.5617266", "0.55962396", "0.55917233", "0.55917233", "0.55917233", "0.5588478", "0.5586481", "0.5576537", "0.55501986", "0.5542011", "0.55409825", "0.5523567", "0.55087763", "0.5506672", "0.5503721", "0.55006534", "0.549637", "0.54763764", "0.5468605", "0.54656535", "0.5454136", "0.5428768", "0.5426498", "0.5420663", "0.5395233", "0.53942215", "0.5358733", "0.5352789", "0.5345346", "0.53398514", "0.53372836", "0.5324656", "0.5322933", "0.5313064", "0.53049266", "0.5299023", "0.5296107", "0.5288305", "0.5276734", "0.5275732", "0.5269305", "0.5217417", "0.51788265", "0.51619726", "0.51596355", "0.5148256", "0.51318115" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int ar[]={1,5,2,8,3,1}; Arrays.sort(ar); for(int i=0;i<ar.length;i++) { System.out.println(ar[i]); } }
{ "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 getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "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.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Compares the given adapter with the object indicating if they are equals. They are equals if have same declaration
public boolean areEquals(PolyAdapter one, Object obj) { if (one == obj) { return true; } if (one == null || obj == null || !(obj instanceof PolyAdapter)) { return false; } PolyAdapter other = (PolyAdapter) obj; return one.adaptedCode().equals(other.adaptedCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean equals(Object ob){\n\t\tItem itemob=(Item)ob;\t//transfer object type to Item type\r\n\t\tif(this.UID==itemob.UID && this.TITLE==itemob.TITLE && this.NOOFCOPIES==itemob.NOOFCOPIES) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public abstract boolean equals(Object other);", "@Test\n public void equals() {\n CsvAdaptedPatient alice = new CsvAdaptedPatient(ALICE);\n CsvAdaptedPatient aliceCopy = new CsvAdaptedPatient(new PatientBuilder(ALICE).build());\n\n assertTrue(alice.equals(aliceCopy));\n\n // same object -> returns true\n assertTrue(alice.equals(alice));\n\n // null -> returns false\n assertFalse(alice.equals(null));\n\n // different type -> returns false\n assertFalse(alice.equals(5));\n\n // different patient -> returns false\n assertFalse(alice.equals(new CsvAdaptedPatient(BOB)));\n\n // different name -> returns false\n Patient editedAlice = new PatientBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different phone -> returns false\n editedAlice = new PatientBuilder(ALICE).withPhone(VALID_PHONE_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different address -> returns false\n editedAlice = new PatientBuilder(ALICE).withAddress(VALID_ADDRESS_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different remark -> returns false\n editedAlice = new PatientBuilder(ALICE).withRemark(VALID_REMARK_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n }", "public boolean equals(Object object);", "public boolean equals( Object obj );", "public abstract boolean equals(Object o);", "public boolean equals(Object obj);", "@Override public boolean equals(Object object);", "@Override\n public abstract boolean equals(Object obj);", "public void testEquals() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n XIntervalDataItem item2 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n }", "@Test\n\tpublic void equalsAndHashcode() {\n\t\tCollisionItemAdapter<Body, BodyFixture> item1 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\tCollisionItemAdapter<Body, BodyFixture> item2 = new CollisionItemAdapter<Body, BodyFixture>();\n\t\t\n\t\tBody b1 = new Body();\n\t\tBody b2 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\tBodyFixture b2f1 = b2.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\titem1.set(b1, b1f1);\n\t\titem2.set(b1, b1f1);\n\t\t\n\t\tTestCase.assertTrue(item1.equals(item2));\n\t\tTestCase.assertEquals(item1.hashCode(), item2.hashCode());\n\t\t\n\t\titem2.set(b2, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t\t\n\t\titem2.set(b1, b2f1);\n\t\tTestCase.assertFalse(item1.equals(item2));\n\t}", "@Test\r\n\tpublic void testEquality(){\n\t\t assertEquals(object1, object2);\r\n\t}", "@Override\n boolean equals(Object obj);", "@Override \n boolean equals(Object obj);", "@Override\n public abstract boolean equals(Object other);", "@Override\n public abstract boolean equals(Object other);", "public boolean equals(Object o);", "@Override\n public boolean equals(Object obj) {\n return this == obj;\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Driver)) {\n return false;\n }\n Driver other = (Driver) object;\n if ((this.driverPK == null && other.driverPK != null) || (this.driverPK != null && !this.driverPK.equals(other.driverPK))) {\n return false;\n }\n return true;\n }", "@Override\n boolean equals(Object other);", "@Override\n public abstract boolean equals(Object abc);", "@Override\n\tpublic abstract boolean equals(Object other);", "public boolean equals(Object rhs) {\n AS rhsAS = (AS) rhs;\n return this.asn == rhsAS.asn;\n }", "@ZenCodeType.Operator(ZenCodeType.OperatorType.EQUALS)\n default boolean equalTo(IData other) {\n \n return notSupportedOperator(OperatorType.EQUALS);\n }", "boolean equals(Object object);", "public boolean equals(Object obj) {\n/* 319 */ if (obj == this) {\n/* 320 */ return true;\n/* */ }\n/* 322 */ if (!(obj instanceof SlidingCategoryDataset)) {\n/* 323 */ return false;\n/* */ }\n/* 325 */ SlidingCategoryDataset that = (SlidingCategoryDataset)obj;\n/* 326 */ if (this.firstCategoryIndex != that.firstCategoryIndex) {\n/* 327 */ return false;\n/* */ }\n/* 329 */ if (this.maximumCategoryCount != that.maximumCategoryCount) {\n/* 330 */ return false;\n/* */ }\n/* 332 */ if (!this.underlying.equals(that.underlying)) {\n/* 333 */ return false;\n/* */ }\n/* 335 */ return true;\n/* */ }", "@Override\n public boolean equals(Object obj) {\n return this == obj;\n }", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }", "public boolean equals(Object obj) {\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof Row) {\n return ((Row) obj).table == table\n && ((Row) obj).position == position;\n }\n\n return false;\n }", "@Override\n public boolean equals(Object other) {\n return this == other;\n }", "public boolean equals(Object ob){\n return name.equals(((PhoneRecord)ob).getName());\n }", "public boolean equals(Object object1) {\n if (object1 != null && object1.getClass() != this.getClass())\n {\n return false;\n }\n else\n {\n Computer c1 = (Computer) object1;\n return (this.brand.equals(c1.brand) && this.model.equals(c1.model) && this.price == c1.price);\n }\n }", "public void testEqualsObject()\n {\n // Null check\n assertFalse(b1.equals(null));\n // Type mismatch\n assertFalse(b1.equals(\"a\"));\n\n // Reflexive\n assertTrue(b1.equals(b1));\n\n // In general, two empty boards\n assertTrue(b1.equals(b2));\n\n // Different contents\n b1.setCell(0, 0, Cell.RED1);\n assertFalse(b1.equals(b2));\n\n // Same Contents\n b2.setCell(0, 0, Cell.RED1);\n assertTrue(b1.equals(b2));\n\n // Some more complex cases\n b1.fromString(\"RRRBEEBBE\");\n assertFalse(b1.equals(b2));\n b2.fromString(\"RRRBEEBBE\");\n assertTrue(b1.equals(b2));\n\n }", "@Override\n public boolean equals(Object obj) {\n return obj != null &&\n getClass() == obj.getClass() &&\n equalElements(getClass().cast(obj));\n }", "@Override\n boolean equals(Object o);", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Override\n public boolean isSame(Item other) {\n return this.equals(other);\n }", "public boolean mojeEquals(Obj o1, Obj o2) {\r\n\t\t//System.out.println(o1.getName() + \" \" + o2.getName());\r\n\t\tboolean sameRight = true; // 21.06.2020. provera prava pristupa\r\n\t\tboolean sameName = true;\t// 22.06.2020. ako nisu metode ne moraju da imaju isto ime\r\n\t\tboolean sameArrayType = true; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t\t\r\n\t\tif (o1.getKind() == Obj.Meth && o2.getKind() == Obj.Meth) {\r\n\t\t\tsameRight = o1.getFpPos() == o2.getFpPos()+10; \r\n\t\t\tsameName = o1.getName().equals(o2.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (o1.getType().getKind() == Struct.Array && o2.getType().getKind() == Struct.Array) {\r\n\t\t\t\tif (!(o1.getType().getElemType() == o2.getType().getElemType())) { // ZA KLASE MOZDA TREBA equals\r\n\t\t\t\t\tsameArrayType = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 16.08.2020.\r\n//\t\tif (o1.getType().getKind() == Struct.Class || o1.getType().getKind() == Struct.Interface)\r\n//\t\t\treturn true;\r\n\t\t\r\n\t\t\r\n\t\treturn o1.getKind() == o2.getKind() \r\n\t\t\t\t&& sameName\r\n\t\t\t\t&& o1.getType().equals(o2.getType())\r\n\t\t\t\t&& /*adr == other.adr*/ o1.getLevel() == o2.getLevel()\r\n\t\t\t\t&& equalsCompleteHash(o1.getLocalSymbols(), o2.getLocalSymbols())\r\n\t\t\t\t&& sameRight // 21.06.2020. provera prava pristupa\r\n\t\t\t\t&& sameArrayType; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t}", "public void testObjEqual()\n {\n assertEquals( true, Util.objEqual(null,null) );\n assertEquals( false,Util.objEqual(this,null) );\n assertEquals( false,Util.objEqual(null,this) );\n assertEquals( true, Util.objEqual(this,this) );\n assertEquals( true, Util.objEqual(\"12\",\"12\") );\n }", "@Test\n public void equalsSameTest() {\n Device device2 = new Device(deviceID, token);\n assertEquals(device, device2);\n }", "@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equals(object));\n assertTrue(\"attribute not equal to object\", object.equals(attribute));\n\n // current implementation checks only for identity\n// final Attribute clonedAttribute = (Attribute) attribute.clone();\n// assertTrue(\"attribute not equal to its clone\", attribute.equals(clonedAttribute));\n// assertTrue(\"clone not equal to attribute\", clonedAttribute.equals(attribute));\n\t}", "@org.testng.annotations.Test\n public void test_equals_Symmetric()\n throws Exception {\n CategorieClient categorieClient = new CategorieClient(\"denis\", 1000, 10.2, 1.1, 1.2, false);\n Client x = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Client y = new Client(\"Denis\", \"Denise\", \"Paris\", categorieClient);\n Assert.assertTrue(x.equals(y) && y.equals(x));\n Assert.assertTrue(x.hashCode() == y.hashCode());\n }", "public boolean equals(Object ob)\n {\n if (this == ob) return true;\n\n if (!(ob instanceof DTD)) return false;\n\n DTD otherDTD = (DTD) ob;\n\n return items.equals(otherDTD.items);\n }", "@Override\n public boolean equals(Object obj) {\n \n //TODO: Complete Method\n \n return true;\n }", "public boolean compareElements(Object element1, Object element2, AbstractSession session) {\n if (element1.getClass() != element2.getClass()) {\n return false;\n }\n return this.getObjectBuilder(element1, session).compareObjects(element1, element2, session);\n }", "@Override\n public boolean equals(Object obj){\n if(this == obj){\n return true;\n }\n else if(!(obj instanceof Row)){\n return false;\n }\n\n Row row2 = (Row)obj;\n\n return this.index == row2.index && this.spaces.equals(row2.spaces);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof OrdenitemPK)) {\r\n return false;\r\n }\r\n OrdenitemPK other = (OrdenitemPK) object;\r\n if (this.ordencompraNumeroorden != other.ordencompraNumeroorden) {\r\n return false;\r\n }\r\n if (this.libroIsbn != other.libroIsbn) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean equals(Card anotherCard){\n\t\t\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemPK == null && other.itemPK != null) || (this.itemPK != null && !this.itemPK.equals(other.itemPK))) {\n return false;\n }\n return true;\n }", "public boolean equals(java.lang.Object r3) {\n /*\n r2 = this;\n if (r2 == r3) goto L_0x001f\n boolean r0 = r3 instanceof com.android.systemui.controls.management.StructureContainer\n if (r0 == 0) goto L_0x001d\n com.android.systemui.controls.management.StructureContainer r3 = (com.android.systemui.controls.management.StructureContainer) r3\n java.lang.CharSequence r0 = r2.structureName\n java.lang.CharSequence r1 = r3.structureName\n boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r1)\n if (r0 == 0) goto L_0x001d\n com.android.systemui.controls.management.ControlsModel r2 = r2.model\n com.android.systemui.controls.management.ControlsModel r3 = r3.model\n boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual(r2, r3)\n if (r2 == 0) goto L_0x001d\n goto L_0x001f\n L_0x001d:\n r2 = 0\n return r2\n L_0x001f:\n r2 = 1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.systemui.controls.management.StructureContainer.equals(java.lang.Object):boolean\");\n }", "public boolean equals (SetADT<T> set);", "boolean equals(Object obj);", "boolean equals(Object obj);", "boolean canEqual(Object obj);", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Itensorc)) {\n return false;\n }\n Itensorc other = (Itensorc) object;\n if ((this.itensorcPK == null && other.itensorcPK != null) || (this.itensorcPK != null && !this.itensorcPK.equals(other.itensorcPK))) {\n return false;\n }\n return true;\n }", "public boolean equals(XObject obj2) {\n/* */ try {\n/* 262 */ if (4 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 268 */ return obj2.equals(this);\n/* */ }\n/* 270 */ if (1 == obj2.getType())\n/* */ {\n/* 272 */ return (bool() == obj2.bool());\n/* */ }\n/* 274 */ if (2 == obj2.getType())\n/* */ {\n/* 276 */ return (num() == obj2.num());\n/* */ }\n/* 278 */ if (4 == obj2.getType())\n/* */ {\n/* 280 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 282 */ if (3 == obj2.getType())\n/* */ {\n/* 284 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 286 */ if (5 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* 290 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* */ \n/* */ \n/* 294 */ return super.equals(obj2);\n/* */ \n/* */ }\n/* 297 */ catch (TransformerException te) {\n/* */ \n/* 299 */ throw new WrappedRuntimeException(te);\n/* */ } \n/* */ }", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof EyeTrackerItem)\r\n\t\t{\r\n\t\t\tEyeTrackerItem item = (EyeTrackerItem) obj;\r\n\t\t\tif(item.getId().equalsIgnoreCase(this.getId()))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn super.equals(obj);\r\n\t}", "@Override\n\tpublic final boolean equals(Object obj) {\n\t\tif (this == obj) {\n\t\t\treturn true;\n\t\t}\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!(obj instanceof DawsonBallotItem)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tDawsonBallotItem itemObj = (DawsonBallotItem) obj;\n\t\tif (this.choice.equalsIgnoreCase(itemObj.choice)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected abstract boolean equalityTest(Object key, Object key2);", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn EqualsBuilder.reflectionEquals(this, obj);\n\t}", "public boolean equals(Object o) {\n\t\tif (o instanceof InstagramObject) {\n\t\t\t//if (((InstagramObject) o).checkClass(element.getAttribute(\"class\")) ) {\n\t\t\t\tif (((InstagramObject) o).getElement().equals(element))\n\t\t\t\t\treturn true;\n\t\t//\t}\n\t\t} return false;\n\t}", "public boolean equals(java.lang.Object r3) {\n /*\n r2 = this;\n if (r3 == r2) goto L_0x001f;\n L_0x0002:\n r0 = r3 instanceof com.iqoption.app.managers.a.e.a;\n if (r0 == 0) goto L_0x001d;\n L_0x0006:\n r0 = r2.instrumentType;\n r3 = (com.iqoption.app.managers.a.e.a) r3;\n r1 = r3.instrumentType;\n r0 = com.google.common.base.f.equal(r0, r1);\n if (r0 == 0) goto L_0x001d;\n L_0x0012:\n r0 = r2.underlying;\n r3 = r3.underlying;\n r3 = com.google.common.base.f.equal(r0, r3);\n if (r3 == 0) goto L_0x001d;\n L_0x001c:\n goto L_0x001f;\n L_0x001d:\n r3 = 0;\n goto L_0x0020;\n L_0x001f:\n r3 = 1;\n L_0x0020:\n return r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.app.managers.a.e.a.equals(java.lang.Object):boolean\");\n }", "@Override\n public boolean areContentsTheSame(Item one,\n Item two) {\n return one.equals(two);\n }", "@Override\n public abstract boolean equals(final Object o);", "@Override\n public abstract boolean equals(final Object o);", "public boolean equals(Object obj){\r\n\t\tif(!(obj instanceof BaseballCard))\r\n\t\t\treturn false;\r\n\t\tBaseballCard compareable = (BaseballCard) obj;\r\n\t\t\r\n\t\treturn(this.getPrice()==(compareable.getPrice())&&this.getYear()==\r\n\t\t\t\t(compareable.getYear())&&this.getSizeX()==(compareable.getSizeX())\r\n\t\t\t\t&&this.getSizeY()==(compareable.getSizeY())&&this.getName()==\r\n\t\t\t\tcompareable.getName()&&this.getManufacturer()==compareable.getManufacturer());\r\n\t\t\r\n\t}", "@Override\r\n\t\tpublic boolean implementEquals(Object obj) {\n\t\t\treturn false;\r\n\t\t}", "@Override\n public boolean equals(Object object) {\n // TODO: Warning - this method won't work in the case the id fields are not set\n if (!(object instanceof DatasetParameterPK)) {\n return false;\n }\n DatasetParameterPK other = (DatasetParameterPK)object;\n if (this.units != other.units && (this.units == null || !this.units.equals(other.units))) return false;\n if (this.name != other.name && (this.name == null || !this.name.equals(other.name))) return false;\n if (this.datasetId != other.datasetId && (this.datasetId == null || !this.datasetId.equals(other.datasetId))) return false;\n return true;\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "@Override\n public boolean equals(Object obj) {\n\n return id.equals(((BacInfo) obj).id);\n\n }", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "@Override\r\n\tpublic boolean equals(Object obj){\r\n\t\tClientPacket otherPacket = (ClientPacket)obj;\r\n\t\t\r\n\t\tif (otherPacket != null){\r\n\t\t\tif(type != otherPacket.type){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif(dataSize != otherPacket.dataSize){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!Arrays.equals(data, otherPacket.data)){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn super.equals(obj);\r\n\t}", "protected abstract boolean isEqual(E entryA, E entryB);", "public boolean compareEqual(org.vcell.util.Matchable obj) {\r\n\tif (obj instanceof ReferenceDataMappingSpec){\r\n\t\tReferenceDataMappingSpec rdms = (ReferenceDataMappingSpec)obj;\r\n\r\n\t\tif (!org.vcell.util.Compare.isEqual(referenceDataColumnName,rdms.referenceDataColumnName)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ((fieldModelObject == null && rdms.fieldModelObject != null) ||\r\n\t\t\t(fieldModelObject != null && rdms.fieldModelObject == null)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// if both are null, everything is ok\r\n\t\t// if both are non-null, then check for equivalence.\r\n\t\t//\r\n\t\tif (fieldModelObject != null && rdms.fieldModelObject != null){\r\n\t\t\tif (fieldModelObject instanceof org.vcell.util.Matchable){\r\n\t\t\t\tif (rdms.fieldModelObject instanceof org.vcell.util.Matchable){\r\n\t\t\t\t\tif (!org.vcell.util.Compare.isEqualOrNull((org.vcell.util.Matchable)this.fieldModelObject,(org.vcell.util.Matchable)rdms.fieldModelObject)){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//\r\n\t\t\t\t// else compare symbol type, name, and nameScope name\r\n\t\t\t\t//\t\t\t\t\r\n\t\t\t\tif (!fieldModelObject.getClass().equals(rdms.fieldModelObject.getClass())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!fieldModelObject.getName().equals(rdms.fieldModelObject.getName())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!fieldModelObject.getNameScope().getName().equals(rdms.fieldModelObject.getNameScope().getName())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "public boolean equals(Object obj)\n {\n if (! (obj instanceof TableRow))\n return false;\n \n return data.equals(((TableRow) obj).data);\n }", "public boolean hasAdapter(Object adaptable, String adapterTypeName);", "public boolean equalsImpl(Object obj)\n {\n boolean ivarsEqual = true;\n\n final EntityTypeVP rhs = (EntityTypeVP)obj;\n\n if( ! (recordType == rhs.recordType)) ivarsEqual = false;\n if( ! (changeIndicator == rhs.changeIndicator)) ivarsEqual = false;\n if( ! (entityType.equals( rhs.entityType) )) ivarsEqual = false;\n if( ! (padding == rhs.padding)) ivarsEqual = false;\n if( ! (padding1 == rhs.padding1)) ivarsEqual = false;\n return ivarsEqual;\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Override\n public final boolean equals(final Object other) {\n return super.equals(other);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof PackageItemInfoPK)) {\r\n return false;\r\n }\r\n PackageItemInfoPK other = (PackageItemInfoPK) object;\r\n if (this.itemId != other.itemId) {\r\n return false;\r\n }\r\n if (this.packageId != other.packageId) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof DmTuyenDonViPK)) {\n return false;\n }\n DmTuyenDonViPK other = (DmTuyenDonViPK) object;\n if (this.dmtuyenMaso != other.dmtuyenMaso) {\n return false;\n }\n if (this.dmdonviMaso != other.dmdonviMaso) {\n return false;\n }\n return true;\n }", "public final boolean equals(java.lang.Object r2) {\n /*\n r1 = this;\n if (r1 == r2) goto L_0x0015;\n L_0x0002:\n r0 = r2 instanceof com.snap.lenses.app.snappable.SnappableMetadataHttpInterface.a;\n if (r0 == 0) goto L_0x0013;\n L_0x0006:\n r2 = (com.snap.lenses.app.snappable.SnappableMetadataHttpInterface.a) r2;\n r0 = r1.a;\n r2 = r2.a;\n r2 = defpackage.akcr.a(r0, r2);\n if (r2 == 0) goto L_0x0013;\n L_0x0012:\n goto L_0x0015;\n L_0x0013:\n r2 = 0;\n return r2;\n L_0x0015:\n r2 = 1;\n return r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.snap.lenses.app.snappable.SnappableMetadataHttpInterface$a.equals(java.lang.Object):boolean\");\n }", "boolean equalTo(ObjectPassDemo o) {\n return (o.a == a && o.b == b);\n }", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "@Override\n public boolean equals(Object o) {\n return this == o;\n }", "public static boolean defaultEquals(DataValue obj1, Object obj2) {\r\n if (obj1 == obj2) return true;\r\n if (obj2 == null) return false;\r\n if (!(obj2 instanceof DataValue)) return false;\r\n DataValue other = (DataValue) obj2;\r\n if (!obj1.getName().equals(other.getName())) return false;\r\n if (obj1.getObject() == null) {\r\n if (other.getObject() != null) return false;\r\n } else if (obj1.getObject().getClass().isArray()) {\r\n if (!other.getObject().getClass().isArray()) return false;\r\n return Arrays.equals((byte[]) obj1.getObject(), (byte[]) other.getObject());\r\n } else {\r\n if (!obj1.getObject().equals(other.getObject())) return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n PObjLayout other = (PObjLayout) that;\n return (this.getGid() == null ? other.getGid() == null : this.getGid().equals(other.getGid()))\n && (this.getpObjObjectGid() == null ? other.getpObjObjectGid() == null : this.getpObjObjectGid().equals(other.getpObjObjectGid()))\n && (this.getLayoutName() == null ? other.getLayoutName() == null : this.getLayoutName().equals(other.getLayoutName()))\n && (this.getLayoutType() == null ? other.getLayoutType() == null : this.getLayoutType().equals(other.getLayoutType()))\n && (this.getDf() == null ? other.getDf() == null : this.getDf().equals(other.getDf()))\n && (this.getFields() == null ? other.getFields() == null : this.getFields().equals(other.getFields()))\n && (this.getJsondata() == null ? other.getJsondata() == null : this.getJsondata().equals(other.getJsondata()))\n && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))\n && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))\n && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))\n && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))\n && (this.getActive() == null ? other.getActive() == null : this.getActive().equals(other.getActive()))\n && (this.getDelete() == null ? other.getDelete() == null : this.getDelete().equals(other.getDelete()));\n }", "@Test\n public void testEquals_2()\n throws Exception {\n ColumnPreferences fixture = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n fixture.setVisible(true);\n Object obj = new Object();\n\n boolean result = fixture.equals(obj);\n\n assertEquals(false, result);\n }", "public final boolean equals(java.lang.Object r2) {\n /*\n r1 = this;\n if (r1 == r2) goto L_0x0015\n boolean r0 = r2 instanceof com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice\n if (r0 == 0) goto L_0x0013\n com.ss.android.ugc.aweme.notice.repo.list.bean.PostNotice r2 = (com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice) r2\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r1.aweme\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r2.aweme\n boolean r2 = kotlin.jvm.internal.C7573i.m23585a(r0, r2)\n if (r2 == 0) goto L_0x0013\n goto L_0x0015\n L_0x0013:\n r2 = 0\n return r2\n L_0x0015:\n r2 = 1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice.equals(java.lang.Object):boolean\");\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\t//check if object is null\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\t//check if object is from difference class\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\t//check if name is different\n\t\tSport other = (Sport) obj;\n\t\tif (sport != other.sport)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }", "@Test\n public void equalsTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0, entity1);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Cdrbrdta)) {\n return false;\n }\n Cdrbrdta other = (Cdrbrdta) object;\n if ((this.cdrbrdtaPK == null && other.cdrbrdtaPK != null) || (this.cdrbrdtaPK != null && !this.cdrbrdtaPK.equals(other.cdrbrdtaPK))) {\n return false;\n }\n return true;\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }" ]
[ "0.6184992", "0.6092969", "0.59733045", "0.5972918", "0.59550047", "0.59308326", "0.5926485", "0.58927095", "0.5882532", "0.586071", "0.58111364", "0.5788553", "0.57578105", "0.5746968", "0.5729944", "0.57235384", "0.57235384", "0.5709199", "0.57017475", "0.5698297", "0.5687849", "0.56860715", "0.5680874", "0.56806016", "0.56683064", "0.56637424", "0.56582934", "0.563833", "0.5635677", "0.5635651", "0.56347144", "0.56308", "0.5619268", "0.56154805", "0.5613389", "0.5608154", "0.5605704", "0.56037843", "0.5597789", "0.5597497", "0.55883473", "0.55871505", "0.5587112", "0.55785114", "0.5578057", "0.55745953", "0.557436", "0.55717486", "0.55716205", "0.55611867", "0.5559798", "0.5550068", "0.5541811", "0.5530789", "0.5530789", "0.55224764", "0.5519325", "0.55192447", "0.5516251", "0.5512269", "0.5510775", "0.5506899", "0.54947156", "0.54900426", "0.5488815", "0.5475171", "0.5475171", "0.5475159", "0.54676867", "0.5448443", "0.5445812", "0.5445763", "0.54423666", "0.54423666", "0.54423666", "0.54423666", "0.54423666", "0.54420125", "0.54382473", "0.5433742", "0.5433113", "0.5431875", "0.54216605", "0.5420079", "0.5418634", "0.54184127", "0.5408721", "0.54023844", "0.5402383", "0.53979915", "0.53933895", "0.538891", "0.5385998", "0.53834957", "0.53826594", "0.53814423", "0.53810257", "0.5377687", "0.537403", "0.53728807" ]
0.6770415
0
Generates the hashcode compatible with this equality definition
public int hashcodeFor(PolyAdapter adapter) { return adapter.adaptedCode().hashCode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int hashCode()\r\n {\r\n int hash = super.hashCode();\r\n hash ^= hashValue( m_name );\r\n hash ^= hashValue( m_classname );\r\n if( m_implicit )\r\n {\r\n hash ^= 35;\r\n }\r\n hash ^= hashValue( m_production );\r\n hash ^= hashArray( m_dependencies );\r\n hash ^= hashArray( m_inputs );\r\n hash ^= hashArray( m_validators );\r\n hash ^= hashValue( m_data );\r\n return hash;\r\n }", "public int hashcode();", "public int generateHashCode() {\n int code = getClass().hashCode();\n ASTSpanInfo temp_info = getInfo();\n code ^= temp_info.hashCode();\n LHS temp_obj = getObj();\n code ^= temp_obj.hashCode();\n Expr temp_index = getIndex();\n code ^= temp_index.hashCode();\n return code;\n }", "public abstract int hashCode();", "public int generateHashCode() {\n int code = getClass().hashCode();\n boolean temp_fromSource = isFromSource();\n code ^= temp_fromSource ? 1231 : 1237;\n IRId temp_name = getName();\n code ^= temp_name.hashCode();\n List<IRId> temp_params = getParams();\n code ^= temp_params.hashCode();\n List<IRStmt> temp_args = getArgs();\n code ^= temp_args.hashCode();\n List<IRFunDecl> temp_fds = getFds();\n code ^= temp_fds.hashCode();\n List<IRVarStmt> temp_vds = getVds();\n code ^= temp_vds.hashCode();\n List<IRStmt> temp_body = getBody();\n code ^= temp_body.hashCode();\n return code;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = QAOperation.SEED;\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operator.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operand.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + constraint.hashCode();\r\n\t\treturn result;\r\n\t}", "public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }", "@Override\r\n\tpublic int hashCode()\r\n\t{\r\n\t\tint hash = 1;\r\n\r\n\t\tif (containingExpression != null)\r\n\t\t{\r\n\t\t\thash = hash & Constants.HASH_PRIME + containingExpression.hashCode();\r\n\t\t}\r\n\r\n\t\tif (conditions != null)\r\n\t\t{\r\n\t\t\thash = hash * Constants.HASH_PRIME + new HashSet<ICondition>(conditions).hashCode();\r\n\t\t}\r\n\r\n\t\treturn hash;\r\n\t}", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }", "public int hashCode()\n {\n int nHash = super.hashCode();\n\n StringBuilder buf = new StringBuilder(m_strDescription.toLowerCase()\n + m_strFieldType + m_strFieldName.toLowerCase() + m_strOperator\n + m_sequence + m_extOperator);\n Iterator iter = m_values.iterator();\n while (iter.hasNext())\n {\n buf.append((String) iter.next());\n }\n return nHash + buf.toString().hashCode() + (m_choices != null ?\n m_choices.hashCode() : 0);\n }", "@Override\n public int hashCode();", "@Override\n public int hashCode() {\n return new HashCodeBuilder(17, 37)\n .append(getName())\n .append(getType())\n .toHashCode();\n }", "public int hashCode() {\n return 37 * 17;\n }", "int hashCode();", "int hashCode();", "public int hashCode() {\n\t\treturn new HashCodeBuilder().append(obox).append(wordOffsets).append(occlusions).toHashCode();\n\t}", "protected int computeHashCode() {\n return flags * 17\n + (var != null ? var.hashCode() : 0)\n + (num != null ? num.hashCode() : 0)\n + (str != null ? str.hashCode() : 0)\n + (object_labels != null ? object_labels.hashCode() : 0)\n + (getters != null ? getters.hashCode() : 0)\n + (setters != null ? setters.hashCode() : 0)\n + (excluded_strings != null ? excluded_strings.hashCode() : 0)\n + (included_strings != null ? included_strings.hashCode() : 0)\n + (functionPartitions != null ? functionPartitions.hashCode() : 0)\n + (functionTypeSignatures != null ? functionTypeSignatures.hashCode() : 0);\n }", "@Override\n int hashCode();", "@Override\n\tpublic int hashCode() {\n\t\treturn labelTemplate.hashCode() ^ type.hashCode() ^ priority ^ valueTemplate.hashCode();\n\t}", "int\thashCode();", "@Override\n public int hashCode()\n {\n return new HashCodeBuilder(17, 31).\n append(_name).\n toHashCode();\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn idx1.hashCode() * 811 + idx2.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\t\n\t\treturn (int)id * name.hashCode() * email.hashCode();\n\t\t//int hash = new HashCodeBuilder(17,37).append(id).append(name); //can be added from Apache Commons Lang's HashCodeBuilder class\n\t}", "@Override\r\n public int hashCode() {\n return 37 * (37 * (37 * 23 \r\n + typeVariable.getName().hashCode()) \r\n + typeVariable.getGenericDeclaration().hashCode())\r\n + base.hashCode();\r\n }", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "@Override\n\t public int hashCode();", "public int hashCode() {\n /*\n r7 = this;\n com.unboundid.ldap.matchingrules.CaseIgnoreStringMatchingRule r0 = com.unboundid.ldap.matchingrules.CaseIgnoreStringMatchingRule.getInstance()\n byte r1 = r7.filterType\n r2 = -121(0xffffffffffffff87, float:NaN)\n if (r1 == r2) goto L_0x009a\n r2 = 0\n switch(r1) {\n case -96: goto L_0x008b;\n case -95: goto L_0x008b;\n case -94: goto L_0x0084;\n case -93: goto L_0x006e;\n case -92: goto L_0x0034;\n case -91: goto L_0x006e;\n case -90: goto L_0x006e;\n default: goto L_0x000e;\n }\n L_0x000e:\n switch(r1) {\n case -88: goto L_0x006e;\n case -87: goto L_0x0013;\n default: goto L_0x0011;\n }\n L_0x0011:\n goto L_0x00a5\n L_0x0013:\n java.lang.String r2 = r7.attrName\n if (r2 == 0) goto L_0x0020\n java.lang.String r2 = com.unboundid.util.StaticUtils.toLowerCase(r2)\n int r2 = r2.hashCode()\n int r1 = r1 + r2\n L_0x0020:\n java.lang.String r2 = r7.matchingRuleID\n if (r2 == 0) goto L_0x002d\n java.lang.String r2 = com.unboundid.util.StaticUtils.toLowerCase(r2)\n int r2 = r2.hashCode()\n int r1 = r1 + r2\n L_0x002d:\n boolean r2 = r7.dnAttributes\n if (r2 == 0) goto L_0x0079\n int r1 = r1 + 1\n goto L_0x0079\n L_0x0034:\n java.lang.String r3 = r7.attrName\n java.lang.String r3 = com.unboundid.util.StaticUtils.toLowerCase(r3)\n int r3 = r3.hashCode()\n int r1 = r1 + r3\n com.unboundid.asn1.ASN1OctetString r3 = r7.subInitial\n if (r3 == 0) goto L_0x004e\n r4 = -128(0xffffffffffffff80, float:NaN)\n com.unboundid.asn1.ASN1OctetString r3 = r0.normalizeSubstring(r3, r4)\n int r3 = r3.hashCode()\n int r1 = r1 + r3\n L_0x004e:\n com.unboundid.asn1.ASN1OctetString[] r3 = r7.subAny\n int r4 = r3.length\n L_0x0051:\n if (r2 >= r4) goto L_0x0063\n r5 = r3[r2]\n r6 = -127(0xffffffffffffff81, float:NaN)\n com.unboundid.asn1.ASN1OctetString r5 = r0.normalizeSubstring(r5, r6)\n int r5 = r5.hashCode()\n int r1 = r1 + r5\n int r2 = r2 + 1\n goto L_0x0051\n L_0x0063:\n com.unboundid.asn1.ASN1OctetString r2 = r7.subFinal\n if (r2 == 0) goto L_0x00a5\n r3 = -126(0xffffffffffffff82, float:NaN)\n com.unboundid.asn1.ASN1OctetString r0 = r0.normalizeSubstring(r2, r3)\n goto L_0x007f\n L_0x006e:\n java.lang.String r2 = r7.attrName\n java.lang.String r2 = com.unboundid.util.StaticUtils.toLowerCase(r2)\n int r2 = r2.hashCode()\n int r1 = r1 + r2\n L_0x0079:\n com.unboundid.asn1.ASN1OctetString r2 = r7.assertionValue\n com.unboundid.asn1.ASN1OctetString r0 = r0.normalize(r2)\n L_0x007f:\n int r0 = r0.hashCode()\n goto L_0x00a4\n L_0x0084:\n com.unboundid.ldap.sdk.Filter r0 = r7.notComp\n int r0 = r0.hashCode()\n goto L_0x00a4\n L_0x008b:\n com.unboundid.ldap.sdk.Filter[] r0 = r7.filterComps\n int r3 = r0.length\n L_0x008e:\n if (r2 >= r3) goto L_0x00a5\n r4 = r0[r2]\n int r4 = r4.hashCode()\n int r1 = r1 + r4\n int r2 = r2 + 1\n goto L_0x008e\n L_0x009a:\n java.lang.String r0 = r7.attrName\n java.lang.String r0 = com.unboundid.util.StaticUtils.toLowerCase(r0)\n int r0 = r0.hashCode()\n L_0x00a4:\n int r1 = r1 + r0\n L_0x00a5:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.unboundid.ldap.sdk.Filter.hashCode():int\");\n }", "public int hashCode() {\r\n int result = 17;\r\n result = xCH(result, getTableDbName());\r\n result = xCH(result, getMemberAddressId());\r\n return result;\r\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }", "public int hashCode() {\n int result = 17;\n result = (37 * result)\n + ((nullCheck == null) ? 0 : nullCheck.hashCode());\n\n return result;\n }", "@Override \n int hashCode();", "@Override\n public int hashCode() {\n\tint hash = 7;\n\thash = 67 * hash + Objects.hashCode(this.targetType);\n\thash = 67 * hash + Objects.hashCode(this.unresolvedType);\n\thash = 67 * hash + Objects.hashCode(this.targetName);\n\thash = 67 * hash + Objects.hashCode(this.targetActions);\n\treturn hash;\n }", "@Override\n public int hashCode() {\n int hash = 17;\n hash = 31 * hash + month;\n hash = 31 * hash + day;\n hash = 31 * hash + year;\n return hash;\n }", "public int hashCode() {\n/* 69 */ int var1 = super.hashCode();\n/* 70 */ var1 = 31 * var1 + this.allowedValues.hashCode();\n/* 71 */ return var1;\n/* */ }", "public String getHashCode();", "@Test\r\n\tvoid testHashCodes() {\n\r\n\t\tvar dummyExpr = new BooleanValue(false);\r\n\t\tvar dummyStatement = new Statement.Empty();\r\n\t\tvar dummyBlock = new Block(new Statement[]{\r\n\t\t\tdummyStatement\r\n\t\t});\r\n\r\n\t\t// The statements\r\n\t\tnew Statement.ExpressionStatement(dummyExpr, ExpressionStatementKind.NORMAL).hashCode();\r\n\t\tnew Statement.Assignment(new Expression.Symbol(\"foo\"), dummyExpr).hashCode();\r\n\t\tnew Statement.WhileLoop(dummyExpr, dummyBlock).hashCode();\r\n\t\tnew Statement.If(new Expression[]{}, new Block[]{}).hashCode();\r\n\t\tnew Statement.BlockStatement(dummyBlock).hashCode();\r\n\t\tnew Statement.Rule(new Expression[]{\r\n\t\t\tdummyExpr\r\n\t\t}, new Expression[]{}, dummyBlock).hashCode();\r\n\t\tvar functionDef = new Statement.FunctionDefinition(new Expression.Symbol(\"foo\"), new Expression.Symbol[]{}, 0, dummyBlock);\r\n\t\tfunctionDef.hashCode();\r\n\t\tnew Statement.Empty().hashCode();\r\n\r\n\t\t// The expressions.\r\n\t\tnew Expression.Binary(dummyExpr, BinaryOperator.ADD, dummyExpr).hashCode();\r\n\t\tnew Expression.FunctionCall(dummyExpr, new Expression[]{}).hashCode();\r\n\t\tnew Expression.Index(dummyExpr, dummyExpr).hashCode();\r\n\t\tnew Expression.Symbol(\"foo\").hashCode();\r\n\t\tnew Expression.Unary(dummyExpr, UnaryOperator.NEGATE).hashCode();\r\n\t\tnew Expression.Array(new Expression[]{}).hashCode();\r\n\t\tnew Expression.Dictionary(new Expression[]{}, new Expression[]{}).hashCode();\r\n\t\tnew Expression.Lambda(functionDef).hashCode();\r\n\t\tnew Expression.IndexRange(dummyExpr, dummyExpr, dummyExpr).hashCode();\r\n\r\n\t\t// The values.\r\n\t\tnew BooleanValue(false).hashCode();\r\n\t\tnew IntegerValue(0).hashCode();\r\n\t\tnew DoubleValue(0).hashCode();\r\n\t\tnew StringValue(\"foo\").hashCode();\r\n\t\tnew ArrayValue(new ExpressionValue[]{}).hashCode();\r\n\t\tnew DictionaryValue(new HashMap<>()).hashCode();\r\n\t}", "public int hashCode() {\n\t\treturn this.defline.hashCode() + this.sequence.hashCode() + this.quality.hashCode();\n\t}", "public void testHashcode() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n int h1 = r1.hashCode();\n int h2 = r2.hashCode();\n }", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = 17;\r\n\t\tresult = 37*result+(int) (id ^ (id>>>32));\r\n\t\t//result = 37*result+(name==null?0:name.hashCode());\r\n\t\t//result = 37*result+displayOrder;\r\n\t\t//result = 37*result+(this.url==null?0:url.hashCode());\r\n\t\treturn result;\r\n\t}", "public int hashCode() {\n return new HashCodeBuilder(7, 29)\n .append(meaning)\n .append(type)\n .append(target)\n .toHashCode(); \n }", "@Override\n public int hashCode() {\n return values.descriptor.hashCode() ^ values.hashCode();\n }", "public int hashCode() {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[28]++;\r\n long start = getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[29]++;\r\n long end = getEndMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[30]++;\r\n int result = 97;\r\n result = 31 * result + ((int) (start ^ (start >>> 32)));\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[31]++;\r\n result = 31 * result + ((int) (end ^ (end >>> 32)));\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[32]++;\r\n result = 31 * result + getChronology().hashCode();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[33]++;\r\n return result;\r\n }", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "public int hashCode() {\n // For speed, this hash code relies only on the hash codes of its select\n // and criteria clauses, not on the from, order by, or option clauses\n int myHash = 0;\n myHash = HashCodeUtil.hashCode(myHash, this.operation);\n myHash = HashCodeUtil.hashCode(myHash, getProjectedQuery());\n return myHash;\n }", "public int hashCode() {\n\treturn name.hashCode() ^ style ^ size;\n }", "public int hashCode()\n {\n return (int)(swigCPtr^(swigCPtr>>>32));\n }", "@Override\n public int hashCode() {\n \n final int code = 24;\n int result = 1;\n result = code * result + ((id == null) ? 0 : id.hashCode());\n return result;\n }", "@Override\n public int hashCode() {\n int result = 17;\n result = 31 * result + x + y;\n return result;\n }", "public int hashCode() {\n int hash = 0;\n hash = width;\n hash <<= 8;\n hash ^= height;\n hash <<= 8;\n hash ^= numBands;\n hash <<= 8;\n hash ^= dataType;\n hash <<= 8;\n for (int i = 0; i < bandOffsets.length; i++) {\n hash ^= bandOffsets[i];\n hash <<= 8;\n }\n for (int i = 0; i < bankIndices.length; i++) {\n hash ^= bankIndices[i];\n hash <<= 8;\n }\n hash ^= numBands;\n hash <<= 8;\n hash ^= numBanks;\n hash <<= 8;\n hash ^= scanlineStride;\n hash <<= 8;\n hash ^= pixelStride;\n return hash;\n }", "@Override\n public int hashCode() {\n int hash = 3;\n hash = 97 * hash + this.x;\n hash = 97 * hash + this.y;\n return hash;\n }", "@Override\r\n public int hashCode() {\r\n int hash = 7;\r\n hash = 19 * hash + (int) (this.grauDeEquilibrio ^ (this.grauDeEquilibrio >>> 32));\r\n return hash;\r\n }", "public int hashCode(){\n\t\treturn toString().hashCode();\n\t}", "public int hashCode() {\n return super.hashCode() ^ 0x1;\n }", "@Override\r\n public int hashCode()\r\n {\r\n if(this.isEmpty()) return 0;\r\n\r\n /**\r\n * En este caso es recomendable usar la funcion Arrays.hashCode porque\r\n * garantiza un hash unico para cada array.\r\n * Si se usa la suma, los objetos \"ab\" y \"ba\" tendrian el mismo hash.\r\n */\r\n return Arrays.hashCode(this.table);\r\n }", "public int hashCode()\n\t{\n\t\treturn y<<16+x;\n\t}", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 89 * hash + Objects.hashCode(this.recipentQualifiedName);\n return hash;\n }", "@Override\n public int hashCode() {\n return Objects.hash(name, type, id);\n }", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn super.hashCode(); //Default implementation; may need to bring in line to equals\n\t\t}", "public int hashCode()\n {\n return hash;\n }", "@Override\n public int hashCode() {\n return 1;\n }", "String getHashAlgorithm();", "@Override\n public int hashCode() {\n return Short.toUnsignedInt(x) + (Short.toUnsignedInt(y)<<16);\n }", "@Override\n public int hashCode() {\n return hashcode;\n }", "public int hashCode() {\n\t\treturn toString().hashCode();\n\t}", "public int hashCode() {\n/* 781 */ return getUniqueId().hashCode();\n/* */ }", "@Override\r\n\tpublic int hashCode() {\n\t\tint result=1,prime=31;\r\n\t\tresult = result * prime + tableName.hashCode();\r\n\t\tresult = result * prime + databaseName.hashCode();\r\n\t\tresult = result * prime + limit;\r\n\t\tresult = result * prime + offset;\r\n\t\tresult = result * prime + queryCondition.hashCode();\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn year*10000+month*100+day; \n\t}", "public int hashCode() {\n int result = 1;\n Object $pageSize = this.getPageSize();\n result = result * 59 + ($pageSize == null ? 43 : $pageSize.hashCode());\n Object $pageNo = this.getPageNo();\n result = result * 59 + ($pageNo == null ? 43 : $pageNo.hashCode());\n Object $sort = this.getSort();\n result = result * 59 + ($sort == null ? 43 : $sort.hashCode());\n Object $orderByField = this.getOrderByField();\n result = result * 59 + ($orderByField == null ? 43 : $orderByField.hashCode());\n return result;\n }", "public int hashCode() {\n return lho.hashCode() + op.hashCode() + rho.hashCode();\n }", "@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return o.hashCode();\n }", "@Override\n\tpublic int hashCode () {\n\t\treturn Objects.hash(name, active, valueType);\n\t}", "@Override\n public int hashCode() {\n int result = 17;\n result = 37 * result + from.hashCode();\n result = 37 * result + to.hashCode();\n result = 37 * result + color.hashCode();\n return result;\n }", "public int hashCode() {\n int result = 17;\n result = 37 * result + column;\n result = 37 * result + sortOrder.hashCode();\n return result;\n }", "@Override\n public int hashCode() {\n return this.toString().hashCode();\n }", "@Override\n public int hashCode() { \n return this.toString().hashCode();\n }", "public int hashCode()\r\n {\r\n \tint hash = 0;\r\n \thash += dublinCoreTerm == null ? 0 : dublinCoreTerm.hashCode();\r\n \thash += identifierType == null ? 0 : identifierType.hashCode();\r\n \thash += dublinCoreEncodingScheme == null ? 0 : dublinCoreEncodingScheme.hashCode();\r\n \treturn hash;\r\n }", "@Override\n public int hashCode() {\n\n if (this.hashCode == null) {\n int hashCode = this.symbol.hashCode();\n\n if (this.isLookahead) {\n hashCode *= 109;\n }\n\n this.hashCode = hashCode;\n }\n\n return this.hashCode;\n }", "@Override\n public int hashCode() {\n return (first != null ? 41 * first.hashCode() : 0) + (second != null ? second.hashCode() : 0);\n }", "@Override\r\n\t\tpublic int hashCode() {\r\n\t\t\tfinal int prime = 31;\r\n\t\t\tint result = 1;\r\n\t\t\tresult = prime * result + getOuterType().hashCode();\r\n\t\t\tresult = prime * result + ((kind == null) ? 0 : kind.hashCode());\r\n\t\t\tresult = prime * result + length;\r\n\t\t\tresult = prime * result + line;\r\n\t\t\tresult = prime * result + pos;\r\n\t\t\tresult = prime * result + pos_in_line;\r\n\t\t\treturn result;\r\n\t\t}", "@Override\n public int hashCode() {\n int result;\n long temp;\n result = type.hashCode();\n result = 31 * result + (name != null ? name.hashCode() : 0);\n result = 31 * result + (mainColor != null ? mainColor.hashCode() : 0);\n result = 31 * result + (material != null ? material.hashCode() : 0);\n result = 31 * result + (origin != null ? origin.hashCode() : 0);\n temp = Double.doubleToLongBits(price);\n result = 31 * result + (int) (temp ^ (temp >>> 32));\n result = 31 * result + Arrays.hashCode(ageDelta);\n return result;\n }", "@Override\n public int hashCode() {\n long longBits = Double.doubleToLongBits(this.size + this.unit.hashCode());\n return (int) (longBits ^ (longBits >>> 32));\n }", "@Override\n public int hashCode() {\n int B = 31, M = 1000000007, code = 0;\n for(int pos = 0; pos < this.objectA.length(); pos++) {\n code = ((this.objectA.charAt(pos) - 'a') + B * code) % M;\n }\n return (code * this.objectB) % M;\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 71 * hash + this.id;\n hash = 71 * hash + Objects.hashCode(this.name);\n hash = 71 * hash + Objects.hashCode(this.cash);\n hash = 71 * hash + Objects.hashCode(this.skills);\n hash = 71 * hash + Objects.hashCode(this.potions);\n return hash;\n }", "@Test\r\n public void testHash() {\r\n Settings expResult = Settings.EXPERT;\r\n int kod = 16 * 30 * 99;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.INTERMEDIATE;\r\n kod = 16 * 16 * 40;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.BEGINNER;\r\n kod = 9 * 9 * 10;\r\n assertEquals(expResult.hashCode(), kod);\r\n }", "public abstract int getHash();", "public int hashCode(){\n return name.hashCode();\n }", "@Override\r\n public int hashCode() {\r\n return this.toString().hashCode();\r\n }", "@Override\r\n\tpublic int hashCode()\r\n\t{\r\n\t\tint hash = 1;\r\n\t\thash = hash * Constants.HASH_PRIME + entityInterface.hashCode();\r\n\t\treturn hash;\r\n\t}", "public int hashCode() {\n final int HASH_MULTIPLIER = 29;\n int h = HASH_MULTIPLIER * FName.hashCode() + LName.hashCode();\n h = HASH_MULTIPLIER * h + ((Integer)ID).hashCode();\n return h;\n }", "@Override\n @Generated(\"eclipse\")\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + (this.asyncSupported ? 1231 : 1237);\n result = prime * result + (this.heldValue == null ? 0 : this.heldValue.hashCode());\n result =\n prime * result + (this.initParameters == null ? 0 : this.initParameters.hashCode());\n result = prime * result + (this.name == null ? 0 : this.name.hashCode());\n result =\n prime * result + (this.serviceReference == null ? 0 : this.serviceReference.hashCode());\n return result;\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((name == null) ? 0 : name.hashCode());\n result = prime * result + ((identifierPrefix == null) ? 0 : identifierPrefix.hashCode());\n return result;\n }", "public int hashCode() {\n return 0;\n }", "public int hashCode(){\n int hashcode = name == null ? 0 : name.hashCode() / 2;\n return hashcode += ( value == null ? 0 : value.hashCode()/2 );\n }", "public void makeHash(){\n\t\tString tmp = \"\";\n\t\t\n\t\tfor(int i=0;i<_rows;i++){\n\t\t\tfor(int j=0;j<_cols;j++){\n\t\t\t\ttmp+=String.valueOf(_puzzle[i][j])+\"#\";\n\t\t\t}\n\t\t}\n\t\t_hashCode = tmp;\n\t}" ]
[ "0.7226402", "0.71544117", "0.7101521", "0.70672774", "0.7041763", "0.69734764", "0.6939099", "0.6914717", "0.6914394", "0.6914394", "0.6914394", "0.6914394", "0.69099826", "0.69099826", "0.69099826", "0.68992156", "0.6897472", "0.6838498", "0.68328893", "0.6828234", "0.68226033", "0.68226033", "0.68107915", "0.6807493", "0.6782881", "0.67777777", "0.6756763", "0.67535275", "0.673363", "0.67197955", "0.67114604", "0.6711243", "0.6707947", "0.66975707", "0.66835266", "0.6679553", "0.66785336", "0.66572016", "0.6651243", "0.665075", "0.6650132", "0.664695", "0.6642638", "0.6632444", "0.6626766", "0.65982133", "0.6579856", "0.6578", "0.6577903", "0.6574758", "0.6574666", "0.65654665", "0.6553447", "0.6550535", "0.6537978", "0.6529267", "0.65245664", "0.6520032", "0.65148985", "0.6510114", "0.6495769", "0.64944994", "0.6493988", "0.649107", "0.64881283", "0.6487492", "0.6476084", "0.64755446", "0.6464323", "0.64570457", "0.6456704", "0.64530355", "0.6452207", "0.64508617", "0.6447918", "0.64470917", "0.64379954", "0.6429964", "0.6428408", "0.64240766", "0.64190453", "0.6414448", "0.6414048", "0.6408591", "0.6387641", "0.6380971", "0.63806653", "0.63793844", "0.6378922", "0.6378591", "0.63784456", "0.63774276", "0.6376711", "0.63736206", "0.6366895", "0.63663673", "0.63649005", "0.63645995", "0.6363083", "0.6357386", "0.63558984" ]
0.0
-1
Time for manual profiling
@PostMapping("/matrix/multiply") public String multiplyMatrices(@RequestParam("matrixOne") MultipartFile fileOne, @RequestParam("matrixTwo") MultipartFile fileTwo, @RequestParam("deadline") float deadline) { long startTime = System.nanoTime(); try { // Parse files as strings then check if they're valid and then transform them into a multi-dimensional array of integers. String matrixOneString = new String(fileOne.getBytes()); String matrixTwoString = new String(fileTwo.getBytes()); int[][] matrixOne = parseMatrixInput(matrixOneString); int[][] matrixTwo = parseMatrixInput(matrixTwoString); // Work out deadline and then work out using rpc. long longDeadline = (long) (deadline * 10_000_000_00L); //System.out.println("======> deadline => " + deadline + " ======= " + "longDeadline L=> " + longDeadline); int[][] finalMatrix = this.grpcClientService.multiplyMatrices(matrixOne, matrixTwo, longDeadline); long endTime = System.nanoTime(); System.out.println("Total time taken => " + (endTime - startTime) + " deadline => " + longDeadline + " dimension => " + matrixOne.length); return MatrixHelpers.serializeMatrix(finalMatrix); } catch(MatrixException | IOException | InterruptedException | ExecutionException ex) { ex.printStackTrace(); return ex.getMessage(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "public void startTiming() {\n elapsedTime = 0;\n startTime = System.currentTimeMillis();\n }", "private void optimiseEVProfile()\n\t{\n\t}", "long getElapsedTime();", "long getExecutionTime();", "public void testPerformance() {\n \t}", "private void startTiming() {\n m_startTime = Calendar.getInstance().getTimeInMillis();\n }", "public long startTime();", "@Test\n\tpublic void testStartTiming() {\n\t\tip = new ImagePlus();\n\t\tip.startTiming();\n\t}", "int getCPU_time();", "private long getSampleTime() {\n return System.currentTimeMillis();\n\n }", "protected long time(LuaTable table) {\n\t\t//TODO allow table argument to work\n\t\treturn System.currentTimeMillis(); //TODO change this to be something minecraft related\n\t}", "protected long logTestStart(String methodName) {\n\t\tString startTimeString = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\").format(new Date());\n\t\tlogEntry(\"*** START \" + methodName + \": \" + testProperties.getEnvironmentName() + \" / \" + browser + \" / \"\n\t\t\t\t+ startTimeString);\n\t\treturn System.nanoTime();\n\t}", "public void startStopwatch() {\n startingTime = System.nanoTime();\n currentNanoTime = () -> System.nanoTime() - startingTime;\n }", "static void setTiming(){\n killTime=(Pars.txType!=0) ? Pars.txSt+Pars.txDur+60 : Pars.collectTimesB[2]+Pars.dataTime[1]+60;//time to kill simulation\n tracksTime=(Pars.tracks && Pars.txType==0) ? Pars.collectTimesI[1]:(Pars.tracks)? Pars.collectTimesBTx[1]:100*24*60;//time to record tracks\n }", "protected void printExecutionTime(){\n //Do nothing\n }", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "void takeBefore(){\n beforeTimeNs=System.nanoTime();\n }", "private static void writeExecutionTime() {\n \t\n \tendMs = System.currentTimeMillis();\n \tlong elapsed = endMs - startMs;\n \tlong hours = elapsed / 3600000;\n long minutes = (elapsed % 3600000) / 60000;\n long seconds = ((elapsed % 3600000) % 60000) / 1000;\n \n try {\n \t\n \tFileSystem fs = FileSystem.get(Mediator.getConfiguration());\n \tPath outputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/time.txt\");\n \tOutputStream os = fs.create(outputPath);\n \tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os));\n \t\n \t/**\n \t * Write total execution time\n \t */\n \tbw.write(\"Total execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+(elapsed/1000)+\" seconds)\\n\");\n \t\n \t/**\n \t * Write Mappers execution time avg.\n \t */\n \tPath inputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/\"+Mediator.TIME_STATS_DIR);\n \tFileStatus[] status = fs.listStatus(inputPath);\n \tBufferedReader br = null;\n \tString buffer;\n \tlong sumMappers = 0;\n \tint numMappers = 0;\n \tfor (FileStatus fileStatus:status){\n \t\t// Read Stage 1\n \t\tif (fileStatus.getPath().getName().contains(\"mapper\")){\n \t\t\tnumMappers ++;\n \t\t\tbr=new BufferedReader(new InputStreamReader(fs.open(fileStatus.getPath())));\n \t\t\tbuffer = br.readLine();\n \t\t\tsumMappers += Long.parseLong(buffer.substring(buffer.indexOf(\":\")+1).trim());\n \t\t}\n \t\tbr.close();\n \t}\n \t// Write AVG\n \telapsed = sumMappers / numMappers;\n \thours = elapsed / 3600;\n minutes = (elapsed % 3600) / 60;\n seconds = (elapsed % 3600) % 60;\n bw.write(\"Mappers avg. execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+elapsed+\" seconds)\\n\");\n \t\n \tbw.close();\n \tos.close();\n \t\n \t// Remove time stats directory\n \tfs.delete(inputPath,true);\n \t\n }\n catch(Exception e){\n \tSystem.err.println(\"\\nERROR WRITING EXECUTION TIME\");\n\t\t\te.printStackTrace();\n }\n \t\n }", "@Override\r\n\tpublic void startTime() {\n\t\tSystem.out.println(\"인터페이스 ISports2메소드 --> startTime()\");\r\n\t\t\r\n\t}", "public long getTimeTaken();", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public abstract void logTraceTime();", "@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(53)\r\n\tint actualCPUTime_Seconds();", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "public interface ITimed {\n\t\t/**\n\t\t * Runs the action to be profiled, and returns the elapsed time of the\n\t\t * profiled section in seconds.\n\t\t */\n\t\tdouble time() throws Throwable;\n\t}", "@DISPID(56)\r\n\t// = 0x38. The runtime will prefer the VTID if present\r\n\t@VTID(54)\r\n\tint actualCPUTime_Milliseconds();", "private void stepTiming() {\n\t\tdouble currTime = System.currentTimeMillis();\n\t\tstepCounter++;\n\t\t// if it's been a second, compute frames-per-second\n\t\tif (currTime - lastStepTime > 1000.0) {\n\t\t\tdouble fps = (double) stepCounter * 1000.0\n\t\t\t\t\t/ (currTime - lastStepTime);\n\t\t\t// System.err.println(\"FPS: \" + fps);\n\t\t\tstepCounter = 0;\n\t\t\tlastStepTime = currTime;\n\t\t}\n\t}", "protected void setupTime() {\n this.start = System.currentTimeMillis();\n }", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "int checkElapsedTime(){\r\n\t\treturn gc.getElapsedTime();\r\n\t}", "public int getTotalTime();", "@Override\n public long getTotalHarvestingTime()\n {\n return 0;\n }", "public void method_1949() {\n this.field_1249 = System.nanoTime();\n }", "private long calculatePostTime() {\n return System.currentTimeMillis();\n }", "public static void main(String[] args) {\n System.out.println(System.nanoTime());\n }", "public long timeAlg(){\n long startTime = System.nanoTime();\n \n this.doTheAlgorithm();\n \n long endTime = System.nanoTime();\n long elapsedTime = endTime - startTime;\n \n return elapsedTime;\n }", "public void take(Profile profile){\n\t\t//aaaand something else\n\t\ttimesTaken++;\n\t\t//haha nope...\n\t}", "private static String elapsed(long start) {\r\n\treturn \": elapsed : \" + (System.currentTimeMillis() - start) + \" ms \";\r\n }", "private void test() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tBpmnModelInstance modelInstance = Bpmn.readModelFromFile(loadedFile);\n\t\tJsonEncoder jsonEncoder = new JsonEncoder(loadedFile.getName());\n\t\tBpmnBasicMetricsExtractor basicExtractor = new BpmnBasicMetricsExtractor(modelInstance, jsonEncoder);\n\t\tBpmnAdvancedMetricsExtractor advExtractor = new BpmnAdvancedMetricsExtractor(basicExtractor, jsonEncoder);\n\t\tlong loadTime = System.currentTimeMillis() - startTime;\n//\t\tSystem.out.println(\"Tempo load del file: \" + loadTime + \"ms\");\n\t\tbasicExtractor.runMetrics();\n\t\tlong basicTime = System.currentTimeMillis() - loadTime - startTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche di base: \" + basicTime + \"ms\");\n\t\tadvExtractor.runMetrics();\n\t\tlong advTime = System.currentTimeMillis() - basicTime - startTime - loadTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche avanzate: \" + advTime + \"ms\");\n\t\tjsonEncoder.exportJson();\n\t\tMySqlInterface db = new MySqlInterface();\n\t\tdb.connect();\n//\t\tdb.createTables(jsonEncoder);\n//\t\tdb.createAndInsertMetricsInfosTable();\n//\t\tdb.saveMetrics(jsonEncoder);\n//\t\tdb.closeConnection();\n\t}", "void dumpStats() {\n long wallTimeNanos = totalStopwatch.elapsed(TimeUnit.NANOSECONDS);\n long dbtime = 0;\n for (String name : methodCalls.keySet()) {\n long calls = methodCalls.get(name);\n long time = methodTotalTime.get(name);\n dbtime += time;\n long average = time / calls;\n double proportion = (time + 0.0) / (wallTimeNanos + 0.0);\n log.info(name + \" c:\" + calls + \" r:\" + time + \" a:\" + average + \" p:\" + String.format(\"%.2f\", proportion));\n }\n double dbproportion = (dbtime + 0.0) / (wallTimeNanos + 0.0);\n double hitrate = (hit + 0.0) / (hit + miss + 0.0);\n log.info(\"Cache size:\" + utxoCache.size() + \" hit:\" + hit + \" miss:\" + miss + \" rate:\"\n + String.format(\"%.2f\", hitrate));\n bloom.printStat();\n log.info(\"hasTxOut call:\" + hasCall + \" True:\" + hasTrue + \" False:\" + hasFalse);\n log.info(\"Wall:\" + totalStopwatch + \" percent:\" + String.format(\"%.2f\", dbproportion));\n String stats = db.getProperty(\"leveldb.stats\");\n System.out.println(stats);\n\n }", "private void optimiseColdProfile(int timeStep)\n\t{\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"==OptimiseColdProfil for \" + this.owner.getAgentName() + \"; timeStep: \" + timeStep);\n\t\t}\n\n\t\tWeakHashMap<String, double[]> coldApplianceProfiles = this.owner.getColdAppliancesProfiles();\n\t\tdouble[] fridge_loads = coldApplianceProfiles.get(Consts.COLD_APP_FRIDGE_ORIGINAL);\n\t\tdouble[] freezer_loads = coldApplianceProfiles.get(Consts.COLD_APP_FREEZER_ORIGINAL);\n\t\tdouble[] fridge_freezer_loads = coldApplianceProfiles.get(Consts.COLD_APP_FRIDGEFREEZER_ORIGINAL);\n\n\t\tdouble[] fridge_loads_day = Arrays.copyOfRange(fridge_loads, (timeStep % fridge_loads.length), (timeStep % fridge_loads.length)\n\t\t\t\t+ this.ticksPerDay);\n\t\tdouble[] freezer_loads_day = Arrays.copyOfRange(freezer_loads, (timeStep % freezer_loads.length), (timeStep % freezer_loads.length)\n\t\t\t\t+ this.ticksPerDay);\n\t\tdouble[] fridge_freezer_loads_day = Arrays\n\t\t\t\t.copyOfRange(fridge_freezer_loads, (timeStep % fridge_freezer_loads.length), (timeStep % fridge_freezer_loads.length)\n\t\t\t\t\t\t+ this.ticksPerDay);\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"BEFORE fridge_loads: \" + Arrays.toString(fridge_loads_day));\n\t\t}\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"BEFORE freezer_loads: \" + Arrays.toString(freezer_loads_day));\n\t\t}\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"BEFORE fridge_freezer_loads: \" + Arrays.toString(fridge_freezer_loads_day));\n\t\t}\n\n\t\t/*\n\t\t * Currently all 3 cold appliances are shifted randomly (between 1-2\n\t\t * timeslots) with single drawn time shift value This can be changed if\n\t\t * we want to apply different 'tolerance', e.g. the load of fridge can\n\t\t * be shifted to longer hours comparing to say, a freezer.\n\t\t */\n\t\tint timeShift = this.mainContext.coldAndWetApplTimeslotDelayRandDist.nextIntFromTo(1, 2); // Shift\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// load\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// or\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// timeslot\n\n\t\t// Fridge\n\t\tdouble[] currentFridgeCost = ArrayUtils.mtimes(fridge_loads_day, this.dayPredictedCostSignal);\n\t\tint maxIndexForFridge = ArrayUtils.indexOfMax(currentFridgeCost);\n\n\t\tdouble maxValForFridge = fridge_loads_day[maxIndexForFridge];\n\n\t\tif ((maxValForFridge > 0) && (maxIndexForFridge < fridge_loads_day.length - 1))\n\t\t{\n\n\t\t\tfridge_loads_day[maxIndexForFridge] = 0;\n\n\t\t\tint newIndexForFridge = maxIndexForFridge + timeShift;\n\n\t\t\tif (newIndexForFridge >= fridge_loads_day.length)\n\t\t\t{\n\t\t\t\tnewIndexForFridge = fridge_loads_day.length - 1;\n\t\t\t}\n\n\t\t\tfridge_loads_day[newIndexForFridge] = fridge_loads_day[newIndexForFridge] + maxValForFridge;\n\n\t\t\tArrayUtils.replaceRange(coldApplianceProfiles.get(Consts.COLD_APP_FRIDGE), fridge_loads_day, timeStep % fridge_loads.length);\n\t\t}\n\t\t// Freezer\n\t\tdouble[] currentFreezerCost = ArrayUtils.mtimes(freezer_loads_day, this.dayPredictedCostSignal);\n\t\tint maxIndexForFreezer = ArrayUtils.indexOfMax(currentFreezerCost);\n\n\t\tdouble maxValForFeezer = freezer_loads_day[maxIndexForFreezer];\n\n\t\tif ((maxValForFeezer > 0) && (maxIndexForFreezer < freezer_loads_day.length - 1))\n\t\t{\n\t\t\tfreezer_loads_day[maxIndexForFreezer] = 0;\n\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"max index for freezer: \" + maxIndexForFreezer + \" val: \" + maxValForFeezer);\n\t\t\t}\n\n\t\t\tint newIndexForFreezer = maxIndexForFreezer + timeShift;\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"newIndex for Freezer before: \" + newIndexForFreezer);\n\t\t\t}\n\t\t\tif (newIndexForFreezer >= freezer_loads_day.length)\n\t\t\t{\n\t\t\t\tnewIndexForFreezer = freezer_loads_day.length - 1;\n\t\t\t}\n\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"newIndexForFeezer after: \" + newIndexForFreezer);\n\t\t\t}\n\n\t\t\tfreezer_loads_day[newIndexForFreezer] = freezer_loads_day[newIndexForFreezer] + maxValForFeezer;\n\n\t\t\tArrayUtils.replaceRange(coldApplianceProfiles.get(Consts.COLD_APP_FREEZER), freezer_loads_day, timeStep % freezer_loads.length);\n\t\t}\n\t\t// FridgeFreezer\n\t\tdouble[] currentFridgeFreezerCost = ArrayUtils.mtimes(fridge_freezer_loads_day, this.dayPredictedCostSignal);\n\t\tint maxIndexForFridgeFreezer = ArrayUtils.indexOfMax(currentFridgeFreezerCost);\n\n\t\tdouble maxValForFridgeFeezer = fridge_freezer_loads_day[maxIndexForFridgeFreezer];\n\n\t\tif ((maxValForFridgeFeezer > 0) && (maxIndexForFridgeFreezer < fridge_freezer_loads_day.length - 1))\n\t\t{\n\n\t\t\tfridge_freezer_loads_day[maxIndexForFridgeFreezer] = 0;\n\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger\n\t\t\t\t\t\t.trace(\"max index for FridgeFreezer: \" + maxIndexForFridgeFreezer + \" val: \" + maxValForFridgeFeezer);\n\t\t\t}\n\n\t\t\tint newIndexForFridgeFreezer = maxIndexForFridgeFreezer + timeShift;\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"newIndexForFridgeFreezer before: \" + newIndexForFridgeFreezer);\n\t\t\t}\n\t\t\tif (newIndexForFridgeFreezer >= fridge_freezer_loads_day.length)\n\t\t\t{\n\t\t\t\tnewIndexForFridgeFreezer = fridge_freezer_loads_day.length - 1;\n\t\t\t}\n\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"newIndexForFridgeFreezer after: \" + newIndexForFridgeFreezer);\n\t\t\t}\n\n\t\t\tfridge_freezer_loads_day[newIndexForFridgeFreezer] = fridge_freezer_loads_day[newIndexForFridgeFreezer] + maxValForFridgeFeezer;\n\n\t\t\tArrayUtils.replaceRange(coldApplianceProfiles.get(Consts.COLD_APP_FRIDGEFREEZER), fridge_freezer_loads_day, timeStep\n\t\t\t\t\t% fridge_freezer_loads.length);\n\t\t}\n\n\t\tthis.owner.setColdAppliancesProfiles(coldApplianceProfiles);\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"AFTER fridge_loads: \" + Arrays.toString(fridge_loads_day));\n\t\t}\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"AFTER freezer_loads: \" + Arrays.toString(freezer_loads_day));\n\t\t}\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"AFTER fridge_freezer_loads: \" + Arrays.toString(fridge_freezer_loads_day));\n\t\t}\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"==END of OptimiseColdProfile === \");\n\t\t}\n\t}", "private static double pythonTime() {\n return System.currentTimeMillis() / 1000;\n }", "@Test\n public void testTimelyTest() {\n }", "@DISPID(70)\r\n\t// = 0x46. The runtime will prefer the VTID if present\r\n\t@VTID(68)\r\n\tint averageCPUTime_Seconds();", "@DISPID(21)\r\n\t// = 0x15. The runtime will prefer the VTID if present\r\n\t@VTID(23)\r\n\tjava.lang.String actualCPUTime();", "protected static double getFPGATime() {\n return (System.currentTimeMillis() - startTime) / 1000.0;\n }", "public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "@Around(\"@annotation(com.example.user_register.aop.annotation.ExecutionTime)\")\n public Object trackTime(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {\n long startTime = System.currentTimeMillis();\n Object object = proceedingJoinPoint.proceed();\n long endTime = System.currentTimeMillis();\n logger.info(\"Method \"\n .concat(proceedingJoinPoint.getSignature().toShortString())\n .concat(\" took: \")\n .concat(String.valueOf(endTime - startTime))\n .concat(\"ms\"));\n return object;\n }", "@Override\r\n\tpublic void perSecond() {\n\r\n\t}", "public void measureRuntime() throws IOException {\n int[] ns = new int[]{10, 100, 1000};\n for (int i : ns) {\n System.out.println(String.format(\"%d times input read took %fms\", i, (float) measureReadInput(i)));\n }\n for (int i : ns) {\n System.out.println(String.format(\"%d times pca took %fms\", i, (float) measurePCA(i)));\n }\n for (int i : ns) { // all cubes\n System.out.println(String.format(\"%d skeleton generations all cubes took %fms\", i, (float) measureAlgorithmWithoutPCA(i, true, true)));\n }\n for (int i : ns) { // low res\n System.out.println(String.format(\"%d skeleton generations low res took %fms\", i, (float) measureAlgorithmWithoutPCA(i, false, true)));\n }\n for (int i : ns) { // high res\n System.out.println(String.format(\"%d skeleton generations high res took %fms\", i, (float) measureAlgorithmWithoutPCA(i, false, false)));\n }\n }", "protected long logTestStart(String methodName, String comment) {\n\t\tscreenshotAdditionalData = comment;\n\t\tString startTimeString = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\").format(new Date());\n\t\tlogEntry(\"*** START \" + methodName + \" (\" + comment + \"): \" + testProperties.getEnvironmentName() + \" / \"\n\t\t\t\t+ browser + \" / \" + startTimeString);\n\t\treturn System.nanoTime();\n\t}", "@DISPID(71)\r\n\t// = 0x47. The runtime will prefer the VTID if present\r\n\t@VTID(69)\r\n\tint averageCPUTime_Milliseconds();", "public void startMeasuring() {\n\tsuper.startMeasuring();\n}", "public void step() {\n \tinternaltime ++;\n \n }", "public String getPerformanceTime()\r\n {\r\n return performanceTime;\r\n }", "@DISPID(66)\r\n\t// = 0x42. The runtime will prefer the VTID if present\r\n\t@VTID(64)\r\n\tint averageRunTime_Milliseconds();", "long elapsedTime();", "public long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n}", "public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }", "public static void main(String[] args) throws Exception {\n \r\n long beginTime = System.nanoTime();\r\n for (int i = 0; i < 50000000; i++) {\r\n// System.out.println(getFlowNo());\r\n getFlowNo();\r\n \r\n }\r\n long endTime = System.nanoTime();\r\n System.out.println(\"onLineWithTransaction cost:\"+((endTime-beginTime)/1000000000) + \"s \" + ((endTime-beginTime)%1000000000) + \"us\");\r\n// \r\n// System.out.println(System.currentTimeMillis());\r\n// TimeUnit.SECONDS.sleep(3);\r\n// System.out.println(System.currentTimeMillis());\r\n }", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the number of members: \");\n\t\tnumberOfMembers = scanner.nextInt();\n\t\tSystem.out.println(\"Enter the number of timestamps: \");\n\t\tnumberOfTimestamps = scanner.nextInt();\n\t\tscanner.close();\n\t\t\n\t\t/**\n\t\t * Generating logFile with values given by user,\n\t\t * calculating time taken to generate and printing that time.\n\t\t */\n\t\tstartTime = System.nanoTime();\n\t\tgenerateLogFile(numberOfMembers, numberOfTimestamps);\n\t\ttimeLast = System.nanoTime() - startTime;\n\t\tcalculateTime(\"File generated in\", timeLast);\n\t\t\n\t\t/**\n\t\t * Initializing algorithm instances,\n\t\t * calculating time taken to initialize and printing that time.\n\t\t */\n\t\tstartTime = System.nanoTime();\n\t\tquickFind = new QuickFindUF(numberOfMembers);\n\t\tquickUnion = new QuickUnionUF(numberOfMembers);\n\t\tweightedQuickUnion = new WeightedQuickUnionUF(numberOfMembers);\n\t\tweightedQuickUnionByHeight = new WeightedQuickUnionByHeightUF(numberOfMembers);\n\t\tquickUnionPathCompression = new QuickUnionPathCompressionUF(numberOfMembers);\n\t\tweightedQuickUnionPathCompression = new WeightedQuickUnionPathCompressionUF(numberOfMembers);\n\t\ttimeLast = System.nanoTime() - startTime;\n\t\tcalculateTime(\"Instances generated in\", timeLast);\n\t\t\n\t\t/**\n\t\t * Running algorithms and initializing variables of time taken.\n\t\t */\n\t\tdouble quickFindTime = runAlgorithm(quickFind);\n\t\tdouble quickUnionTime = runAlgorithm(quickUnion);\n\t\tdouble weightedQuickUnionTime = runAlgorithm(weightedQuickUnion);\n\t\tdouble weightedQuickUnionByHeightTime = runAlgorithm(weightedQuickUnionByHeight);\n\t\tdouble quickUnionPathCompressionTime =runAlgorithm(quickUnionPathCompression);\n\t\tdouble weightedQuickUnionPathCompressionTime = runAlgorithm(weightedQuickUnionPathCompression);\n\t\t\n\t\t/**\n\t\t * Creating list of times taken to run by different algorithms\n\t\t * to get the shortest time taken.\n\t\t */\n\t\tArrayList<Double> algorithmTimes = new ArrayList<>();\n\t\talgorithmTimes.add(quickFindTime);\n\t\talgorithmTimes.add(quickUnionTime);\n\t\talgorithmTimes.add(weightedQuickUnionTime);\n\t\talgorithmTimes.add(weightedQuickUnionByHeightTime);\n\t\talgorithmTimes.add(quickUnionPathCompressionTime);\n\t\talgorithmTimes.add(weightedQuickUnionPathCompressionTime);\n\t\tCollections.sort(algorithmTimes);\n\t\tdouble shortestTime = algorithmTimes.get(0);\n\t\t\n\t\t/**\n\t\t * Printing comparison of time taken by algorithms in relation to the shortest time. \n\t\t */\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\"Times Comparison\");\n\t\tSystem.out.println(\"======================================================\");\n\t\tSystem.out.printf(quickFind.getClass().getSimpleName() + \"\\t\\t\\t\\t%.5f%n\"\n\t\t\t\t+ quickUnion.getClass().getSimpleName() + \"\\t\\t\\t\\t%.5f%n\"\n\t\t\t\t+ weightedQuickUnion.getClass().getSimpleName() + \"\\t\\t\\t%.5f%n\"\n\t\t\t\t+ weightedQuickUnionByHeight.getClass().getSimpleName() + \"\\t\\t%.5f%n\"\n\t\t\t\t+ quickUnionPathCompression.getClass().getSimpleName() + \"\\t\\t%.5f%n\"\n\t\t\t\t+ weightedQuickUnionPathCompression.getClass().getSimpleName() + \"\\t%.5f%n\",\n\t\t\t\tquickFindTime/shortestTime, quickUnionTime/shortestTime,weightedQuickUnionTime/shortestTime, \n\t\t\t\tweightedQuickUnionByHeightTime/shortestTime, quickUnionPathCompressionTime/shortestTime, weightedQuickUnionPathCompressionTime/shortestTime);\n\t}", "public void savePersonTiming(ActionEvent actionEvent) {\n\t\tfor (int i = 0; i < 1000000; i++) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"You've registered\"));\n\t}", "private int computeExaminationTime(short type) {\n\t\treturn (int)\n\t\t\t(_examinationMins[type]\n\t\t\t\t+ (_examinationMaxs[type] - _examinationMins[type])\n\t\t\t\t\t* Math.random());\n\t}", "protected int getTimesOptimized()\r\n {\r\n return timesOptimized;\r\n }", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "public void setCPUTime() {\r\n\t\t\tthis.CPUTime = 0;\r\n\t\t}", "public void start(){\n\n stopWatchStartTimeNanoSecs = magicBean.getCurrentThreadCpuTime();\n\n }", "long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {\r\n\t\tlong t = System.currentTimeMillis();\r\n\t\tSystem.out.println(String.valueOf(t)); \r\n\t\t\r\n\t\t\r\n\t}", "public void testTime()\n {\n SudokuTimer test = new SudokuTimer();\n\n mTimer.start();\n test.start();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n assertTrue(mTimer.toString().equals(test.toString()));\n\n mTimer.stop();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n assertFalse(mTimer.toString().equals(test.toString()));\n\n test.stop();\n mTimer.start();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n mTimer.stop();\n\n //checks to the nearest second\n assertEquals(mTimer.getElapsedTime() / 1000,\n test.getElapsedTime() / 1000);\n }", "public static void basicTime(){\t\n\t\tint[] array;\n\t\t//Basic sort timings\n\t\tSystem.out.printf(\"%12s%10s%10s%10s%10s%10s%n\", \"Size\", \"Bubble\", \"Insertion\", \"Selection\", \"Quick\", \"Merge\");\n\t\t//1K\n\t\tarray = generateArray(1000, 0, 1000);\n\t\tallSorts(array);\n\t\t//5K\n\t\tarray = generateArray(5000, 0, 5000);\n\t\tallSorts(array);\n\t\t//10K\n\t\tarray = generateArray(10000, 0, 10000);\n\t\tallSorts(array);\n\t\t//50K\n\t\tarray = generateArray(50000, 0, 50000);\n\t\tallSorts(array);\n\t\t//100K\n\t\tSystem.out.printf(\"%12d%10s\",100000,\"N/A\");\n\t\tarray = generateArray(100000, 0, 100000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//500K\n\t\tSystem.out.printf(\"%12d%10s\",500000,\"N/A\");\n\t\tarray = generateArray(500000, 0, 500000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//1M\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",1000000,\"N/A\", \"N/A\", \"N/A\");\n\t\tarray = generateArray(1000000, 0, 1000000);\n\t\t//Performs quick sort\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\t\n\t\t\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t\t//5M\n\t\tarray = generateArray(5000000, 0, 5000000);\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",5000000,\"N/A\", \"N/A\", \"N/A\");\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t}", "long getVisitStarttime();", "long getVisitStarttime();", "public static void getProfilingLevelSettings(Instruction inst){\r\n Map<String, Integer> levelMap = inst.getProfilingLevelMap();\r\n Instruction.printInstruction(inst);\r\n\r\n for(String s: levelMap.keySet()){\r\n if(s.equals(\"method\")){\r\n ProfilingThread.methodProfiling = true;\r\n }\r\n if(s.endsWith(\"memory\") && levelMap.get(s) != 0){\r\n ProfilingThread.memoryProfiling = true;\r\n ProfilingThread.MEMORY_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"cpu\") && levelMap.get(s) != 0){\r\n ProfilingThread.cpuProfiling = true;\r\n ProfilingThread.CPU_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"thread\") && levelMap.get(s) != 0){\r\n ProfilingThread.threadProfiling = true;\r\n ProfilingThread.THREAD_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"class\") && levelMap.get(s) != 0){\r\n ProfilingThread.classProfiling = true;\r\n ProfilingThread.CLASS_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n }\r\n\r\n System.out.println(\"Meth: \" + ProfilingThread.methodProfiling + \", MEM: \" + ProfilingThread.memoryProfiling + \", CPU: \" + ProfilingThread.cpuProfiling + \", CLASS: \" + ProfilingThread.classProfiling + \", THREAD: \" + ProfilingThread.threadProfiling);\r\n\r\n }", "boolean profilerEnabled();", "double get_system_time(int n)\n {\n long start = System.nanoTime();\n for (int i = 1; i < n; i*=2)\n {\n // free process..\n }\n long end = System.nanoTime();\n double t = (end - start) / 1000000000.0;\n return t;\n }", "String measureAlgorithmTime(int x, int y, int z) throws Exception;", "private void m128168k() {\n C42962b.f111525a.mo104671a(\"upload_page_duration\", C22984d.m75611a().mo59971a(\"first_selection_duration\", System.currentTimeMillis() - this.f104209S).mo59971a(\"page_stay_duration\", System.currentTimeMillis() - this.f104208R).f60753a);\n }", "public void Times() \n {\n if(status.getStatus_NUM() == 1 || status.getStatus_NUM() == 2 || status.getStatus_NUM() == 3)\n { //Waiting Time\n startWaitingTime = System.nanoTime();\n if(status.getStatus_NUM() != 1 || status.getStatus_NUM() != 2 || status.getStatus_NUM() != 3)\n {\n endWaitingTime = System.nanoTime();\n }\n \n totalWaitingTime += endWaitingTime - startWaitingTime;\n }\n //When it is running status \n else if(status.getStatus_NUM() == 0)\n {\n //Running Time\n startRunningTime = System.nanoTime();\n //Add a process\n if(status.getStatus_NUM() != 0)\n {\n endRunningTime = System.nanoTime();\n }\n \n totalRunningTime += endRunningTime - startRunningTime;\n }\n //When it is terminated\n else\n {\n System.out.println(\"Terminated\");\n System.out.println(\"Total Running Time : \" + totalRunningTime);\n System.out.println(\"Total Waiting Time : \" + totalWaitingTime);\n }\n }", "public long mo130408c() {\n return System.nanoTime();\n }", "public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}", "public void trackTime()\n {\n frames += 1;\n\n // Every second (roughly) reduce the time left\n if (frames % 60 == 0)\n {\n time += 1;\n showTime();\n }\n }", "public static double toc() {\n\t\treturn System.currentTimeMillis() / 1000d - t;\n\t}", "public static String testRunTime(String startFileName) throws IOException {\n\t\t\t long finish = System.currentTimeMillis();\n\t\t\t String startingTime = fileScanner(startFileName);\n\t\t\t long start = convertStringToLong(startingTime);\n\t\t\t return convertTimeMillisecondsAsLongToDuration(finish - start);\n\t\t\t}", "public void testSummaryStatsStoppedTime() {\n File testFile = new File(\"src/test/data/dataset41.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertTrue(JdkUtil.LogEventType.G1_YOUNG_PAUSE.toString() + \" collector not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.G1_YOUNG_PAUSE));\n Assert.assertTrue(JdkUtil.LogEventType.APPLICATION_STOPPED_TIME.toString() + \" not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.APPLICATION_STOPPED_TIME));\n Assert.assertEquals(\"GC Event count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 2192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 2847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 964, jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 3884, jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 3884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 4884, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 99, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 78, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "private void startTime()\n {\n timer.start();\n }", "public static long getElapsedTime() {\n long time = System.currentTimeMillis() - START_TIME;\n // long time = System.nanoTime() / 1000000;\n return time;\n }", "private void optimiseWetProfile(int timeStep)\n\t{\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"==OptimiseWetProfil for a \" + this.owner.getAgentID() + \"; timeStep: \" + timeStep);\n\t\t}\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"dayPredictedCostSignal: \" + Arrays.toString(this.dayPredictedCostSignal));\n\t\t}\n\n\t\tWeakHashMap<String, double[]> wetApplianceProfiles = this.owner.getWetAppliancesProfiles();\n\t\tdouble[] washer_loads = wetApplianceProfiles.get(Consts.WET_APP_WASHER_ORIGINAL);\n\t\tdouble[] dryer_loads = wetApplianceProfiles.get(Consts.WET_APP_DRYER_ORIGINAL);\n\t\tdouble[] dishwasher_loads = wetApplianceProfiles.get(Consts.WET_APP_DISHWASHER_ORIGINAL);\n\n\t\tdouble[] washer_loads_day = Arrays.copyOfRange(washer_loads, (timeStep % washer_loads.length), (timeStep % washer_loads.length)\n\t\t\t\t+ this.ticksPerDay);\n\t\tdouble[] dryer_loads_day = Arrays.copyOfRange(dryer_loads, (timeStep % dryer_loads.length), (timeStep % dryer_loads.length)\n\t\t\t\t+ this.ticksPerDay);\n\t\tdouble[] dishwasher_loads_day = Arrays\n\t\t\t\t.copyOfRange(dishwasher_loads, (timeStep % dishwasher_loads.length), (timeStep % dishwasher_loads.length)\n\t\t\t\t\t\t+ this.ticksPerDay);\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"BEFORE washer_loads_day: \" + Arrays.toString(washer_loads_day));\n\t\t}\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"BEFORE dryer_loads_day: \" + Arrays.toString(dryer_loads_day));\n\t\t}\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"BEFORE dishwasher_loads_day: \" + Arrays.toString(dishwasher_loads_day));\n\t\t}\n\n\t\t// Washer (washing machine)\n\t\tdouble[] currentWasherCostArr = ArrayUtils.mtimes(washer_loads_day, this.dayPredictedCostSignal);\n\t\tint maxIndexForWasher = ArrayUtils.indexOfMax(currentWasherCostArr);\n\t\tdouble maxValForWasher = washer_loads_day[maxIndexForWasher];\n\t\tdouble currentCostForWasher = currentWasherCostArr[maxIndexForWasher];\n\n\t\tif ((maxValForWasher > 0) && (maxIndexForWasher < washer_loads_day.length - 1))\n\t\t{\n\nif (\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\tthis.mainContext.logger.trace(\"max index for Wahser: \" + maxIndexForWasher + \" val: \" + maxValForWasher + \" current cost: \"\n\t\t\t\t\t+ currentCostForWasher);\n}\n\t\t\tint newIndexForWasher = this.mainContext.coldAndWetApplTimeslotDelayRandDist\n\t\t\t\t\t.nextIntFromTo(maxIndexForWasher + 1, washer_loads_day.length - 1);\n\n\t\t\tdouble newCostForWasher = maxValForWasher * this.dayPredictedCostSignal[newIndexForWasher];\n\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"newIndexForWasher (1st): \" + newIndexForWasher + \" new cost: \" + newCostForWasher);\n\t\t\t}\n\t\t\tif (this.dayPredictedCostSignal[maxIndexForWasher] != this.dayPredictedCostSignal[newIndexForWasher])\n\t\t\t{\nif (\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\tthis.mainContext.logger.trace(\"Signal: \" + this.dayPredictedCostSignal[maxIndexForWasher] + \" != (new) \"\n\t\t\t\t\t\t+ this.dayPredictedCostSignal[newIndexForWasher]);\n}\n\t\t\t}\n\n\t\t\tif (newCostForWasher < currentCostForWasher)\n\t\t\t{\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\" newCostForWahser < currentCostForWasher \");\n\t\t\t\t}\n\n\t\t\t\twasher_loads_day[maxIndexForWasher] = 0;\n\t\t\t\twasher_loads_day[newIndexForWasher] = washer_loads_day[newIndexForWasher] + maxValForWasher;\n\n\t\t\t\tArrayUtils.replaceRange(wetApplianceProfiles.get(Consts.WET_APP_WASHER), washer_loads_day, timeStep % washer_loads.length);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\" newCostForWahser !< currentCostForWasher \");\n\t\t\t\t}\n\n\t\t\t\tint iWasher = newIndexForWasher + 1;\n\t\t\t\tboolean lowerCostFound = false;\n\t\t\t\twhile ((iWasher < washer_loads_day.length) && (!lowerCostFound))\n\t\t\t\t{\n\t\t\t\t\tnewCostForWasher = maxValForWasher * this.dayPredictedCostSignal[iWasher];\nif (\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\tthis.mainContext.logger.trace(iWasher + \" newCostForWahser to considered: \" + newCostForWasher + \" \"\n\t\t\t\t\t\t\t+ (newCostForWasher < currentCostForWasher));\n}\n\t\t\t\t\tif (this.dayPredictedCostSignal[maxIndexForWasher] != this.dayPredictedCostSignal[iWasher])\n\t\t\t\t\t{\nif (\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\tthis.mainContext.logger.trace(\"Signal: \" + this.dayPredictedCostSignal[maxIndexForWasher] + \" != (new) \"\n\t\t\t\t\t\t\t\t+ this.dayPredictedCostSignal[iWasher]);\n}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newCostForWasher < currentCostForWasher)\n\t\t\t\t\t{\n\t\t\t\t\t\tlowerCostFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tiWasher++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (lowerCostFound)\n\t\t\t\t{\n\t\t\t\t\twasher_loads_day[maxIndexForWasher] = 0;\n\t\t\t\t\twasher_loads_day[iWasher] = washer_loads_day[iWasher] + maxValForWasher;\n\n\t\t\t\t\tArrayUtils.replaceRange(wetApplianceProfiles.get(Consts.WET_APP_WASHER), washer_loads_day, timeStep\n\t\t\t\t\t\t\t% washer_loads.length);\nif (\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\tthis.mainContext.logger.trace(\"lowerCostFound: newIndexForWasher (2nd found): \" + iWasher + \" new cost (2): \"\n\t\t\t\t\t\t\t+ newCostForWasher);\n}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Dryer\n\t\tdouble[] currentDryerCostArr = ArrayUtils.mtimes(dryer_loads_day, this.dayPredictedCostSignal);\n\t\tint maxIndexForDryer = ArrayUtils.indexOfMax(currentDryerCostArr);\n\t\tdouble maxValForDryer = dryer_loads_day[maxIndexForDryer];\n\t\tdouble currentCostForDryer = currentDryerCostArr[maxIndexForDryer];\n\n\t\tif ((maxValForDryer > 0) && (maxIndexForDryer < dryer_loads_day.length - 1))\n\t\t{\n\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"max index for Dryer: \" + maxIndexForDryer + \" val: \" + maxValForDryer);\n\t\t\t}\n\t\t\tint newIndexForDryer = this.mainContext.coldAndWetApplTimeslotDelayRandDist\n\t\t\t\t\t.nextIntFromTo(maxIndexForDryer + 1, dryer_loads_day.length - 1);\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"newIndexForDryer: \" + newIndexForDryer);\n\t\t\t}\n\t\t\tdouble newCostForDryer = maxValForDryer * this.dayPredictedCostSignal[newIndexForDryer];\n\n\t\t\tif (newCostForDryer < currentCostForDryer)\n\t\t\t{\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\" newCostForDryer < currentCostForDryer \");\n\t\t\t\t}\n\n\t\t\t\tdryer_loads_day[maxIndexForDryer] = 0;\n\t\t\t\tdryer_loads_day[maxIndexForDryer] = dryer_loads_day[maxIndexForDryer] + maxValForDryer;\n\n\t\t\t\tArrayUtils.replaceRange(wetApplianceProfiles.get(Consts.WET_APP_DRYER), dryer_loads_day, timeStep % dryer_loads.length);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\" newCostForDryer !< currentCostForDryer \");\n\t\t\t\t}\n\t\t\t\tint iDryer = newIndexForDryer + 1;\n\t\t\t\tboolean lowerCostFoundForDryer = false;\n\t\t\t\twhile ((iDryer < dryer_loads_day.length) && (!lowerCostFoundForDryer))\n\t\t\t\t{\n\t\t\t\t\tnewCostForDryer = maxValForDryer * this.dayPredictedCostSignal[iDryer];\nif (\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\tthis.mainContext.logger.trace(iDryer + \" newCostForDryer to considered: \" + newCostForDryer + \" \"\n\t\t\t\t\t\t\t+ (newCostForDryer < currentCostForDryer));\n}\n\t\t\t\t\tif (this.dayPredictedCostSignal[maxIndexForDryer] != this.dayPredictedCostSignal[iDryer])\n\t\t\t\t\t{\nif (\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\tthis.mainContext.logger.trace(\"Signal: \" + this.dayPredictedCostSignal[maxIndexForDryer] + \" != (new) \"\n\t\t\t\t\t\t\t\t+ this.dayPredictedCostSignal[iDryer]);\n}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newCostForDryer < currentCostForDryer)\n\t\t\t\t\t{\n\t\t\t\t\t\tlowerCostFoundForDryer = true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tiDryer++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (lowerCostFoundForDryer)\n\t\t\t\t{\n\t\t\t\t\tdryer_loads_day[maxIndexForDryer] = 0;\n\t\t\t\t\tdryer_loads_day[iDryer] = dryer_loads_day[iDryer] + maxValForDryer;\n\n\t\t\t\t\tArrayUtils.replaceRange(wetApplianceProfiles.get(Consts.WET_APP_DRYER), dryer_loads_day, timeStep % dryer_loads.length);\nif (\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\tthis.mainContext.logger.trace(\"lowerCostFoundForDryer: newIndexForDryer (2nd found): \" + iDryer + \" new cost (2): \"\n\t\t\t\t\t\t\t+ newCostForDryer);\n}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Dishwasher\n\t\tdouble[] currentDishwasherCostArr = ArrayUtils.mtimes(dishwasher_loads_day, this.dayPredictedCostSignal);\n\t\tint maxIndexForDishwasher = ArrayUtils.indexOfMax(currentDishwasherCostArr);\n\t\tdouble maxValForDishwasher = dishwasher_loads_day[maxIndexForDishwasher];\n\t\tdouble currentCostForDishwasher = currentDishwasherCostArr[maxIndexForDishwasher];\n\n\t\tif ((maxValForDishwasher > 0) && (maxIndexForDishwasher < dishwasher_loads_day.length - 1))\n\t\t{\n\n\t\t\t// dishwasher_loads_day[maxIndexForDishwasher] = 0;\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"max index for Dishwasher: \" + maxIndexForDishwasher + \" val: \" + maxValForDishwasher);\n\t\t\t}\n\t\t\tint newIndexForDishwasher = this.mainContext.coldAndWetApplTimeslotDelayRandDist\n\t\t\t\t\t.nextIntFromTo(maxIndexForDishwasher + 1, dishwasher_loads_day.length - 1);\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"newIndexForDishwasher: \" + newIndexForDishwasher);\n\t\t\t}\n\t\t\tdouble newCostForDishwasher = maxValForDishwasher * this.dayPredictedCostSignal[newIndexForDishwasher];\n\n\t\t\tif (newCostForDishwasher < currentCostForDishwasher)\n\t\t\t{\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\" newCostForDishwasher < currentCostForDishwasher \");\n\t\t\t\t}\n\n\t\t\t\tdishwasher_loads_day[maxIndexForDishwasher] = 0;\n\t\t\t\tdishwasher_loads_day[newIndexForDishwasher] = dishwasher_loads_day[newIndexForDishwasher] + maxValForDishwasher;\n\n\t\t\t\tArrayUtils.replaceRange(wetApplianceProfiles.get(Consts.WET_APP_DISHWASHER), dishwasher_loads_day, timeStep\n\t\t\t\t\t\t% dishwasher_loads.length);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\" newCostForDishWahser !< currentCostForDishwasher \");\n\t\t\t\t}\n\t\t\t\tint iDish = newIndexForDishwasher + 1;\n\t\t\t\tboolean lowerCostFoundForDishwasher = false;\n\t\t\t\twhile ((iDish < dishwasher_loads_day.length) && (!lowerCostFoundForDishwasher))\n\t\t\t\t{\n\t\t\t\t\tnewCostForDishwasher = maxValForDishwasher * this.dayPredictedCostSignal[iDish];\nif (\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\tthis.mainContext.logger.trace(iDish + \" newCostForDishwahser to considered: \" + newCostForDishwasher + \" \"\n\t\t\t\t\t\t\t+ (newCostForDishwasher < currentCostForDishwasher));\n}\n\t\t\t\t\tif (this.dayPredictedCostSignal[maxIndexForWasher] != this.dayPredictedCostSignal[iDish])\n\t\t\t\t\t{\nif (\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\tthis.mainContext.logger.trace(\"Signal: \" + this.dayPredictedCostSignal[maxIndexForDishwasher] + \" != (new) \"\n\t\t\t\t\t\t\t\t+ this.dayPredictedCostSignal[iDish]);\n}\n\t\t\t\t\t}\n\t\t\t\t\tif (newCostForDishwasher < currentCostForDishwasher)\n\t\t\t\t\t{\n\t\t\t\t\t\tlowerCostFoundForDishwasher = true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tiDish++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (lowerCostFoundForDishwasher)\n\t\t\t\t{\n\t\t\t\t\tdishwasher_loads_day[maxIndexForDishwasher] = 0;\n\t\t\t\t\tdishwasher_loads_day[iDish] = washer_loads_day[iDish] + maxValForDishwasher;\n\n\t\t\t\t\tArrayUtils.replaceRange(wetApplianceProfiles.get(Consts.WET_APP_DISHWASHER), dishwasher_loads_day, timeStep\n\t\t\t\t\t\t\t% dishwasher_loads.length);\nif (\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\tthis.mainContext.logger.trace(\"lowerCostFound: newIndexForDishwasher (2nd found): \" + iDish + \" new cost (2): \"\n\t\t\t\t\t\t\t+ newCostForDishwasher);\n}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.owner.setWetAppliancesProfiles(wetApplianceProfiles);\n\n\t}", "public abstract double sensingTime();", "private static double simpleSpeedupRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], new String[] {\"1\", \"2\"});\n\t\tConfMan configManager;\n\n\t\tconfigManager = new ConfMan(args[1],applicationPath, false);\n\t\t\n\t\tTrace speedupTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tspeedupTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(speedupTrace);\n\t\t}\n\t\tspeedupTrace.setPrefix(\"speedup\");\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Measuring simple speedup\");\n\t\tspeedupTrace.printTableHeader(\"Running without Synthesis\");\n\t\tAmidarSimulationResult resultsOFF = run(configManager, null, false);\n\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Running again with Synthesis\");\n\t\tconfigManager.setSynthesis(true);\n\t\tAmidarSimulationResult resultsON = run(configManager, null, false);\n\n\t\tdouble speedup = (double)resultsOFF.getTicks()/(double)resultsON.getTicks();\n\t\tdouble energySavings = (double)resultsON.getEnergy()/(double)resultsOFF.getEnergy();\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#0.000\", symbols);\n\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tspeedupTrace.setPrefix(\"results\");\n\t\t\tspeedupTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Simple Speedup Measurement\");\n\t\t\tspeedupTrace.println(\"Ticks without synthesis: \"+resultsOFF.getTicks());\n\t\t\tspeedupTrace.println(\"Ticks with synthesis: \"+resultsON.getTicks());\n\t\t\tspeedupTrace.println(\"Speedup: \"+formater.format(speedup));\n\t\t\tspeedupTrace.println();\n\t\t\tspeedupTrace.println(\"Energy without synthesis: \"+formater.format(resultsOFF.getEnergy()));\n\t\t\tspeedupTrace.println(\"Energy with synthesis: \"+formater.format(resultsON.getEnergy()));\n\t\t\tspeedupTrace.println(\"Energy savings: \"+formater.format((1-energySavings)*100) + \"%\");\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresultsON.getProfiler().reportProfile(speedupTrace);\n\t\t\tspeedupTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresultsON.getKernelProfiler().reportProfile(speedupTrace, resultsON.getTicks());\n\t\t}\n\t\t\t\n\t\treturn speedup;\n\n\t}", "private static void asymptoticAnalysis() {\n\t\tfor(int i = 1; i <= 10; i++) {\n\t\t\tint[] array = getMeRandomArray(100*i);\n\t\t\t// Start timer here\n\t\t\tSystem.out.println(maximumSubarray(array));\n\t\t\t// End timer here\n\t\t\t// Print time here\n\t\t}\n\t\t\n\t}", "public void trace(long startNanoTime, long endNanoTime) {\n trace(\"{}\\t{}\", TOTAL_PROCESSING_TIME, (endNanoTime - startNanoTime) / nanosToMicros);\n }", "public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}", "public static void main(String[] args){\n\n StopWatch watch1 = new StopWatch();\n int row = 100000;\n int[] array = new int[row];\n for(int i=0; i<row; i++){\n array[i] = RandomNumber(1,1000);\n }\n\n array = SortArray(array);\n\n double time1 = watch1.getElapsedTime();\n System.out.printf(\"%.2f seconds\\n\",time1);\n }", "public static void main(String[] args) {\n double SumOfTimes = 0;\n for(int j=0; j<100; j++) {\n\n TimeCounter timer = new TimeCounter();\n timer.StartToCount();\n\n for (int i = 1; i <= 100000; i++) {\n if (i % 3 == 0) {\n System.out.print(\"fizz \");\n }\n if (i % 5 == 0) {\n System.out.print(\"buzz\");\n }\n if (i % 3 != 0 && i % 5 != 0) {\n System.out.print(i);\n }\n System.out.println();\n }\n\n timer.FinishToCount();\n SumOfTimes+=timer.GetCountedTime();\n\n }\n System.out.println(\"Average time = \"+SumOfTimes/100); // Average time = 0.318....... (in my processor)\n }", "int getIO_time();", "public static void main(String[] args) {\n\t\tSystem.out.println(\"start . . . \");\n\t\tlong start = System.currentTimeMillis();\n\t\t//rankOffer();\n\t\t//statisticOffer();\\\n\t\t//displayOffer();\n\t\t//idReplace();\n\t\tupdate();\n\t\t//randName();\n\t\tlong end = System.currentTimeMillis();\n\t\tSystem.out.println(\"end use time : \"+ (end-start)+\" ms .\");\n\t}", "Optional<Duration> totalCpuTime();", "@Override\n\tpublic String getUsedCpuTime() {\n\t\treturn model.getUsedCpuTime();\n\t}" ]
[ "0.7393463", "0.6494565", "0.6370959", "0.63404465", "0.6327057", "0.6305046", "0.6255465", "0.62435806", "0.6219845", "0.6195023", "0.619126", "0.6152447", "0.6089722", "0.6042915", "0.6036572", "0.6032087", "0.6012153", "0.6004776", "0.5999638", "0.59984845", "0.598062", "0.5960654", "0.5956494", "0.5940819", "0.59397036", "0.5929819", "0.5922652", "0.59005165", "0.58946425", "0.58946365", "0.5887081", "0.58793795", "0.58659935", "0.58641773", "0.58541536", "0.5842242", "0.5835085", "0.5831091", "0.5818198", "0.58144575", "0.57859105", "0.5783921", "0.5775089", "0.5770265", "0.57618797", "0.57534313", "0.57478344", "0.5728764", "0.570891", "0.5698417", "0.5684335", "0.5683215", "0.56758046", "0.56753695", "0.5666334", "0.5663677", "0.5660288", "0.565649", "0.56547874", "0.5651625", "0.56500983", "0.564938", "0.56475157", "0.5639571", "0.5638428", "0.56376976", "0.5631234", "0.5629454", "0.56207126", "0.5611215", "0.5599587", "0.55975616", "0.5597538", "0.5593163", "0.5593163", "0.55854595", "0.55732566", "0.5562947", "0.55567163", "0.5549844", "0.5545492", "0.55442554", "0.5538628", "0.55327344", "0.55232793", "0.55164635", "0.55149114", "0.5514149", "0.55057657", "0.5500975", "0.54970783", "0.5490071", "0.5482395", "0.5479079", "0.5476609", "0.547513", "0.5474126", "0.54626274", "0.5460833", "0.5459641", "0.54568535" ]
0.0
-1
Tokenize lines from input to later use as dimension.
private static int[][] parseMatrixInput(String input) throws MatrixException { String[] rows = input.trim().split("\n"); String[] columns = rows[0].trim().split(" "); // Various checks against dimension if(rows.length < 1 || columns.length < 1) { throw new MatrixException("Matrix Exception: Matrix does not have rows or perhaps columns."); } if(rows.length != columns.length) { throw new MatrixException("Matrix Exception: Square matrix not provided"); } if(!MatrixHelpers.isAPowerOfTwo(rows.length)) { throw new MatrixException("Matrix Exception: Matrix dimension is not a power of two."); } // Should be ideal dimension int [][] matrix = new int[rows.length][columns.length]; try { for(int i = 0; i < rows.length; i++) { // Tokenize horizontally String[] rowTokens = rows[i].trim().split(" "); // Check for a dodgy line if(rowTokens.length != columns.length) { throw new MatrixException("Matrix Exception: Matrix row length does not conform to original dimension."); } for(int j = 0; j < rowTokens.length; j++) { matrix[i][j] = Integer.parseInt(rowTokens[j]); } } } catch(ArrayIndexOutOfBoundsException | NumberFormatException ex) { throw new MatrixException("Matrix Exception: Could not parse number.", ex); } return matrix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void tokenize() {\n\t\t//Checks char-by-char\n\t\tcharLoop:\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\t//Check if there's a new line\n\t\t\tif (input.charAt(i) == '\\n') {\n\t\t\t\ttokens.add(LINE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Iterate through the tokens and find if any matches\n\t\t\tfor (Token st : Token.values()) {\n\t\t\t\t//Do not test for these because they have separate cases below\n\t\t\t\tif (st.equals(NUMBER) || st.equals(VARIABLE_NAME) || st.equals(STRING) || st.equals(LINE)) continue;\n\t\t\t\t//Skip whitespace & newlines\n\t\t\t\tif (Character.isWhitespace(input.charAt(i))) continue;\n\t\t\t\t\n\t\t\t\t//Checks for multi-character identifiers\n\t\t\t\ttry {\n\t\t\t\t\tif (input.substring(i, i + st.getValue().length()).equals(st.getValue())) {\n\t\t\t\t\t\ttokens.add(st);\n\t\t\t\t\t\ti += st.getValue().length()-1;\n\t\t\t\t\t\tcontinue charLoop;\n\t\t\t\t\t}\n\t\t\t\t} catch(StringIndexOutOfBoundsException e) {}\n\t\t\t\t//Ignore this exception because the identifiers might be larger than the input string.\n\t\t\t\t\n\t\t\t\t//Checks for mono-character identifiers\n\t\t\t\tif (st.isOneChar() && input.charAt(i) == st.getValue().toCharArray()[0]) {\n\t\t\t\t\ttokens.add(st);\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a string\n\t\t\tif (input.charAt(i) == '\"') {\n\t\t\t\ti++;\n\t\t\t\tif (i >= input.length()) break;\n\t\t\t\tStringBuilder string = new StringBuilder();\n\t\t\t\twhile (input.charAt(i) != '\"') {\n\t\t\t\t\tstring.append(input.charAt(i));\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tstring.insert(0, \"\\\"\");\n\t\t\t\tstring.append(\"\\\"\");\n\t\t\t\ttokens.add(STRING);\n\t\t\t\tmetadata.put(tokens.size()-1, string.toString());\n\t\t\t\tcontinue charLoop;\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a number\n\t\t\tif (Character.isDigit(input.charAt(i))) {\n\t\t\t\tStringBuilder digits = new StringBuilder();\n\t\t\t\twhile (Character.isDigit(input.charAt(i)) || input.charAt(i) == '.') {\n\t\t\t\t\tdigits.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (digits.length() != 0) {\n\t\t\t\t\ttokens.add(NUMBER);\n\t\t\t\t\tmetadata.put(tokens.size()-1, digits.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if there is a variable reference/creation\n\t\t\tif (Character.isAlphabetic(input.charAt(i)) && !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\tStringBuilder varName = new StringBuilder();\n\t\t\t\twhile ( ( Character.isAlphabetic(input.charAt(i)) || Character.isDigit(input.charAt(i)) )\n\t\t\t\t\t\t&& !Character.isWhitespace(input.charAt(i))) {\n\t\t\t\t\tvarName.append(input.charAt(i));\n\t\t\t\t\ti++;\n\t\t\t\t\tif (i >= input.length()) break;\n\t\t\t\t}\n\t\t\t\tif (varName.length() != 0) {\n\t\t\t\t\ttokens.add(VARIABLE_NAME);\n\t\t\t\t\tmetadata.put(tokens.size()-1, varName.toString());\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue charLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static String[] lineSplit(String input) {\r\n String[] tokens = input.split(delimiter);\r\n return tokens;\r\n }", "public void tokenizeLines()\n {\n tokenizeLines(0, getDefaultRootElement().getElementCount());\n }", "public void tokenize(String input, List<TokenInfo> tokens);", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "public void tokenizeLines(\n int start,\n int len)\n {\n if (tokenMarker == null)\n {\n return;\n }\n\n Segment lineSegment = new Segment();\n Element map = getDefaultRootElement();\n\n len += start;\n\n try\n {\n for (int i = start; i < len; i++)\n {\n Element lineElement = map.getElement(i);\n int lineStart = lineElement.getStartOffset();\n getText(\n lineStart, lineElement.getEndOffset() - lineStart - 1, lineSegment);\n tokenMarker.markTokens(lineSegment, i);\n }\n }\n catch (BadLocationException bl)\n {\n ;\n }\n }", "public String[] parse() {\n String line = input.nextLine();\n line = line.trim();\n if (StringUtils.isNotEmpty(line)) {\n return StringUtils.split(line, \" \");\n }\n return null;\n }", "protected abstract String[] tokenizeImpl(String text);", "private static int[][] processInput (String info) throws FileNotFoundException, IOException\n {\n BufferedReader input = new BufferedReader(new FileReader(info));\n ArrayList<Integer> pointList = new ArrayList<Integer>();\n String point;\n while ((point = input.readLine()) != null)\n {\n StringTokenizer st = new StringTokenizer(point);\n pointList.add(Integer.parseInt(st.nextToken()));\n pointList.add(Integer.parseInt(st.nextToken()));\n }\n int[][] pointSet = new int[2][pointList.size()/2];\n int j = 0;\n for (int i = 0; i<=pointList.size()-1; i=i+2)\n {\n pointSet[0][j] = pointList.get(i);\n pointSet[1][j] = pointList.get(i+1);\n j++;\n }\n return pointSet;\n }", "private static String[] tokenizeInput(String input) {\r\n\t\tArrayList<String> tokens = new ArrayList<String>(8);\r\n\t\t\r\n\t\tScanner inputScanner = new Scanner(input);\r\n\t\twhile (inputScanner.hasNext()) {\r\n\t\t\ttokens.add(inputScanner.next());\r\n\t\t}\r\n\t\treturn tokens.toArray(new String[tokens.size()]);\r\n\t}", "private LineTokenizer createIdentityCard2LineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer.setNames(new String[] { \"IdCard2Id\", \"IdCard2Number\", \"IdCard2Type\",\"IdCard2HolderName\",\"IdCard2IssuedOn\",\"IdCard2IssuedBy\",\"IdCard2expDate\",\"IdCard2addressId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "protected abstract DataTypes[] processLine(MutableCharArrayString line);", "public void transform() {\n String delimiter = \" \";\n\n System.out.println(\"Using pathname \" + this.inputPath_ + \"\\n\");\n\n //create string to hold the entire input file\n String input = \"\";\n try { //use a scanner to get the contents of the file into a string\n Scanner inputScanner = new Scanner(new File(this.inputPath_));\n //use a delimiter that only matches the end of the file; this will give us the whole file\n input = inputScanner.useDelimiter(\"\\\\Z\").next();\n inputScanner.close();\n } catch (Exception e) {\n System.err.println(\"Couldn't read \" + this.inputPath_);\n System.exit(-100);\n }\n //if we are here, then there wasn't an exception\n\n //make sure not empty file\n if(input.isEmpty()) {\n System.err.print(\"Error: Empty file.\");\n System.exit(-200);\n }\n\n //create an array for the line strings\n ArrayList<String> inputLines = new ArrayList<>();\n\n //next, separate the input string into multiple strings, one for each line\n //delimiter string regex - only match line terminators\n String lineDelim = \"(\\n|\\r|\\r\\n|\\u0085|\\u2028|\\u2029)\";\n StringTokenizer inputLineTokenizer = new StringTokenizer(input, lineDelim); //create a string tokenizer\n\n //count number of lines\n int numberOfLines = inputLineTokenizer.countTokens();\n\n //add the lines to the array\n for(int i = 0; i < numberOfLines; i++) inputLines.add(inputLineTokenizer.nextToken(lineDelim));\n\n\n //split line into words\n\n //create arraylist of strings\n ArrayList<ArrayList<String>> lines = new ArrayList<>();\n\n for(int i = 0; i < inputLines.size(); i++) {\n //printout(\"Read line: \" + inputLines.get(i) + \"\\n\");\n\n //create a tokenizer and count number of tokens\n StringTokenizer tokenizer = new StringTokenizer(inputLines.get(i), delimiter);\n int numWords = tokenizer.countTokens();\n\n //create array of strings\n ArrayList<String> currentLine = new ArrayList<>();\n\n for(int j = 0; j < numWords; j++) { //add a word if it is valid\n String currentWord = cleanUpText(tokenizer.nextToken(delimiter));\n if(!currentWord.isEmpty()) currentLine.add(currentWord);\n }\n\n //add the current line to the list of typed lines if it had any valid words\n if(currentLine.size() > 0) lines.add(currentLine);\n }\n\n if(lines.size() <= 0) {\n System.err.println(\"ERROR! File did not contain a line with any valid words. Please try again with a different inpput file.\");\n System.exit(-444);\n } else {\n //send lines from array to pipe\n for(int i = 0; i < lines.size(); i++) {\n this.output_.put(lines.get(i));\n }\n\n\n\n //send a null terminator?\n //this causes the other filter to give an exception\n //the exception is caught by the other filter, which breaks the loop it uses to get new lines\n this.output_.put(null);\n //printout(\"Done with file input.\\n\");\n //stop the filter\n this.stop();\n }\n\n\n }", "private static void parseInput(BufferedReader reader) {\n\t\tString line = \"\";\n\t\tField f;\n\t\ttry {\n\t\t\tline = reader.readLine();\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\twhile (line != null) {\n\t\t\tf = Field.parse(line);\n\t\t\tif (dimension < f.getCoords().getX()) {\n\t\t\t\tdimension = f.getCoords().getX();\n\t\t\t}\n\t\t\tmap.put(f.getCoords(), f);\n\t\t\ttry {\n\t\t\t\tline = reader.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\n\t}", "public interface Tokenizer {\n\n List<Token> parse(String text);\n}", "@Override\n public void process(JCas jcas)\n throws AnalysisEngineProcessException\n {\n \tfor (LineAnnotation line : JCasUtil.select(jcas, LineAnnotation.class)) {\n String pText = line.getCoveredText();\n int boundary = pText.length();\n int start = 0;\n int end = 0;\n\n while (start < boundary) {\n while (start < boundary && (Character.isSpaceChar(pText.charAt(start)) || Character.isWhitespace(pText.charAt(start))) ) {\n start++;\n }\n\n for (end = start; end < boundary && !(Character.isSpaceChar(pText.charAt(end)) || Character.isWhitespace(pText.charAt(end))); end++);\n \n if (start < boundary) {\n Token tokenAnnotation = new Token(jcas);\n tokenAnnotation.setBegin(start+line.getBegin());\n tokenAnnotation.setEnd(end+line.getBegin());\n tokenAnnotation.addToIndexes();\n }\n start = end + 1;\n }\n \t}\n }", "@Test\n public void testTokenize() {\n String code = \"METAR KTTN 051853Z 04011KT 1 1/2SM VCTS SN FZFG BKN003 OVC010 M02/M02 A3006 RMK AO2 TSB40 SLP176 P0002 T10171017=\";\n String[] tokens = { \"METAR\", \"KTTN\", \"051853Z\", \"04011KT\", \"1 1/2SM\", \"VCTS\", \"SN\", \"FZFG\", \"BKN003\", \"OVC010\", \"M02/M02\", \"A3006\", \"RMK\", \"AO2\", \"TSB40\", \"SLP176\", \"P0002\", \"T10171017\" };\n // WHEN tokenizing the string\n String[] result = getParser().tokenize(code);\n // THEN the visibility part is 1 1/2SM\n assertNotNull(result);\n assertArrayEquals(tokens, result);\n\n }", "public abstract T parseLine(String inputLine);", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "T transform(String line);", "private LineTokenizer createCardLineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer\r\n\t\t\t\t.setNames(new String[] { \"cardId\", \"cardNumber\", \"cardHolderName\", \"expiryDate\", \"cvv\", \"cardTypeId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "public void tokenizeAndParse(){\n StringTokenizer st1 = new StringTokenizer(Strinput, \" \");\n while (st1.hasMoreTokens()){\n String temp = st1.nextToken();\n if(!temp.equals(\"Rs\")&&!temp.equals(\"Ri\")){\n melody.add(Integer.decode(temp.substring(0,2)));\n }\n\n }\n\n }", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "public static String[] tokenizeWords(String line) {\n\n String[] lineTokens = new String[0];\n if (!line.equals(\"\") && !line.equals(\" \")) {\n lineTokens = line.split(\":| :|: | : \");\n }\n return lineTokens;\n }", "@Test\n public void test() {\n bridge.chunk(\"file.txt\", new InputStreamReader(new ByteArrayInputStream(new byte[0]), StandardCharsets.UTF_8));\n List<TokensLine> lines = bridge.chunk(\"file.txt\", new InputStreamReader(new ByteArrayInputStream(new byte[0]), StandardCharsets.UTF_8));\n\n assertThat(lines.size(), is(3));\n\n TokensLine line = lines.get(0);\n // 2 tokens on 1 line\n assertThat(line.getStartUnit(), is(1));\n assertThat(line.getEndUnit(), is(2));\n\n assertThat(line.getStartLine(), is(1));\n assertThat(line.getEndLine(), is(1));\n assertThat(line.getHashCode(), is(\"t1t2\".hashCode()));\n\n line = lines.get(1);\n // 1 token on 2 line\n assertThat(line.getStartUnit(), is(3));\n assertThat(line.getEndUnit(), is(3));\n\n assertThat(line.getStartLine(), is(2));\n assertThat(line.getEndLine(), is(2));\n assertThat(line.getHashCode(), is(\"t3\".hashCode()));\n\n line = lines.get(2);\n // 3 tokens on 4 line\n assertThat(line.getStartUnit(), is(4));\n assertThat(line.getEndUnit(), is(6));\n\n assertThat(line.getStartLine(), is(4));\n assertThat(line.getEndLine(), is(4));\n assertThat(line.getHashCode(), is(\"t1t3t3\".hashCode()));\n }", "private static List<Integer> parse_line(String line, int d) throws Exception {\n\t List<Integer> ans = new ArrayList<Integer>();\n\t StringTokenizer st = new StringTokenizer(line, \" \");\n\t if (st.countTokens() != d) {\n\t throw new Exception(\"Bad line: [\" + line + \"]\");\n\t }\n\t while (st.hasMoreElements()) {\n\t String s = st.nextToken();\n\t try {\n\t ans.add(Integer.parseInt(s));\n\t } catch (Exception ex) {\n\t throw new Exception(\"Bad Integer in \" + \"[\" + line + \"]. \" + ex.getMessage());\n\t }\n\t }\n\t return ans;\n\t }", "private static List<String[]> readInput(String filePath) {\n List<String[]> result = new ArrayList<>();\n int numOfObject = 0;\n\n try {\n Scanner sc = new Scanner(new File(filePath));\n sc.useDelimiter(\"\");\n if (sc.hasNext()) {\n numOfObject = Integer.parseInt(sc.nextLine());\n }\n for (int i=0;i<numOfObject;i++) {\n if (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.trim().isEmpty()) {\n continue;\n }\n result.add(s.split(\" \"));\n }\n }\n sc.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException\");\n }\n return result;\n }", "private void setDimenstions(String line) throws Exception {\n\t\tScanner dimensions = new Scanner(line);\n\n\t\tsetWidth((short) (2 + Short.parseShort(dimensions.next())));\n\t\tsetHeight((short) (2 + Short.parseShort(dimensions.next())));\n\n\t\tdimensions.close();\n\t}", "@Test\r\n public void testTokenize() {\n String code = \"METAR KTTN 051853Z 04011KT 1 1/2SM VCTS SN FZFG BKN003 OVC010 M02/M02 A3006 RMK AO2 TSB40 SLP176 P0002 T10171017=\";\r\n String[] tokens = { \"METAR\", \"KTTN\", \"051853Z\", \"04011KT\", \"1 1/2SM\", \"VCTS\", \"SN\", \"FZFG\", \"BKN003\", \"OVC010\", \"M02/M02\", \"A3006\", \"RMK\", \"AO2\", \"TSB40\", \"SLP176\", \"P0002\", \"T10171017=\" };\r\n // WHEN tokenizing the string\r\n String[] result = getSut().tokenize(code);\r\n // THEN the visibility part is 1 1/2SM\r\n assertNotNull(result);\r\n assertArrayEquals(tokens, result);\r\n\r\n }", "protected String[] splitMVSLine(String raw) {\n if (raw == null) {\n return new String[] {};\n }\n StringTokenizer st = new StringTokenizer(raw);\n String[] rtn = new String[st.countTokens()];\n int i = 0;\n while (st.hasMoreTokens()) {\n String nextToken = st.nextToken();\n rtn[i] = nextToken.trim();\n i++;\n }\n return rtn;\n }", "public static String process(String input) {\n StringTokenizer st = new StringTokenizer(input, DELIM);\n StringBuilder result = new StringBuilder();\n String space = \" \";\n\n while (st.hasMoreTokens()) {\n String tok = st.nextToken();\n Pattern p = Pattern.compile(SPLIT_REGEX);\n Matcher m = p.matcher(tok);\n boolean found = m.find();\n while (found) {\n String subStringFound = m.group();\n if (1 < subStringFound.length()) {\n result.append(subStringFound + space);\n }\n found = m.find();\n }\n }\n return result.toString();\n }", "private void AnalyzeByLine(String str, int lineNum){\n int prev = 0;\n int cur = 0;\n char[] specialCh={' ', '*', '/', '+', '-', '=', '!', '<', '>', '.', ',', '[', ']', '(', ')', '{', '}', ';'};\n boolean isSpecial = false;\n String tmp = \"\";\n\n while (cur < str.length()){\n\n // check the current char is a special char or not\n for (char x : specialCh) {\n if (x == str.charAt(cur)) {\n isSpecial = true;\n break;\n }\n else{\n isSpecial = false;\n }\n }\n\n if(isSpecial) {\n // every time encounter a special char, handle the token before it\n tmp = str.substring(prev, cur);\n switch (tmp){\n case \"\":\n break;\n case \"then\":\n arrL.add(new Token(tmp, 41, lineNum));\n break;\n case \"do\":\n arrL.add(new Token(tmp, 42, lineNum));\n break;\n case \"od\":\n arrL.add(new Token(tmp, 81, lineNum));\n break;\n case \"fi\":\n arrL.add(new Token(tmp, 82, lineNum));\n break;\n case \"else\":\n arrL.add(new Token(tmp, 90, lineNum));\n break;\n case \"let\":\n arrL.add(new Token(tmp, 100, lineNum));\n break;\n case \"call\":\n arrL.add(new Token(tmp, 101, lineNum));\n break;\n case \"if\":\n arrL.add(new Token(tmp, 102, lineNum));\n break;\n case \"while\":\n arrL.add(new Token(tmp, 103, lineNum));\n break;\n case \"return\":\n arrL.add(new Token(tmp, 104, lineNum));\n break;\n case \"var\":\n arrL.add(new Token(tmp, 110, lineNum));\n break;\n case \"array\":\n arrL.add(new Token(tmp, 111, lineNum));\n break;\n case \"function\":\n arrL.add(new Token(tmp, 112, lineNum));\n break;\n case \"procedure\":\n arrL.add(new Token(tmp, 113, lineNum));\n break;\n case \"main\":\n arrL.add(new Token(tmp, 200, lineNum));\n break;\n case \"InputNum\":\n case \"OutputNum\":\n case \"OutputNewLine\":\n arrL.add(new Token(tmp, 61, lineNum));\n break;\n default:\n AnalyzeIdentNum(tmp, lineNum);\n }\n\n // consider binary operator first\n if(str.charAt(cur) == '<' || str.charAt(cur) == '>' || str.charAt(cur) == '!'){\n switch(str.charAt(cur)){\n case '<':\n if(str.charAt(cur+1) == '='){\n arrL.add(new Token(\"<=\", 24, lineNum));\n cur++;\n }\n else if(str.charAt(cur+1) == '-'){\n arrL.add(new Token(\"<-\", 40, lineNum));\n cur++;\n }\n else{\n arrL.add(new Token(\"<\", 22, lineNum));\n }\n break;\n case '>':\n if(str.charAt(cur+1) == '='){\n arrL.add(new Token(\">=\", 23, lineNum));\n cur++;\n }\n else{\n arrL.add(new Token(\">\", 25, lineNum));\n }\n break;\n case '!':\n arrL.add(new Token(\"!=\", 21, lineNum));\n cur++;\n break;\n }\n }\n else{\n // consider unary operator\n switch(str.charAt(cur)){\n case '*':\n arrL.add(new Token(\"*\", 1, lineNum));\n break;\n case '/':\n arrL.add(new Token(\"/\", 2, lineNum));\n break;\n case '+':\n arrL.add(new Token(\"+\", 11, lineNum));\n break;\n case '-':\n arrL.add(new Token(\"-\", 12, lineNum));\n break;\n case '.':\n arrL.add(new Token(\".\", 30, lineNum));\n break;\n case ',':\n arrL.add(new Token(\",\", 31, lineNum));\n break;\n case '[':\n arrL.add(new Token(\"[\", 32, lineNum));\n break;\n case ']':\n arrL.add(new Token(\"]\", 34, lineNum));\n break;\n case ')':\n arrL.add(new Token(\")\", 35, lineNum));\n break;\n case '(':\n arrL.add(new Token(\"(\", 50, lineNum));\n break;\n case ';':\n arrL.add(new Token(\";\", 70, lineNum));\n break;\n case '}':\n arrL.add(new Token(\"}\", 80, lineNum));\n break;\n case '{':\n arrL.add(new Token(\"{\", 150, lineNum));\n break;\n }\n }\n prev = cur + 1;\n }\n cur++;\n }\n }", "protected String[] parseLine() {\n ArrayList<String> lines = new ArrayList<String>();\n StringBuffer line = new StringBuffer(current);\n while (line.length() > style.lineWidth) {\n int index = split(line);\n lines.add(line.substring(0, index));\n line = new StringBuffer(line.substring(index));\n if (line.length() != 0)\n line.insert(0, continueIndentString());\n }\n if (line.length() != 0)\n lines.add(line.toString());\n return lines.toArray(new String[0]);\n }", "public void tokenize(){\n StringReader reader = null;\n try {\n //This returns a StringBuilder with the contents of the file\n reader = buildFileContents(programFile);\n //Next character in file\n int nxt = 0;\n String currentWord = \"\";\n int numAdjEquals = 0;\n int valueBeingBuilt = 0;\n boolean isValBeingBuilt = false;\n //Maps the name of a variable to its memory address on the data segment.\n HashMap<String, Integer> dataSegmentMap = new HashMap<>();\n while ((nxt = reader.read()) != -1){\n char nxtChar = (char)nxt;\n if (currentWord.length() >= 1 && !(((nxtChar >= 'a' && nxtChar <= 'z') || (nxtChar >= 'A' && nxtChar <= 'Z') || (nxtChar >= '0' && nxtChar <= '9')))) {\n //If statement in fun\n if (currentWord.equals(\"if\")){\n //System.out.println(\"if\");\n Token t = new Token(Token.Kind.IF, 0, \"IF\");\n tokenization.add(t);\n }\n //While in fun\n else if (currentWord.equals(\"while\")){\n //System.out.println(\"while\");\n Token t = new Token(Token.Kind.WHILE, 0, \"WHILE\");\n tokenization.add(t);\n }\n //ELse in fun\n else if (currentWord.equals(\"else\")){\n //System.out.println(\"else\");\n Token t = new Token(Token.Kind.ELSE, 0, \"ELSE\");\n tokenization.add(t);\n }\n //Print in fun\n else if (currentWord.equals(\"print\")){\n //System.out.println(\"print\");\n Token t = new Token(Token.Kind.PRINT, 0, \"PRINT\");\n tokenization.add(t);\n }\n //Return in fun\n else if (currentWord.equals(\"return\")){\n Token t = new Token(Token.Kind.RET, 0, \"RET\");\n tokenization.add(t);\n }\n //Start of function definition in fun\n else if (currentWord.equals(\"fun\")){\n //System.out.println(\"fun\");\n Token t = new Token(Token.Kind.FUN, 0, \"FUN\");\n tokenization.add(t);\n }\n //In a fun program, you can put $ + hex to do in-line hex code. E.g. if your program has $0a00\n //the processor will move register A contents to register 0 when it gets thee\n else if (currentWord.charAt(0) == '$'){\n Token t = new Token(Token.Kind.ASIS, 0, \"ASIS\", currentWord.substring(1));\n tokenization.add(t);\n }\n //Variable name\n else{\n //System.out.println(currentWord);\n String varName = \"\";\n //If this is a new variable, put a spot for in the data segment\n if (!dataSegmentMap.containsKey(currentWord)) {\n dataSegmentMap.put(currentWord, nextDataSegmentAddress);\n nextDataSegmentAddress = nextDataSegmentAddress + 2;\n }\n varName = \"var\" + (dataSegmentMap.get(currentWord) / 2);\n Token t = new Token(Token.Kind.ID, 0, \"ID\", varName);\n tokenization.add(t);\n }\n currentWord = \"\";\n }\n //Numeric constant\n else if ((isValBeingBuilt && !((nxtChar >= '0' && nxtChar <= '9') || (nxtChar == '_')) && currentWord.length() == 0)){\n Token t = new Token(Token.Kind.INT, valueBeingBuilt, \"INT\");\n tokenization.add(t);\n isValBeingBuilt = false;\n //System.out.println(valueBeingBuilt);\n valueBeingBuilt = 0;\n }\n if (nxtChar == '=') {\n numAdjEquals++;\n }\n //'='\n else if (numAdjEquals == 1){\n Token t = new Token(Token.Kind.EQ, 0, \"EQ\");\n tokenization.add(t);\n //System.out.println(\"=\");\n numAdjEquals = 0;\n }\n //==\n else if (numAdjEquals == 2){\n Token t = new Token(Token.Kind.EQEQ, 0, \"EQEQ\");\n tokenization.add(t);\n //System.out.println(\"==\");\n numAdjEquals = 0;\n }\n //Braces\n if (nxtChar == '{'){\n Token t = new Token(Token.Kind.LBRACE, 0, \"LBRACE\");\n tokenization.add(t);\n //System.out.println(\"{\");\n }\n else if (nxtChar == '}'){\n Token t = new Token(Token.Kind.RBRACE, 0, \"RBRACE\");\n tokenization.add(t);\n //System.out.println(\"}\");\n }\n //Parenthesis\n else if (nxtChar == '('){\n Token t = new Token(Token.Kind.LEFT, 0, \"LEFT\");\n tokenization.add(t);\n //System.out.println(\"(\");\n }\n else if (nxtChar == ')'){\n Token t = new Token(Token.Kind.RIGHT, 0, \"RIGHT\");\n tokenization.add(t);\n //System.out.println(\")\");\n }\n //Comma (for function arguments like add(x,y)\n else if (nxtChar == ','){\n Token t = new Token(Token.Kind.COMMA, 0, \"COMMA\");\n tokenization.add(t);\n }\n //Addition\n else if (nxtChar == '+'){\n Token t = new Token(Token.Kind.PLUS, 0, \"PLUS\");\n tokenization.add(t);\n //System.out.println(\"+\");\n }\n //Subtraction (multiplication not supported)\n else if (nxtChar == '-'){\n Token t = new Token(Token.Kind.MINUS, 0, \"MINUS\");\n tokenization.add(t);\n }\n //Semicolon\n else if (nxtChar == ';'){\n //System.out.println(\";\");\n }\n //Builds word\n if ((nxtChar >= 'a' && nxtChar <= 'z') || (nxtChar >= 'A' && nxtChar <= 'Z') || (nxtChar >= '0' && nxtChar <= '9' && currentWord.length() >= 1) || (nxtChar == '$' && currentWord.length() == 0)){\n currentWord = currentWord + nxtChar;\n }\n //BUilds numeric value\n if (((nxtChar >= '0' && nxtChar <= '9') || nxtChar == '_') && currentWord.length() == 0){\n if (nxtChar != '_'){\n if (!isValBeingBuilt){\n isValBeingBuilt = true;\n valueBeingBuilt = 0;\n }\n int digit = nxtChar - '0';\n valueBeingBuilt *= 10;\n valueBeingBuilt += digit;\n }\n }\n }\n //At the end, we could still be building a word or numeric value, so we do a final check\n if (currentWord.length() >= 1 ) {\n\n if (currentWord.equals(\"if\")){\n //System.out.println(\"if\");\n Token t = new Token(Token.Kind.IF, 0, \"IF\");\n tokenization.add(t);\n }\n else if (currentWord.equals(\"while\")){\n //System.out.println(\"while\");\n Token t = new Token(Token.Kind.WHILE, 0, \"WHILE\");\n tokenization.add(t);\n }\n else if (currentWord.equals(\"else\")){\n //System.out.println(\"else\");\n Token t = new Token(Token.Kind.ELSE, 0, \"ELSE\");\n tokenization.add(t);\n }\n else if (currentWord.equals(\"print\")){\n //System.out.println(\"print\");\n Token t = new Token(Token.Kind.PRINT, 0, \"PRINT\");\n tokenization.add(t);\n }\n else if (currentWord.equals(\"fun\")){\n //System.out.println(\"fun\");\n Token t = new Token(Token.Kind.FUN, 0, \"FUN\");\n tokenization.add(t);\n }\n else{\n //System.out.println(currentWord);\n Token t = new Token(Token.Kind.ID, 0, \"ID\");\n tokenization.add(t);\n if (!dataSegmentMap.containsKey(currentWord)){\n dataSegmentMap.put(currentWord, nextDataSegmentAddress);\n nextDataSegmentAddress = nextDataSegmentAddress + 2;\n }\n }\n currentWord = \"\";\n }\n else if ((isValBeingBuilt && currentWord.length() == 0)){\n Token t = new Token(Token.Kind.INT, valueBeingBuilt, \"INT\");\n tokenization.add(t);\n isValBeingBuilt = false;\n //System.out.println(valueBeingBuilt);\n valueBeingBuilt = 0;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n tokenization.add(new Token(Token.Kind.END, 0, \"\"));\n substituteStackPointerSet();\n tokenizeFunctionArguments();\n }", "void tokenize(TextDocument document, TokenFactory tokens) throws IOException;", "public SourcedToken[] sourcedTokenize(String input, String source) {\n Token[] tokens = tokenize(input);\n SourcedToken[] sourcedTokens = new SourcedToken[tokens.length];\n for (int i = 0; i < tokens.length; i++) {\n String key = tokens[i].getValue() + \"@\" + source;\n if (tokMap.get(key) == null) {\n tokMap.put(key, new Integer(++nextId));\n }\n int id = ((Integer) tokMap.get(key)).intValue();\n sourcedTokens[i] = new BasicSourcedToken(id, tokens[i].getValue(), source);\n }\n return sourcedTokens;\n }", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "protected abstract void parse(String line);", "public static String[] wrapToLineArray ( final String in, final int width )\n {\n if (in == null) return null;\n if (width < 1) return new String[] {in};\n return wrap(in, width).split(\"\\n\");\n }", "private Line(String inLine) {\n // Save the input line.\n this.lineText = inLine;\n // Get the number of fields in the line.\n int nFields = labels.length;\n // Normally, this will work.\n this.fields = TabbedLineReader.this.splitLine(inLine);\n // If the number of fields is wrong, we have to adjust.\n if (this.fields.length != nFields) {\n // Copy the old array and create a new one of the proper length.\n String[] buffer = this.fields;\n this.fields = new String[nFields];\n // Transfer the strings one by one, padding if necessary.\n for (int i = 0; i < nFields; i++) {\n if (i < buffer.length) {\n this.fields[i] = buffer[i];\n } else {\n this.fields[i] = \"\";\n }\n }\n }\n }", "List<ThingPackage> parseLines(List<String> line);", "private static Stream<String> getTokensFromRawText(String rawText) {\n return Stream.of(rawText.split(\"\\\\s\"));\n }", "protected abstract Operation parseLine(File baseDir, String line, int lineNum) throws IOException;", "void visit(Line line);", "public void tokenizeFile (String filePath) throws IOException {\r\n tokenList.clear();\r\n\r\n FileInputStream fInStream = new FileInputStream(filePath);\r\n Scanner inFS = new Scanner(fInStream);\r\n\r\n while (inFS.hasNextLine()) {\r\n String nextStr = inFS.nextLine();\r\n\r\n if (!nextStr.isEmpty()) {\r\n tokenList.add(theBuilder.build(nextStr));\r\n }\r\n }\r\n\r\n fInStream.close();\r\n inFS.close();\r\n }", "private void init(){\r\n\t\t// already checked that this is a valid file and reader\r\n\t\ttokenizer = new StreamTokenizer(reader);\r\n\t\ttokenizer.slashSlashComments(true);\r\n\t\ttokenizer.slashStarComments(true);\r\n\t\ttokenizer.wordChars('_', '_');\r\n\t\ttokenizer.wordChars('.', '.');\r\n\t\ttokenizer.ordinaryChar('/');\r\n\t\ttokenizer.ordinaryChar('-');\r\n\t\tfillKeywords();\r\n\t\t//tokenChoose = new TokenChooser();\r\n\t}", "@Test\n\tpublic void testInlinerWithFile() throws Exception {\n\t\tString input = new String(Files.readAllBytes(new File(\"../warre.txt\").toPath()));\n\t\tInliner inliner = new Inliner();\n\t\tList<Part> parts = new Tokenizer(inliner).split(input);\n\t\tList<HTreeNode> freq = new FrequencyAnalyzer().analyzeFrequency(parts);\n\t\tString result = inliner.encode(parts, freq, 'X');\n\n\t\tSystem.out.println(\"\\nInput size : \" + input.length());\n\t\tSystem.out.println(\"Output size : \" + result.length());\n\t\tSystem.out.println(\"Num tokens : \" + freq.stream().filter(a -> a.prevalence > 1).count());\n\n//\t\tSystem.out.println(input);\n\t\tSystem.out.println(result);\n//\t\tSystem.out.println(inliner.decode(result, 'X'));\n\t}", "public void parseInput(Scanner sc, String inputLine) {\n String[] input = inputLine.split(\",\");\n assert(input[0].equals(\"R\"));\n this.warehouseID = Integer.parseInt(input[1]);\n this.districtID = Integer.parseInt(input[2]);\n this.customerID = Integer.parseInt(input[3]);\n }", "@Override\n protected void processLine(String line) {\n String[] lines = line.split(\",\");\n for (String l : lines) {\n data.add(l);\n }\n }", "private Iterator tokenize(FreeTTSSpeakable speakable) {\n\treturn new FreeTTSSpeakableTokenizer(speakable).iterator();\n }", "public static void parseLine(String input){\r\n\t\tfor(int i = 0;i<input.length();i++){\r\n\t\t\t\r\n\t\t\tString currentChar = parseChar(input,i);\r\n\t\t\ti+=currentChar.length()-1; //skip past all integer characters if there are any\r\n\t\t\t\r\n\t\t\tif(checkOperand(currentChar)){\r\n\t\t\t\texpressionTree.treeStack.push(new Node(currentChar));\r\n\t\t\t}else if(checkOperator(currentChar)){\r\n\t\t\t\tNode node = new Node(currentChar);\r\n\t\t\t\t\r\n\t\t\t\tif(!expressionTree.treeStack.empty()){\r\n\t\t\t\t\tnode.rightNode = (Node) expressionTree.treeStack.peek();\r\n\t\t\t\t\tnode.rightNode.parentNode = node;\r\n\t\t\t\t\texpressionTree.treeStack.pop();\r\n\t\t\t\t}\r\n\t\t\t\tif(!expressionTree.treeStack.empty()){\r\n\t\t\t\t\tnode.leftNode = (Node) expressionTree.treeStack.peek();\r\n\t\t\t\t\tnode.leftNode.parentNode = node;\r\n\t\t\t\t\texpressionTree.treeStack.pop();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\texpressionTree.treeStack.push(node);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "List<CountryEntity> parseLines(List<String> line);", "public static int[][] getMatrix(String[] lines, String delimiter) {\n\n int[][] data = new int[lines.length][];\n for(int i = 0; i < lines.length; i++) {\n\n String[] parts = lines[i].split(delimiter);\n int[] row = new int[parts.length];\n for (int j = 0; j < parts.length; j++) {\n row[j] = Integer.parseInt(parts[j]);\n }\n data[i] = row;\n }\n return data;\n }", "private boolean parseLine()\r\n\t{\r\n\t\tString delim = \"\\t\";\r\n\t\tm_tokenizer = new StringTokenizer(m_line, delim, true);\r\n\t\tString token;\r\n\t\t\r\n\t\tint tokCount = m_tokenizer.countTokens();\r\n\t\tif ((fieldIndexArray.length <= tokCount) &&\t(tokCount <= fieldIndexArray.length*2))\r\n\t\t{\r\n\t\t\tint lastDelim = -2; /** case when line has consecutive (>=2) tabs!*/\r\n\t\t\tint columnIndex = 0;\r\n\t\t\t/** Tokenise the chip data file's line to separate the data to be put in various columns*/\r\n\t\t\tfor (int i=0; i< tokCount; i++) \r\n\t\t\t{\r\n\t\t\t\ttoken = m_tokenizer.nextToken();\r\n\t\t\t\tif (token.equalsIgnoreCase(delim)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (lastDelim + 1 == i) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** 2 consecutive tags - empty string value*/\r\n\t\t\t\t\t\tif(columnIndex<fieldIndexArray.length)\r\n\t\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(\"\");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlastDelim = i;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t/** Each time when new token rrpresenting column data is encountered then columnIndex is \r\n\t\t\t\t\t * incremented and tokens are stored till the token number is less than total number\r\n\t\t\t\t\t * of tokens on one line according to fieldIndexArray */\r\n\t\t\t\t\tif(columnIndex < fieldIndexArray.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** If total description length exceeds the precision of that field in the table then \r\n\t\t\t\t\t\t * it will be truncated to load it in the description field*/\r\n\t\t\t\t\t\tif(columnIndex == (fieldIndexArray.length-1))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (token.length() > max)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tStringBuffer tokenbuffer = new StringBuffer(token);\r\n\t\t\t\t\t\t\t\ttokenbuffer.setLength(max);\r\n\t\t\t\t\t\t\t\tif(tokenbuffer.charAt(max-1) != '\"')\r\n\t\t\t\t\t\t\t\t\ttokenbuffer.append('\"');\r\n\t\t\t\t\t\t\t\ttoken=tokenbuffer.toString();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/** Here fieldIndexArray will give the actual location of particular token\r\n\t\t\t\t\t\t * in the chipinformation table. This mapping is already done in fieldIndexArray */\r\n\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(token);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\tLogger.log(\"Invalid record: \"+ tokCount + \" fields. \",\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\tLogger.log(\"Expected tokens = \"+ fieldIndexArray.length,\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private static List<String> simpleTokenize (String text) {\r\n\r\n // Do the no-brainers first\r\n String splitPunctText = splitEdgePunct(text);\r\n\r\n int textLength = splitPunctText.length();\r\n \r\n // BTO: the logic here got quite convoluted via the Scala porting detour\r\n // It would be good to switch back to a nice simple procedural style like in the Python version\r\n // ... Scala is such a pain. Never again.\r\n\r\n // Find the matches for subsequences that should be protected,\r\n // e.g. URLs, 1.0, U.N.K.L.E., 12:53\r\n Matcher matches = Protected.matcher(splitPunctText);\r\n //Storing as List[List[String]] to make zip easier later on \r\n List<List<String>> bads = new ArrayList<List<String>>();\t//linked list?\r\n List<Pair<Integer,Integer>> badSpans = new ArrayList<Pair<Integer,Integer>>();\r\n while(matches.find()){\r\n // The spans of the \"bads\" should not be split.\r\n if (matches.start() != matches.end()){ //unnecessary?\r\n List<String> bad = new ArrayList<String>(1);\r\n bad.add(splitPunctText.substring(matches.start(),matches.end()));\r\n bads.add(bad);\r\n badSpans.add(new Pair<Integer, Integer>(matches.start(),matches.end()));\r\n }\r\n }\r\n\r\n // Create a list of indices to create the \"goods\", which can be\r\n // split. We are taking \"bad\" spans like \r\n // List((2,5), (8,10)) \r\n // to create \r\n /// List(0, 2, 5, 8, 10, 12)\r\n // where, e.g., \"12\" here would be the textLength\r\n // has an even length and no indices are the same\r\n List<Integer> indices = new ArrayList<Integer>(2+2*badSpans.size());\r\n indices.add(0);\r\n for(Pair<Integer,Integer> p:badSpans){\r\n indices.add(p.first);\r\n indices.add(p.second);\r\n }\r\n indices.add(textLength);\r\n\r\n // Group the indices and map them to their respective portion of the string\r\n List<List<String>> splitGoods = new ArrayList<List<String>>(indices.size()/2);\r\n for (int i=0; i<indices.size(); i+=2) {\r\n String goodstr = splitPunctText.substring(indices.get(i),indices.get(i+1));\r\n List<String> splitstr = Arrays.asList(goodstr.trim().split(\" \"));\r\n splitGoods.add(splitstr);\r\n }\r\n\r\n // Reinterpolate the 'good' and 'bad' Lists, ensuring that\r\n // additonal tokens from last good item get included\r\n List<String> zippedStr= new ArrayList<String>();\r\n int i;\r\n for(i=0; i < bads.size(); i++) {\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n zippedStr = addAllnonempty(zippedStr,bads.get(i), false);\r\n }\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n \r\n // BTO: our POS tagger wants \"ur\" and \"you're\" to both be one token.\r\n // Uncomment to get \"you 're\"\r\n /*ArrayList<String> splitStr = new ArrayList<String>(zippedStr.size());\r\n for(String tok:zippedStr)\r\n \tsplitStr.addAll(splitToken(tok));\r\n zippedStr=splitStr;*/\r\n \r\n return zippedStr;\r\n }", "public static ArrayList<String> parseFeatureLine(String line){\n\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\n\t\tStringTokenizer tokenizer = new StringTokenizer(line);\n\t\t\n\t\twhile( tokenizer.hasMoreTokens() ){\n\t\t\tString word = tokenizer.nextToken();\n\t\t\t\n\t\t\tif( !word.matches(\"[^a-z]+\") ){\n\t\t\t\twords.add(word);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn words;\n\t}", "@Override\n\tpublic ArrayList<BigDecimal> input(String line) {\n\t\tArrayList<BigDecimal> list = new ArrayList<BigDecimal>();\n\t\tfor (String s : line.split(\"\\\\s+\")) {\n\t\t\tBigDecimal num = new BigDecimal(Double.parseDouble(s));\n\t\t\tlist.add(num);\n\t\t}\n\n\t\treturn list;\n\t}", "List<Object> parse(String inputLine) {\n List<Object> lo = new ArrayList<>();\n int lineLength = inputLine.length();\n for (int i = 0; i < lineLength; i++) {\n char c = inputLine.charAt(i);\n //creator of constant:\n if (isPartOfNumber(c)) {\n String constantValue = \"\";\n for (; i < lineLength; i++) {\n c = inputLine.charAt(i);\n if (!isPartOfNumber(c)) {\n break;\n }\n constantValue += c;\n }\n //assign constant\n lo.add(new Constant(Double.parseDouble(constantValue)));\n if (i == lineLength) {\n break;\n }\n }\n switch (c) {\n case '(':\n lo.add(Brackets.OPENING);\n break;\n case ')':\n lo.add(Brackets.CLOSING);\n break;\n case '²':\n lo.add(Operators.SQUARE);\n break;\n case '√':\n lo.add(Operators.SQUARE_ROOT);\n break;\n case '÷':\n lo.add(Operators.DIVIDE);\n break;\n case '×':\n lo.add(Operators.MULTIPLY);\n break;\n case '%':\n lo.add(Operators.PERCENTAGE);\n break;\n case '+':\n lo.add(Operators.ADD);\n break;\n case '−':\n lo.add(Operators.SUBTRACT);\n break;\n default:\n throw new IllegalArgumentException(\"Unknown symbol used as input string\");\n }\n }\n return lo;\n }", "@Override\n public void pushback() {\n if (tokenizer != null) {\n // add 1 to count: when looping through the new tokenizer, we want there to be 1 more token remaining than there is currently.\n int tokensRemaining = tokenizer.countTokens() + 1;\n tokenizer = new StringTokenizer(stringToTokenize, delimiter, includeDelimiterTokens);\n int totalNumberOfTokens = tokenizer.countTokens();\n for (int i = totalNumberOfTokens; i > tokensRemaining; i--) {\n tokenizer.nextToken();\n }\n }\n }", "public void tokenizeAll() {\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tgetNextValidToken();\n\t\t\t}\n\t\t} catch (NoSuchElementException done) {\n\t\t\t// Fully Tokenized\n\t\t}\n\t}", "public abstract void visit(Line line);", "private static List<Token> tokenize(String source) {\n List<Token> tokens = new ArrayList<Token>();\n\n while (!source.equals(\"\")) {\n int pos = 0;\n TokenType t = null;\n if (Character.isWhitespace(source.charAt(0))) {\n while (pos < source.length() && Character.isWhitespace(source.charAt(pos))) {\n pos++;\n }\n t = TokenType.WHITESPACE;\n } else if (Character.isDigit(source.charAt(0))) {\n while (pos < source.length() && Character.isDigit(source.charAt(pos))) {\n pos++;\n }\n t = TokenType.NUMBER;\n } else if (source.charAt(0) == '+') {\n pos = 1;\n t = TokenType.ADD;\n } else if (source.charAt(0) == '-') {\n pos = 1;\n t = TokenType.SUBTRACT;\n } else if (source.charAt(0) == '*') {\n pos = 1;\n t = TokenType.MULTIPLY;\n } else if (source.charAt(0) == '/') {\n pos = 1;\n t = TokenType.DIVIDE;\n } else if (Character.isLetter(source.charAt(0))) {\n while (pos < source.length() && Character.isLetter(source.charAt(pos))) {\n pos++;\n }\n t = TokenType.IDENTIFIER;\n } else {\n System.err.println(String.format(\"Parse error at: %s\", source));\n System.exit(1);\n }\n\n tokens.add(new Token(t, source.substring(0, pos)));\n source = source.substring(pos, source.length());\n }\n\n return tokens;\n }", "@Override\n public void annotate(Annotation annotation) {\n if (VERBOSE) {\n System.err.print(\"Tokenizing ... \");\n }\n\n if (annotation.has(CoreAnnotations.TextAnnotation.class)) {\n String text = annotation.get(CoreAnnotations.TextAnnotation.class);\n Reader r = new StringReader(text);\n // don't wrap in BufferedReader. It gives you nothing for in-memory String unless you need the readLine() method!\n\n List<CoreLabel> tokens = getTokenizer(r).tokenize();\n // cdm 2010-05-15: This is now unnecessary, as it is done in CoreLabelTokenFactory\n // for (CoreLabel token: tokens) {\n // token.set(CoreAnnotations.TextAnnotation.class, token.get(CoreAnnotations.TextAnnotation.class));\n // }\n\n annotation.set(CoreAnnotations.TokensAnnotation.class, tokens);\n if (VERBOSE) {\n System.err.println(\"done.\");\n System.err.println(\"Tokens: \" + annotation.get(CoreAnnotations.TokensAnnotation.class));\n }\n } else {\n throw new RuntimeException(\"Tokenizer unable to find text in annotation: \" + annotation);\n }\n }", "public static void main(String[] args) {\n\t\tIreader reader = new FileReader();\n\t\tTokens tokens = new Tokens();\n\t\tString s = \"\";\n\t\ttry {\n\t\t\ts = reader.readFile(\"Data/code.txt\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tArrayList<Token> result = new ArrayList<>(), found = new ArrayList<>();\n\t\tfor (Token token : tokens.tokens) {\n\t\t\tfound = token.validate_2(s);\n\t\t\tif (!found.isEmpty()) {\n\t\t\t\tresult.addAll(found);\n\t\t\t\t//System.out.println(found);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(result);\n\t\tCollections.sort(result, Comparator.comparing(Token::getStartpos));\n\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\tfor (int j = i + 1; j < result.size(); j++) {\n\t\t\t\tif (result.get(i).getStartpos() == result.get(j).getStartpos()) {\n\t\t\t\t\tif (result.get(j).getClassName().equals(\"ID\")) {\n\t\t\t\t\t\tresult.remove(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\tfor (int j = i + 1; j < result.size(); j++) {\n\n\t\t\t\tif (result.get(i).getStartpos() <= result.get(j).getStartpos()\n\t\t\t\t\t\t&& result.get(i).getEndpos() >= result.get(j).getEndpos()) {\n\t\t\t\t\tif(result.get(j).getClassName().equals(\"DOT\")&&\n\t\t\t\t\t result.get(j-1).getClassName().equals(\"FLOAT\")&&\n\t\t\t\t\t result.get(j+1).getClassName().equals(\"INT_LITERAL\")) {\n\t\t\t\t\t\tresult.remove(j-1);\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\tresult.remove(j);\n\t\t\t\t\tj--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t//\tSystem.out.println(result);\n\t\tErrorHandler errorhandler = new ErrorHandler(s,result);\n\t\terrorhandler.printError();\n\t\ttry {\n\t\t\tWriter.writeTokens(result, \"Data/output.txt\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "List<String> tokenize0(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"\\\\s+\"))\n res.add(s);\n return res;\n }", "public static void fillArray(TextFileInput input){\r\n String line = input.readLine();\r\n while(line!=null){\r\n StringTokenizer cTokens = new StringTokenizer(line, \":\");\r\n //only if the line has three arguments\r\n if(cTokens.countTokens()==3){\r\n int h = Integer.parseInt(cTokens.nextToken());\r\n int m = Integer.parseInt(cTokens.nextToken());\r\n int s = Integer.parseInt(cTokens.nextToken());\r\n Clock c = new Clock(h, m, s);\r\n //adds clocks to the array\r\n allClocks[clockCount++] = c;\r\n }\r\n else{\r\n System.out.println(line + \" does not have three tokens\");\r\n }\r\n line = input.readLine();\r\n }\r\n }", "public String getToken(String line){ \n String[] tokensArr = splitTokens(line, \" &,+.'`\");\n ArrayList<String> tokens = new ArrayList<String>(Arrays.asList(tokensArr));\n \n // filter tokens\n tokens = filterTokens(tokens);\n String token = tokens.get(r.nextInt(tokens.size()));\n return token;\n }", "private String[] splitLine (String fileLine){\n String[] ans = new String[5];\n ans[0] = fileLine.substring(0, fileLine.indexOf(\"!\"));\n ans[1] = fileLine.substring(fileLine.indexOf(\"[\") + 1, fileLine.indexOf(\"]\"));\n String dfTf = fileLine.substring(fileLine.indexOf(\"]!\") + 2);\n ans[3] = dfTf;\n ans[2] = dfTf.substring(0, dfTf.indexOf(\"!\"));\n if (dfTf.contains(\"^\")) {\n ans[4] = dfTf.substring(dfTf.length() - 1);\n ans[3] = ans[3].substring(ans[3].indexOf(\"!\") + 1, ans[3].length() - 2);\n } else\n ans[3] = ans[3].substring(dfTf.indexOf(\"!\") + 1);\n\n return ans;\n }", "public static void readDataPatterns(int sizeX, int sizeY, boolean trainORtest){\n StreamTokenizer tok=null;\n String filenameX, filenameY;\n if(trainORtest){\n filenameX=trainDataFileX;\n filenameY=trainDataFileY;\n }\n else{\n filenameX=testDataFileX;\n filenameY=testDataFileY;\n }\n try{\n tok = new StreamTokenizer(new BufferedReader(new FileReader(filenameX)));\n tok.ordinaryChar('\\n');\n //tok.ordinaryChar()\n }\n catch(java.io.FileNotFoundException e){\n System.out.println(e+\" in Context.java\");\n }\n int i=0;\n int j=0;\n float [][] curDat=new float[sizeX][sizeY];\n \n String str;\n try{\n j=0;\n while(tok.nextToken()!=StreamTokenizer.TT_EOF){\n if(j>=44){j=0;i++;}\n switch (tok.ttype){\n case StreamTokenizer.TT_EOL:\n i++;\n j=0;\n break;\n case '\\r': \n i++;\n j=0;\n break;\n case 'n':\n i++;\n j=0;\n break;\n case StreamTokenizer.TT_NUMBER:\n curDat[i][j]=(float)tok.nval;\n // System.out.println(tok.nval);\n // j=j+1;\n // if(j==3){\n // j=0;\n // i++;\n // }\n j++;\n break;\n default:\n // if(tok.ttype!=StreamTokenizer.TT_NUMBER && (tok.sval.compareTo(\"\\t\")!=0||tok.sval.compareTo(\" \")!=0)){//means a newline\n // j=0;\n // i++;\n // }\n break;\n }\n }\n }\n catch(java.io.EOFException e){\n //do nothing\n }\n catch(java.io.IOException e){\n //do nothing\n }\n catch(java.lang.ArrayIndexOutOfBoundsException e){\n //do nothing agin :(\n System.out.println(e+\"Here lies the bug\"+trainORtest+j+i);\n // System.exit(0);\n }\n System.out.println(\"Here is what I read\\n\"+i+j);\n for(i=0;i<2;i++){\n for(j=0;j<3;j++)\n System.out.print(curDat[i][j]+\"\\t\");\n System.out.println();\n }\n try{\n tok = new StreamTokenizer(new BufferedReader(new FileReader(filenameY)));\n tok.ordinaryChar('\\n');\n //tok.ordinaryChar()\n }\n catch(java.io.FileNotFoundException e){\n System.out.println(e+\" in Context.java\");\n }\n i=0;\n double [] DatY=new double[sizeX]; \n try{\n j=0;\n while(tok.nextToken()!=StreamTokenizer.TT_EOF){\n switch (tok.ttype){\n case StreamTokenizer.TT_EOL:\n // i++;\n break;\n // case '\\n':\n // i++;\n // j=0;\n // break;\n case StreamTokenizer.TT_NUMBER:\n DatY[i]=tok.nval;\n i++;\n // System.out.println(tok.nval);\n break;\n default:\n // j++;\n break;\n }\n }\n }\n catch(java.io.EOFException e){\n //do nothing\n }\n catch(java.io.IOException e){\n //do nothing\n }\n catch(java.lang.ArrayIndexOutOfBoundsException e){\n //do nothing agin :(\n System.out.println(e+\"Here lies the bug\");\n System.exit(0);\n }\n if(trainORtest){\n XData=curDat;\n Target=DatY;\n }\n else{\n TestXData=curDat;\n TestTarget=DatY;\n }\n// for(int jj=0;jj<XData.length;jj++){\n // XData[jj][1]*=100;\n // }\n }", "private void synsetParse(String line) {\n String[] tokens = line.split(\",\");\n Integer key = Integer.parseInt(tokens[0]);\n ArrayList<String> al = new ArrayList<String>();\n String[] words = tokens[1].split(\" \");\n for (String w : words) {\n al.add(w);\n nounSet.add(w); // build nounSet at the same time\n }\n synsetMap.put(key, al);\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public interface Tokenization {\r\n\t\r\n\t/**\r\n\t * The method to implement for tokenization.\r\n\t * \r\n\t * @param input\tInput string to tokenize\r\n\t * @param tokens\t The list of tokens to populate\r\n\t */\r\n public void tokenize(String input, List<TokenInfo> tokens);\r\n\r\n}", "public String[] tokenize(String review) throws IOException {\n InputStream is = new FileInputStream(\"en-token.bin\");\n\n TokenizerModel model = new TokenizerModel(is);\n\n TokenizerME tokenizer = new TokenizerME(model);\n\n String tokens[] = tokenizer.tokenize(review);\n\n is.close();\n return tokens;\n }", "private void tokenizar(){\r\n String patron = \"(?<token>[\\\\(]|\\\\d+|[-+\\\\*/%^]|[\\\\)])\";\r\n Pattern pattern = Pattern.compile(patron);\r\n Matcher matcher = pattern.matcher(this.operacion);\r\n \r\n String token;\r\n \r\n while(matcher.find()){\r\n token = matcher.group(\"token\");\r\n tokens.add(token);\r\n \r\n }\r\n \r\n }", "public static List<Token> tokenize(String source) {\n List<Token> tokens = new ArrayList<>();\n\n String token = \"\";\n TokenizeState state = TokenizeState.DEFAULT;\n\n // Many tokens are a single character, like operators and ().\n String charTokens = \"\\n=+-*/<>(),\";\n TokenType[] tokenTypes = {LINE, EQUALS,\n OPERATOR, OPERATOR, OPERATOR,\n OPERATOR, OPERATOR, OPERATOR,\n LEFT_PAREN, RIGHT_PAREN,COMMA\n };\n\n // Scan through the code one character at a time, building up the list\n // of tokens.\n for (int i = 0; i < source.length(); i++) {\n char c = source.charAt(i);\n switch (state) {\n case DEFAULT:\n // Our comment is two -- tokens so we need to check before\n // assuming its a minus sign\n if ( c == '-' && source.charAt(i+1 ) == '-') {\n state = TokenizeState.COMMENT;\n } else if (charTokens.indexOf(c) != -1) {\n tokens.add(new Token(Character.toString(c),\n tokenTypes[charTokens.indexOf(c)]));\n } else if (Character.isLetter(c) || c=='_') { // We support underbars as WORD start.\n token += c;\n state = TokenizeState.WORD;\n } else if (Character.isDigit(c)) {\n token += c;\n state = TokenizeState.NUMBER;\n } else if (c == '\"') {\n state = TokenizeState.STRING;\n } else if (c == '\\'') {\n state = TokenizeState.COMMENT; // TODO Depricated. Delete me.\n }\n break;\n\n case WORD:\n if (Character.isLetterOrDigit(c) || c=='_' ) { // We allow underbars\n token += c;\n } else if (c == ':') {\n tokens.add(new Token(token, TokenType.LABEL));\n token = \"\";\n state = TokenizeState.DEFAULT;\n } else {\n tokens.add(new Token(token, TokenType.WORD));\n token = \"\";\n state = TokenizeState.DEFAULT;\n i--; // Reprocess this character in the default state.\n }\n break;\n\n case NUMBER:\n // HACK: Negative numbers and floating points aren't supported.\n // To get a negative number, just do 0 - <your number>.\n // To get a floating point, divide.\n if (Character.isDigit(c)) {\n token += c;\n } else {\n tokens.add(new Token(token, TokenType.NUMBER));\n token = \"\";\n state = TokenizeState.DEFAULT;\n i--; // Reprocess this character in the default state.\n }\n break;\n\n case STRING:\n if (c == '\"') {\n tokens.add(new Token(token, TokenType.STRING));\n token = \"\";\n state = TokenizeState.DEFAULT;\n } else {\n token += c;\n }\n break;\n\n case COMMENT:\n if (c == '\\n') {\n state = TokenizeState.DEFAULT;\n }\n break;\n }\n }\n\n // HACK: Silently ignore any in-progress token when we run out of\n // characters. This means that, for example, if a script has a string\n // that's missing the closing \", it will just ditch it.\n return tokens;\n }", "private void parseAxiom(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tif(tokens.length != 2) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid unitLength argument\");\n\t\t}\n\t\tthis.setAxiom(tokens[1]);\n\t}", "public abstract Tokenizer getTokenizer();", "protected String[] splitLine(String line) {\n return StringUtils.splitPreserveAllTokens(line, TabbedLineReader.this.delim);\n }", "private void processFirstLine(String line) {\r\n\t\tString[] numsAsStr = line.split(\" \");\r\n\t\tnumRows = Integer.parseInt(numsAsStr[0]);\r\n\t\tnumCols = Integer.parseInt(numsAsStr[1]);\r\n\t\t/**\r\n\t\t * Taken out for time testing\r\n\t\t */\r\n//\t\tSystem.out.println(\"Rows: \" + numRows + \" Cols: \" + numCols);\r\n\t}", "private static void processLine(\r\n final String line,\r\n final Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<View>> viewsForSessions,\r\n Map<String, List<Buy>> buysForSessions\r\n /* add parameters as needed */\r\n ) {\r\n final String[] words = line.split(\"\\\\h\");\r\n\r\n if (words.length == 0) {\r\n return;\r\n }\r\n\r\n switch (words[0]) {\r\n case START_TAG:\r\n processStartEntry(words, sessionsFromCustomer);\r\n break;\r\n case VIEW_TAG:\r\n processViewEntry(words, viewsForSessions );\r\n break;\r\n case BUY_TAG:\r\n processBuyEntry(words, buysForSessions);\r\n break;\r\n case END_TAG:\r\n processEndEntry(words);\r\n break;\r\n }\r\n }", "public void readInput(String fileName){\n\n BufferedReader reader;\n try {\n reader = new BufferedReader(new FileReader(fileName));\n String line = reader.readLine(); //read first line\n int numLine =1; //keep track the number of line\n while (line != null) {\n String[] tokens = line.trim().split(\"\\\\s+\"); //split line into token\n if(numLine==1){ //for the first line\n intersection = Integer.parseInt(tokens[0]); //set the number of intersection\n roadways = Integer.parseInt(tokens[1]); // set the number of roadways\n coor = new Coordinates[intersection];\n g = new Graph(intersection);//create a graph\n line = reader.readLine();\n numLine++;\n }\n else if(numLine>1&&numLine<intersection+2){ //for all intersection\n while(numLine>1&&numLine<intersection+2){\n tokens = line.trim().split(\"\\\\s+\");\n coor[Integer.parseInt(tokens[0])] = new Coordinates(Integer.parseInt(tokens[1]),Integer.parseInt(tokens[2])); //add into coor array to keep track the coor of intersection\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine ==intersection+2){ //skip the space line\n line = reader.readLine();\n numLine++;\n while(numLine<roadways+intersection+3){ // for all the roadways, only include the number of roadways mention in the first line\n tokens = line.trim().split(\"\\\\s+\");\n int fst = Integer.parseInt(tokens[0]);\n int snd = Integer.parseInt(tokens[1]);\n g.addEgde(fst,snd,coor[fst].distTo(coor[snd]));\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine >= roadways+intersection+3)\n break;\n }\n reader.close();\n } catch (FileNotFoundException e){\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static Token getTokenFor(String line) \n throws ParseException {\n if(line == null || line.length() == 0) {\n throw new NullPointerException();\n }\n line = line.trim();\n line += '\\n';\n int index = 0;\n char c = line.charAt(index);\n if(c == '#') {\n return parseComment(line, ++index);\n }else if(c == '[') {\n return parseSection(line, ++index);\n }else {\n return parseProperty(line, index);\n }\n }", "public interface Tokenizer {\n\n /**\n * Tokenize the source code and record tokens using the provided token factory.\n */\n void tokenize(TextDocument document, TokenFactory tokens) throws IOException;\n\n /**\n * Wraps a call to {@link #tokenize(TextDocument, TokenFactory)} to properly\n * create and close the token factory.\n */\n static void tokenize(Tokenizer tokenizer, TextDocument textDocument, Tokens tokens) throws IOException {\n try (TokenFactory tf = Tokens.factoryForFile(textDocument, tokens)) {\n tokenizer.tokenize(textDocument, tf);\n }\n }\n}", "private static int[][] readInput() throws Exception {\r\n\t\t\r\n\t\t// Read the input into a array of strings.\r\n\t\tList<String> inputLines = new ArrayList<String>();\r\n\t\tString currLine = \"\";\r\n\t\ttry {\r\n\t\t\t// Read the content of the file into an array of strings.\r\n\t\t\tScanner myScanner = new Scanner(new File(myFileName));\r\n\t\t\twhile((currLine = myScanner.nextLine()) != null) {\r\n\t\t\t\t\r\n\t\t\t\tinputLines.add(currLine);\r\n\r\n\t\t\t\tif (!myScanner.hasNextLine()) {\r\n\t\t\t\t\tmyScanner.close();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Based out of the number of lines in the input file\r\n\t\t\t// create a nXn matrix.\r\n\t\t\tint max = inputLines.size();\r\n\t\t\tint[][] data = new int[max][max];\r\n\t\t\tint count = 0;\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\tfor (int j = 0; j < max; j++) {\r\n\t\t\t\t\tdata[i][j] = INFINITY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Populate the nXn matrix.\r\n\t\t\tfor(int i = 0; i < inputLines.size(); i++) {\r\n\t\t\t\tcurrLine = inputLines.get(i);\r\n\t\t\t\tString[] splitLine = currLine.split(\"\\t\");\r\n\t\t\t\tfor(int j = 0; j < splitLine.length; j++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdata[count][j] = Integer.parseInt(splitLine[j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (NumberFormatException ex) { \r\n\t\t\t\t\t\t//do nothing\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\t\t\t\r\n\t\t\treturn data;\r\n\t\t\t\r\n\t\t} catch(Exception ex) {\r\n\t\t\tSystem.out.println(ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "public void parseFile() {\n File file = new File(inputFile);\n try {\n Scanner scan = new Scanner(file);\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replaceAll(\"\\\\s+\", \" \").trim();\n\n if (line.isEmpty()) {\n continue;\n }\n // System.out.println(line);\n String cmd = line.split(\" \")[0];\n String lineWithoutCmd = line.replaceFirst(cmd, \"\").trim();\n // System.out.println(lineWithoutCmd);\n\n // The fields following each command\n String[] fields;\n\n switch (cmd) {\n case (\"add\"):\n fields = lineWithoutCmd.split(\"<SEP>\");\n fields[0] = fields[0].trim();\n fields[1] = fields[1].trim();\n fields[2] = fields[2].trim();\n add(fields);\n break;\n case (\"delete\"):\n\n fields = split(lineWithoutCmd);\n delete(fields[0], fields[1]);\n break;\n case (\"print\"):\n if (lineWithoutCmd.equals(\"ratings\")) {\n printRatings();\n break;\n }\n fields = split(lineWithoutCmd);\n\n print(fields[0], fields[1]);\n\n break;\n case (\"list\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n list(fields[0], fields[1]);\n break;\n case (\"similar\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n similar(fields[0], fields[1]);\n break;\n default:\n break;\n }\n\n }\n\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void Mini_Parser(){\n Lista_ER Nuevo=null;\n String Nombre=\"\";\n String Contenido=\"\";\n ArrayList<String> tem = new ArrayList<String>();\n //este boleano sirve para concatenar la expresion regular\n int Estado=0;\n for (int x = 0; x < L_Tokens.size(); x++) {\n switch(Estado){\n //ESTADO 0\n case 0:\n //Conjuntos\n if(L_Tokens.get(x).getLexema().equals(\"CONJ\")){\n if(L_Tokens.get(x+1).getLexema().equals(\":\")){\n if(L_Tokens.get(x+2).getDescripcion().equals(\"Identificador\")){\n //Son conjuntos \n Nombre=L_Tokens.get(x+2).getLexema();\n Estado=1;\n x=x+4;\n }\n }\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n //pasaa estado de expresion regular\n Nombre=L_Tokens.get(x).getLexema();\n Estado=2;\n }\n break;\n \n case 1:\n //ESTADO 1\n //Concatena los conjuntos\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Digito\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n for(int i=6;i<=37;i++){\n if(L_Tokens.get(x).getID()==i){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n }\n //conjunto sin llaves\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n if(L_Tokens.get(x-1).getLexema().equals(\",\")){\n }else{\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n Estado=0;\n Contenido=\"\";\n\n }\n }else{\n Contenido+=L_Tokens.get(x).getLexema();\n }\n \n\n break;\n case 2:\n //ESTADO 2\n if(L_Tokens.get(x).getLexema().equals(\"-\")){\n if(L_Tokens.get(x+1).getLexema().equals(\">\")){\n //se mira que es expresion regular\n \n Lista_ER nuevo=new Lista_ER(L_Tokens.get(x-1).getLexema());\n Nuevo=nuevo;\n L_Tokens_ER.add(nuevo);\n x++;\n Estado=3;\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\":\")){\n //se mira que es lexema\n Estado=4;\n }\n break;\n case 3: \n //ESTADO 3\n //Concatenacion de Expresion Regular\n \n //System.out.println(\"---------------------------------\"+ L_Tokens.get(x).getLexema());\n if(L_Tokens.get(x).getDescripcion().equals(\"Punto\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Barra Vetical\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Interrogacion\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Asterisco\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Signo Mas\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Lexema de Entrada\")){ \n String tem1='\"'+L_Tokens.get(x).getLexema()+'\"';\n Nuevo.setER(tem1);\n \n }\n if(L_Tokens.get(x).getLexema().equals(\"{\")){ \n String tem1=\"\";\n if(L_Tokens.get(x+2).getLexema().equals(\"}\")){\n tem1=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n Nuevo.setER(tem1);\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n Estado=0;\n }\n break;\n case 4:\n// System.out.println(L_Tokens.get(x).getLexema());\n Contenido=L_Tokens.get(x+1).getLexema();\n L_Tokens_Lex.add(new Lista_LexemasE(L_Tokens.get(x-2).getLexema(), Contenido));\n Estado=0;\n \n break;\n }//fin switch\n }//Fin for\n }", "public List<Tokens> populateParserInfo(String inputSentence) {\n\t\t\n\t\t//Properties props = new Properties();\n\t\t// props.setProperty(\"annotators\", \"tokenize, ssplit, pos, lemma, ner, parse, dcoref\");\n\t\t//props.setProperty(\"annotators\", \"tokenize, ssplit, pos, lemma, ner, parse\");\n\t\t//StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\t\tPipeline pipe = new Pipeline(true);\n\t\t//Annotation annotation;\n\t\t//annotation = new Annotation(inputSentence);\n\n\t\tAnnotation annotation = pipe.annotate(inputSentence);\n\t\tList<CoreMap> sentences = annotation.get(CoreAnnotations.SentencesAnnotation.class);\n\t\tint sentenceCount = 0;\n\t\tList<Tokens> tokenList = new ArrayList<Tokens>();\n\t\tfor (CoreMap sentence: sentences) {\n populateParserInfo(sentence, tokenList);\n\t\t}\n\t\treturn tokenList;\n\t}", "private void traceInput() {\r\n int line = 1, start = 0, stop = input.length();\r\n for (int i = 0; i < in; i++) {\r\n if (input.charAt(i) != '\\n') continue;\r\n line++;\r\n start = i + 1;\r\n }\r\n for (int i = in; i < input.length(); i++) {\r\n if (input.charAt(i) != '\\n') continue;\r\n stop = i;\r\n break;\r\n }\r\n System.out.print(\"I\" + line + \": \");\r\n System.out.print(input.substring(start, in));\r\n System.out.print(\"|\");\r\n System.out.println(input.substring(in, stop));\r\n }", "protected void processLine(String line) {\n //remove non Alphabetical chars and put all to lowercase\n String alphabetic = line.replaceAll(\"[^A-Za-z0-9\\\\-\\\\s+]\", \"\").toLowerCase();\n for (String word : alphabetic.split(\"\\\\s+\")) {\n words.put(word, words.getOrDefault(word, 0) + 1);\n }\n }", "public LineTokenizer(String str)\n {\n m_str = str;\n m_length = str.length();\n m_nextIndex = 0;\n }", "String[] getLegalLineDelimiters();", "public void tokenize(InputSource is) throws SAXException, IOException {\n if (is == null) {\n throw new IllegalArgumentException(\"InputSource was null.\");\n }\n swallowBom = true;\n this.systemId = is.getSystemId();\n this.publicId = is.getPublicId();\n this.reader = is.getCharacterStream();\n CharsetDecoder decoder = decoderFromExternalDeclaration(is.getEncoding());\n if (this.reader == null) {\n InputStream inputStream = is.getByteStream();\n if (inputStream == null) {\n throw new SAXException(\"Both streams in InputSource were null.\");\n }\n if (decoder == null) {\n this.reader = new HtmlInputStreamReader(inputStream,\n errorHandler, this, this);\n } else {\n this.reader = new HtmlInputStreamReader(inputStream,\n errorHandler, this, this, decoder);\n }\n }\n contentModelFlag = ContentModelFlag.PCDATA;\n escapeFlag = false;\n inContent = true;\n pos = -1;\n cstart = -1;\n line = 1;\n linePrev = 1;\n col = 0;\n colPrev = 0;\n colPrevPrev = 0;\n prev = '\\u0000';\n bufLen = 0;\n nonAsciiProhibited = false;\n alreadyComplainedAboutNonAscii = false;\n html4 = false;\n alreadyWarnedAboutPrivateUseCharacters = false;\n metaBoundaryPassed = false;\n tokenHandler.start(this);\n for (int i = 0; i < characterHandlers.length; i++) {\n CharacterHandler ch = characterHandlers[i];\n ch.start();\n }\n wantsComments = tokenHandler.wantsComments();\n try {\n if (swallowBom) {\n // Swallow the BOM\n char c = read();\n if (c == '\\uFEFF') {\n col = 0;\n } else {\n unread(c);\n }\n }\n dataState();\n } finally {\n systemIdentifier = null;\n publicIdentifier = null;\n doctypeName = null;\n tagName = null;\n attributeName = null;\n tokenHandler.eof();\n for (int i = 0; i < characterHandlers.length; i++) {\n CharacterHandler ch = characterHandlers[i];\n ch.end();\n }\n reader.close();\n }\n }", "private static List<Pair<String, Integer>> splitWords(String line) {\n // This is kinda silly: we read and parse the stop words file once for each chunk, but this is the way the book\n // does it, so better stay in line with that.\n Set<String> stopWords = Arrays.stream(readFile(\"../stop_words.txt\").split(\",\")).\n collect(Collectors.toCollection(HashSet::new));\n return Arrays.stream(line.replaceAll(\"[^a-zA-Z\\\\d\\\\s]\", \" \").toLowerCase().split(\" \")).\n filter(w -> w.length() >= 2 && !stopWords.contains(w)).\n map(w -> new Pair<>(w, 1)).\n collect(Collectors.toList());\n }", "public void parse(InputStream in) throws IOException {\n InputStreamReader isr = null;\n BufferedReader layoutReader = null;\n try {\n isr = new InputStreamReader(in, \"UTF-8\");\n layoutReader = new BufferedReader(isr);\n List<String> rawQualifiers = new ArrayList<String>();\n List<String> rawSchemas = new ArrayList<String>();\n\n String qualifier;\n String json;\n String line = layoutReader.readLine();\n while (line != null) {\n // Skip empty lines.\n if (line.equals(EMPTY_LINE)) {\n line = layoutReader.readLine();\n continue;\n }\n\n if (SKIP_ENTRY_TOKEN.equals(line)) {\n // null entries indicate this column should be skipped.\n qualifier = null;\n json = null;\n } else {\n qualifier = parseName(line);\n json = parseSchema(layoutReader);\n }\n\n rawQualifiers.add(qualifier);\n rawSchemas.add(json);\n\n line = layoutReader.readLine();\n }\n\n mQualifierInfo = Collections.unmodifiableList(makeQualifierInfo(rawQualifiers, rawSchemas));\n\n LOG.info(\"Parsed input layout of size: \" + getQualifierInfo().size());\n } finally {\n IOUtils.closeQuietly(layoutReader);\n IOUtils.closeQuietly(isr);\n }\n }", "public void Scanner(){\n char Caracter=' ';\n int Estado=0;\n int Fila=0;\n int Columna=1;\n String Lexema=\"\";\n String Cadena_Archivo=jTextPane1.getText();\n for(int i=0;i<Cadena_Archivo.length();i++){\n Caracter=Cadena_Archivo.charAt(i);\n \n switch(Estado){\n case 0:\n \n if(Caracter == (char) 33){\n L_Tokens.add(new Lista_Tokens(6,Character.toString(Caracter),\"Signo de Admiracion\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 34){\n L_Tokens.add(new Lista_Tokens(7,Character.toString(Caracter),\"Comillas Dobles\",Fila,Columna));\n Estado = 7;\n Columna++;\n }else if(Caracter == (char) 35){\n L_Tokens.add(new Lista_Tokens(8,Character.toString(Caracter),\"Numeral\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 36){\n L_Tokens.add(new Lista_Tokens(9,Character.toString(Caracter),\"Simbolo Peso\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 37){\n L_Tokens.add(new Lista_Tokens(10,Character.toString(Caracter),\"Porcentaje\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 38){\n L_Tokens.add(new Lista_Tokens(11,Character.toString(Caracter),\"Ampersand\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 39){\n L_Tokens.add(new Lista_Tokens(12,Character.toString(Caracter),\"Comilla Simple\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 40){\n L_Tokens.add(new Lista_Tokens(13,Character.toString(Caracter),\"Parentesis Izquierdo\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 41){\n L_Tokens.add(new Lista_Tokens(14,Character.toString(Caracter),\"Parentesis Derecho\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 42){\n L_Tokens.add(new Lista_Tokens(15,Character.toString(Caracter),\"Asterisco\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 43){\n L_Tokens.add(new Lista_Tokens(16,Character.toString(Caracter),\"Signo Mas\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 44){\n L_Tokens.add(new Lista_Tokens(17,Character.toString(Caracter),\"Coma\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 45){\n L_Tokens.add(new Lista_Tokens(18,Character.toString(Caracter),\"Signo Menos\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 46){\n L_Tokens.add(new Lista_Tokens(19,Character.toString(Caracter),\"Punto\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 47){\n L_Tokens.add(new Lista_Tokens(20,Character.toString(Caracter),\"Barra Inclinada\",Fila,Columna));\n Estado = 3;\n Columna++;\n }else if(Caracter == (char) 58){\n L_Tokens.add(new Lista_Tokens(21,Character.toString(Caracter),\"Dos Puntos\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 59){\n L_Tokens.add(new Lista_Tokens(22,Character.toString(Caracter),\"Punto y Coma\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 60){\n L_Tokens.add(new Lista_Tokens(23,Character.toString(Caracter),\"Menor Que\",Fila,Columna));\n Estado = 5;\n Columna++;\n }else if(Caracter == (char) 61){\n L_Tokens.add(new Lista_Tokens(24,Character.toString(Caracter),\"Igual Que\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 62){\n L_Tokens.add(new Lista_Tokens(25,Character.toString(Caracter),\"Mayor Que\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 63){\n L_Tokens.add(new Lista_Tokens(26,Character.toString(Caracter),\"Interrogacion\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 64){\n L_Tokens.add(new Lista_Tokens(27,Character.toString(Caracter),\"Arroba\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 91){\n L_Tokens.add(new Lista_Tokens(28,Character.toString(Caracter),\"Corchete Izquierdo\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 92){\n L_Tokens.add(new Lista_Tokens(29,Character.toString(Caracter),\"Barra Invertida\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 93){\n L_Tokens.add(new Lista_Tokens(30,Character.toString(Caracter),\"Corchete Derecho\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 94){\n L_Tokens.add(new Lista_Tokens(31,Character.toString(Caracter),\"Acento Circunflejo\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 95){\n L_Tokens.add(new Lista_Tokens(32,Character.toString(Caracter),\"Barra Baja\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 96){\n L_Tokens.add(new Lista_Tokens(33,Character.toString(Caracter),\"Acento Grave\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 123){\n L_Tokens.add(new Lista_Tokens(34,Character.toString(Caracter),\"Llave Izquierda\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 124){\n L_Tokens.add(new Lista_Tokens(35,Character.toString(Caracter),\"Barra Vetical\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 125){\n L_Tokens.add(new Lista_Tokens(36,Character.toString(Caracter),\"Corchete Derecho\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Caracter == (char) 126){\n L_Tokens.add(new Lista_Tokens(37,Character.toString(Caracter),\"Tilde\",Fila,Columna));\n Estado = 0;\n Columna++;\n }else if(Character.isLetter(Caracter)){\n //Verifica si es Letra\n Lexema+=Caracter;\n Estado = 1;\n }else if(Character.isDigit(Caracter)){\n //Verifica si es Digito\n Lexema+=Caracter;\n Estado = 2;\n }else if (Caracter == '\\n') {\n //salto de linea\n Columna = 1;\n Fila++;\n Estado = 0;\n } \n else if (Caracter == ' ' | Caracter == '\\t' | Caracter == '\\b' | Caracter == '\\r' | Caracter == '\\f') {\n //Espacios en blanco\n } else {\n //Errores Lexicos\n L_Tokens_Error.add(new Lista_Tokens(0,Character.toString(Caracter),\"Error Lexico\",Fila,Columna));\n Lexema = \"\";\n Estado = 0;\n }\n \n \n break;\n case 1:\n //Verificar si es Letra\n if (Character.isLetter(Caracter)) {\n Lexema+=Caracter;\n Estado = 1;\n }else if(Character.isDigit(Caracter)){\n //Verifica si es Digito\n Lexema += Caracter;\n Estado = 1;\n }else if(Caracter == (char) 95){\n Lexema += Caracter;\n Estado = 1;\n }else{\n \n if(Lexema.equals(\"CONJ\")){\n L_Tokens.add(new Lista_Tokens(3,Lexema,\"Palabra Reservada\",Fila,Columna));\n }else{\n L_Tokens.add(new Lista_Tokens(5,Lexema,\"Identificador\",Fila,Columna));\n }\n Columna++;\n Lexema = \"\";\n Estado = 0;\n i--;\n }\n \n break;\n case 2:\n //Verifica si es Digito\n if (Character.isDigit(Caracter)) {\n Lexema += Caracter;\n Estado = 2;\n }else{\n L_Tokens.add(new Lista_Tokens(38,Lexema,\"Digito\",Fila,Columna));\n Columna++;\n Lexema = \"\";\n Estado = 0;\n i--;\n }\n break;\n case 3:\n //Verifica si es Comentario de una linea\n if(Caracter == (char) 47){\n L_Tokens.add(new Lista_Tokens(20,Character.toString(Caracter),\"Barra Inclinada\",Fila,Columna));\n Estado = 4;\n Columna++;\n }else{\n Lexema = \"\";\n Estado = 0;\n i--;\n }\n break;\n case 4:\n //Verifica si es Comentario de una linea acepta lo que sea hasta salto de linea\n if(Caracter != '\\n'){\n Lexema+=Caracter;\n Estado = 4;\n }else{\n L_Tokens.add(new Lista_Tokens(1,Lexema,\"Comentario de Linea\",Fila,Columna));\n Columna++;\n Lexema = \"\";\n Estado = 0;\n i--;\n }\n break;\n case 5:\n //Comentario Multilinea\n if(Caracter == (char) 33){\n L_Tokens.add(new Lista_Tokens(6,Character.toString(Caracter),\"Signo de Admiracion\",Fila,Columna));\n Estado = 6;\n Columna++;\n }else{\n Lexema = \"\";\n Estado = 0;\n i--;\n }\n break;\n case 6:\n //Comentario Multilinea acepta hasta el signo de admiracion\n if(Caracter != (char) 33){\n Lexema+=Caracter;\n Estado = 6;\n }else{\n L_Tokens.add(new Lista_Tokens(2,Lexema,\"Comentario Multilinea\",Fila,Columna));\n Columna++;\n Lexema = \"\";\n Estado = 0;\n i--;\n }\n break;\n case 7:\n //Comentario Multilinea acepta hasta comilla dobles\n if(Caracter != (char) 34){\n Lexema+=Caracter;\n Estado = 7;\n }else{\n L_Tokens.add(new Lista_Tokens(4,Lexema,\"Lexema de Entrada\",Fila,Columna));\n Columna++;\n Lexema = \"\";\n Estado = 0;\n //aceptamos las comillas\n L_Tokens.add(new Lista_Tokens(7,Character.toString(Caracter),\"Comillas Dobles\",Fila,Columna));\n Columna++;\n }\n break;\n \n }\n \n }//fin for\n }", "void dims() throws IOException {\n\t\tmatch('[');\n\t\tmatch(Tag.NUM);\n\t\tmatch(']');\n\t\tif (look.tag == '[')\n\t\t\tdims();\n\t\treturn;\n\t}", "public Token getToken() throws IOException {\n\t\t// check if peek() was called\n\t\tif (nextToken != null) {\n\t\t\tToken token = nextToken;\n\t\t\tnextToken = null; // allow peek to call for next token\n\t\t\treturn token;\n\t\t}\n\n\t\t// skip whitespace character\n\t\twhile (Character.isWhitespace(nextChar)) {\n\t\t\t// check if whitespace char is a newline\n\t\t\tif (!skipNewline()) {\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t}\n\n\t\t\t// offset colNum for tab chars\n\t\t\tif (nextChar == '\\t')\n\t\t\t\tcolumnNumber += 3;\n\t\t}\n\t\t//skips comments\n\t\tif (nextChar == '@') {\n\t\t\tnextChar = getChar();\n\t\t\twhile (!skipNewline()) {\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t}\n\n\t\t\tnextChar = getChar();\n\t\t}\n\n\t\t// identifier or reserved word ([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\tif (Character.isLetter(nextChar)) {\n\t\t\t// create new idVal starting with first char of identifier\n\t\t\tString current = Character.toString((char) nextChar);\n\t\t\tcolumnNumber++;\n\t\t\tnextChar = getChar();\n\n\t\t\t// include remaining sequence of chars that are letters, digits, or _\n\t\t\twhile (Character.isLetterOrDigit(nextChar)) {\n\t\t\t\tcurrent += (char) nextChar;\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t}\n\n\t\t\t// check if identifier is a reserved word\n\t\t\tTokenType type = reservedWords.get(current);\n\n\t\t\tif (type != null)\n\t\t\t\treturn new Token(type, new TokenAttribute());\n\n\n\n\t\t\t// token is an identifier\n\t\t\tresult.add(new Token(TokenType.IDENTIFIER, new TokenAttribute(current))); // adding token to results\n\t\t\treturn new Token(TokenType.IDENTIFIER, new TokenAttribute(current));\n\t\t}\n\n\t\t// integer literal ([0-9]+) OR float literal ([0-9]+.[0-9]+)\n\t\tif (Character.isDigit(nextChar)) {\n\n\t\t\t// create string representation of number\n\t\t\tString numString = Character.toString((char) nextChar);\n\t\t\tcolumnNumber++;\n\t\t\tnextChar = getChar();\n\n\t\t\t// concatenate remaining sequence of digits\n\t\t\twhile (Character.isDigit(nextChar)) {\n\t\t\t\tnumString += (char) nextChar;\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t}\n\n\t\t\tif (nextChar == '.') {\n\t\t\t\t//stream.mark(0);\n\t\t\t\tnextChar = getChar();\n\t\t\t\tcolumnNumber++;\n\n\t\t\t\tif (Character.isDigit(nextChar)) {\n\t\t\t\t\tnumString += '.';\n\t\t\t\t\t// concatenate remaining sequence of digits\n\t\t\t\t\twhile (Character.isDigit(nextChar)) {\n\t\t\t\t\t\tnumString += (char) nextChar;\n\t\t\t\t\t\tcolumnNumber++;\n\t\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(new Token(TokenType.FLOAT_CONST, new TokenAttribute(Float.parseFloat(numString))));\n\t\t\t\t\treturn new Token(TokenType.FLOAT_CONST, new TokenAttribute(Float.parseFloat(numString)));\n\t\t\t\t}\n\t\t\t\twhile (!Character.isWhitespace(nextChar)) {\n\t\t\t\t\tcolumnNumber++;\n\t\t\t\t\tnumString += nextChar;\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t}\n\n\t\t\t\t//return new Token(TokenType.UNKNOWN, new TokenAttribute());\n\t\t\t}\n\n\t\t\t// return integer literal token\n\t\t\tresult.add(new Token(TokenType.INT_CONST, new TokenAttribute(Integer.parseInt(numString))));\n\t\t\treturn new Token(TokenType.INT_CONST, new TokenAttribute(Integer.parseInt(numString)));\n\t\t}\n\n\n\t\t//EOF --> end of file reached\n\t\tif (nextChar == -1) {\n\t\t\treturn new Token(TokenType.EOF, new TokenAttribute());\n\t\t}\n\n\n\t\t// check for binops\n\t\tswitch (nextChar) {\n\n\t\t\t//Checks for strings\n\t\t\tcase '\"':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tString current = Character.toString((char) nextChar);\n\t\t\t\tnextChar = getChar();\n\t\t\t\tcurrent += (char)nextChar;\n\n\t\t\t\twhile (nextChar != '\"') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tcurrent += (char)nextChar;\n\t\t\t\t}\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.STRING, new TokenAttribute(current)));\n\t\t\t\treturn new Token(TokenType.STRING, new TokenAttribute(current));\n\n\t\t\tcase '=':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\n\t\t\t\t// check if next char is '=' to match '==' binop\n\t\t\t\tif (nextChar == '=') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tresult.add(new Token(TokenType.EQ, new TokenAttribute()));\n\t\t\t\t\treturn new Token(TokenType.EQ, new TokenAttribute());\n\t\t\t\t} else\n\t\t\t\t\tresult.add(new Token(TokenType.ASSIGN, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.ASSIGN, new TokenAttribute());\n\n\t\t\tcase '!':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\n\t\t\t\t// check if next char is '!' to match '!=' binop\n\t\t\t\tif (nextChar == '^') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tresult.add(new Token(TokenType.NEQ, new TokenAttribute()));\n\t\t\t\t\treturn new Token(TokenType.NEQ, new TokenAttribute());\n\t\t\t\t}\n\n\t\t\tcase '<':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\n\t\t\t\t// check if next char is '<' to match '<=' binop\n\t\t\t\tif (nextChar == '=') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tresult.add(new Token(TokenType.LT_EQ, new TokenAttribute()));\n\t\t\t\t\treturn new Token(TokenType.LT_EQ, new TokenAttribute());\n\t\t\t\t} else\n\t\t\t\t\tresult.add(new Token(TokenType.LT, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.LT, new TokenAttribute());\n\n\t\t\tcase '>':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\n\t\t\t\t// check if next char is '<' to match '<=' binop\n\t\t\t\tif (nextChar == '=') {\n\t\t\t\t\tnextChar = getChar();\n\t\t\t\t\tresult.add(new Token(TokenType.GT_EQ, new TokenAttribute()));\n\t\t\t\t\treturn new Token(TokenType.GT_EQ, new TokenAttribute());\n\t\t\t\t} else\n\t\t\t\t\tresult.add(new Token(TokenType.RT, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.RT, new TokenAttribute());\n\n\t\t\tcase '+':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.PLUS, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.PLUS, new TokenAttribute());\n\n\t\t\tcase '-':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.MINUS, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.MINUS, new TokenAttribute());\n\n\t\t\tcase '*':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.MULTIPLY, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.MULTIPLY, new TokenAttribute());\n\n\t\t\tcase '/':\n\t\t\t\tcolumnNumber++;\n\t\t\t\tnextChar = getChar();\n\t\t\t\tresult.add(new Token(TokenType.DIVIDE, new TokenAttribute()));\n\t\t\t\treturn new Token(TokenType.DIVIDE, new TokenAttribute());\n\n\n\t\t}\n\n\t\t// check for punctuation\n\t\tTokenType type = punctuation.get((char) nextChar);\n\t\tcolumnNumber++;\n\t\tnextChar = getChar();\n\n\t\t// found punctuation token\n\t\tif (type != null) {\n\t\t\tresult.add(new Token(type, new TokenAttribute()));\n\t\t\treturn new Token(type, new TokenAttribute());\n\t\t}\n\n\t\t// token type is unknown\n\t\tresult.add(new Token(TokenType.UNKNOWN, new TokenAttribute()));\n\t\treturn new Token(TokenType.UNKNOWN, new TokenAttribute());\n\t}", "public interface InputSentenceFormatter<T extends Token> {\n\n\t/**\n\t * Returns true if the input source has any more sentences to be parsed.\n\t * \n\t * @return True if there are more sentences remaining; false otherwise\n\t */\n\tpublic boolean hasNext();\n\n\t/**\n\t * Returns the next sentence to be parsed as an array of tokens.\n\t * \n\t * @return the next sentence to be parsed\n\t */\n\tpublic T[] next();\n}" ]
[ "0.6470702", "0.63234746", "0.61643964", "0.57871616", "0.54904276", "0.5480308", "0.5407399", "0.54034024", "0.5376959", "0.53612393", "0.53420025", "0.53343886", "0.5303276", "0.5287093", "0.52437335", "0.5229839", "0.52247524", "0.5219736", "0.52163696", "0.5197372", "0.518704", "0.5185276", "0.5182141", "0.5180067", "0.51788855", "0.51631576", "0.51572406", "0.50946474", "0.5072314", "0.5064891", "0.50511104", "0.50272536", "0.49998257", "0.49882168", "0.49689957", "0.49442717", "0.49313805", "0.48886812", "0.48762774", "0.4870658", "0.4866011", "0.48591766", "0.48424646", "0.48300555", "0.48123795", "0.48044258", "0.47968313", "0.47850057", "0.47758082", "0.47710037", "0.4753788", "0.47524083", "0.4750976", "0.4749386", "0.4743655", "0.47375968", "0.47355038", "0.4728778", "0.47252953", "0.47072056", "0.4704654", "0.4698712", "0.46975875", "0.46841913", "0.46768066", "0.46734735", "0.46733445", "0.46674165", "0.4662715", "0.4659766", "0.46584252", "0.46493214", "0.46489406", "0.46448648", "0.46438608", "0.46436897", "0.46387365", "0.46225223", "0.46195188", "0.46118012", "0.4610572", "0.45966873", "0.45937043", "0.45861343", "0.45848224", "0.45769888", "0.45756495", "0.45715114", "0.45678264", "0.45637688", "0.4562546", "0.45614117", "0.45613754", "0.4561068", "0.45601866", "0.4554414", "0.45510155", "0.4549681", "0.4548561", "0.45454055" ]
0.4714945
59
Instantiates a new Client chat os.
public ClientChatOs(String pseudo, InetSocketAddress serverAddress) throws IOException { this.serverAddress = serverAddress; this.pseudo = pseudo; this.sc = SocketChannel.open(); this.selector = Selector.open(); this.console = new Thread(this::consoleRun); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ChatClient() {\n\n }", "public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }", "public Chat() {\n }", "public Chat(){ }", "public Chat(Client _client, long _id) {\n\t\tclient = _client;\n\t\tFid = _id;\n\t\tinitComponents();\n\t}", "public Client() {}", "public static void main(String args[]) {\n\t\tchatClient c = new chatClient();\r\n\t\tc.createGUI();// call createGUI() method\r\n\r\n\t}", "public void start() throws IOException{\n\t\tSystem.out.println(\"starting new chatclient with socket ID ...\"); //socketID is currently determined in chatserverthread so inaccessible\n\t\tstrOut = new DataOutputStream(new BufferedOutputStream (socket.getOutputStream()) );\n\t\tconsole = new BufferedReader(new InputStreamReader(System.in)); //sets up environment for client msgs\n\t\n\t\t//Note: Later, Rather than reading in the console, data must be retrieved consistently from the GUI\n\t\t//Try again\n\t\t\n\t\tif(thread == null){\n\t\t\tclient = new ChatClientThread(this, socket);\n\t\t\tthread = new Thread(this);\n\t\t\tthread.start();\n\t\t\t//Where should this go?\n\t\t\t//Is there another way to start a gui for each new client?\n\t\t\t//Does the run method in here interfere with the run method below?\n\t\t}\n\t\t\n\t}", "public Client() {\n }", "public Client(ClientConfiguration conf) {\n clientMessages = new Stack<>();\n serverMessages = new Stack<>();\n this.conf = conf;\n encryptionSessionHashMap = new HashMap<>();\n savedMessage = new HashMap<>();\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public ChatClient(){\n System.out.print(\"2c\");\n }", "public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }", "ServerClient(ChatServer serv, Socket cl, String user){\n this.server = serv;\n this.client = cl;\n this.username = user;\n this.clientConnected = true;\n this.room = serv.name;\n }", "public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }", "public Cliente() {\n }", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public ServerConsole(String uID, String host, String password, int port){\n\t\ttry{\n\t\t\tclient= new ChatClient(uID, host, password, port, this);\n\t\t} \n\t\tcatch(IOException exception){\n\t\t\tSystem.out.println(\"Error: Can't setup connection!\" + \" Terminating client.\");\t\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public ClientConsole(String loginID, String host, int port) {\n internalLoginID = loginID;\n internalHost = host;\n internalPort = port;\n try {\n client = new ChatClient(loginID, host, port, this);\n System.out.println(loginID + \" has logged on.\");\n } catch (IOException exception) {\n System.out.println(\"Error: Can't open connection. Awaiting Command\");\n }\n }", "public void onCreate() {\n Log.i(TAG, \"MinaClient create\");\r\n\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n\r\n CommandHandle.getInstance().setContext(getApplicationContext());\r\n }", "public ClientMenu(String host, int port, Client c) {\n\n\t\tsuper(\"Chat Client\");\n\t\tdefaultPort = port;\n\t\tdefaultHost = host;\n\t\tclient = c;\n\n\t\t// The NorthPanel with:\n\t\tJPanel northPanel = new JPanel(new GridLayout(3, 1));\n\t\t// the server name and the port number\n\t\tJPanel serverAndPort = new JPanel(new GridLayout(1, 5, 1, 3));\n\t\t// the two JTextField with default value for server address and port number\n\t\ttfServer = new JTextField(host);\n\t\ttfPort = new JTextField(\"\" + port);\n\t\ttfPort.setHorizontalAlignment(SwingConstants.RIGHT);\n\n\t\tserverAndPort.add(new JLabel(\"Server Address: \"));\n\t\tserverAndPort.add(tfServer);\n\t\tserverAndPort.add(new JLabel(\"Port Number: \"));\n\t\tserverAndPort.add(tfPort);\n\t\t// serverAndPort.add(new JLabel(\"\"));\n\t\t// adds the Server an port field to the GUI\n\t\t// northPanel.add(serverAndPort);\n\n\t\t// the Label and the TextField\n\t\tlabel = new JLabel(\"Username:\", SwingConstants.CENTER);\n\t\tserverAndPort.add(label);\n\t\tun = new JTextField(\"Anonymous\");\n\t\ttf = new JTextField(\"\");\n\t\ttf.setBackground(Color.WHITE);\n\t\tun.setBackground(Color.WHITE);\n\t\tserverAndPort.add(un);\n\t\tnorthPanel.add(serverAndPort);\n\n\t\tadd(northPanel, BorderLayout.NORTH);\n\n\t\t// The CenterPanel which is the chat room\n\t\tta = new JTextArea(\"Welcome to the Chat room\\n\", 80, 80);\n\t\tJPanel centerPanel = new JPanel(new GridLayout(1, 1));\n\t\tcenterPanel.add(new JScrollPane(ta));\n\t\tta.setEditable(false);\n\t\tadd(centerPanel, BorderLayout.CENTER);\n\n\t\t// the 3 buttons\n\t\tlogin = new JButton(\"Connect\");\n\t\tlogin.setActionCommand(\"Connect\");\n\t\tlogin.addActionListener(this);\n\t\tsend = new JButton(\"Send\");\n\t\tsend.setActionCommand(\"Send\");\n\t\tsend.addActionListener(this);\n\t\t// logout = new JButton(\"Logout\");\n\t\t// logout.addActionListener(this);\n\t\t// logout.setEnabled(false); // you have to login before being able to logout\n\n\t\tJPanel southPanel = new JPanel(new GridLayout(1, 3, 5, 5));\n\t\tserverAndPort.add(login);\n\t\t// southPanel.add(logout);\n\t\tsouthPanel.add(tf);\n\t\tsouthPanel.add(send);\n\t\tadd(southPanel, BorderLayout.SOUTH);\n\n\t\tuserListModel = new DefaultListModel<String>();\n\t\tuserList = new JList<String>(userListModel);\n\t\tuserList.setPreferredSize(new Dimension(100, 400));\n\t\tuserList.addListSelectionListener(this);\n\t\tusers_label = new JLabel(\"Users:\");\n\n\t\tJPanel eastPanel = new JPanel();\n\t\teastPanel.setPreferredSize(new Dimension(100, 50));\n\t\tusers_label.setPreferredSize(new Dimension(100, 20));\n\t\teastPanel.add(users_label);\n\t\teastPanel.add(userList);\n\t\tadd(eastPanel, BorderLayout.EAST);\n\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tsetSize(600, 600);\n\t\tsetVisible(true);\n\t\ttf.requestFocus();\n\n\t}", "ClientMessageSender() {\n\n\t}", "public GlobalChat() {\r\n // Required empty public constructor\r\n }", "private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }", "public ChatServer()\n {\n try\n {\n ServerSocket socketServidor = new ServerSocket(PORT);\n while (true)\n {\n Socket client = socketServidor.accept();\n Runnable nuevoCliente = new ClientThread(chat, client);\n Thread thread = new Thread(nuevoCliente);\n thread.start();\n }\n } catch (Exception e)\n {\n e.getMessage();\n }\n }", "public Communicator() {\n }", "public Communicator() {\n }", "public Cliente() {\n\t\tsuper();\n\t}", "public TCPMessengerServer() {\n initComponents();\n customInitComponents();\n listenForClient(); \n }", "public TCommChatPanel() {\r\n\t\tinitialize();\r\n\t}", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "Communicator createCommunicator();", "private void createClient() {\n tc = new TestClient();\n }", "public Communicator() {\n\t}", "public Client( int id)\r\n\t\t{\r\n\t\t\r\n\t\tsuper( \"Client \"+id);\r\n\t\t\r\n\t\t//some configuration here\r\n\t\tc_id = id; //client's id\r\n\t\tseq_number = 1; //message sequence number\r\n\t\tserverPort = 1020; //server port\r\n\t\tserverAddress = \"localhost\"; // server IP address\r\n\t\t\r\n\t\t\r\n\t\tenterField = new JTextField( \"Type message here\" );\r\n\t\tenterField.addActionListener(\r\n\t\tnew ActionListener()\r\n\t\t\t{\r\n\t\t\t\tpublic void actionPerformed( ActionEvent event )\r\n\t\t\t\t{\r\n\t\t\t\t\t//sent request\r\n\t\t\t\t\tString message = event.getActionCommand();\r\n\t\t\t\t\tsendRequest(message);\r\n\t\t\t\t} // end actionPerformed\r\n\t\t\t} // end inner class\r\n\t\t); // end call to addActionListener\r\n\t\t\r\n\t\tadd( enterField, BorderLayout.NORTH );\r\n\t\t\t\r\n\t\tdisplayArea = new JTextArea();\r\n\t\tadd( new JScrollPane( displayArea ), BorderLayout.CENTER );\r\n\t\tsetSize( 400, 300 ); // set window size\r\n\t\tsetVisible( true ); // show window\r\n\t\t\t\r\n\t\ttry // create DatagramSocket for sending and receiving packets\r\n\t\t{\r\n\t\t\tsocket = new DatagramSocket();\r\n\t\t} // end try\r\n\t\tcatch ( SocketException socketException )\r\n\t\t{\r\n\t\t\tsocketException.printStackTrace();\r\n\t\t\tSystem.exit( 1 );\r\n\t\t} // end catch\r\n\t\t//msgSender.start(); //starts automatic message sender\r\n\t\tthis.waitForPackets(); //starts listening\r\n\t}", "private Presenter createChatClientFactory(View view) {\r\n\t\tPresenter presenter = new ClientPresenter();\r\n\t\tview.setPresenter(presenter);\r\n\t\tpresenter.setView(view);\r\n\t\treturn presenter;\r\n\t}", "Client createNewClient(Client client);", "public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }", "private void setupChat() {\n chatService = new BluetoothChatService(NavigationDrawerActivity.this, mHandler);\n\n }", "public AbaloneClient() {\n server = new AbaloneServer();\n clientTUI = new AbaloneClientTUI();\n }", "public Client(){\r\n\t\t// ask the user for a host, port, and user name\r\n\t\tString host = JOptionPane.showInputDialog(\"Host address:\");\r\n\t\t\r\n\t\tString port = JOptionPane.showInputDialog(\"Host port:\");\r\n\t\tboolean shouldRepeat = true;\r\n\t\tint portNum = 0;\r\n\t\twhile(shouldRepeat){\r\n\t\t\ttry{\r\n\t\t\tportNum = Integer.parseInt(port);\r\n\t\t\tshouldRepeat = false;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e){\r\n\t\t\t\tport = JOptionPane.showInputDialog(\"Host port:\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tclientName = JOptionPane.showInputDialog(\"User name:\");\r\n\t\t\r\n\t\tif (host == null || port == null || clientName == null)\r\n\t\t\treturn;\r\n\t\t\r\n\t\ttry{\r\n\t\t\t// Open a connection to the server\r\n\t\t\tserver = new Socket(host, portNum);\r\n\t\t\tout = new ObjectOutputStream(server.getOutputStream());\r\n\t\t\tin = new ObjectInputStream(server.getInputStream());\r\n\t\t\t\r\n\t\t\tout.writeObject(clientName);\r\n\t\t\t\r\n\t\t\tsetupGUI();\r\n\t\t\t\r\n\t\t\t// start a thread for handling server events\r\n\t\t\tnew Thread(new ServerHandler()).start();\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void joinNewClient() {\r\n\t\t\tString clientName = _clientView.getUserName();\r\n\t\t\tif(clientName == null)\r\n\t\t\t\treturn;\r\n\t\t\t_clientModel.connectToServer();\r\n\t\t\t_clientModel.joinChat(clientName);\r\n\t\t}", "public ClientLoginService(){\n this(MessageConnection.CHANNEL_DEFAULT_RELIABLE);\n }", "public ChatClient(String name, String ip, JChatFrame chatFrame, String host, int port) {\r\n this.clientName = name;\r\n this.clientIP = ip;\r\n this.chatFrame = chatFrame;\r\n this.host = host;\r\n this.port = port;\r\n chatFrame.notifyLogin(login());\r\n }", "public ChatClient() {\r\n\r\n // Layout GUI\r\n textField.setEditable(false);\r\n messageArea.setEditable(false);\r\n frame.getContentPane().add(textField, \"North\");\r\n frame.getContentPane().add(new JScrollPane(messageArea), \"Center\");\r\n frame.pack();\r\n\r\n // Add Listeners\r\n textField.addActionListener(new ActionListener() {\r\n /**\r\n * Responds to pressing the enter key in the textfield by sending the contents of the text\r\n * field to the server. Then clear the text area in preparation for the next message.\r\n */\r\n public void actionPerformed(ActionEvent e)\r\n {\r\n out.println(textField.getText());\r\n textField.setText(\"\");\r\n }\r\n });\r\n }", "Cliente(){}", "public Client(String host) {\n super(\"Client\");\n\n chatServer = host; // set server to which this client connects\n\n enterField = new JTextField(); // create enterField\n enterField.setEditable(false);\n enterField.addActionListener(\n new ActionListener() {\n // send message to server\n public void actionPerformed(ActionEvent event) {\n sendData(event.getActionCommand());\n enterField.setText(\"\");\n } // end method actionPerformed\n } // end anonymous inner class\n ); // end call to addActionListener\n\n add(enterField, BorderLayout.NORTH);\n displayArea = new JTextArea(); // create displayArea\n add(new JScrollPane(displayArea), BorderLayout.CENTER);\n\n setSize(300, 150); // set size of window\n setVisible(true); // show window\n }", "public Cliente() {\r\n\t \tsetTitle(\" Cliente\");\r\n\t \r\n\t//Campo de Texto en la parte inferior\r\n\t ingresoMensaje = new JTextField();\r\n\t ingresoMensaje.setFont(new Font(\"Arial\", Font.PLAIN, 11));\r\n\t ingresoMensaje.setEditable(false);\r\n\t getContentPane().add(ingresoMensaje, BorderLayout.SOUTH);\r\n\r\n\t//Hoja del chat centrado\r\n\t pantallaChat = new JTextArea();\r\n\t pantallaChat.setFont(new Font(\"Arial\", Font.PLAIN, 15));\r\n\t pantallaChat.setEditable(false);\r\n\t getContentPane().add(new JScrollPane(pantallaChat), BorderLayout.CENTER);\r\n\t pantallaChat.setBackground(Color.white);\r\n\t pantallaChat.setForeground(Color.black);\r\n\t ingresoMensaje.setForeground(Color.BLACK);\r\n\r\n\t//Crea opcione de Salir\r\n\t JMenuItem salir = new JMenuItem(\"Salir\");\r\n\t salir.setFont(new Font(\"Arial\", Font.PLAIN, 15));\r\n\t salir.setBackground(Color.WHITE);\r\n\t salir.setForeground(Color.BLACK);\r\n\t \r\n\t JMenuBar barra = new JMenuBar();\r\n\t setJMenuBar(barra);\r\n\t barra.add(salir);\r\n\t \r\n\r\n\t//Accion que se realiza Salir\r\n\t salir.addActionListener(new ActionListener() {\r\n\t public void actionPerformed(ActionEvent e) {\r\n\t System.exit(0); //Sale de la aplicacion\r\n\t }\r\n\t });\r\n\r\n\r\n\t ipServidor = JOptionPane.showInputDialog(null, \"Introduzca IP del servidor: \");\r\n\t setSize(574, 341);//tamano de la ventana del chat\r\n\t setVisible(true);//hace visible a la ventana\r\n\t }", "private void createGUI() {\r\n\t\t// Create the frame for client window.\r\n\t\tJFrame frame = new JFrame(\"Client\");\r\n\t\t/*\r\n\t\t * Set the layout as null as using setbounds to set complonents set size\r\n\t\t * and close the frame when clicked on exit\r\n\t\t */\r\n\t\tframe.setLayout(null);\r\n\t\t// exit chat rrom system if clicks on close icon\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tJLabel userlabel = new JLabel(\"Enter Username\");// label for username\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// input\r\n\t\tJLabel inputlabel = new JLabel(\"Enter Message\");// label for message\r\n\t\t/*\r\n\t\t * Create the buttons Send button to send messegs connect to connect to\r\n\t\t * chat room disconnect to logout from the chat room\r\n\t\t */\r\n\t\tJButton send = new JButton(\"Send\");\r\n\t\tJButton connect = new JButton(\"Connect\");\r\n\t\tJButton disconnect = new JButton(\"Disconnect\");\r\n\t\t// usertext is to input username from user and inputfield is to input\r\n\t\t// messages\r\n\t\tJTextField usertext = new JTextField();\r\n\t\t// set textfield as editable\r\n\t\tusertext.setEditable(true);\r\n\t\tJTextField inputfield = new JTextField();\r\n\t\t// set textfield as editable\r\n\t\tinputfield.setEditable(true);\r\n\t\tuserlabel.setBounds(10, 40, 100, 20);\r\n\t\tusertext.setBounds(120, 40, 120, 30);\r\n\t\tinputlabel.setBounds(10, 70, 150, 20);\r\n\t\tinputfield.setBounds(120, 70, 120, 30);\r\n\t\ttextarea.setBounds(10, 110, 500, 300);\r\n\t\t// https://www.youtube.com/watch?v=Uo5DY546rKY\r\n\t\tsend.setBounds(10, 430, 150, 30);\r\n\t\tconnect.setBounds(180, 430, 150, 30);\r\n\t\tdisconnect.setBounds(350, 430, 150, 30);\r\n\t\t// provide scrolling capability to textarea\r\n\t\tJScrollPane scrollPane = new JScrollPane(textarea);\r\n\t\t// set textarea as not editable\r\n\t\ttextarea.setEditable(false);\r\n\t\t// Create textfield to write message\r\n\t\t// http://cs.lmu.edu/~ray/notes/javanetexamples/\r\n\t\t// exit on close\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// put created components in the frame.\r\n\t\tframe.add(userlabel);// add userlabel to the frame\r\n\t\tframe.add(usertext);// add usertext to the frame\r\n\t\tframe.add(inputlabel);// add inputlabel to the frame\r\n\t\tframe.add(inputfield);// add inputfield to the frame\r\n\t\tframe.add(textarea);// add textarea to the frame\r\n\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tframe.add(send);// add send button to the frame\r\n\t\tframe.add(connect);// add connect button to the frame\r\n\t\tframe.add(disconnect);// add disconnect button to the frame\r\n\t\t/*\r\n\t\t * add listeners set action to start button\r\n\t\t * https://docs.oracle.com/javase/tutorial/uiswing/components/button.\r\n\t\t * html#abstractbutton When user clicks on send button after adding\r\n\t\t * message then client converts that message to HTTP format\r\n\t\t */\r\n\t\tsend.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * user-agent displays name of the browsers,this list shows\r\n\t\t\t\t\t * this application is independent of a browser. display the\r\n\t\t\t\t\t * host name in this case host is \"localhost\"\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString useragent = \" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36\";\r\n\t\t\t\t\tString host = \" Host:\" + socket.getInetAddress().getHostName();// get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// host\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// name\r\n\r\n\t\t\t\t\t/* get length of the original messsage */\r\n\t\t\t\t\tString ContentLength = \" Content-length:\" + inputfield.getText().length();\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * htm as this is simple chat room system,independent of the\r\n\t\t\t\t\t * browser the content type is text/plain\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString contentType = \" Conent-Type:text/plain\";\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * To print current date in the HTTP date format explicitly\r\n\t\t\t\t\t * adding the time zone to the formatter\r\n\t\t\t\t\t */\r\n\t\t\t\t\tInstant i = Instant.now();\r\n\t\t\t\t\tString dateFormatted = DateTimeFormatter.RFC_1123_DATE_TIME.withZone(ZoneOffset.UTC).format(i);\r\n\t\t\t\t\tString currentDate = \"Date:\" + dateFormatted;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * To get time difference between to messages and converting\r\n\t\t\t\t\t * it to the string format\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString time2 = dispTime.format(System.currentTimeMillis());\r\n\t\t\t\t\tdate2 = dispTime.parse(time2);\r\n\t\t\t\t\t// get difference between previous message and recent\r\n\t\t\t\t\t// message\r\n\t\t\t\t\tdifference = date2.getTime() - date1.getTime();\r\n\t\t\t\t\tint min = (int) ((difference / (1000 * 60)) % 60);// calculate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// minute\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// difference\r\n\t\t\t\t\tint sec = (int) ((difference / 1000) % 60);//// calculate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//// seconds\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//// difference\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * the format of the time is two digit numbers so concevert\r\n\t\t\t\t\t * minutes and seconds to 2 digits\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString m = String.format(\"%02d\", min);\r\n\t\t\t\t\tString s = String.format(\"%02d\", sec);\r\n\t\t\t\t\tString time = \"(\" + m + \".\" + s + \") - \";\r\n\t\t\t\t\t// minutes and seconds\r\n\t\t\t\t\tdate1 = date2;\r\n\t\t\t\t\t// append useragent,host,ContentLength,contentType to a\r\n\t\t\t\t\tString httpmsg = useragent + host + ContentLength + contentType + currentDate;\r\n\t\t\t\t\t// append timedifference to the username\r\n\t\t\t\t\tString timetrack = username + time;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * append all the strings\r\n\t\t\t\t\t * useragent,host,ContentLength,contentType, timedifference\r\n\t\t\t\t\t * to the username for HTTP format in the main message\r\n\t\t\t\t\t * entered server reads this whole message\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString wholeMsg = \"POST:\" + timetrack + \":\" + inputfield.getText() + \":\" + httpmsg + \":Chat\";\r\n\t\t\t\t\tout.println(wholeMsg);// send whole message in HTTP format\r\n\t\t\t\t\t\t\t\t\t\t\t// to output stream\r\n\t\t\t\t\tout.flush(); // flushes the buffer\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * After sending message to output stream clear the textfield\r\n\t\t\t\t * and set focus to inputfield to take messages input\r\n\t\t\t\t */\r\n\t\t\t\tinputfield.setText(\"\");\r\n\t\t\t\tinputfield.requestFocus();\r\n\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\t/*\r\n\t\t * add listner to connect button after entering username if user clicks\r\n\t\t * on connect button then it checks if the username is valid(ie.only\r\n\t\t * charachters) then its creates a new thread with setting username in\r\n\t\t * title\r\n\t\t */\r\n\t\tconnect.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\t\t\t\tif (isConnected == false) {\r\n\t\t\t\t\t// take username\r\n\t\t\t\t\tusername = usertext.getText();\r\n\r\n\t\t\t\t\t// check if the user name is valid that is contains only\r\n\t\t\t\t\t// letters\r\n\t\t\t\t\tif (username.matches(\"[a-zA-Z]*\")) {\r\n\t\t\t\t\t\tusertext.setEditable(false);\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// server is at localhost and port 7879 so use same\r\n\t\t\t\t\t\t\t// port number here\r\n\t\t\t\t\t\t\tsocket = new Socket(\"localhost\", 7879);\r\n\t\t\t\t\t\t\t// create inputstream and outputstream\r\n\t\t\t\t\t\t\tInputStreamReader streamreader = new InputStreamReader(socket.getInputStream());\r\n\t\t\t\t\t\t\tin = new BufferedReader(streamreader);\r\n\t\t\t\t\t\t\tout = new PrintWriter(socket.getOutputStream());\r\n\t\t\t\t\t\t\tout.println(\"POST:\" + username + \":(00.00) has connected.:Connect\");\r\n\t\t\t\t\t\t\tout.flush();\r\n\t\t\t\t\t\t\tisConnected = true; // connection is established so\r\n\t\t\t\t\t\t\t\t\t\t\t\t// this value is true\r\n\t\t\t\t\t\t\tconnect.setEnabled(false);// disable the connect\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// button\r\n\t\t\t\t\t\t\tframe.setTitle(\"Thread \" + username);\r\n\t\t\t\t\t\t} // try\r\n\t\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// create and start a new thread\r\n\t\t\t\t\t\tThread thread = new Thread(new ListenServer());\r\n\t\t\t\t\t\tthread.start();\r\n\t\t\t\t\t} // if\r\n\t\t\t\t\t\t// if user enters invalid username then give message to\r\n\t\t\t\t\t\t// enter valid user name\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttextarea.append(\"Username is not valid.\");\r\n\t\t\t\t\t\ttextarea.append(\"\\nPlease enter only Charachters.\");\r\n\t\t\t\t\t\ttextarea.append(\"\");\r\n\r\n\t\t\t\t\t} // else\r\n\r\n\t\t\t\t} // if\r\n\t\t\t}\r\n\t\t});\r\n\t\t/*\r\n\t\t * add listner to disconnect button this button logs off the user from\r\n\t\t * chat room\r\n\t\t */\r\n\t\tdisconnect.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\t\t\t\tString dc = (\"POST:\" + username + \": has disconnected.:Disconnect\");\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * set output stream disable disconnect and send buttons\r\n\t\t\t\t\t */\r\n\t\t\t\t\tout.println(dc);\r\n\t\t\t\t\tout.flush();\r\n\t\t\t\t\tdisconnect.setEnabled(false);\r\n\t\t\t\t\tsend.setEnabled(false);\r\n\t\t\t\t\t// socket.close();\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tisConnected = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t// setting frame as visible\r\n\t\tframe.setVisible(true);\r\n\t\tframe.setSize(520, 500);\r\n\t\tframe.setResizable(false);\r\n\r\n\t}", "public ChatActivity() {\n }", "private MatterAgentClient() {}", "public GameServerClient(){\r\n\t\tinitComponents();\r\n\t\t}", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "public GameClient() {\r\n super(new Client(Config.WRITE_BUFFER_SIZE, Config.OBJECT_BUFFER_SIZE), null, null);\r\n }", "public Client() {\n // Naming the client window Player\n super(\"Player\");\n\n // Setting up the textField. Must press enter to start the game.\n textField = new JTextField(\"Please press enter to start...\");\n\n // Adding the ActionListener\n textField.addActionListener(\n event -> {\n try // create and send packet\n {\n // get message from textfield\n String message = event.getActionCommand();\n\n // convert to bytes\n byte[] data = message.getBytes();\n\n // create sendPacket\n DatagramPacket sendPacket = new DatagramPacket(data,\n data.length, InetAddress.getLocalHost(), 5000);\n\n // sending packet to Server\n socket.send(sendPacket);\n\n // Displaying the message in \"Player: Message\" Format\n displayArea.setCaretPosition(\n displayArea.getText().length());\n } catch (IOException ioException) {\n displayMessage(ioException + \"\\n\");\n ioException.printStackTrace();\n }\n }\n );\n add(textField, BorderLayout.NORTH);\n\n // Creating and Adding the Display Area text box.\n displayArea = new JTextArea();\n add(new JScrollPane(displayArea), BorderLayout.CENTER);\n\n // Making the Window for Client\n setSize(400, 300); // set window size\n setVisible(true); // show window\n\n try // create DatagramSocket for sending and receiving packets\n {\n socket = new DatagramSocket();\n } catch (SocketException socketException) {\n socketException.printStackTrace();\n System.exit(1);\n }\n }", "public ChatRequest()\r\n\t{\r\n\t}", "public Server () {\n\t\t\n\t\tsuper(\"The best messager ever! \");\n\t\t//This sets the title. (Super - JFrame).\n\t\t\n\t\tuserText = new JTextField();\n\t\tuserText.setEditable(false);\n\t\tuserText.addActionListener(\n\t\t\t\tnew ActionListener() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tsendMessage(event.getActionCommand());\n\t\t\t\t\t\t//This returns whatever event was performed in the text field i.e the text typed in.\n\t\t\t\t\t\tuserText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\tadd(userText,BorderLayout.NORTH);\n\t\tchatWindow = new JTextArea();\n\t\tadd(new JScrollPane (chatWindow));\n\t\tsetSize(800,600);\n\t\tsetVisible(true);\n\t\t\n\t\t\n\t\n\t\n\t}", "public EO_ClientsImpl() {\n }", "Client(String server, int port, String username, ClientGUI cg) {\n\t\tthis.server = server;\n\t\tthis.port = port;\n\t\tthis.username = username;\n\t\tthis.cg = cg; // Saved if in GUI mode or not\n\t}", "public Client(Client client) {\n\n }", "public DmaiClient() {\r\n\t\tthis.mainView = new MainView();\r\n\t\tconnexionServeur();\r\n\r\n\t}", "public ChatBean() {\r\n }", "public static void main(String[] args) {\n\n System.out.println(\"Hi. This is a greeting.\");\n Scanner scanner = new Scanner(System.in);\n\n String name = \"\";\n String address = \"localhost\";\n int portNum = 1500;\n\n if (args.length == 1)\n name = args[0];\n else {\n System.out.print(\"Please type a username. \");\n name = scanner.nextLine();\n }\n if (args.length == 2){\n name = args[0];\n try {\n portNum = Integer.parseInt(args[1]);\n } catch (Exception e) {\n System.out.println(\"Invalid port number!\");\n return;\n }\n }\n if (args.length == 3){\n address = args[2];\n try {\n portNum = Integer.parseInt(args[1]);\n } catch (Exception e) {\n System.out.println(\"Invalid port number!\");\n return;\n }\n name = args[0];\n }\n\n\n // Create your client and start it\n ChatClient client = new ChatClient(address, portNum, name);\n if (!client.start()) {\n return;\n }\n\n\n // Send an empty message to the server\n\n while (true) {\n String message = scanner.nextLine();\n message = message.toLowerCase();\n if (message.contains(\"/ttt\")) {\n String[] messageArray = message.split(\" \");\n if (messageArray.length <= 1) {\n System.out.println(\"Dude do this right!!!\");\n continue;\n }\n if(messageArray[1].equals(name)) {\n System.out.println(\"Error.\");\n continue;\n }\n client.sendMessage(new ChatMessage(ChatMessage.TICTACTOE,message, messageArray[1]));\n\n\n /// /tt <recipent> <placement>\n\n\n } else if (message.equals(\"/logout\")){\n client.sendMessage(new ChatMessage(ChatMessage.LOGOUT, \" \" + name + \" disconnected\", name));\n client.close();\n break;\n\n } else if (message.equals(\"/list\")) {\n// System.out.println(name + \"requested a list of users.\");\n client.sendMessage(new ChatMessage(ChatMessage.LIST, \" \",name));\n\n } else if (message.contains(\"/msg\")){\n String[] messageArray = message.split(\" \");\n if(messageArray[1].equals(name)) {\n System.out.println(\"Error. You cannot slide into your own DM.\");\n }\n\n else {\n int index = message.indexOf(messageArray[2]);\n client.sendMessage(new ChatMessage(ChatMessage.DM, message.substring(index), messageArray[1]));\n }\n } else {\n client.sendMessage(new ChatMessage(ChatMessage.MESSAGE, message, name));\n }\n }\n }", "public LocalClient() {\n\t\tsuper(\"SERVER\", Arrays.asList(new String[] {\"*\"}), null, null);\n\t\tinputThread = new Thread(this);\n\t\tinputThread.start();\n\t}", "public ClientAcceptor(ChatServer cs, ServerSocket ss){\n\t\tlistener = ss;\n\t\tthis.chatServ = cs;\n\t}", "public static void main(String[] args){\n \n Chat m = new Chat();\n m.connectChat(new String[]{\"100.1.215.220\",\"8889\"});\n //m.runServer(new String[]{\"192.168.1.164\",\"8889\"});\n }", "public ChatModel() {\n\t}", "public void make_chat_room() {\n client_PW.println(\"------------make new chat-------------\");\n client_PW.println(\"Enter chat name : \");\n client_PW.flush();\n String line = null;\n String ad=null;\n PrintWriter pw=null;\n HashMap new_chat = new HashMap();\n try {\n line = client_BR.readLine();\n try{\n File file = new File(System.getProperty(\"user.home\"),line + \".txt\");\n pw = new PrintWriter(file);\n \n }catch(Exception e){System.out.println(e);}\n \n synchronized(chat_room) {\n chat_room.put(line, new_chat);\n }\n synchronized(cur_chat_room) {\n cur_chat_room.remove(client_ID);\n }\n String msg = client_ID + \"님이 퇴장하셨습니다\";\n broadcast(msg, null);\n synchronized(new_chat) {\n new_chat.put(client_ID,client_PW);\n }\n synchronized(new_chat) {\n \n new_chat.put(ad,pw);\n }\n cur_chat_room = new_chat;\n } catch (Exception e) { System.out.println(e); }\n \n\n }", "public CluelessClient(String username, String hostAddress) {\n\t\tclient = new Client();\n\t\tclient.start();\n\n\t\t// Registers the client class so we can send it over the network\n\t\tNetwork.register(client);\n\n\t\t// Gets the player from the other end of the connection for rmi\n\t\tconsolePlayer = ObjectSpace.getRemoteObject(client, Network.CONSOLE_PLAYER, ConsolePlayerInterface.class);\n\t\tRemoteObject remoteConsolePlayerObject = (RemoteObject) consolePlayer;\n\t\tremoteConsolePlayerObject.setResponseTimeout(Network.reponseTime);\n\n\t\tclient.addListener(new Listener() {\n\t\t\t@Override\n\t\t\tpublic void disconnected(Connection connection) {\n\t\t\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tconsoleTextArea.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t// ask user for host\n//\t\tString userInput = (String) JOptionPane.showInputDialog(null, \"Host:\", \"Connect to Clueless Server\",\n//\t\t JOptionPane.QUESTION_MESSAGE, null, null, \"localhost\");\n//\t\tif (userInput == null || userInput.trim().length() == 0) {\n//\t\t\tSystem.exit(1);\n//\t\t}\n//\t\tfinal String host = userInput.trim();\n\t\tfinal String host = hostAddress.trim();\n\n\t\t// ask for user name\n//\t\tuserInput = (String) JOptionPane.showInputDialog(null, \"Name:\", \"Connect to Clueless Server\",\n//\t\t JOptionPane.QUESTION_MESSAGE, null, null, \"YourUsername\");\n//\t\tif (userInput == null || userInput.trim().length() == 0) {\n//\t\t\tSystem.exit(1);\n//\t\t}\n//\t\tfinal String userName = userInput.trim();\n\t\tfinal String userName = username.trim();\n\n\t\tconsoleTextArea = new ConsoleFrame(host);\n\t\tnew ObjectSpace(client).register(Network.CONSOLE_TEXT_AREA, consoleTextArea);\n\t\tconsoleTextArea.setSendListener(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\t// Create a cheat mode to show case file\n\t\t\t\tif (consoleTextArea.getConsoleText().equals(\"CHEAT\")) {\n\t\t\t\t\tconsolePlayer.cheatMode();\n\t\t\t\t} else {\n\t\t\t\t\tswitch (consolePlayer.getGameState().getGameState()) {\n\t\t\t\t\t// addPlayer(1)\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tconsolePlayer.addPlayer(userName, consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waitingForStartGame(2)\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tconsolePlayer.startGame(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// gameStarted(3)\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// moving(4)\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tconsolePlayer.movePlayer(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// chooseAction(5),\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tconsolePlayer.chooseAction(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// suggesting(6)\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\tconsolePlayer.makeSuggestion(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// accussing(7)\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\tconsolePlayer.makeAccusation(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waiting(8)\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// showCard(9)\n\t\t\t\t\tcase 9:\n\t\t\t\t\t\tconsolePlayer.showCard(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waitingSeeCard(10)\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconsoleTextArea.setCloseListener(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tclient.stop();\n\t\t\t}\n\t\t});\n\t\tconsoleTextArea.setVisible(true);\n\n\t\t// connecting on a new thread. This allows a progress bar to be shown if\n\t\t// connection is slow enough.\n\t\tnew Thread(\"Connect\") {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tclient.connect(Network.reponseTime, host, Network.port);\n\t\t\t\t\tconsolePlayer.registerUserName(userName);\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "private ChatUI()\n\t{\n\t}", "public void createClient(ClientView clientView, int tcpPort, int udpPort, String tcpIPAddress, String clientID) {\n Client client = new Client(clientView, tcpPort, udpPort, tcpIPAddress, udpIPAddress, clientID);\n }", "private void setupChat() {\n Log.d(TAG, \"setupChat()\");\n\n // Initialize the array adapter for the conversation thread\n mConversationArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.message);\n\n mConversationView.setAdapter(mConversationArrayAdapter);\n\n // Initialize the compose field with a listener for the return key\n\n // Initialize the send button with a listener that for click events\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(getActivity(), mhandler);\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n switchForFileSaved.setOnCheckedChangeListener(switchListener) ;\n }", "private void startClientConnection() {\r\n\t\t\t\r\n\t//\tStringBuilder sbreq = new StringBuilder();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*making connection request*/\r\n\t\t\tclientsoc = new Socket(ip,port);\r\n\t\t\t\r\n\t\t\t/*Input and output streams for data sending and receiving through client and server sockets.*/\r\n\t\t\tdis = new DataInputStream(clientsoc.getInputStream());\t\r\n\t\t\tdos = new DataOutputStream(clientsoc.getOutputStream());\r\n\t\t\t\r\n\t\t\tStringBuilder sbconnreq = new StringBuilder();\r\n\r\n\t\t\t/*Building the Http Connection Request and passing Client name as body. Thus the Http Header\r\n\t\t\tare encoded around the client name data.*/\r\n\t\t\tsbconnreq.append(\"POST /\").append(\"{\"+clientname+\"}\").append(\"/ HTTP/1.1\\r\\n\").append(host).append(\"\\r\\n\").\r\n\t\t\tappend(userAgent).append(\"\\r\\n\").append(contentType).append(\"\\r\\n\").append(contentlength).append(clientname.length()).append(\"\\r\\n\").\r\n\t\t\tappend(date).append(new Date()).append(\"\\r\\n\");\r\n\t\t\t\r\n\t\t\tdos.writeUTF(sbconnreq.toString());\r\n\r\n\t\t\totherusers = new ArrayList<>(10);\r\n\t\t\tusertimestamp = new HashMap<>(10);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You have logged in. You can start Chatting: \" + clientname);\r\n\t\t\tconnected = true;\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ServerThread(Socket socket, String UserName){\n this.socket = socket;\n this.UserName = UserName;\n ChatMessage = new LinkedList<String>();\n }", "public Ctacliente() {\n\t}", "public ChatGUI() {\r\n\r\n String propertiesPath = \"kchat.properties\";\r\n try {\r\n Configuration.getInstance().setFile(propertiesPath);\r\n sock = new ChatSocket(new UdpMulticast(Configuration.getInstance().getValueAsString(\"udp.iface\"),\r\n Configuration.getInstance().getValueAsString(\"udp.host\"), Configuration.getInstance()\r\n .getValueAsInt(\"udp.port\")), this);\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(null, \"Cannot Open Socket\", \"alert\", JOptionPane.ERROR_MESSAGE);\r\n // Exit the application if socket is not established\r\n // print stack trace to terminal\r\n e.printStackTrace();\r\n System.exit(0);\r\n }\r\n\r\n // exit the frame on closure of the frame\r\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n // set the bounds of the frame\r\n setBounds(100, 100, 450, 300);\r\n\r\n // Initialize the content pane\r\n contentPane = new JPanel();\r\n\r\n // set the borders of the content pane\r\n contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\r\n // set the layout of the content pane\r\n contentPane.setLayout(new BorderLayout(0, 0));\r\n\r\n // add content pane to frame\r\n setContentPane(contentPane);\r\n\r\n // create panel and layout for input, button and field at top of content\r\n // pane\r\n JPanel panel = new JPanel();\r\n panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n contentPane.add(panel, BorderLayout.NORTH);\r\n\r\n // create the username lael\r\n JLabel lblNewLabel = new JLabel(\"Username\");\r\n panel.add(lblNewLabel);\r\n\r\n // create the field for the Username to input text\r\n textField = new JTextField();\r\n panel.add(textField);\r\n // set column length of the field\r\n textField.setColumns(10);\r\n\r\n // get rooms from the socket return array of long\r\n LongInteger[] rooms = sock.getPresenceManager().getRooms();\r\n // initialize field to store room names\r\n String[] roomNames = new String[rooms.length];\r\n // using for loop convert long to string and store in room name array\r\n for (int i = 0; i < rooms.length; i++) {\r\n roomNames[i] = rooms[i].toString();\r\n }\r\n\r\n // create the combo box\r\n final JComboBox comboBox = new JComboBox(roomNames);\r\n\r\n // refresh the rooms on button press\r\n final JButton btnNewButton = new JButton(\"Refresh Rooms\");\r\n // the action listener for button press\r\n btnNewButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent arg0) {\r\n comboBox.removeAllItems();\r\n // get rooms from the socket\r\n LongInteger[] rooms = sock.getPresenceManager().getRooms();\r\n // initialize field to store room names\r\n String[] roomNames = new String[rooms.length];\r\n // using for loop convert long to string and store in room name\r\n // array\r\n for (int i = 0; i < rooms.length; i++) {\r\n comboBox.addItem(roomNames);\r\n roomNames[i] = rooms[i].toString();\r\n }\r\n }\r\n });\r\n\r\n // add the label for joins\r\n JLabel lblJoin = new JLabel(\" [--- joins \");\r\n panel.add(lblJoin);\r\n\r\n // add the textfield for user input for user to user connection\r\n textField_3 = new JTextField();\r\n\r\n // create a checkbox for when you which to select drop down or input\r\n // user\r\n final JCheckBox chckbxNewCheckBox = new JCheckBox(\"\");\r\n chckbxNewCheckBox.setSelected(true);\r\n final JCheckBox chckbxNewCheckBox_1 = new JCheckBox(\"\");\r\n\r\n // add action listener to checkbox for drop down\r\n chckbxNewCheckBox.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent arg0) {\r\n // if checkbox is checked\r\n if (chckbxNewCheckBox.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox_1.setSelected(false);\r\n // enable the combox box drop down\r\n comboBox.setEnabled(true);\r\n // disable the textfield for the user input\r\n textField_3.setEnabled(false);\r\n textField_3.setText(\"\");\r\n // enable the refresh rooms button\r\n btnNewButton.setEnabled(true);\r\n }\r\n }\r\n });\r\n panel.add(chckbxNewCheckBox);\r\n\r\n // add the drop down to the contentpane\r\n panel.add(comboBox);\r\n\r\n // additional labels are added to the content pane\r\n JLabel lblOrChatWith = new JLabel(\" OR chat with user\");\r\n panel.add(lblOrChatWith);\r\n\r\n // add action listener to checkbox for user input\r\n chckbxNewCheckBox_1.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent arg0) {\r\n // if checkbox is checked\r\n if (chckbxNewCheckBox_1.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox.setSelected(false);\r\n // disable the combox box drop down\r\n comboBox.setEnabled(false);\r\n // enable the textfield for the user input\r\n textField_3.setEnabled(true);\r\n textField_3.setText(\"\");\r\n // disable the refresh rooms button\r\n btnNewButton.setEnabled(false);\r\n }\r\n }\r\n });\r\n panel.add(chckbxNewCheckBox_1);\r\n\r\n // set the textfield for user to user input to false by default and add\r\n // to contentpane panel\r\n textField_3.setEnabled(false);\r\n panel.add(textField_3);\r\n textField_3.setColumns(10);\r\n\r\n // the label is added to the content pane panel\r\n JLabel label = new JLabel(\" ---] \");\r\n panel.add(label);\r\n\r\n // the refresh rooms button is added to content pane panel\r\n panel.add(btnNewButton);\r\n\r\n // the connection button is created\r\n JButton btnNewButton_1 = new JButton(\"Connect\");\r\n // action listener is added to button to take action on key press\r\n btnNewButton_1.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n // if no input or only spaces is put in text field it counts as\r\n // invalid entry\r\n if (textField.getText().trim().equals(\"\")) {\r\n // prompt to user and do nothing\r\n JOptionPane.showMessageDialog(null, \"Please input a valid username\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n textField.setText(\"\");\r\n } else {\r\n // if checkbox for room drop down is selected meaning we are\r\n // connecting to a room\r\n if (chckbxNewCheckBox.isSelected() == true) {\r\n\r\n // if no tab exist with a chosen room name continue\r\n if (tabbedPane.indexOfTab(comboBox.getSelectedItem().toString()) == -1) {\r\n\r\n // get the room members\r\n Set<LongInteger> roomMembers = sock.getPresenceManager().membersOf(\r\n new LongInteger(comboBox.getSelectedItem().toString()));\r\n // initialize field to store room member names\r\n String[] roomMemberNames = new String[roomMembers.size()];\r\n // using for loop convert long to string and store\r\n // in room member name array\r\n int i = 0;\r\n for (LongInteger member : roomMembers) {\r\n roomMemberNames[i] = member.toString();\r\n i++;\r\n }\r\n\r\n // connect to room below and based on return type\r\n // add tab\r\n try {\r\n sock.executeCommand(new PresenceCommand(new LongInteger(comboBox.getSelectedItem()\r\n .toString()), true));\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n // add tab based on return type above\r\n // once you connect successfully disable the\r\n // username textfield\r\n textField.setEnabled(false);\r\n // add tab for Room to user chat\r\n addTab(comboBox.getSelectedItem().toString(), roomMemberNames, 1);\r\n } else {\r\n // prompt user and ensures that one does not open\r\n // multiple tabs to the same room\r\n JOptionPane.showMessageDialog(null, \"You are already connected to \"\r\n + comboBox.getSelectedItem().toString(), \"alert\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n // if checkbox for user is selected meaning we are\r\n // connecting to a user\r\n else if (chckbxNewCheckBox_1.isSelected() == true) {\r\n\r\n if (tabbedPane.indexOfTab(\"Chat with \" + textField_3.getText()) == -1) {\r\n // one does not connect to a user so the tab is\r\n // automatically created\r\n // once you connect successfully disable the\r\n // username textfield\r\n // disable the textfield for usernname\r\n textField.setEnabled(false);\r\n // add tab for User to user chat\r\n addTab(\"Chat with \" + textField_3.getText(), new String[] { textField_3.getText() }, 2);\r\n } else {\r\n // prompt user and ensures that one does not open\r\n // multiple tabs to the same user\r\n JOptionPane.showMessageDialog(null, \"You are already connected to \" + \"Chat with \"\r\n + textField_3.getText(), \"alert\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n }\r\n }\r\n });\r\n panel.add(btnNewButton_1);\r\n\r\n // set the tabbed pane to top\r\n tabbedPane = new JTabbedPane(SwingConstants.TOP);\r\n\r\n // add tabbed pane to center of content pane\r\n contentPane.add(tabbedPane, BorderLayout.CENTER);\r\n }", "ChatServer (int port) throws IOException \n {\n\t//create new server socket \n ServerSocket server = new ServerSocket(port);\n \n //confirmation message that server is connected\n System.out.println(\"The Chat Server is now connected to port \" + port + \".\");\n System.out.println(\"Waiting for clients to connect...\");\n\n //looks for new clients and adds them to linkedList\n while (true) \n {\n client = server.accept();\n linkedList.add(client);\n \n //creates new participant(ChatClient) in discussion\n //with associated socket as argument\n ChatClient chatterer = new ChatClient(client);\n \n //starts the thread\n chatterer.start();\n \n //prints message on server console including # of the client is and\n //where they are connected from\n System.out.println(\"New client #\" + linkedList.size() + \" on client's port \" \n \t\t + client.getPort());\n }\n }", "public ClienteServicio() {\n }", "public TelemetryClientClient()\n {\n TelemetryClient tc = new TelemetryClient();\n if (!tc.getOnlineStatus())\n tc.connect(\"a connection string\");\n\n tc.send(\"some message\");\n\n String response = tc.receive();\n\n tc.disconnect();\n\n }", "ClientGUI() {\n\t\t_ls = new logServer(\"ClientGui\");\n\n\t\t_clientFrame = new JFrame();\n\t\t_loginFrame = new LoginF(_ls);\n\n\t\t_clientFrame.setSize(500, 820);\n\t\t_clientFrame.setLayout(null);\n\t\t_clientFrame.add(_loginFrame);\n\t\tinit();\n\n\t\t// startFrame();\n\t\t\n\n\t\t_clientControl = new Client(_ls);\n\t\t_loginFrame.setClientPointer(_clientControl);\n\n\t\t/**\n\t\t * event for login frame to close and open new frame\n\t\t */\n\t\t_loginFrame.setLoginListener(new loginFrameListener() {\n\t\t\t@Override\n\t\t\tpublic void singUpListener(Client clientControl) {\n\t\t\t\t_clientControl = clientControl;\n\t\t\t\tstartFrame();\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }", "public Communicator() {\n\t\tcommlock = new Lock ();\n\t\tspeaker = new Condition(commlock);\n\t\tlistener = new Condition(commlock);\n\n }", "public ChatServer() throws Exception {\n \n // Set port\n port = Integer.parseInt(config.getConfig(\"chatPort\"));\n \n System.out.println(\"Chat server running on port \" + port);\n \n }", "public TurnoVOClient() {\r\n }", "private SshClient createClient() {\n java.security.Security.addProvider(\n new org.bouncycastle.jce.provider.BouncyCastleProvider());\n final SshClient client = SshClient.setUpDefaultClient();\n client.setForwardingFilter(AcceptAllForwardingFilter.INSTANCE);\n client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);\n return client;\n }", "public Client(String nickname) throws RemoteException {\n\t\n\tthis.nickname=nickname;\n\n\t\t\t\t\t\t\t\t}", "public CoronosClient(String ip){\n //GUI creator\n loginBuilder();\n uiBuilder();\n\n //create Socket + Streams\n try {\n s = new Socket(ip, 16789);\n oos = new ObjectOutputStream(s.getOutputStream());\n ois = new ObjectInputStream(s.getInputStream());\n serverListener();\n } catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (BindException be) {\n be.printStackTrace();\n } catch(ConnectException ce){\n JOptionPane.showMessageDialog(loginButton, \"Failed to connect to server, please contact your System Administrator\", \"Connection Error\", JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public static void main(String[] args) {\n ServerSocket serverSocket = null;\n \n /* Create the server socket */\n try {\n serverSocket = new ServerSocket(9999);\n } catch (IOException e) {\n System.out.println(\"IOException: \" + e);\n System.exit(1);\n }\n room r = new room(\"Lobby\");\n ChatServerThread.addRoom(r);\n /* In the main thread, continuously listen for new clients and spin off threads for them. */\n while (true) {\n try {\n /* Get a new client */\n Socket clientSocket = serverSocket.accept();\n \n /* Create a thread for it and start! */\n ChatServerThread clientThread = new ChatServerThread(clientSocket);\n ChatServerThread.addClient(clientThread);\n new Thread(clientThread).start();\n\n } catch (IOException e) {\n System.out.println(\"Accept failed: \" + e);\n System.exit(1);\n }\n }\n }", "private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}", "public SubsystemClient(String name) {\r\n this.name = name;\r\n messageStore = new SubsystemMessageStore();\r\n }", "public ChatServer(){\r\n\t\tblnKeepRunning = true;\r\n\t\ttry{\r\n\t\t\tss = new ServerSocket(SERVER_PORT);\t\r\n\t\t\tThread t = new Thread(new Listener(), \"Chat Server Main Thread\"); //Run the service in its own thread\r\n\t\t\tt.start(); //The Hollywood Principle - \"Don't Call Us, We'll Call You.\". Threads are based on the Template Pattern\r\n\t\t}catch(Exception e){\t\t\t\r\n\t\t\te.printStackTrace();\t\r\n\t\t}\r\n\t}", "private void initiateClient(){\n btnNewGame.addActionListener(clientAction);\n btnNewGame.setActionCommand(\"NEWGAME\");\n btnQuit.addActionListener(clientAction);\n btnQuit.setActionCommand(\"QUIT\");\n btnResign.addActionListener(clientAction);\n btnResign.setActionCommand(\"RESIGN\");\n btnSendMsg.addActionListener(clientAction);\n btnSendMsg.setActionCommand(\"CHAT\");\n\n setButtons(false);\n btnNewGame.setEnabled(false);\n boardComponent.initiate();\n }", "public ChatClient(String nick, String choice,\n String host, int port)throws Exception{\n\n nickName = nick;\n\n if (choice.equals(\"cs\")){\n connectToCS(port, host);\n }\n else if (choice.equals(\"ns\")){\n connectToNS(port, host);\n }\n }", "@Override\r\n \tpublic void clientConnectedCallback(RoMClient newClient) {\r\n \t\t// Add new client and start listening to this one\r\n \t\tthis.clients.addClient(newClient);\r\n \r\n \t\t// Create the ReceiveClientCommandThread for this client\r\n \t\tReceiveClientCommandThread receiveCommandThread = new ReceiveClientCommandThread(newClient, this, this);\r\n \t\treceiveCommandThread.start();\r\n \r\n \t\t// Create the CommandQueue Thread for this client\r\n \t\tClientCommandQueueThread commandQueueThread = new ClientCommandQueueThread(newClient);\r\n \t\tcommandQueueThread.start();\r\n \t}", "public static void main(String[] args) throws IOException {\n // Get proper arguments and override defaults\n\n boolean isExit = false;\n Scanner scan = new Scanner( System.in );\n\n String username;\n int port;\n String serverAddress;\n\n switch( args.length ) {\n case 3:\n username = args[0];\n port = Integer.parseInt( args[1] );\n serverAddress = args[2];\n break;\n case 2:\n username = args[0];\n port = Integer.parseInt( args[1] );\n serverAddress = \"localhost\";\n break;\n case 1:\n username = args[0];\n port = 1500;\n serverAddress = \"localhost\";\n break;\n default:\n username = \"Anonymous\";\n port = 1500;\n serverAddress = \"localhost\";\n }\n\n String hostname;\n\n // Create your client and start it\n ChatClient client = new ChatClient( serverAddress, port, username );\n //ChatClient client = new ChatClient(\"localhost\", 1500, \"CS 180 Student\");\n boolean serverStart = client.start();\n\n // Send an empty message to the server\n if ( !serverStart || !client.socket.isConnected() ) {\n System.out.print(\"\");\n isExit = true;\n } else {\n try {\n client.sendMessage(new ChatMessage( \"just joined\", 0, null));\n } catch ( SocketException ignored) {\n isExit = true;\n }\n }\n //client.sOutput.flush();\n //client.sendMessage( new ChatMessage( \"yeet\", 0 ));\n\n while ( !isExit ) {\n String message = scan.nextLine();\n\n if ( message.toLowerCase().contains( \"/logout\" ) ) {\n client.sendMessage(new ChatMessage(message, 1, null));\n try {\n client.sOutput.close();\n client.sInput.close();\n isExit = true;\n System.out.println(\"You have been successfully logged out.\");\n //client.socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if ( message.contains( \"/msg\" ) ) {\n String[] msg = message.split(\" \");\n String privateMessage = \"\";\n for ( int i = 2; i < msg.length; i++ ) {\n privateMessage = privateMessage + msg[i] + \" \";\n }\n client.sendMessage( new ChatMessage( privateMessage , 2, msg[1] ));\n } else if ( message.contains( \"/list\" ) ) {\n client.sendMessage( new ChatMessage( null, 3, null ));\n } else {\n client.sendMessage( new ChatMessage( message, 0 , null) );\n }\n }\n\n //BufferedReader userInputReader = new BufferedReader( new InputStreamReader( client.socket.getInputStream() ));\n //String message = userInputReader.readLine();\n //client.sendMessage( new ChatMessage( message, 0));\n\n }", "public static Client getInstance() {\n if(client == null) {\n client = new Client();\n }\n return client;\n }", "public static Comms connect() {\r\n\t\tComms client = null;\r\n\t\ttry(ServerSocket server = new ServerSocket(4444)) {\r\n\t\t\tclient = new Comms(server.accept());\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn client;\r\n\t}", "public Client(String id, String serverHost, int serverPort)\n {\n this.id = id;\n sender = new Sender(serverHost, serverPort);\n }", "private JTextArea initializeChatArea() {\r\n\t\t// create and set properties of chat area.\r\n\t\tchatArea = new JTextArea();\r\n\t\tchatArea.setEditable(false);\r\n\t\tchatArea.setAutoscrolls(true);\r\n\t\tchatArea.setFont(new Font(\"Tahoma\", 0, 12));\r\n\t\treturn chatArea;\r\n\t}", "public Cliente() {\r\n\t\tSystem.out.println(\"El cliente es: Diego Juarez \"+\"\\n\");\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t}" ]
[ "0.7838922", "0.69981116", "0.691002", "0.683693", "0.67090255", "0.66516954", "0.66157854", "0.65795964", "0.6545017", "0.65062124", "0.649051", "0.6480585", "0.6444659", "0.6432312", "0.64133817", "0.6409674", "0.64087254", "0.64056593", "0.64004743", "0.6392672", "0.6373785", "0.63721156", "0.6363578", "0.63521856", "0.6322732", "0.6311781", "0.6311781", "0.6310976", "0.63042915", "0.62918586", "0.62918556", "0.6274813", "0.6253905", "0.6242513", "0.62366205", "0.6217184", "0.6198422", "0.6195979", "0.61849403", "0.6177709", "0.61749417", "0.6141655", "0.6138873", "0.613699", "0.61362714", "0.61208427", "0.61163425", "0.61156267", "0.60822767", "0.60698754", "0.60598546", "0.6059472", "0.60561126", "0.60486984", "0.6039683", "0.60151196", "0.6004046", "0.59911", "0.59845746", "0.5978123", "0.5971444", "0.5929281", "0.59036475", "0.5896439", "0.5896346", "0.5891541", "0.58910376", "0.589", "0.58887917", "0.5878599", "0.587252", "0.58708256", "0.5860289", "0.58575433", "0.58518", "0.5834949", "0.5834351", "0.5832699", "0.5831513", "0.58300275", "0.58240706", "0.58221346", "0.58197725", "0.5819696", "0.5804973", "0.5795712", "0.5793697", "0.5790641", "0.57824206", "0.57807684", "0.57793015", "0.57669383", "0.5764526", "0.57636684", "0.57592267", "0.57563996", "0.57373685", "0.5734129", "0.5733516", "0.5726934" ]
0.61290646
45
Listening to client inputs and calling sendCommand
private void consoleRun() { try { var scan = new Scanner(System.in); while (scan.hasNextLine()) { var msg = scan.nextLine(); sendCommand(msg); } } catch (InterruptedException e) { logger.info("Console thread has been interrupted"); } finally { logger.info("Console thread stopping"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void listen() {\n// synchronized (this) {\n try {\n String input;\n if ((input = in.readLine()) != null) {\n parseCommand(input);\n }\n } catch (IOException ex) {\n Logger.getLogger(ClientIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n// }\n }", "protected void serveClient() {\r\n\t\tif (lineIn == null || lineOut == null) {\r\n\t\t\tSystem.err.printf(\"I/O has not been set up.%n\");\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\tString clientRequest;\r\n\t\t\t\tStringTokenizer args;\r\n\r\n\t\t\t\t// control loop, receiving client requests\r\n\t\t\t\twhile (!exitRecieved) {\r\n\t\t\t\t\t// PRESENT PROMPT\r\n\t\t\t\t\tsendMessage(PROMPT);\r\n\r\n\t\t\t\t\t// ACCEPT & PROCESS INPUT\r\n\t\t\t\t\tclientRequest = receiveMessage();\r\n\t\t\t\t\targs = new StringTokenizer(clientRequest);\r\n\t\t\t\t\tprocessCommand(args);\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tSystem.err.printf(\"IO Error receiving client input: %s%n\", ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void sendCommand(Command cmd);", "public static void main(String[] args) throws IOException {\n NetworksClient client = new NetworksClient();\n client.startConnection(\"127.0.0.1\", 18741);\n \n System.out.println(\"Enter a command:\");\n while(true){\n Scanner input = new Scanner(System.in);\n String message = input.nextLine();\n\n if(\".\".equals(message)){\n client.stopConnection();\n return;\n }\n\n String response = client.sendMessage(message);\n\n System.out.println(\"From server: \" + response);\n }\n }", "public void accept() {\n try {\n BufferedReader fromConsole = new BufferedReader(new InputStreamReader(System.in));\n String message;\n\n // loops infinitely, until #quit command is called, which sets run = false, and\n // stops the loop\n while (run) {\n message = fromConsole.readLine();\n if (message != null) {\n if (message.charAt(0) == '#') {\n command(message.substring(1));\n } else {\n client.handleMessageFromClientUI(message);\n }\n } else {\n client.handleMessageFromClientUI(message);\n }\n }\n }\n\n // Exceptions where the reader encounters an error\n catch (Exception ex) {\n System.out.println(\"Unexpected error while reading from console!\");\n System.out.println(ex.getMessage());\n }\n }", "public void process () {\n consoleListenerAndSender.execute(() -> {\n String message = null;\n DataInputStream reader = null;\n try {\n reader = new DataInputStream(new BufferedInputStream(console.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n while (!isServerAvailable()) {\n message = reader.readUTF();\n\n if (Objects.equals(message, \"/quit\")){\n close();\n setQuitCommandAppear(true);\n break;\n }\n\n sender.sendMessage(message);\n message = null;\n\n }\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n serverListenerAndConsoleWriter.execute(() -> {\n try {\n while (!isServerAvailable()) {\n System.out.println(getter.getInputMessage());\n }\n } catch (IOException e) {\n if (!isQuitCommandAppear()) {\n System.out.println(\"[SERVER ISSUE] server is down.\");\n close();\n setServerAvailable(true);\n }\n else {\n System.out.println(\"Quit...\");\n }\n }\n });\n }", "public void communicate() throws IOException{\n\t\tdo{\n\t\t\t//Messages recieved by the client\n\t\t\t\n\t\t\t\n\t\t\t//Messages being sent by the client\t\n\t\t\t//Chat client is reading in data from its own user and from the chat client thread\n//\t\t\t line = console.readLine(); //client msg is read from console environment\n\t\t\t\n\t\t\t//nope \n//\t\t\tScanner scanner = new Scanner(System.in);\n//\t String line = scanner.nextLine();\n//\t System.out.println(line);\n//\t\t\tscanner.close();\n\t\t\t\n\t\t\t//nope\n//\t line = strIn.readUTF();\n//\t\t\tSystem.out.println(\"User said: \"+ line);\n\t\t\t\n\n//\t\t\tnope needs to be a constant stream cant just get client message from client gui\n//\t\t\tline = gui.getLatestMsg();\n\t\t\t\n//\t\t\tnope initial stream is null. read from gui stream\n//\t\t\tByteArrayInputStream bInput = new ByteArrayInputStream(gui.b);\n//\t\t\tline = bInput.toString();\n//\t\t\t\n\t\t\tstrOut.writeUTF(line); // Writes a string to the underlying output stream using modified UTF-8 encoding\n\t\t\tstrOut.flush(); //Forces any buffered output bytes to be written out to the stream.\n\t\t\t\n\t\t}while(!line.equalsIgnoreCase(\"bye\")); //not working. Still listens\n\t}", "public void listen() {\n\t\tthread(\"NetworkClientInput\", () -> {\n\t\t\twhile (true) {\n\t\t\t\ttry {\n\t\t\t\t\tString str = in.readLine();\n\t\t\t\t\t\n\t\t\t\t\tif (str == null)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"[CLIENT] Received: \" + str);\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandle(str);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.err.println(\"[Client] Error handling input\");\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"[Client] Disconnected.\");\n\t\t\t\t\tconnected = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tconnected = false;\n\t\t\texecutor.shutdown();\n\t\t\tsocket.close();\n\t\t});\n\t}", "void sendCommand(CommandEvent event);", "private void acceptCommands() {\n\t\tScanner input = new Scanner(System.in);\n\t\tInteractiveCommandParser commandParser = new InteractiveCommandParser(\n\t\t\t\tinput, this);\n\t\tcommandParser.readCommands(); // blocking command reader\n\t}", "public interface CommandHandler {\n void handleInput(String msg, DataInputStream input, DataOutputStream output);\n}", "private void handleInput() {\n String result = \"\";\n while (!clientSocket.isClosed() && result != null) {\n try {\n result = inFromServer.readLine();\n if (result == null || result.equals(\"null\")) {\n RoboRally.scheduleSync(() -> game.setScreen(new ErrorScreen(game, \"You where disconnected from the host\")), 0);\n\n return;\n }\n ClientAction command = ClientAction.fromCommandString(result.substring(0, result.indexOf(\":\")));\n String data = result.substring(result.indexOf(\":\") + 1);\n switch (command) {\n case START_GAME:\n setupGame(data);\n break;\n case GIVE_CARDS:\n giveCards(data);\n break;\n case NAME:\n //clientName = data;\n // Only used to check connectivity\n break;\n case CONNECTED_PLAYERS:\n receiveConnectedPlayers(data);\n break;\n case THREAD_NAME:\n //Do nothing\n break;\n case START_ROUND:\n GameScreen.getUiHandler().updateCountDown(0);\n playerHandler.runRound(GameGraphics.gson.fromJson(data, StartRoundDto.class));\n break;\n case COUNT_DOWN:\n // This seconds int has the information about the current number for the countdown\n int seconds = 30 - GameGraphics.gson.fromJson(data, Integer.class); // Count down, not count up\n GameScreen.getUiHandler().updateCountDown(seconds);\n break;\n case PARTY_MODE:\n InputHandler.enableMode();\n break;\n default:\n System.out.println(\"Unknown operation :\" + result);\n break;\n }\n } catch (IOException e) {\n System.out.println(\"IOExeption \" + e);\n }\n }\n }", "public interface CommandSender \n{\n /**\n * Handle a respond from the robot.\n * @param result The result.\n * @param originalCommand The command which was sent to the robot.\n */\n public void handleResponse(byte[] result, Command originalCommand);\n \n /**\n * Handle an error that occured when communicating to the robot.\n * @param code The error code that was sent by the robot.\n */\n public void handleError(int code);\n \n /**\n * Needed when sending a command repetitively to the robot.\n * @return The command string that should be used.\n */\n public Command getCurrentCommand();\n \n}", "public void sendCommand(String str){\n \n /*This string holds the command temporarily*/\n String theLine = str;\n \n /*Writes the command to the Server*/\n try {\n oOS.writeObject(theLine);\n } catch (IOException ex) {\n Logger.getLogger(ClientView.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n /*Clears the terminal screen if the user puts in the right command*/\n if (theLine.equals(\"-clrs\")){\n terminalText.setText(\" \");\n return;\n }\n \n try {\n oOS.flush();\n } catch (IOException ex) {\n Logger.getLogger(ClientView.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n /*String that temporarily holds the input sent from the Server*/\n String tempString = \"\";\n \n try {\n tempString = (String)oIS.readObject();\n } catch (IOException ex) {\n Logger.getLogger(ClientView.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ClientView.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n /*Takes the input from the server and displays it to the temrinal*/\n\tterminalText.append(tempString + \"\\n\");\n\n /*Disables and enables buttons and changes Connect button colour when user quits*/\n if(theLine.equals(\"-quit\")){\n connectButton.setBackground(Color.red);\n connectButton.setEnabled(true);\n sendButton.setEnabled(false);\n terminalText.append(\"CLIENT> Connection closed.\");\n }\n \n }", "void processGUIInput(String cmd){\n try{\n debugWriter.write(cmd);\n debugWriter.flush();\n //}\n }catch(IOException e){\n //Eat it\n e.printStackTrace();\n //throw new InvalidInteractionsException();\n }\n }", "private void command(){\n out.println(\"Enter command: \");\n String comInput = in.nextLine();\n\n if (comInput.toLowerCase().equals(\"vote\")) {\n voteCommand();\n }else if (comInput.toLowerCase().equals(\"trade\")){\n tradeCommand();\n }else if (comInput.toLowerCase().equals(\"next\")){\n out.println(waitPrint());\n await();\n// nextRound();\n }else if(comInput.toLowerCase().equals(\"logout\")){\n// login = false;\n logout();\n }\n }", "public void run() {\n\t\ttry { \n\t\t\tBufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\tPrintWriter out = new PrintWriter(socket.getOutputStream(), true);\n\t\t\t \n\t\t\tString fromServer= null;\n\t\t\tString fromUser = null;\n\n\t\t\twhile(true){\n\t\t\t\t//If the user types \"BACKUP\" will make a file of the messages\n\t\t\t\tif ((fromUser = in.readLine()).equals(\"BACKUP\")){\n\t\t\t\t\tbuffer.add(\"BACKUP\");\n\t\t\t\t\tfor(int i = 0; i < buffer.size(); i++){\n\t\t\t\t\t\tout.println(buffer.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//put whatever the user input to the Server Buffer\n\t\t\t\tbuffer.add(fromUser);\n\n\t\t\t\t//Displaying the option menu\n\t\t\t\tSystem.out.print(\"\\n1. Send Message to all clients\\n\" +\n\t\t\t\t\t\"2. Print message from client\\n\" +\n\t\t\t\t\t\"3. Quit\\n\\n\" + \n\t\t\t\t\t\"Please choice 1, 2, or 3\\n\" +\n\t\t\t\t\t\"Choice: \");\n\t\t\t\tfromServer = stdIn.readLine();\n\t\t\t\tif(fromServer.equals(\"1\")){ \n\t\t\t\t\tout.println(buffer.lastElement());\n\t\t\t\t}\n\t\t\t\telse if(fromServer.equals(\"2\")){\n\t\t\t\t\tSystem.out.println(buffer.lastElement());\n\t\t\t\t}\n\t\t\t\telse if(fromServer.equals(\"3\")){\n\t\t\t\t\tSystem.out.println(\"\\nLeaving the program. Good Bye!\\n\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"Options 1~3 Please\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLogger.dump(0, \"Client Exited by force quitting\");\n\t\t\tSystem.exit(1);\n\t\t} catch (NullPointerException e) {\n\t\t\tLogger.dump(0, \"Client Exited\");\n\t\t} \n\t}", "@Override\n\tpublic void handleServerCmd() {\n\t\t\n\t}", "public void run() {\r\n\t\ttry {\r\n\t\t\toutput = clientSocket.getOutputStream();\r\n\t\t\tinput = clientSocket.getInputStream();\r\n\t\t// send initial message on connect\r\n\t\t\tsendMessage(new common.messages.KVAdminMessage(\"connect\", \"CONNECT_SUCCESS\", \"\", \"\")); \r\n\r\n\t\t\r\n\t\t\twhile(isOpen) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Receive the KV Message from Client and check if it is valid\r\n\t\t\t\t\tcommon.messages.KVMessage latestMsg = receiveMessage();\r\n\t\t\t\t\tif (latestMsg.validityCheck() == null) {\r\n\t\t\t\t\t\t// If it is valid Handle the message by calling the function in KVServer\r\n\t\t\t\t\t\tcommon.messages.KVMessage returnMsg = m_server.handleClientMessage(latestMsg);\r\n\t\t\t\t\t\tif (returnMsg.validityCheck() == null) {\r\n\t\t\t\t\t\t\t// If returned KVMessage was valid send it back to the client\r\n\t\t\t\t\t\t\tif (returnMsg.getStatus().equals(\"SERVER_STOPPED\") || returnMsg.getStatus().equals(\"SERVER_WRITE_LOCK\") || returnMsg.getStatus().equals(\"SERVER_NOT_RESPONSIBLE\")){\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg.getHeader() + \" was not processed by Server.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg.getHeader() + \" was Successfully Processed by Server!\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsendMessage(returnMsg);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// If returned KVMessage is not valid it will have all blank fields\r\n\t\t\t\t\t\t\tSystem.out.println(\"Last command from client \" + latestMsg + \" encountered a problem on Server side!\");\r\n\t\t\t\t\t\t\tsendMessage(returnMsg);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\telse if (latestMsg.getHeader().trim().equals(\"\")) {\r\n\t\t\t\t\t\t//echo empty messages\r\n\t\t\t\t\t\tsendMessage(latestMsg);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// If it is a bad message output error and echo it back to the client\r\n\t\t\t\t\t\tlogger.debug(\"Message from Client was not valid, sending errorous message back to client\");\r\n\t\t\t\t\t\tlogger.debug(latestMsg.getError());\r\n\t\t\t\t\t\tsendMessage(new common.messages.KVAdminMessage(latestMsg.getHeader(), \"FAILED\", latestMsg.getKey(), latestMsg.getValue()));\r\n\t\t\t\t\t}\r\n\t\t\t\t/* connection either terminated by the client or lost due to \r\n\t\t\t\t * network problems*/\t\r\n\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\tlogger.error(\"Connection lost!\");\r\n\t\t\t\t\tisOpen = false;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tlogger.error(\"Error! Connection could not be established!\", ioe);\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif (clientSocket != null) {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t\toutput.close();\r\n\t\t\t\t\tclientSocket.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tlogger.error(\"Error! Unable to tear down connection!\", ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void run() throws IOException {\n\n // Establish connection with a server and create streams for communication\n System.out.println(\"Enter IP Address of the Server: \");\n String serverAddress = getClientInput();\n Socket socket = new Socket(serverAddress, 9001);\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n out = new PrintWriter(socket.getOutputStream(), true);\n\n String clientName;\n\n // Process replies from server\n while (true) {\n String line = in.readLine();\n if (line.startsWith(\"SUBMITNAME\")) {\n System.out.println(\"Enter a client name: \");\n clientName = getClientInput();\n out.println(clientName);\n }\n else if (line.startsWith(\"WELCOME\")) {\n System.out.println(line);\n String tempLine = \"\";\n while (!tempLine.startsWith(\"5\")){\n tempLine = in.readLine();\n System.out.println(tempLine);\n }\n }\n else if (line.startsWith(\"COMMAND\")) {\n System.out.println(\"Enter a command: \");\n out.println(getClientInput());\n }\n else if(line.startsWith(\"SERVER\")) {\n String answer = in.readLine();\n System.out.println(line + \": \" + answer);\n //Close after client calls exit and server closes the client thread.\n if(answer.equals(\"EXIT\")) {\n System.out.println(\"Session closed.\");\n break;\n }\n else {\n System.out.println(\"Enter a command: \");\n out.println(getClientInput());\n }\n }\n }\n }", "private void eventLoop() {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n while (true) {\n try {\n System.out.println(\">\");\n // Before readLine(), clear the in stream.\n System.out.flush();\n String line = in.readLine().toLowerCase();\n if (line.startsWith(\"quit\") || line.startsWith(\"exit\")) {\n break;\n }\n line = \"[\" + \"Node1\" + \"]\" + line;\n // destination address is null, send msg to everyone in the cluster.\n Message msg = new ObjectMessage(null, line);\n channel.send(msg);\n } catch (Exception e) {\n // TODO: handle exception.\n }\n }\n\n }", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}", "public void run()\r\n {\r\n Scanner sc = new Scanner(System.in);\r\n while(socket.isConnected())\r\n {\r\n String comm = sc.nextLine();\r\n\r\n }\r\n }", "public void run() {\n\t\tString name = \"\"; \n\n\t\ttry {\n\t\t\tOutputStream outStream = incoming.getOutputStream(); \n\t\t\tPrintWriter out = new PrintWriter(outStream, true /* autoFlush */);\n\t\t\tScanner in = new Scanner(incoming.getInputStream());\n\t\t\t//loop till broken in BYE command\n\t\t\tfor(;;) {\n\t\t\t\tString input = in.nextLine();\n\t\t\t\tString inputArr[] = input.split(\" \");\n\t\t\t\t//if register, set name and output connected\n\t\t\t\tif(inputArr[0].equals(\"REGISTER\")) {\n\t\t\t\t\tname = inputArr[1];\n\t\t\t\t\tSystem.out.println(name + \" registered\");\n\t\t\t\t\tout.println(\"OK\");\n\t\t\t\t//if get question, return the next question, serialized\n\t\t\t\t} else if(input.equals(\"GET QUESTION\")) {\n\t\t\t\t\tObjectOutputStream toClient = new ObjectOutputStream(incoming.getOutputStream());\n\t\t\t\t\ttoClient.writeObject(quiz.get(questionCount++));\n\t\t\t\t//if bye, close connection, output disconnected\n\t\t\t\t} else if(input.equals(\"BYE\")) {\n\t\t\t\t\tSystem.out.println(name + \" disconnected\");\n\t\t\t\t\tincoming.close();\t\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tout.println(\"Wrong syntax for command\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void accept(){\n\t\ttry{\n\t\t\tBufferedReader fromConsole = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString message;\n\t\t\twhile (true){\n\t\t\t\tmessage = fromConsole.readLine();\n\t\t\t\tthis.handleMessage(message);\n\t\t\t}\n\t\t} \n\t\tcatch (Exception exception){\n\t\t\tSystem.out.println\n\t\t\t(\"Unexpected error while reading from console!\");\n\t\t}\n\t}", "void requestInput();", "public abstract void onCommand(MessageEvent context) throws Exception;", "public void run() {\r\n try {\r\n this.is = new ObjectInputStream(clientSocket.getInputStream());\r\n this.os = new ObjectOutputStream(clientSocket.getOutputStream());\r\n while (this.readCommand()) {}\r\n } \r\n catch (IOException e) \r\n {\r\n \tSystem.out.println(\"XX. There was a problem with the Input/Output Communication:\");\r\n e.printStackTrace();\r\n }\r\n }", "public void run() {\n\t\tPrintWriter out = null;\r\n\t\ttry {\r\n\t\t\tout = new PrintWriter(clientSocket.getOutputStream(), true);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tBufferedReader in = null;\r\n\t\ttry {\r\n\t\t\tin = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tString inputLine, outputLine;\r\n\t\tProtocol kkp = new Protocol();\r\n\r\n\t\toutputLine = kkp.processInput(null);\r\n\t\tout.println(outputLine);\r\n\t\t// Leo continuamente e interactuo\r\n\t\ttry {\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n//\t\t\t\toutputLine = kkp.processInput(inputLine);\r\n\t\t\t\toutputLine = inputLine;\r\n\t\t\t\tout.println(outputLine);\r\n\t\t\t\tif (outputLine.equals(\"Bye.\")){\r\n\t\t\t\t\tbreak;\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t// Cierro la entrada y salida\r\n\t\t\tout.close();\r\n\t\t\tin.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\tlog.info(\"Clientes activos: \"+ (taskExecutor.getThreadPoolExecutor().getActiveCount()-1));\t\t\t\r\n\t\t}\r\n\t}", "public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);", "@Override\n public void run() {\n\n\n try {\n out.println(\"Available operation are ADD, SUB, MULT, QUIT to left\");\n out.flush();\n\n String clientInput = \"\";\n while(true) {\n // Wait for client request\n clientInput = in.readLine();\n if(clientInput.equals(\"QUIT\")) {\n System.out.println(\"Client has left conversation\");\n System.out.flush();\n break;\n }\n\n // op contains the operation name followed by two integer operands\n String[] op = clientInput.split(\" \");\n\n if(op.length != 3) {\n out.println(\"Bad input\");\n out.flush();\n } else {\n int n1 = Integer.parseInt(op[1]), n2 = Integer.parseInt(op[2]);\n String result;\n switch (op[0]) {\n case \"ADD\":\n result = Integer.toString(n1 + n2);\n break;\n case \"SUB\":\n result = Integer.toString(n1 - n2);\n break;\n case \"MULT\":\n result = Integer.toString(n1 * n2);\n break;\n default:\n result = \"Error while calculating\";\n }\n out.println(result);\n out.flush();\n }\n }\n\n in.close();\n out.close();\n clientSocket.close();\n } catch (IOException ex) {\n\n }\n }", "public void run() {\n\t\tString currentDirectory = System.getProperty(\"user.home\");\n\n\t\ttry {\n\t\t\tbis = new BufferedInputStream(socket.getInputStream());\n\t\t\tisr = new InputStreamReader(bis);\n\t\t\tbos = new BufferedOutputStream(socket.getOutputStream());\n\t\t\tosw = new OutputStreamWriter(bos);\n\n\t\t\tosw.write(\"Welcome to Java Telnet Server\\n\");\n\t\t\tosw.write(\"\\t\" + System.getProperty(\"os.name\") + \" - \"\n\t\t\t\t\t+ System.getProperty(\"os.arch\"));\n\t\t\tosw.write(\"\\n\\n\");\n\t\t\tosw.flush();\n\n\t\t\twhile (stopper) {\n\t\t\t\tosw.write(\"$ \");\n\t\t\t\tosw.flush();\n\n\t\t\t\t// read until enter or return (13) key is pressed\n\t\t\t\tint character;\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\twhile ((character = isr.read()) != 13)\n\t\t\t\t\tsb.append((char) character);\n\n\t\t\t\t// split buffer and extract - command, options and arguments\n\t\t\t\tString[] commandArray = sb.toString().trim().split(\"\\\\s+\");\n\n\t\t\t\tString command = (commandArray.length >= 1) ? commandArray[0]\n\t\t\t\t\t\t: null;\n\t\t\t\tArrayList<String> commandOptions = new ArrayList<String>();\n\t\t\t\tArrayList<String> commandArguments = new ArrayList<String>();\n\n\t\t\t\tfor (int i = 1; i < commandArray.length; i++) {\n\t\t\t\t\tif (commandArray[i].startsWith(\"-\")) {\n\t\t\t\t\t\tcommandOptions.add(commandArray[i]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcommandArguments.add(commandArray[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlogger.info(\"Command : \" + command + \" Options : \"\n\t\t\t\t\t\t+ commandOptions.toString() + \" Arguments : \"\n\t\t\t\t\t\t+ commandArguments.toString());\n\n\t\t\t\t// process command\n\t\t\t\t// check if command is to exit\n\t\t\t\tif (command.equals(\"exit\") || command.equals(\"quit\")\n\t\t\t\t\t\t|| command.equals(\"bye\")) {\n\t\t\t\t\tosw.write(\"See ya!\\n\");\n\t\t\t\t\tosw.flush();\n\t\t\t\t\tstopper = false;\n\t\t\t\t} else {\n\t\t\t\t\t// get the command from factory and execute\n\t\t\t\t\tAbstractCommand abstractCommand = CommandFactory\n\t\t\t\t\t\t\t.getCommandInstance(command);\n\t\t\t\t\tif (abstractCommand != null) {\n\t\t\t\t\t\t// set command options\n\t\t\t\t\t\tabstractCommand.setOptions(commandOptions\n\t\t\t\t\t\t\t\t.toArray(new String[commandOptions.size()]));\n\t\t\t\t\t\t//set command arguments\n\t\t\t\t\t\tabstractCommand.setArguments(commandArguments\n\t\t\t\t\t\t\t\t.toArray(new String[commandArguments.size()]));\n\t\t\t\t\t\t// set console to output\n\t\t\t\t\t\tabstractCommand.setConsole(osw);\n\t\t\t\t\t\t// set current working directory\n\t\t\t\t\t\tabstractCommand.setCurrentDirectory(currentDirectory);\n\t\t\t\t\t\tabstractCommand.execute();\n\t\t\t\t\t\t// get the current directory after command execution\n\t\t\t\t\t\tcurrentDirectory = abstractCommand\n\t\t\t\t\t\t\t\t.getCurrentDirectory();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tosw.write(command + \": command not found\\n\");\n\t\t\t\t\t\tosw.flush();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlogger.debug(\"Failed to read/write from input/output streams\\n\");\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Close all open streams\n\t\t\ttry {\n\t\t\t\tbis.close();\n\t\t\t\tisr.close();\n\t\t\t\tbos.close();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t\tlogger.debug(\"Failed closing input/output streams\\n \");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t// Try closing client connection\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t} catch (IOException e2) {\n\t\t\t\tlogger.debug(\"Closing of client socket failed\\n \");\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void handleCommand(String input) throws ClientOfflineException, ServerException {\n String[] params = input.split(\" \");\n Command command = this.availableCommandMap.get(params[0]);\n String argument = (params.length <= 1) ? null : params[1];\n command.execute(this, argument);\n }", "public void communicate() {\n\t\tconnect();\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\tout = new PrintWriter((socket.getOutputStream()), true);\n\t\t\tobjOut = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjIn = new ObjectInputStream(socket.getInputStream());\n\t\t\twhile (!socket.isClosed()) {}\t// Doesn't need to do anything besides stay awake, GUI handles all in/outputs\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\tobjIn.close();\n\t\t\tobjOut.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Sending error: \" + e.getMessage());\n\t\t}\t\t\n\t}", "@Override\r\n \tpublic void clientCommandReceivedCallback(RoMClient client, ClientCommand clientCommand) {\r\n \t\tLogger.logMessage(client.getSessionID() + \" newCommand: \" + clientCommand);\r\n \r\n \t\tthis.processClientCommand(client, clientCommand);\r\n \t}", "public void run() {\n clientLogger.info(\"Client \" + name + \" started working\");\n EventLoopGroup group = new NioEventLoopGroup();\n try {\n Bootstrap bootstrap = new Bootstrap()\n .group(group)\n .channel(NioSocketChannel.class)\n .handler(new ClientInitializer());\n Channel channel = bootstrap.connect(host, port).sync().channel();\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n while (true) {\n channel.write(in.readLine() + \"\\r\\n\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n group.shutdownGracefully();\n }\n clientLogger.info(\"Client \" + name + \" finished working\");\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\r\n\t\t\r\n\r\n\t\t// Get input from GUI window\r\n\t\tString input = m_GUI.getInput();\r\n\r\n\t\tif (input.isEmpty())\r\n\t\t\treturn;\r\n\r\n\t\tString message = new String();\r\n\r\n\t\tif (input.startsWith(\"/\"))\r\n\t\t{\r\n\t\t\t// Input is a command\r\n\t\t\tString command = new String(input.split(\" \")[0].trim().toLowerCase());\r\n\r\n\t\t\tswitch (command)\r\n\t\t\t{\r\n\t\t\tcase \"/connect\":\r\n\t\t\tcase \"/c\":\r\n\t\t\t\tString hostname = input.split(\" \")[1];\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tm_connection.connect(hostname);\r\n\t\t\t\t} catch (IOException e1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\"Error: IO exception when conencting to server\");\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/disconnect\":\r\n\t\t\tcase \"/dc\":\r\n\t\t\t\tm_connection.disconnect();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/whisper\":\r\n\t\t\tcase \"/w\":\r\n\t\t\t\tString recepient = input.split(\" \")[1];\r\n\t\t\t\tmessage = input.split(\" \", 3)[2];\r\n\t\t\t\tm_connection.whisper(recepient, message);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/list\":\r\n\t\t\tcase \"/l\":\r\n\t\t\t\tm_connection.list();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else\r\n\t\t{\r\n\t\t\t// Type is broadcast\r\n\t\t\tmessage = input;\r\n\t\t\tm_connection.broadcast(message);\r\n\t\t}\r\n\t\tm_GUI.clearInput();\r\n\t}", "private void sendLineCommand(String message) throws IOException,\n \t\t\tIllegalStateException {\n \t\tif (!connected) {\n \t\t\tthrow new IllegalStateException(\"Client not connected\");\n \t\t}\n \t\toutput.write(message + \"\\r\");\n \t\toutput.newLine();\n \t\toutput.flush();\n \t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tthis.sendMessage(Response.WELCOME_MESSAGE);\n\t\t\t// Get new command from client\n\t\t\twhile (true) {\n\t\t\t\tthis.executeCommand();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// If a exception is catch we just close the client connection\n\t\t\ttry {\n\t\t\t\tthis.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t/// just throw the exception of the close\n\t\t\t\tthrow new RuntimeException(e1);\n\t\t\t}\n\t\t}\n\t}", "public void transmit()\n { \n try\n {\n JSch jsch=new JSch(); //object that allows for making ssh connections\n //Log into the pi\n Session session=jsch.getSession(USERNAME, HOSTNAME, 22); //pi defaults to using port 22 \n session.setPassword(PASSWORD);\n session.setConfig(\"StrictHostKeyChecking\", \"no\"); //necessary to access the command line easily\n \n session.connect(1000);//connect to the pi\n \n Channel channel = session.openChannel(\"exec\");//set session to be a command line \n ((ChannelExec)channel).setCommand(this.command); //send command to the pi\n \n channel.setInputStream(System.in); \n channel.setOutputStream(System.out);\n //connect to the pi so the command can go through\n channel.connect(1000);\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(frame, \"Error connecting to infrared light\", \"Error Message\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n public void run() {\n try {\n boolean autoFlush = true;\n fromClient = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n toClient = new PrintWriter(clientSocket.getOutputStream(), autoFlush);\n } catch (IOException ioe) {\n throw new UncheckedIOException(ioe);\n }\n for (String entry : communicationWhenStarting) {\n sendMsg(entry);\n }\n while (connected) {\n try {\n Message msg = new Message(fromClient.readLine());\n updateClientAction(msg);\n } catch (IOException ioe) {\n disconnectClient();\n throw new MessageException(ioe);\n }\n }\n }", "private void run() throws IOException\r\n {\r\n\r\n // Make connection and initialize streams\r\n String serverAddress = getServerAddress();\r\n Socket socket = new Socket(serverAddress, 9001);\r\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n out = new PrintWriter(socket.getOutputStream(), true);\r\n\r\n // Process all messages from server, according to the protocol.\r\n while (true) {\r\n String line = in.readLine();\r\n if (line.startsWith(\"SUBMITNAME\")) {\r\n out.println(getName());\r\n } else if (line.startsWith(\"NAMEACCEPTED\")) {\r\n textField.setEditable(true);\r\n } else if (line.startsWith(\"MESSAGE\")) {\r\n messageArea.append(line.substring(8) + \"\\n\");\r\n }\r\n }\r\n }", "protected void mainTask() {\n\t logger.log(1, CLASS, \"-\", \"impl\",\n\t\t \"About to read command\");\n\t try { \n\t\tcommand = (COMMAND)connection.receive();\n\t\tlogger.log(1,CLASS, \"-\", \"impl\",\n\t\t\t \"Received command: \"+(command == null ? \"no-command\" : command.getClass().getName()));\n\t } catch (IOException e) {\n\t\tinitError(\"I/O error while reading command:[\"+e+\"]\",command);\n\t\treturn;\n\t } catch (ClassCastException ce) {\n\t\tinitError(\"Garbled command:[\"+ce+\"]\", command);\n\t\treturn;\n\t } \n\t \n\t // 2. Create a handler.\n\t if (command == null) {\n\t\tinitError(\"No command set\", null);\n\t\treturn;\n\t }\n\n\t if (handlerFactory != null) {\n\t\thandler = handlerFactory.createHandler(connection, command);\n\t\tif (handler == null) {\n\t\t initError(\"Unable to process command [\"+command.getClass().getName()+\"]: No known handler\", command);\n\t\t return;\n\t\t}\n\t \n\t\t// 3. Handle the request - handler may send multiple updates to client over long period\n\t\thandler.handleRequest();\n\t }\t \n\t}", "private void runCmd(String input) {\n CommandDetails cmd = cmdParser.parse(input);\n if (cmd != null) {\n switch (cmd.getAction()) {\n case LIST:\n listAll(cmd.getType());\n break;\n case SEARCH:\n search(cmd);\n break;\n case SEND_HELP:\n sendHelp(cmd);\n break;\n case SEND_USAGE:\n sendUsage(cmd.getType());\n break;\n case EXIT:\n closeStreams();\n break;\n }\n }\n sendMsgToClient(END_TRANSMISSION);\n }", "public void listen() throws IOException, InterruptedException{\n\t\tString response;\n\t\twhile (!serverSoc.isClosed() && (response = fromServer.readLine()) != null){\n\t\t\tif (gui != null){\n\t\t\t\tgui.giveResponse(response);\n\t\t\t}\n\t\t\tSystem.out.println(response);\n\t\t\tbotAction(response);\n\t\t}\n\t\tqueue.add(\"\");\n\t\tgameOver = true;\n\t}", "private void sendGameCommand(){\n\n }", "public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOException ioe) {\n pw.println(\"ERROR: Problem with reading user input.\");\n } finally {\n try {\n br.close();\n } catch (IOException ioe) {\n pw.println(\"ERROR: Buffer DNE\");\n }\n }\n }", "public static void main(String[] args) {\n\n try {\n client = new Socket(InetAddress.getByName(\"127.0.0.1\"), 12345);\n\n do {\n //1. Establish IO paths between client and server\n output = new ObjectOutputStream(client.getOutputStream());\n output.flush();\n input = new ObjectInputStream(client.getInputStream());\n\n //2. Wait for our client user to type a response\n System.out.println(\"Please type your message: \");\n keyboardInput = new Scanner(System.in);\n messageOut = keyboardInput.nextLine();\n\n //3. Send message to server\n output.writeObject(messageOut);\n output.flush();\n\n if (messageOut.equals(\"<OUT>\")) {\n break;\n } else if (messageOut.equals(\"<OVER>\"))\n break;\n\n //4. Wait for an incoming string object\n messageIn = (String) input.readObject();\n\n //5. Print it to the screen\n System.out.println(\"SERVER SAYS: \" + messageIn);\n\n } while (!messageOut.equals(\"<OUT>\"));\n } catch (SocketException e) {\n System.out.println(\"Oops! : \" + e.getMessage());\n } catch (Exception e) {\n System.out.println(\"Exception occurred\");\n\n {\n System.out.println();\n }\n }\n\n }", "public void handleCommand(String command);", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "public void clientRunning() {\n\t\twhile (this.running) {\n\t\t\tString userInputString = textUI.getString(\"Please input (or type 'help'):\");\n\t\t\tthis.processUserInput(userInputString);\n\t\t}\n\t}", "public void command(String command) {\n\n // Determines if client is connected\n boolean isConnected = true;\n try {\n isConnected = client.isConnected();\n } catch (Exception notCnnected) {\n isConnected = false;\n }\n\n // Switch/case/default statement to determine command\n switch (command) {\n\n case (\"quit\"):\n if (isConnected) {\n try {\n client.closeConnection();\n run = false;\n } catch (Exception ex) {\n System.out.println(\"Unexpected error while terminating connection\");\n }\n }\n break;\n\n case (\"logoff\"):\n if (!isConnected) {\n System.out.println(\"Client already logged off\");\n }\n\n else {\n try {\n client.closeConnection();\n } catch (Exception ex) {\n System.out.println(\"Unexpected error while terminating connection\");\n }\n }\n break;\n\n case (\"login\"):\n if (isConnected) {\n System.out.println(\"Client already logged in\");\n } else {\n ClientConsole chat = new ClientConsole(internalLoginID, internalHost, internalPort);\n chat.accept();\n }\n break;\n\n case (\"getport\"):\n System.out.println(internalPort);\n break;\n\n case (\"gethost\"):\n System.out.println(internalHost);\n break;\n\n default:\n\n if (command.length() > 8 && command.substring(0, 7).equals(\"sethost\")) {\n // Checks to see if client is connected, if so, disallow host changed.\n // This is in a try/catch statement to allow host change before connection is\n // established\n\n if (isConnected) {\n System.out.println(\"Client currently logged in. Please log off before changing host.\");\n } else {\n internalHost = command.substring(8);\n System.out.println(\"Host set to: \" + internalHost);\n }\n }\n\n else if (command.length() > 8 && (command.substring(0, 7)).equals(\"setport\")) {\n\n // Iniitalize changeport as DEFAULT_PORT, incase something goes wrong.\n int changePort = DEFAULT_PORT;\n\n // Confirms that port change is valid.\n try {\n changePort = Integer.parseInt(command.substring(8));\n\n // Checks to see if client is connected, if so, disallow port changed.\n // This is in a try/catch statement to allow port change before connection is\n // established\n if (isConnected) {\n System.out.println(\"Client currently logged in. Please log off before changing port.\");\n } else {\n internalPort = changePort;\n System.out.println(\"Port set to: \" + internalPort);\n }\n }\n\n catch (Exception e) {\n System.out.println(\"Invalid port number\");\n }\n\n }\n\n else {\n System.out.println(\"Command unknown, please try again\");\n }\n }\n\n }", "public abstract void onInput();", "@Override\n\tpublic void run() {\n\t\t// Get object streams.\n\t\ttry{\n\t\t\toutput = new ObjectOutputStream(socket.getOutputStream());\n\t\t\toutput.flush();\n\t\t\tinput = new ObjectInputStream(socket.getInputStream());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"ERROR: could not create streams \" + e.getMessage());\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t\tSystem.out.println(\"ERROR: Could not close connection - \" + e.getMessage());\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Receive commands until EOFException thrown\n\t\ttry{\n\t\t\t// The delay after a command is processed in milliseconds. Increase this value to test the client's command queuing.\n\t\t\tlong serverDelayPerCommand = 100;\n\t\t\t\n\t\t\t// Create the command verifier.\n\t\t\tPattern validCommandPattern = Pattern.compile(\"-(end|echo|time|date|help|cls)(-.+)?\");\n\t\t\t\n\t\t\t// Create the time and date formatters.\n\t\t\tDateFormat timeFormat = new SimpleDateFormat(\"hh:mm:ss a\");\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"d MMMM yyyy\");\n\t\t\t\n\t\t\t// Main loop\n\t\t\twhile(true){\n\t\t\t\tString command = (String)input.readObject();\n\t\t\t\tString response = \"ERROR: Unrecognized command.\";\n\t\t\t\t\n\t\t\t\t// Make sure that the string is in a valid format.\n\t\t\t\tif(validCommandPattern.matcher(command).matches()){\n\t\t\t\t\tif(command.startsWith(\"-echo-\")){\n\t\t\t\t\t\tresponse = \"ECHO:\" + command.substring(6);\n\t\t\t\t\t}\n\t\t\t\t\telse if(command.startsWith(\"-echo\")){\n\t\t\t\t\t\tresponse = \"ECHO:\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(command.startsWith(\"-time\")){\n\t\t\t\t\t\tresponse = \"TIME: \" + timeFormat.format(new Date());\n\t\t\t\t\t}\n\t\t\t\t\telse if(command.startsWith(\"-date\")){\n\t\t\t\t\t\tresponse = \"DATE: \" + dateFormat.format(new Date());\n\t\t\t\t\t}\n\t\t\t\t\telse if(command.startsWith(\"-help\")){\n\t\t\t\t\t\tresponse = \"Available Services:\\nend\\necho\\ntime\\ndate\\nhelp\\ncls\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(command.startsWith(\"-cls\")){\n\t\t\t\t\t\tresponse = Server.SR_CLS;\n\t\t\t\t\t}\n\t\t\t\t\t// If the response is an end command, break from the loop.\n\t\t\t\t\telse if(command.startsWith(\"-end\")){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Write the response\n\t\t\t\toutput.writeObject(response);\n\t\t\t\t\n\t\t\t\t// Sleep.\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(serverDelayPerCommand);\n\t\t\t\t}\n\t\t\t\tcatch(InterruptedException e){\n\t\t\t\t\t// Do nothing.\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\toutput.writeObject(Server.SR_END);\n\t\t}\n\t\tcatch(EOFException e){\n\t\t\t// Connection closed on client side.\n\t\t}\n\t\tcatch(ClassNotFoundException e){\n\t\t\tSystem.out.println(\"ERROR: Unknown object type recieved.\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"ERROR: \" + e.getMessage());\n\t\t}\n\t\t\n\t\t// Close the connection\n\t\tSystem.out.println(\"Server Socket: Closing client connection...\");\n\t\ttry {\n\t\t\toutput.close();\n\t\t\tinput.close();\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR: Could not close connection. \" + e.getMessage());\n\t\t}\n\t}", "protected void handleClientInput(Object objectFromClient) {\n Object objectToClient = null;\n\n // DOES NOTHING\n\n if (objectToClient != null)\n this.clientConnection.send(objectToClient);\n }", "public void run() {\n\t\ttry {\n\t\t\tout = new PrintWriter(client.getOutputStream(), true);\n\t\t\tin = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\ts.getMessage(this, inputLine);\n\t\t\t\tSystem.out.println(inputLine);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection to host\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "public void run() {\n\t\ttry {\n\t\t\tinternalSocket = new Socket(\"localhost\", getPort());\n\t\t\tin = new ObjectInputStream(socket.getInputStream());\n\n\t\t\tinternalOut = new ObjectOutputStream(\n\t\t\t\t\tinternalSocket.getOutputStream());\n\t\t} catch (IOException e1) {\n\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\treturn;\n\t\t}\n\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tString message = in.readUTF();\n\n\t\t\t\t// take message and redirect this message to\n\t\t\t\t// second console\n\t\t\t\tsendMessage(message);\n\n\t\t\t\tif (message.equalsIgnoreCase(\"bye\")) {\n\t\t\t\t\tclose();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (Exception efEx) {\n\t\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\t\ttry {\n\t\t\t\t\tclose();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "void onInput(Terminal terminal, int numChars, String current);", "private static void command() {\n Scanner reader = new Scanner(System.in);\n System.out.print(\"Write action (buy, fill, take):\\n> \");\n String input = reader.next();\n\n switch (input) {\n case \"buy\" :\n buy();\n break;\n case \"fill\" :\n fill();\n break;\n case \"take\" :\n take();\n break;\n default:\n System.out.println(\"not accepted command\");\n }\n }", "public abstract void exec(CommandSender sender, String[] args);", "public static native void send( String cmd );", "public void run() {\n\t\texecuteCommand( client, false );\n\t}", "public abstract void execute(CommandSender sender, String[] args);", "public void sendInput(String input) throws IOException {\n\t\tmShell.sendCommand(\"INPUT:\" + mStag + \":\" + input + \":\");\n\t}", "public void run() {\n\t\tString choice = null;\n\t\tBufferedReader inFromClient = null;\n\t\tDataOutputStream outToClient = null;\n\t\t\n\t\ttry {\n\t\t\tinFromClient = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\toutToClient = new DataOutputStream(client.getOutputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\t// Loops until the client's connection is lost\n\t\t\twhile (true) {\t\n\t\t\t\t// Request that was sent from the client\n\t\t\t\tchoice = inFromClient.readLine();\n\t\t\t\tif(choice != null) {\n\t\t\t\t\tSystem.out.println(choice);\n\t\t\t\t\tswitch (choice) {\n\t\t\t\t\t\t// Calculates the next even fib by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTEVENFIB\":\n\t\t\t\t\t\t\tnew EvenFib(client).run();\n\t\t\t\t\t\t\t// Increments the fib index tracker so no duplicates\n\t\t\t\t\t\t\t// are sent\n\t\t\t\t\t\t\tServer.fib++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Calculates the next even nextLargerRan by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTLARGERRAND\":\n\t\t\t\t\t\t\tnew NextLargeRan(client).run();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// Calculates the next prime by creating a new\n\t\t\t\t\t\t// thread to handle that calculation\n\t\t\t\t\t\tcase \"NEXTPRIME\":\n\t\t\t\t\t\t\tnew NextPrime(client).run();\n\t\t\t\t\t\t\t// Increments the prime index tracker so no duplicates\n\t\t\t\t\t\t\t// are sent\n\t\t\t\t\t\t\tServer.prime++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// Displays that the client it was connected to\n\t\t\t// has disconnected\n\t\t\tSystem.out.println(\"Client Disconnected\");\n\t\t}\n\n\t}", "@Override\n public void sendMenuCommand(MenuCommand msg) throws IOException {\n if (isConnected()) {\n synchronized (outputBuffer) {\n cmdBuffer.clear();\n protocol.toChannel(cmdBuffer, msg);\n cmdBuffer.flip();\n outputBuffer.clear();\n outputBuffer.put(START_OF_MSG);\n outputBuffer.put(protocol.getKeyIdentifier());\n outputBuffer.put(cmdBuffer);\n outputBuffer.flip();\n logByteBuffer(\"Sending message on \" + getConnectionName(), outputBuffer);\n sendInternal(outputBuffer);\n outputBuffer.clear();\n }\n } else {\n throw new IOException(\"Not connected to port\");\n }\n }", "@Override\n public void run() {\n try {\n while (this.game.gameAlive.get()) {\n if (clientInput.ready()) {\n String command = clientInput.readLine();\n if (command.equals(\"CHAT\")) {\n chatMessage();\n } else if (command.equals(\"MOVE\")) {\n move();\n } else if (command.equals(\"GAMEOVER\")) {\n gameOver();\n break;\n }\n }\n }\n clientInput.close();\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n }", "protected void sendStartStdInSignal() {\n\t\tDownstreamMessageEvent dme = new DownstreamMessageEvent(channel, Channels.future(channel), STREAM_IN_READY, channel.getRemoteAddress());\n\t\t//channel.getPipeline().sendDownstream(dme);\n\t\tSystem.out.println(\"Sending STDIN READY\");\n\t\tchannel.write(STREAM_IN_READY).awaitUninterruptibly();\n\t\tSystem.out.println(\"Sent STDIN READY\");\n\t}", "@Override\r\n\tpublic void run() {\r\n\t\twhile (closer) {\r\n\t\t\ttry {\r\n\t\t\t\tObjectInputStream ois = new ObjectInputStream(client.getInputStream());\r\n\t\t\t\tObject object = ois.readObject();\r\n\t\t\t\tArrayList<String> input = (ArrayList<String>) object;\r\n\t\t\t\tInteger election = inputTransformer(input);\r\n\t\t\t\tif (election == 1) {\r\n\t\t\t\t\tsl.getLogger().info(\"IncomingMessage on Client Type 1 - For Chat\");\r\n\t\t\t\t}\r\n\t\t\t\tif (election == 2) {\r\n\t\t\t\t\tsl.getLogger().info(\"IncomingMessage on Client Type 2 - For Points\");\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed\n String str = requestCommand.getText();\n sC.sendCommand(str); \n requestCommand.requestFocus();\n }", "private void mainLoop()\n {\n try\n {\n while (true)\n {\n System.out.print( \"\\r\\nJicos> \" );\n System.out.flush();\n\n byte[] input = new byte[1024];\n int read = -1;\n if (-1 == (read = System.in.read( input )))\n {\n break;\n }\n\n try\n {\n performCommand( new String( input, 0, read ) );\n }\n catch (Exception exception)\n {\n System.err.println( exception.getMessage() );\n }\n }\n }\n catch (Exception exception)\n {\n }\n }", "public void communicate() {\n String line;\n String response;\n\n boolean run = true;\n\n while (run) {\n try {\n System.out.println(\"Please select an option (DATE/TIME)\");\n\n // Read line from console\n line = stdIn.readLine();\n\n if (line.equals(\"QUIT\")) {\n run = false;\n // Send QUIT to server\n socketOut.println(line);\n }\n else {\n // Send line to server\n socketOut.println(line);\n // Receive response from the server\n response = socketIn.readLine();\n // Print server response to client console\n System.out.println(response);\n }\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }\n\n closeConnection();\n }", "@Override\r\n\tpublic final void receiveCommand(Command cmd) {\n\t\tif (cmd.getCommand().equals(Constants.CMD_PARAMETER)) {\r\n\t\t\tString param = cmd.getParameter(\"NAME\");\r\n\t\t\tString value = cmd.getParameter(\"VALUE\");\r\n\t\t\tif (param != null && value != null && parameters.containsKey(param)) {\r\n\t\t\t\t// Calls user method\r\n\t\t\t\tif (!parameterUpdate(param, value)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// TODO Alguns parâmetros não podem ser mudados!\r\n\t\t\t\tparameters.put(param, value);\r\n\t\t\t\t// Let the console knows about the updated parameter\r\n\t\t\t\tcmd = new Command(getAddress(), \"/console\", \"UPDATE\");\r\n\t\t\t\tcmd.addParameter(\"AGENT\", getAgent().getAgentName());\r\n\t\t\t\tcmd.addParameter(\"COMPONENT\", getComponentName());\r\n\t\t\t\tcmd.addParameter(\"NAME\", param);\r\n\t\t\t\tcmd.addParameter(\"VALUE\", value);\r\n\t\t\t\tsendCommand(cmd);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tprocessCommand(cmd);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void handleRequest(){\r\n\r\n\t\ttry {\r\n\t\t\t_inFromClient = new ObjectInputStream(_socket.getInputStream());\r\n\t\t\t_outToClient = new ObjectOutputStream(_socket.getOutputStream());\r\n\t\t _humanQuery = (String) _inFromClient.readObject();\r\n\t\t _outToClient.writeObject(manageCommunication());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "public void run() {\t\r\n\ttry {\r\n\t System.out.println(\"Creating input pipe\");\r\n\t // create the input pipe\r\n\t pipeIn = pipeSvc.createInputPipe(pipeAdv,this);\r\n\t} \r\n\tcatch (Exception e) {\r\n\t System.out.println(\"Error creating input pipe.\");\r\n\t return;\r\n\t}\r\n\tif (pipeIn == null) {\r\n\t System.out.println(\"Error: cannot open InputPipe\");\r\n\t System.exit(-1);\r\n\t}\r\n\tSystem.out.println(\"Listener waiting for messages...\");\r\n\ttry {\r\n\t Thread.sleep(Integer.MAX_VALUE);\r\n\t} catch (Exception e) {\r\n\t System.out.println(\"Program interrupted\");\r\n\t}\r\n }", "void receive(String watcher) throws ProtocolExecutionException;", "public void onCommandReceived(AbstractCommand command) {\n\t\t\t\t\t\tif (command instanceof GrantedSessionCommand) {\n\t\t\t\t\t\t\t// Print our our unique key, this will be used for\n\t\t\t\t\t\t\t// subsequent connections\n\t\t\t\t\t\t\tUtilities.log(\"Your instanceId is \" + ((GrantedSessionCommand) command).getInstanceId());\n\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//let's make the dock show up on the TV\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_yahoo\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(2000); //sleep for 2 seconds so the animation to dock finishes\n\n\t\t\t\t\t\t\t\t// Lets do something cool, like tell the TV to navigate to the right. Then do a little dance\n\t\t\t\t\t\t\t\t// This is the same as pressing \"right\" on your remote\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t// slide to the left\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//slide to the right\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//take it back now, y'all\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\t//cha cha cha\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Notify the main thread that everything we wanted to\n\t\t\t\t\t\t\t// do is done.\n\t\t\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\t\t\tconn.notifyAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // print out the others for educational purposes\n\t\t\t\t\t\t\tUtilities.log(\"Received: \" + command.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "void commandStarted(Command c);", "@Override\n public void execute() {\n if(state.getState()!=1) {\n client.printParseMessage();\n return;\n } else if(inputArgs.length < 1) {\n System.out.println(client.strings.getString(\"manage_command_message\"));\n return;\n }\n try {\n client.setDraftTag(inputArgs[0]);\n channel.send(new ReadRequest(client.getDraftTag()));\n ReadReply reply = (ReadReply) channel.receive();\n if(!reply.lines.isEmpty()) {\n String replyLine = reply.lines.get(reply.lines.size() - 1);\n if(Push.CLOSE_LINE.equals(replyLine)) {\n System.out.println(client.strings.getString(\"manage_close_command_message\"));\n return;\n }\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(ReadCommand.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n state.setState(2);\n }", "public void sendCommands (String input, String language) {\n myController.parseCommand(input, language);\n }", "public int rx_cmd(BufferedReader cmd,PrintWriter out)\n {\n \ttry\n \t{\n // get blocked in readLine until something actually comes on the inputStream\n // then perform actions based on the received command\n \t String cmd_in = cmd.readLine();\n // initial_setup sequence to populate the client socket list stored by the client\n \t if(cmd_in.equals(\"initial_setup\"))\n {\n \t System.out.println(\"got cmd 1\");\n \t out.println(my_ip);\n \t out.println(my_port);\n \t out.println(my_c_id);\n ip = in.readLine();\n \t System.out.println(\"ip:\"+ip);\n port=in.readLine();\n \t System.out.println(\"port:\"+port);\n remote_c_id=Integer.valueOf(in.readLine());\n \t System.out.println(\"neighbor connection, PID:\"+ Integer.toString(remote_c_id)+ \" ip:\" + ip + \" port = \" + port);\n synchronized (c_list)\n {\n c_list.put(remote_c_id,this);\n }\n \t } \n // initial_setup_server sequence to populate the server socket list stored by the client\n else if(cmd_in.equals(\"initial_setup_server\"))\n {\n System.out.println(\"got cmd 1 from server\");\n out.println(my_ip);\n out.println(my_port);\n out.println(my_c_id);\n ip = in.readLine();\n System.out.println(\"ip:\"+ip);\n port=in.readLine();\n System.out.println(\"port:\"+port);\n remote_c_id=Integer.valueOf(in.readLine());\n System.out.println(\"server connection, PID:\"+ Integer.toString(remote_c_id)+ \" ip:\" + ip + \" port = \" + port);\n synchronized (s_list)\n {\n s_list.put(remote_c_id,this);\n }\n // if this is a server handle / connected to the server\n // no need to run this rx_cmd method\n // so return from this method\n if(svr_hdl == true)\n {\n System.out.println(\"rx_cmd processing finished\");\n return 0;\n }\n }\n // initiate connection setup once this message is received\n else if(cmd_in.equals(\"chain_setup\"))\n {\n \t System.out.println(\"chain_setup \");\n setup_connections();\n }\n // perform enquiry and create the Ricart-Agrawala instances after this message\n else if(cmd_in.equals(\"chain_setup_finish\"))\n {\n \t System.out.println(\"connection setup finished\");\n cnode.initiate_enquiry();\n cnode.create_RAlgorithm();\n }\n // to terminate the program\n else if(cmd_in.equals(\"simulation_finish\"))\n {\n \t System.out.println(\"Finish program execution!\");\n cnode.end_program();\n return 0;\n }\n // got a REQUEST message, process it\n else if(cmd_in.equals(\"REQUEST\"))\n {\n int ts = Integer.valueOf(in.readLine());\n int pid = Integer.valueOf(in.readLine());\n String filename = in.readLine();\n \t System.out.println(\"REQUEST received from PID \"+pid+\" with timestamp \"+ts+\" for file \"+filename);\n process_request_message(ts,pid,filename);\n }\n // got a REPLY message, process it\n else if(cmd_in.equals(\"REPLY\"))\n {\n int pid = Integer.valueOf(in.readLine());\n String filename = in.readLine();\n \t System.out.println(\"REPLY received from PID \"+pid+\" for file \"+filename);\n process_reply_message(pid,filename);\n }\n \t}\n \tcatch (IOException e) \n \t{\n \t System.out.println(\"Read failed\");\n \t System.exit(-1);\n \t}\n \n \t// default : return 1, to continue processing further commands \n \treturn 1;\n }", "@Override\n @SneakyThrows\n public void nextRound() {\n Interpreter interpreter = Zuul.getInstance().getInterpreter();\n /*\n Getting player's input\n */\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n interpreter.handleCommand(this, reader.readLine());\n }", "@Override\n\tpublic void handleInput() {\n\t\t\n\t}", "@FXML\n\tpublic void onProcessCommand() {\n\t\tString command = prompt.getText().trim();\n\t\tif (!command.isEmpty()) {\n\t\t\t// Print what the user entered to the screen\n\t\t\tscreen.appendText(\"> \" + command + \"\\n\");\n\t\t\tswitch (command) {\n\t\t\t\tcase \"clear\":\n\t\t\t\t\tscreen.clear();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// Print the output of the commandName\n\t\t\t\t\tscreen.appendText(commandDispatch.processCommand(command) + \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Clear the prompt - ready for new input\n\t\t\tprompt.clear();\n\t\t}\n\t}", "public synchronized final void\n\t\trun()\n\t{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = null;\n\n\t\ttry {\n\t\t\twhile (this.isRunning() && (null != (line = reader.readLine()))) {\n\t\t\t\ttry {\n\t\t\t\t\t_handler.handleCommand(line);\n\t\t\t\t} catch (RuntimeException ex) {\n\t\t\t\t\t_LOG.error(new Strings(new Object[]\n\t\t\t\t\t\t{this, \":\", StackTrace.formatStackTrace(ex)}));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ex) {\n\t\t\t_LOG.error(new Strings(new Object[]\n\t\t\t\t{this, \":\", StackTrace.formatStackTrace(ex)}));\n\t\t}\n\n\t\tif (line == null) {\n\t\t\tif (this.isRunning()) {\n\t\t\t\t_handler.handleCommand(\"quit\");\n\t\t\t}\n\t\t}\n\n\t\t_LOG.warn(\"Console exiting.\");\n\t}", "public void processInput( String input ){\n\t\tString opponent;//holds either \"client\" or \"server\". Whichever is the opponent\n\t\tif( parent.whichPlayer.equals(\"server\") ) opponent = \"client\";\n\t\telse opponent = \"server\";\n\t\t\n\t\t//create a string array to hold the input split around spaces\n\t\tString[] split = input.split(\" \");\n\t\t\n\t\t//input was mouseclick\n\t\tif( split[0].equals(\"C\") ) {\n\t\t\t//If the line contains mouseClick information, then send it to handleMouseClick\n\t\t\tparent.handleMouseClick(Integer.parseInt(split[1]), Integer.parseInt(split[2]), opponent);\n\t\t}\n\n\t\t//input was name\n\t\telse if(split[0].equals(\"N\")) {\n\t\t\t//if this window is the server, set the recieved name to the client\n\t\t\tif( parent.serverRadio.isSelected() ) {\n\t\t\t\tparent.playerTwoTextField.setText(split[1]);\n\t\t\t}\n\t\t\t//if this window is the client, set the recieved name to the server\n\t\t\telse {\n\t\t\t\tparent.playerOneTextField.setText(split[1]);\n\t\t\t}\n\t\t}\n\t\t//if a quit flag was sent\n\t\telse if(split[0].equals(\"Q\")){\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t\tss.close();\n\t\t\t\tpw.close();\n\t\t\t\tsc.close();\n\t\t\t}catch(Exception e) {\n\t\t\t\tSystem.out.println(\"Unable to close the connection!\");\n\t\t\t}\n\t\t}\n\n\t}", "public void run() {\n debugOutput(\"Current working directory \" + this.currDirectory);\n try {\n // Input from client\n controlIn = new BufferedReader(new InputStreamReader(controlSocket.getInputStream()));\n\n // Output to client, automatically flushed after each print\n controlOutWriter = new PrintWriter(controlSocket.getOutputStream(), true);\n\n // Greeting\n sendMsgToClient(\"220 Welcome to the COMP4621 FTP-Server\");\n\n // Get new command from client\n while (!quitCommandLoop) {\n executeCommand(controlIn.readLine());\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Clean up\n try {\n controlIn.close();\n controlOutWriter.close();\n controlSocket.close();\n debugOutput(\"Sockets closed and worker stopped\");\n } catch (IOException e) {\n e.printStackTrace();\n debugOutput(\"Could not close sockets\");\n }\n }\n\n }", "protected void sendMessage() throws IOException {\r\n\t\tif (smscListener != null) {\r\n\t\t\tint procCount = processors.count();\r\n\t\t\tif (procCount > 0) {\r\n\t\t\t\tString client;\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tlistClients();\r\n\t\t\t\tif (procCount > 1) {\r\n\t\t\t\t\tSystem.out.print(\"Type name of the destination> \");\r\n\t\t\t\t\tclient = keyboard.readLine();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(0);\r\n\t\t\t\t\tclient = proc.getSystemId();\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tif (proc.getSystemId().equals(client)) {\r\n\t\t\t\t\t\tif (proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Type the message> \");\r\n\t\t\t\t\t\t\tString message = keyboard.readLine();\r\n\t\t\t\t\t\t\tDeliverSM request = new DeliverSM();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trequest.setShortMessage(message);\r\n\t\t\t\t\t\t\t\tproc.serverRequest(request);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sent.\");\r\n\t\t\t\t\t\t\t} catch (WrongLengthOfStringException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sending failed\");\r\n\t\t\t\t\t\t\t\tevent.write(e, \"\");\r\n\t\t\t\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\t\t\t} catch (PDUException pe) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"This session is inactive.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "@Override\r\n public void getInput() { \r\n \r\n String command;\r\n Scanner inFile = new Scanner(System.in);\r\n \r\n do {\r\n \r\n this.display();\r\n \r\n command = inFile.nextLine();\r\n command = command.trim().toUpperCase();\r\n \r\n switch (command) {\r\n case \"B\":\r\n this.helpMenuControl.displayBoardHelp();\r\n break;\r\n case \"C\":\r\n this.helpMenuControl.displayComputerPlayerHelp();\r\n break;\r\n case \"G\":\r\n this.helpMenuControl.displayGameHelp();\r\n break; \r\n case \"Q\": \r\n break;\r\n default: \r\n new Connect4Error().displayError(\"Invalid command. Please enter a valid command.\");\r\n }\r\n } while (!command.equals(\"Q\")); \r\n }", "private void communicate() {\n\t\tString line = \"\";\n\t\tboolean running = true;\n\t\twhile (running) {\n\t\t\ttry {\n\t\t\t\tline = socketIn.readLine();\n\t\t\t\t//quit the program if user input is \"QUIT\"\n\t\t\t\tif(line == null)\n\t\t\t\t\tbreak;\n\t\t\t\tif (isPalindrome(line))\n\t\t\t\t\tsocketOut.println(line + \" is a palindrome\");\n\t\t\t\telse\n\t\t\t\t\tsocketOut.println(line + \" is NOT a palindrome\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(e.getStackTrace());\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tSystem.out.println(\"[SERVER] Closed\");\n\t\t\tserverSocket.close();\n\t\t\tsocketIn.close();\n\t\t\tsocketOut.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Closing error: \" + e.getMessage());\n\t\t}\n\t}", "public void run(){\r\n\r\n try{\r\n InputStreamReader isr = new InputStreamReader(inputStream);\r\n BufferedReader br = new BufferedReader(isr);\r\n String line = null;\r\n\r\n while((line = br.readLine()) != null){\r\n System.out.println(\"CLIENT: \" + type + \">\" + line);\r\n }\r\n\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log this error and handle it like a boss\r\n }\r\n }", "@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }", "public void commandEntered(String cmd)\n {\n String cleaned = StringUtils.cleanWhiteSpace(cmd.trim());\n String args[] = cleaned.split(\" \");\n \tString c = args[0];\n \n Runnable cb = new Runnable() { public void run() { cbEmptyResponse(); } };\n \n \tif (c.equals(\"name\"))\n cb = new Runnable() { public void run() { cbName(); } };\n else if (c.equals(\"version\")) \n cb = new Runnable() { public void run() { cbVersion(); } };\n else if (c.equals(\"genmove\")) \n cb = new Runnable() { public void run() { cbGenMove(); } };\n else if (c.equals(\"all_legal_moves\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"get_absorb_group\"))\n cb = new Runnable() { public void run() { cbGetAbsorbGroup(); } };\n \n \telse if (c.equals(\"shortest_paths\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \telse if (c.equals(\"shortest_vc_paths\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n else if (c.equals(\"compute_dead_cells\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n else if (c.equals(\"vc-build\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n else if (c.equals(\"vc-build-incremental\"))\n cb = new Runnable() { public void run() { cbComputeDeadCells(); } };\n \n \n else if (c.equals(\"solver-find-winning\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } }; \n \n else if (c.equals(\"find_sealed\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"strengthen_vcs\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n \n else if (c.equals(\"book-depths\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"book-sizes\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"book-scores\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \telse if (c.equals(\"book-priorities\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \n else if (c.equals(\"db-get\")) \n cb = new Runnable() { public void run() { cbDBGet(); } };\n \n else if (c.equals(\"vc-connected-to\")) \n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-between-cells\"))\n cb = new Runnable() { public void run() { cbBetweenCells(); } };\n else if (c.equals(\"vc-get-mustplay\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-intersection\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n else if (c.equals(\"vc-union\"))\n cb = new Runnable() { public void run() { cbDisplayPointList(); } };\n \n else if (c.equals(\"eval_twod\")) \n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n else if (c.equals(\"eval_resist\")) \n cb = new Runnable() { public void run() { cbEvalResist(); } };\n else if (c.equals(\"eval_resist_delta\")) \n cb = new Runnable() { public void run() { cbEvalResistDelta(); } };\n \telse if (c.equals(\"eval_influence\"))\n cb = new Runnable() { public void run() { cbDisplayPointText(); } };\n \n else if (c.equals(\"mohex-show-rollout\")) \n cb = new Runnable() { public void run() { cbMohexShowRollout(); } };\n else if (c.equals(\"quit\")) \n cb = new Runnable() { public void run() { cbEmptyResponse(); } };\n \n sendCommand(cmd, cb);\n }", "private void processInputData() throws IOException {\n\t\tout.write(Protocol.PC_READY.value);\n\t\tout.flush();\n\t\tInputBuffer buffer = InputBuffer.readFrom(in);\n\t\tdispatcher.dispatch(buffer.entries);\n\t}", "public void run()\n\t{\n\t\ttry \n\t\t{\n\t\t\tis = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\n\t\t\twhile ((serverInput = is.readLine())!= null)\n\t\t\t{\n\t\t\t\tif (Objects.equals(serverInput.substring(0, 3), \"210\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(serverInput);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (Objects.equals(serverInput.substring(0, 3), \"200\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(serverInput.substring(0, 6));\n\n\t\t\t\t\tif (serverInput.length() > 22)\n\t\t\t\t\t{\n\t\t\t\t\t\tString [] list = serverInput.substring(6).split(\"@\");\n\t\t\t\t\t\tfor (int i = 0; i < list.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(list[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (Objects.equals(serverInput.substring(6), \"QUIT\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(serverInput.substring(6));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//Do nothing\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(serverInput);\n\t\t\t\t}\n\t\t\t}\n\t\t\tis.close();\n\t\t\tsocket.close();\n\t\t\tSystem.exit(0);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\t//Error Handler\n\t\t}\n\t}", "@Override\n public void run() {\n try {\n this.in = new BufferedReader(new InputStreamReader(\n clientSocket.getInputStream()));\n this.out = clientSocket.getOutputStream();\n\n\n String str = \"\";\n while (!(str != null && !str.equals(\"\"))) {\n str = in.readLine();\n }\n\n handleRequest(str);\n } catch (Exception e) {\n System.out.println(\"Error: \" + e);\n e.printStackTrace();\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\treMsg = withClient.getInputStream();\r\n\t\t\t\t\t\tbyte[] reBuffer = new byte[500];\r\n\t\t\t\t\t\treMsg.read(reBuffer);\r\n\t\t\t\t\t\tString msg = new String(reBuffer);\r\n\t\t\t\t\t\tmsg = msg.trim();\r\n\t\t\t\t\t\tif (msg.indexOf(\"/bye\") == 0) {\r\n\t\t\t\t\t\t\tendCat();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tAnalysis.ckMsg(mySin, msg);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\tendCat();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}", "@NotNull\n CommandResult onCommand(@NotNull Player player, @NotNull String[] params);", "@Override\n\tpublic void handle(T event) {\n\t\tString messageFromClient;\n\t\tmessageFromClient = breakOut.getView().getInputTextfield().getText();\n\t\ttry {\n\t\t\tbreakOut.getClient().getWriter().println(messageFromClient);\n\t\t\tbreakOut.getClient().getWriter().flush();\n\t\t\tbreakOut.getView().getInputTextfield().clear();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"No reachable Server\");\n\t\t}\n\t}", "public abstract boolean commandExecution(CommandSender sender, String label, String[] args);" ]
[ "0.7244048", "0.70254135", "0.67438775", "0.67113346", "0.6619631", "0.64990777", "0.64917636", "0.6490638", "0.6483893", "0.6474658", "0.64685017", "0.64632595", "0.64611715", "0.64173824", "0.63690406", "0.6313334", "0.6272099", "0.62655956", "0.6250953", "0.6250118", "0.62493575", "0.6235941", "0.6229161", "0.6221228", "0.6220891", "0.62009037", "0.61975926", "0.61848384", "0.61753654", "0.617378", "0.6167278", "0.61573744", "0.6155347", "0.6143592", "0.61284596", "0.611184", "0.61064285", "0.6088039", "0.60848504", "0.6077726", "0.6049126", "0.60436106", "0.60315686", "0.60171366", "0.6009378", "0.6002538", "0.59945583", "0.59912455", "0.59898055", "0.5988869", "0.59836435", "0.5982852", "0.5971892", "0.5948288", "0.5940747", "0.593961", "0.5935901", "0.5933832", "0.5924184", "0.59073687", "0.5906685", "0.5906329", "0.58856505", "0.5885515", "0.58805114", "0.5866658", "0.5866187", "0.58657974", "0.5864434", "0.5859718", "0.5858626", "0.58533424", "0.5847138", "0.58240944", "0.581401", "0.5812804", "0.58121496", "0.5795305", "0.5791902", "0.5790497", "0.5790119", "0.5788625", "0.57879066", "0.5781314", "0.57810426", "0.5779763", "0.57767147", "0.5776529", "0.57659334", "0.5765639", "0.57643867", "0.5762735", "0.5760761", "0.57578874", "0.5756191", "0.5744756", "0.57429564", "0.5741132", "0.57340515", "0.5731059" ]
0.5970452
53
Send a command to the selector via commandQueue and wake it up
private void sendCommand(String msg) throws InterruptedException { commandQueue.put(msg); selector.wakeup(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Send(String commandString) {\n try {\n this.commandQueue.put(commandString);\n }\n catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n }", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}", "protected void submitCommand(ServoCommand cmd){\r\n if(cmd==null){\r\n log.warning(\"null cmd submitted to servo command queue\");\r\n return;\r\n }\r\n if(submittedCmdAfterOpen && cmd.equals(lastCmd)){\r\n return; // don't just duplicate command already sent since open\r\n }\r\n if(errorString!=null){\r\n log.warning(errorString);\r\n close();\r\n return;\r\n }\r\n if(!servoQueue.offer(cmd)){ // if queue is full, just clear it and replace with latest command\r\n servoQueue.clear();\r\n servoQueue.offer(cmd);\r\n submittedCmdAfterOpen=true;\r\n if(clearedQueueWarningCount++%PRINT_QUEUE_CLEARED_INTERVAL==0){\r\n log.warning(\"cleared queue to submit latest command (only logging this warning every \"+PRINT_QUEUE_CLEARED_INTERVAL+\" times)\"); // TODO add limited number of warnings here\r\n }\r\n }\r\n lastCmd=cmd;\r\n Thread.yield(); // let writer thread get it and submit a write\r\n }", "public Message<?> receiveSelected(MessageSelector selector) {\n Object[] array = this.queue.toArray();\n for (Object o : array) {\n Message<?> message = (Message<?>) o;\n if (selector.accept(message) && this.queue.remove(message)) {\n return message;\n }\n }\n \n return null;\n }", "public void sendCommand(Command cmd);", "protected abstract long waitOnQueue();", "EmulatorDriver.Cmd poll()\n {\n synchronized (QUEUE_LOCK)\n {\n if ( ! queue.isEmpty() )\n {\n return queue.remove(0);\n }\n return isWaiting() ? take() : null;\n }\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\ttry {\r\n\t\t\t\twhile (mClient.mSelector.select() > 0) {\r\n\t\t\t\t\tif (DEBUG) Log.e(TAG, \" In while 135\");\r\n\t\t\t\t\tfor (SelectionKey next : mClient.mSelector.selectedKeys()) {\r\n\t\t\t\t\t\tif (next.isReadable()) {\r\n\t\t\t\t\t\t\tSocketChannel socketChannel = (SocketChannel) next.channel();\r\n\t\t\t\t\t\t\tByteBuffer buffer = ByteBuffer.allocate(500);\r\n\t\t\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\t\t\tint length = socketChannel.read(buffer);\r\n//\t\t\t\t\t\t\tif (DEBUG) Log.e(TAG, Arrays.toString(buffer.array()));\r\n\t\t\t\t\t\t\tif (length == -1) continue;\r\n\t\t\t\t\t\t\tbuffer.flip();\r\n\t\t\t\t\t\t\tif (buffer.get(0) == MessageBean.MESSAGE_TYPE_TEXT) {\r\n\t\t\t\t\t\t\t\tMessageBean messageBean = MessageBean.createMessage(buffer.array());\r\n\t\t\t\t\t\t\t\t// send message to activity\r\n\t\t\t\t\t\t\t\tIntent intent = new Intent(ReceiveReceiver.ACTION);\r\n\t\t\t\t\t\t\t\tintent.putExtra(\"data\", messageBean.getByteArray());\r\n\t\t\t\t\t\t\t\tsendBroadcast(intent);\r\n\t\t\t\t\t\t\t\tnext.interestOps(SelectionKey.OP_READ);\r\n\t\t\t\t\t\t\t\tif (DEBUG) \r\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"message : \" + messageBean.getSendId() + \" \" + \r\n\t\t\t\t\t\t\t\t\t\t\tmessageBean.getReceiveId() + \" \" + messageBean.getSendMessageLength() + \" \" +\r\n\t\t\t\t\t\t\t\t\t\t\tmessageBean.getMessageText());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmClient.mSelector.selectedKeys().remove(next);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "@Override\n public void execute(final Runnable command) {\n WorkerThread actorThread = startActorThread();\n WorkerRef<Runnable> actor = actorThread.bindActor(Runnable.class, command);\n actor.tell().run();\n actorThread.stop();\n }", "private void doCommand() {\n try {\n TimeUnit.SECONDS.sleep(2L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private void sendCommand(CommandItem command) {\n sendCommand(command.data, command.advTimeout);\n }", "public void insertCommand(iCommand c){\r\n\t\ttry {\r\n\t\t\tcommandQueue.put(c);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void ping() {\n\t\tHeader.Builder hb = Header.newBuilder();\n\t\thb.setNodeId(999);\n\t\thb.setTime(System.currentTimeMillis());\n\t\thb.setDestination(-1);\n\n\t\tCommandMessage.Builder rb = CommandMessage.newBuilder();\n\t\trb.setHeader(hb);\n\t\trb.setPing(true);\n\n\t\ttry {\n\t\t\t// direct no queue\n\t\t\t// CommConnection.getInstance().write(rb.build());\n\n\t\t\t// using queue\n\t\t\tCommConnection.getInstance().enqueue(rb.build());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void onQueue();", "public void sendBack(SelectionKey key, String message) {\r\n\t\tsocketChannel = (SocketChannel) key.channel(); \r\n\t\tmessage += \"\\r\\n\";\r\n\t\tbuffer = CharBuffer.wrap(message);\r\n\t\twhile (buffer.hasRemaining()) {\r\n\t\t\ttry {\r\n\t\t\t\tsocketChannel.write(Charset.defaultCharset().encode(buffer));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong x = System.nanoTime();\r\n\t\tserviceTime = x - pollTime;\r\n\t\tresponseTime = x - currentJob.queueEntranceTime;\r\n\t\ttimeInSystem = x - currentJob.timeOfArrival;\r\n\t\t\r\n\t\ttimes.add(myNumber + \"\\t\" + type + \"\\t\" + queueTime + \"\\t\" + workerTime +\"\\t\" + processingTime +\"\\t\" + serviceTime +\"\\t\" + responseTime +\"\\t\" + timeInSystem );\r\n\t\tnumOfRequests.incrementAndGet();\r\n\t\tmyNumOfRequests++;\r\n\t}", "public MessageSelectingQueueChannel(BlockingQueue<Message<?>> queue) {\n super(queue);\n \n this.queue = queue;\n }", "@Override\n public void sendSelectionMessage(CommandHandler commandHandler) {\n try {\n commandHandler.update(new Response(null, true, Constants.MAIN_ACTION));\n } catch (Observer.CommunicationError error) {\n error.printStackTrace();\n }\n }", "public void receiveTarget() {\n BufferedReader localReader = new BufferedReader(new InputStreamReader(System.in));\n String msg = null;\n try {\n while ((msg = localReader.readLine()) != null) {\n if (!msg.equals(\"bye\")){\n Target target=new Target(msg);\n addTarget(target);\n }else{\n shutdown=true;\n selector.wakeup(); // Let Connector thread return from the method select()\n break;\n }\n }\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "Message sendAndWait();", "void sendCommand(CommandEvent event);", "private void sendMessage()\n\t{\n\t\tfinal String message = messageTextArea.getText(); \n\t\tif(message.length() == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tmessageTextArea.setText(\"\");\n\t\ttry\n\t\t{\n\t\t\teventsBlockingQueue.put(new MessageEvent(message));\n\t\t}\n\t\tcatch (final InterruptedException e1)\n\t\t{\n\t\t}\n\t}", "public void addCommand(CommandInfo command) {\n\t\ttry {\n\t\t\tcommandsQueue.put(command);\n\t\t} catch(InterruptedException exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "public boolean sendCommand(String command) {\n\t\tcommands.add(command);\n\t\tsynchronized(lock) {\n\t\t\t// Wake up another thread that is waiting for commands.\n\t\t\tlock.notify();\n\t\t}\n\t\treturn true;\n\t}", "List<Command> receive(final String receiveQueueId) throws ZigBeeException;", "@Override\n public void run() {\n ICBlock currentBlock = null;\n\n while (running) {\n try {\n currentBlock = mQueue.take();\n currentBlock.doAction();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n\n }\n\n\n }", "private void addCommandToQueue(CancellableCommand command) {\n outstandingRequests.add(command);\n while (outstandingRequests.size() > maxOutstandingRequests) {\n outstandingRequests.poll().onCancelled();\n }\n }", "public void command(byte[] cmdMessage) throws SAPIException{\r\n\t\t\t\t//sends command to RBNB\r\n\t\t\t\t\r\n\t\t\t\tsrcMap.PutDataAsByteArray(srcMap.GetIndex(getParameterToStringById(\"sourceChannelCommandName\")), cmdMessage); //cmds channel\t \t\r\n\t \tsrc.Flush(srcMap); \t\r\n\t\t}", "private void processCommands() {\n while (!commandQueue.isEmpty()) {\n var msg = commandQueue.remove();\n treatCommand.parseCommand(msg);\n }\n }", "private void handleCommand(Intent intent) {\r\n\t\t//obtain the wake lock \r\n\t\tPowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); \r\n\t\tmPartialWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"ItemUpdateService\"); \r\n\t\tmPartialWakeLock.acquire(); \r\n\t\t// do the actual work, in a separate thread \r\n\t\tnew UpdateItemTask().execute();\t\t\r\n\t}", "public void run(){\n\t\tsetRunning(true);\n\n\t\twhile(isRunning()){\n\t\t\ttry{\n\t\t\t\tgetSelector().select();\n\t\t\t}catch(IOException ioex){\n\t\t\t\tLogger.getInstance().log(\"An exception occured during the exection of the multiplexer (select())\", Logger.ERROR, ioex);\n\t\t\t}\n\n\t\t\tSet readyKeys = getSelector().selectedKeys();\n\t\t\tIterator iterator = readyKeys.iterator();\n\t\t\twhile(iterator.hasNext()){\n\t\t\t\tfinal SelectionKey key = (SelectionKey) iterator.next();\n\t\t\t\titerator.remove();\n\n\t\t\t\t// Acception a connection is a relatively fast operation, so there is no need to do this concurrently.\n\t\t\t\tif(getMode() == SERVERMODE && key.isAcceptable()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\taccept(key);\n\t\t\t\t\t}catch(IOException ioex){\n\t\t\t\t\t\tLogger.getInstance().log(\"An exception occured during the exection of the multiplexer (read()). The connection on which the exception occurred will be closed.\", Logger.ERROR, ioex);\n\n\t\t\t\t\t\tcloseDueToDisconnect(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(key.isReadable()){\n\t\t\t\t\tregister(key.channel(), 0, key.attachment());\n\t\t\t\t\t\n\t\t\t\t\tthreadPool.addJob(new Runnable(){\n\t\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t\tread(key);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Only re-register when the key is still valid (not cancelled).\n\t\t\t\t\t\t\tif(key.isValid()) register(key.channel(), SelectionKey.OP_READ, key.attachment());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsynchronized(selectorCreator.getSelectionPreventionLock()){\n\t\t\t\t// This is just a barrier, hopefully the compiler doesn't remove\n\t\t\t\t// this empty block.\n\t\t\t\t// If it does we have a problem, since we have no way of\n\t\t\t\t// preventing the select() call from obtaining the lock we need\n\t\t\t\t// for registering a channel.\n\t\t\t\t// If the design for the selector wasn't so severly broken we\n\t\t\t\t// wouldn't need this crap.\n\t\t\t}\n\t\t}\n\t}", "public void wakeup()\n {\n // TODO: add in control for state here. Only wakeup if actually blocked as it is usually expensive.\n selector.wakeup();\n }", "@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\t\tqueue.get();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public Command requestCommand() \r\n {\r\n while (!GameFrame.gameDisplay.selectionMade())\r\n {\r\n //System.out.println();\r\n Thread.yield();\r\n }\r\n \r\n Command command = GameFrame.gameDisplay.getSelection();\r\n GameFrame.gameDisplay.resetSelection();\r\n return command;\r\n }", "public synchronized void send(Object obj)\r\n\t{\r\n\t\tclientQueue.offer(obj);\r\n\t}", "void registerCommandBusForCommand( CommandBus commandBus, String commandName );", "Object dequeue();", "Object dequeue();", "@Override\n public void run()\n {\n if (!isEnabled())\n return;\n\n /* Bind if needed */\n bind();\n\n /* If we are not bound, spool command */\n if (mEngagementService == null)\n {\n mPendingCmds.offer(cmd);\n if (mPendingCmds.size() > MAX_COMMANDS)\n mPendingCmds.remove();\n }\n\n /* Otherwise call API and set unbind timer */\n else\n {\n cmd.run();\n scheduleUnbind();\n }\n }", "private void watch() {\n ByteBuffer buffer = ByteBuffer.allocate(BUFFER_SIZE);\n while (true) {\n try {\n int numSelected = selector.select();\n if (numSelected == 0) {\n continue;\n }\n Set<SelectionKey> selectedKeys = selector.selectedKeys();\n Iterator<SelectionKey> iterator = selectedKeys.iterator();\n while (iterator.hasNext()) {\n SelectionKey key = iterator.next();\n iterator.remove();\n SocketChannel channel = ((SocketChannel) key.channel());\n int numReadBytes = channel.read(buffer);\n boolean noMessage = numReadBytes == 0;\n if (noMessage) {\n continue;\n }\n\n String message = new String(buffer.array(), StandardCharsets.UTF_8).replace(\"\\u0000\", \"\");\n System.out.print(message);\n Arrays.fill(buffer.array(), (byte) 0);\n buffer.clear();\n }\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n }\n }", "@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\ttry {\n\t\t\tSystem.out.println(\"run\");\n\t\t\tsleep(2000);\n\t\t\tcontrol_device.publish(\"nct_control_\"+this.did, (this.msg).getBytes(), 0, true);\n\t\t\tSystem.out.println(\"done\");\n\t\t} catch (MqttPersistenceException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (MqttException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void queueMessage(Message message);", "private void workOnQueue() {\n }", "public void queueMessage(ByteBuffer bb) {\n\t\tqueue.add(bb);\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "void queueShrunk();", "void processCommand (String command, ZMsg msg);", "public void sendFromMessageQueue() throws IOException {\n Date canSendDate = new Date(lastReceiveMsgDate.getTime() + 2000);\n if (canSendDate.before(new Date())) {\n String msg = messageQueue.poll();\n if (msg == null)\n return;\n\n output.writeBytes(msg + \"\\n\");\n }\n }", "public void queueMessage(ByteBuffer bb) {\n queue.add(bb);\n processOut();\n updateInterestOps();\n }", "protected void onQueued() {}", "public void onCommandReceived(AbstractCommand command) {\n\t\t\t\t\t\tif (command instanceof GrantedSessionCommand) {\n\t\t\t\t\t\t\t// Print our our unique key, this will be used for\n\t\t\t\t\t\t\t// subsequent connections\n\t\t\t\t\t\t\tUtilities.log(\"Your instanceId is \" + ((GrantedSessionCommand) command).getInstanceId());\n\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//let's make the dock show up on the TV\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_yahoo\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(2000); //sleep for 2 seconds so the animation to dock finishes\n\n\t\t\t\t\t\t\t\t// Lets do something cool, like tell the TV to navigate to the right. Then do a little dance\n\t\t\t\t\t\t\t\t// This is the same as pressing \"right\" on your remote\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t// slide to the left\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//slide to the right\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//take it back now, y'all\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\t//cha cha cha\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Notify the main thread that everything we wanted to\n\t\t\t\t\t\t\t// do is done.\n\t\t\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\t\t\tconn.notifyAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // print out the others for educational purposes\n\t\t\t\t\t\t\tUtilities.log(\"Received: \" + command.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public NotifyMessage pollNotifyMessage() throws InterruptedException {\n return messageQueue.take();\n }", "protected void forwardCommand(String from, byte command)\n\t\t\tthrows QueueBlockedException {\n\t\tthis.writer.write(from, command);\n\t}", "private void sendQueue() {\r\n firePropertyChange(\"boardQueue\", null, myBoardQueue);\r\n firePropertyChange(\"scaleQueue\", null, myScaleDialogQueue);\r\n firePropertyChange(\"gui\", null, this);\r\n }", "void runQueue();", "protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);", "<T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id, long waitTime, TimeUnit timeUnit) throws InterruptedException;", "public void run(){\r\n TaggedData d;\r\n try{\r\n dos = new DataOutputStream(new BufferedOutputStream(socket.getOutputStream()));\r\n while(true){\r\n synchronized(sendLock){\r\n if(queue.size() <= 0) sendLock.wait();\r\n try{ d = queue.removeLast(); }\r\n catch(NoSuchElementException e){ d = null; }\r\n }\r\n if(quit){\r\n cleanup();\r\n break;\r\n }\r\n if(d != null) send(d);\r\n }\r\n }\r\n catch(InterruptedException ie){ ie.printStackTrace(); cleanup(false); } // for now\r\n catch(IOException ioe){ ioe.printStackTrace(); cleanup(false); }\r\n finally{ cleanup(false); }\r\n \r\n if(dos != null){\r\n try{ dos.close(); } catch(IOException ioe){ ioe.printStackTrace(); }\r\n dos = null;\r\n }\r\n }", "void wakeUp();", "<T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id) throws InterruptedException;", "public void sendCommand(String command){\n sendCommand(command, true);\n fromPlugin = false;\n\n }", "protected void waitUntilCommandFinished() {\n }", "@Override\n public void run()\n {\n while (true) {\n if (isReadyToStop && (buffer.poll() == null)) {\n System.out.println(\"Thread stop\");\n producerClient.close();\n return;\n }\n try {\n Message msg = buffer.poll(config.getBufferPollTimeout());\n if (msg == null) {\n // ignore it\n continue;\n }\n System.out.println(\"Sent out: [\" + msg + \"]\");\n if (msg.getTopic().isPresent()) {\n String topic = msg.getTopic().get();\n Optional<Function<String, Integer>> function = funcMapBuffer.get(topic);\n function.ifPresent(stringLongFunction -> {\n int fiberId = stringLongFunction.apply(msg.getKey());\n msg.setFiberId(fiberId);\n producerClient.send(topic, fiberId, msg);\n });\n // else ignore this message\n }\n // else ignore this message\n }\n catch (InterruptedException ignored) {\n // if poll nothing, enter next loop\n }\n }\n }", "public void run()\n {\n try\n {\n while (!done)\n {\n select();\n handleSelectedKeys();\n // TODO: check command buffer for commands\n }\n }\n catch (final Exception e)\n {\n e.printStackTrace();\n }\n }", "public Object waitingForKey(Jt808CommandKey commandKey, long time, TimeUnit unit) throws InterruptedException {\n this.blockingMap.put(commandKey, null);\n\n // Get result blocked\n Object result;\n try {\n log.info(\"Waiting for key {}\", commandKey);\n result = this.blockingMap.take(commandKey, time, unit);\n } finally {\n // Remove tmp waiting-flag\n this.blockingMap.remove(commandKey);\n }\n\n return result;\n }", "public void deliverPacket(Packet packet_) {\n queue.enqueue(packet_);\n sender.wakeUp();\n }", "private NotifySuspendedCommandControllerPowerState() {\n\n\t}", "public abstract void onCommand(MessageEvent context) throws Exception;", "@Override\n\tpublic Future<Integer> write(ByteBuffer bb) {\n\t\tthis.outcomingMessageQ.offer(bb);\n\n\t\t/*\n\t\t * Read the Q and send the packet util the Q is empty.\n\t\t * \n\t\t * This method will for ever called after the offer call on the Q to\n\t\t * make sure write will be triggered if the Q isn't empty.\n\t\t */\n\t\treturn sendOne();\n\n\t}", "@Override \n public void commandKill(int id) {\n\n }", "public void notifyCommands(Command cmd, boolean pressed) {\n if (pressed) {\n if (!commands.contains(cmd) && isMovement(cmd)) movements.push(cmd);\n commands.add(cmd);\n } else {\n if(commands.contains(cmd)) movements.remove(cmd);\n commands.remove(cmd);\n }\n }", "@Override\r\n public void handleMessage(Message msg) {\n mThreadPool.execute(getTask());\r\n try {\r\n mSemaphoreThreadPool.acquire();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "public interface CommandBus {\n void registerHandler(final CommandHandler<? extends DomainCommand> handler);\n CommandResponse push(final DomainCommand command);\n void pushAndForget(final DomainCommand command);\n}", "public void messageArrived(String s, MqttMessage mqttMessage) {\n LoCommand command = new Gson().fromJson(new String(mqttMessage.getPayload()), LoCommand.class);\n System.out.println(\"Device command received: \" + new Gson().toJson(command));\n\n LoCommand.LoCommandResponse response = new LoCommand.LoCommandResponse(new HashMap<>(), command.cid);\n response.res.put(\"my-ack\", \"this is my command acknowledge to \" + command.req);\n\n new Thread(() -> {\n try {\n\n String responseJson = new Gson().toJson(response);\n System.out.println(\"Publishing command acknowledge message: \" + responseJson);\n\n MqttMessage message = new MqttMessage(responseJson.getBytes());\n message.setQos(QOS);\n\n mqttClient.publish(MqttTopics.MQTT_TOPIC_RESPONSE_COMMAND, message);\n System.out.println(\"Command ack published\");\n\n } catch (MqttException me) {\n System.out.println(\"reason \" + me.getReasonCode());\n System.out.println(\"msg \" + me.getMessage());\n System.out.println(\"loc \" + me.getLocalizedMessage());\n System.out.println(\"cause \" + me.getCause());\n System.out.println(\"excep \" + me);\n me.printStackTrace();\n }\n }).start();\n }", "public static void sendMessage(int command) {\n\t\tfindWindow();\n\t\t\n\t\tuser32.SendMessageA(handle, IUser32.WM_COMMAND, command, 0x00000000);\n\t}", "private void sendEngagementCommand(final Runnable cmd)\n {\n /* The command needs to run on the main thread to avoid race conditions */\n runOnMainThread(new Runnable()\n {\n @Override\n public void run()\n {\n /* Nothing to do if disabled */\n if (!isEnabled())\n return;\n\n /* Bind if needed */\n bind();\n\n /* If we are not bound, spool command */\n if (mEngagementService == null)\n {\n mPendingCmds.offer(cmd);\n if (mPendingCmds.size() > MAX_COMMANDS)\n mPendingCmds.remove();\n }\n\n /* Otherwise call API and set unbind timer */\n else\n {\n cmd.run();\n scheduleUnbind();\n }\n }\n });\n }", "@Override\n protected Void doInBackground(String... strings) {\n try {\n this.socket = new Socket(strings[0], Integer.parseInt(strings[1]));\n this.buffer = new DataOutputStream(this.socket.getOutputStream());\n while(true) {\n this.buffer.write((commandQueue.take()+\"\\r\\n\").getBytes());\n this.buffer.flush();\n }\n }\n catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n return null;\n }", "public void kick(Player presser,Player kicked)\r\n\t{\r\n\t\tclientQueue.offer(new Action(getLobby().getID(),presser,kicked,Action.KICK));\r\n\t}", "void commandStarted(Command c);", "private void doSelect() throws IOException\n {\n selector.select();\n\n // Iterate over the set of keys for which events are available\n Set<SelectionKey> keySet = selector.selectedKeys();\n Iterator<SelectionKey> selectedKeys = keySet.iterator();\n \n while (selectedKeys.hasNext()) {\n SelectionKey key = selectedKeys.next();\n \n if (!key.isValid()) {\n selectedKeys.remove();\n disconnect(key);\n continue;\n }\n \n // Check what event is available and deal with it\n try {\n \n if (key.isValid() && key.isReadable()) {\n selectedKeys.remove();\n read(key);\n }\n else if (key.isValid() && key.isWritable()) {\n selectedKeys.remove();\n write(key);\n }\n } catch (IOException e) {\n log.log(Level.WARNING, \"[\"+Thread.currentThread().getName()+\"] Ignoring exception and removing connection\", e);\n disconnect(key);\n }\n }\n \n }", "public void run() {\r\n logger.info(\"Selector started.\");\r\n \r\n// PerformanceLogger p = PerformanceLogger.getLogger(\"Selector\");\r\n// long start = System.currentTimeMillis();// \r\n// int c = 0;\r\n // run main loop until thread is interrupted\r\n while (!Thread.interrupted()) {\r\n runScheduleTasks();\r\n\r\n try {\r\n // Check the scheduleTasks queue at least once every 10ms\r\n // In some cases, this might require skipping a call to select\r\n // in some iteration, if handling the previous iteration took more than 10ms\r\n int selectedCount = selector.select(10);\r\n // if some keys were selected process them\r\n if (selectedCount > 0) {\r\n processSelectedKeys();\r\n }\r\n \r\n// c++;\r\n// p.log((System.currentTimeMillis() - start) + \"\\t\" + id + \"\\t\" + selectedCount + \"\\n\");\r\n\r\n } catch (IOException e) {\r\n // it shouldn't happen in normal situation so print stack trace\r\n // and kill the application\r\n logger.log(Level.SEVERE, \"Unexpected exception\", e);\r\n closeSelectorThread();\r\n // System.exit(1);\r\n }\r\n }\r\n }", "<C, R> void dispatch( CommandMessage<C> command, CommandCallback<? super C, ? super R> callback );", "public void handleCommand(String command);", "synchronized void processCommandQueue() throws IOException {\n\t\tuserMgr.readUserListIfNeeded();\n\t\tuserMgr.clearExpiredPasswords();\n\t\tCommandProcessor.processCommands(this);\n\t}", "private void queueModified() {\n\tmServiceExecutorCallback.queueModified();\n }", "void send(Runnable msg);", "private void kickControlThread() {\r\n\t\tcontrolSignal.release();\r\n\t}", "public void talk() throws IOException, InterruptedException{\n\t\ttoServer.println(\"PICKUP\");\n\t\ttoServer.println(\"HELLO\");\n\t\ttoServer.println(\"LOOK\");\n\t\twhile (!gameOver){\n\t\t\tThread.sleep(500);\n\t\t\ttoServer.println(queue.take());\n\t\t\ttoServer.println(\"LOOK\");\n\t\t}\n\t}", "void addCommand(final Runnable command)\n {\n synchronized (command_queue)\n {\n // New maximum queue length (+1 for the one about to get added)\n if (command_queue.size() >= max_size_reached)\n max_size_reached = command_queue.size() + 1;\n command_queue.addLast(command);\n }\n }", "public interface CommandSender \n{\n /**\n * Handle a respond from the robot.\n * @param result The result.\n * @param originalCommand The command which was sent to the robot.\n */\n public void handleResponse(byte[] result, Command originalCommand);\n \n /**\n * Handle an error that occured when communicating to the robot.\n * @param code The error code that was sent by the robot.\n */\n public void handleError(int code);\n \n /**\n * Needed when sending a command repetitively to the robot.\n * @return The command string that should be used.\n */\n public Command getCurrentCommand();\n \n}", "public interface UsbCommunicationInterface extends Runnable\n{\n byte get();\n\n void send(byte data) throws IOException;\n\n void cancel();\n}", "public T dequeue();", "public abstract void sendQuietly(String command, Object... args);", "@DISPID(112)\r\n\t// = 0x70. The runtime will prefer the VTID if present\r\n\t@VTID(107)\r\n\tjava.lang.String queue();", "int send(final Command command) throws ZigBeeException;", "public E dequeue();", "@Override\n\t\tpublic void run() {\n\t\t\twhile (true) {\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (Message message : pending) {\n\t\t\t\t\t\tif (canLCBdeliver(message)) {\n\t\t\t\t\t\t\tfifoBC.canDeliver(message);\n\t\t\t\t\t\t\tp.Pendinglock.lock();\n\t\t\t\t\t\t\tpending.remove(message);\n\t\t\t\t\t\t\tp.Pendinglock.unlock();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tSystem.out.println(\"Failed to sleep in deliver thread.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public synchronized void constructCmdAndNotify(final String cmdPart) {\n\n log.info(\"Getting command part: {}\", cmdPart);\n\n if (StringUtils.isEmpty(cmdPart)) {\n return;\n }\n\n final String startSymbol = serialProperties.getCmdBeginMarker().toString();\n\n // before appending\n String buffer = constructedCommand();\n\n if (cmdPart.startsWith(startSymbol)) {\n if (StringUtils.isEmpty(buffer)) {\n append(cmdPart);\n } else {\n constructedCommand.set(cmdPart);\n }\n } else if (buffer.startsWith(startSymbol)) {\n append(cmdPart);\n }\n\n\n while(canSend()) {\n buffer = constructedCommand();\n\n log.info(\"buffer: {}\", buffer);\n\n int beginIndex = constructedCommand()\n .indexOf(startSymbol);\n int endIndex = constructedCommand()\n .indexOf(serialProperties.getCmdEndMarker());\n\n String toSend = buffer.substring(beginIndex, endIndex + 1);\n\n constructedCommand.set(buffer.substring(endIndex + 1));\n\n if (!StringUtils.isEmpty(buffer)) {\n ArduinoDataUpdate dataUpdate = ArduinoDataUpdate.fromSerialCmd(\n toSend,\n startSymbol,\n serialProperties.getCmdEndMarker().toString(),\n serialProperties.getCmdSeparator().toString());\n\n if (dataUpdate != null) {\n processor.onNext(dataUpdate);\n }\n }\n }\n\n }", "private void commandMotor(int channel, int maskValue){\n\t\tbyte workingByte = (byte)((CMDBIT_GO | maskValue) & 0xff);\n\n\t\tif (motorParams[MOTPARAM_REGULATE][channel] == MOTPARAM_OP_TRUE) workingByte |= CMDBIT_SPEED_MODE;\n\t\tif (motorParams[MOTPARAM_RAMPING][channel] == MOTPARAM_OP_TRUE) workingByte |= CMDBIT_RAMP;\n\t\t// send the message.\n\t\tsendData(REGISTER_MAP[REG_IDX_COMMAND][channel], workingByte);\n\t}", "public void sendByteCommand(int address, byte command, boolean waitForCompletion)\n {\n final String funcName = \"sendByteCommand\";\n byte[] data = new byte[1];\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"addr=%d,cmd=0x%x,sync=%s\",\n address, command, Boolean.toString(waitForCompletion));\n }\n\n data[0] = command;\n if (waitForCompletion)\n {\n syncWrite(address, data, data.length);\n }\n else\n {\n //\n // Fire and forget.\n //\n asyncWrite(null, address, data, data.length, null, null);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n }", "public void innerAdd(Object cmd) {\n this.commandList.add(cmd);\n if (!this.handler.hasMessages(1)) {\n this.handler.sendEmptyMessageDelayed(1, getDelayTime());\n }\n }" ]
[ "0.5996472", "0.5603127", "0.55569047", "0.55177724", "0.5490133", "0.5359152", "0.5339009", "0.53148776", "0.53123283", "0.52504075", "0.5192134", "0.5181374", "0.5177508", "0.5153618", "0.51422256", "0.51375306", "0.511099", "0.51074713", "0.51056314", "0.5103238", "0.5096869", "0.5072413", "0.5069965", "0.50497836", "0.50341934", "0.5026904", "0.5024745", "0.5018619", "0.5010638", "0.50041986", "0.4937551", "0.4936331", "0.4935235", "0.49258804", "0.49166644", "0.49136138", "0.49136138", "0.49072862", "0.4898951", "0.4893085", "0.4888737", "0.48883918", "0.48600525", "0.48516393", "0.48450294", "0.48419335", "0.48414332", "0.48389155", "0.48288527", "0.48265", "0.48189116", "0.4816135", "0.4814139", "0.48093796", "0.48042464", "0.4795644", "0.47950724", "0.47796392", "0.47794646", "0.47621495", "0.47618222", "0.47520897", "0.47381413", "0.47353724", "0.4710606", "0.4710557", "0.47096115", "0.47080812", "0.47065598", "0.4700244", "0.4689133", "0.4681019", "0.46690804", "0.46557295", "0.46548304", "0.4654006", "0.4652491", "0.465114", "0.46496382", "0.46432194", "0.4639277", "0.46377584", "0.46339378", "0.46323165", "0.46307418", "0.46232232", "0.462236", "0.46218902", "0.46214092", "0.4613283", "0.46130276", "0.46069112", "0.46020332", "0.45981905", "0.45933726", "0.458582", "0.45784965", "0.45773345", "0.4576888", "0.4575584" ]
0.7484217
0
Processes the command from commandQueue
private void processCommands() { while (!commandQueue.isEmpty()) { var msg = commandQueue.remove(); treatCommand.parseCommand(msg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "synchronized void processCommandQueue() throws IOException {\n\t\tuserMgr.readUserListIfNeeded();\n\t\tuserMgr.clearExpiredPasswords();\n\t\tCommandProcessor.processCommands(this);\n\t}", "void processCommand (String command, ZMsg msg);", "public void handleCommand(String command);", "protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);", "void processQueue();", "@Override\n public void process(Serializable msg) {\n ((Command) msg).execute(arg);\n }", "public void process() {\n \n//System.out.println(\"UndoCommand.undo()\");\n//System.out.println(\" command: \" + command.getDescription());\n//System.out.println(\" isTransient: \" + command.isTransient());\n//System.out.println(\" isUndoable: \" + command.isUndoable());\n\n try {\n \n command.undo();\n\n // Move the command to the top of the redo stack\n redoCommands.push(command);\n\n // Trim the redo stack\n if (redoCommands.size() > maxSize) {\n redoCommands.setSize(maxSize);\n } \n \n // finally, notify listeners of the change\n for (int i = 0; i < commandListeners.size(); i++) {\n CommandListener l = commandListeners.get(i);\n l.commandExecuted(command);\n }\n\n } catch (Exception e) {\n errorReporter.errorReport(\"Undo of \" + command.getDescription() + \" command failed.\", e);\n }\n\n }", "public abstract byte[] appExecuteUnordered(byte[] command, MessageContext msgCtx);", "public void\n\t\t\thandleCommand(/*@ non_null */ String command);", "@Override\n\tpublic String processCommand(String command) {\n\t\tif (this.isValid(\"c\", command)) {\n\t\t\t// structure matches the quit command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 'Q') {\n\t\t\t\trunning = false;\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |c| |n\", command)) {\n\t\t\t// structure matches the insert command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 'a') {\n\t\t\t\tchar insertChar = command.charAt(2);\n\t\t\t\tint index = Integer.parseInt(command.substring(4));\n\t\t\t\tif (linkedList.insert(insertChar, index)) {\n\t\t\t\t\tunMixCode = \"r\" + (index + 1) + unMixCode;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Invalid index!\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |c\", command)) {\n\t\t\t// structure matches the remove command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 'r') {\n\t\t\t\tchar removeChar = command.charAt(2);\n\t\t\t\tlinkedList.remove(removeChar);\n\t\t\t\tfor (int i = curMessage.length() - 1; i >= 0; i--) {\n\t\t\t\t\tif (removeChar == curMessage.charAt(i)) {\n\t\t\t\t\t\tunMixCode = \"a\" + removeChar + (i - 1)\n\t\t\t\t\t\t\t\t+ unMixCode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |n| |n| |n\", command)) {\n\t\t\t// structure matches the cut command, check to see if\n\t\t\t// the first char\n\t\t\t// is right\n\t\t\tif (command.charAt(0) == 'c') {\n\t\t\t\tcommand = command.substring(2);\n\t\t\t\tint space1 = command.indexOf(\" \");\n\t\t\t\tint space2 = command.indexOf(\" \", space1 + 1);\n\t\t\t\tint startIndex = Integer\n\t\t\t\t\t\t.parseInt(command.substring(0, space1));\n\t\t\t\tint endIndex = Integer.parseInt(\n\t\t\t\t\t\tcommand.substring(space1 + 1, space2));\n\t\t\t\tint clipboardIndex = Integer\n\t\t\t\t\t\t.parseInt(command.substring(space2 + 1));\n\t\t\t\tboolean ok = true;\n\t\t\t\tif (startIndex < 0\n\t\t\t\t\t\t|| startIndex >= curMessage.length()) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tif (endIndex < startIndex || endIndex < 0\n\t\t\t\t\t\t|| endIndex >= curMessage.length()) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tif (clipboardIndex < 0 || clipboardIndex >= 1000) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tif (ok) {\n\t\t\t\t\tLinkedList temp = new LinkedList();\n\t\t\t\t\ttemp.setToString(linkedList.toString()\n\t\t\t\t\t\t\t.substring(startIndex, endIndex + 1));\n\t\t\t\t\tclipboards.add(clipboardIndex, temp.getTop());\n\t\t\t\t\tfor (int i = endIndex; i >= startIndex; i--) {\n\t\t\t\t\t\tunMixCode = \"a\"\n\t\t\t\t\t\t\t\t+ curMessage.toString().charAt(i)\n\t\t\t\t\t\t\t\t+ (i - 1) + unMixCode;\n\t\t\t\t\t\tlinkedList.removeAt(i);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t\t(testing) ? \"\" : \"Invalid command!\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |n| |n\", command)) {\n\t\t\t// structure matches the paste command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 'p') {\n\t\t\t\tcommand = command.substring(2);\n\t\t\t\tint spc1 = command.indexOf(' ');\n\t\t\t\tint startIndex = Integer\n\t\t\t\t\t\t.parseInt(command.substring(0, spc1));\n\t\t\t\tint clipboardIndex = Integer\n\t\t\t\t\t\t.parseInt(command.substring(spc1 + 1));\n\t\t\t\tboolean ok = true;\n\t\t\t\tif (startIndex < 0\n\t\t\t\t\t\t|| startIndex >= curMessage.length()) {\n\t\t\t\t\tif (startIndex != -1) {\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (clipboardIndex < 0 || clipboardIndex >= 1000) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tLinkedList temp = new LinkedList();\n\t\t\t\ttemp.setTop(clipboards.get(clipboardIndex));\n\t\t\t\tif (temp.getTop() == null) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tif (ok) {\n\t\t\t\t\tfor (char c : temp.toString().toCharArray()) {\n\t\t\t\t\t\tif (linkedList.insert(c, startIndex)) {\n\t\t\t\t\t\t\tunMixCode = \"r\" + (startIndex + 1)\n\t\t\t\t\t\t\t\t\t+ unMixCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstartIndex++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t\t(testing) ? \"\" : \"Invalid command!\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |s\", command)) {\n\t\t\t// structure matches the save command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 's') {\n\t\t\t\tString fileName = command.substring(2,\n\t\t\t\t\t\tcommand.length());\n\t\t\t\ttry {\n\t\t\t\t\tPrintWriter saver = new PrintWriter(\n\t\t\t\t\t\t\tnew BufferedWriter(\n\t\t\t\t\t\t\t\t\tnew FileWriter(fileName)));\n\t\t\t\t\tsaver.print(unMixCode);\n\t\t\t\t\tsaver.close();\n\t\t\t\t\tif (!testing) {\n\t\t\t\t\t\tSystem.out.println(\"Saved successfully\");\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.print((testing) ? \"\" : \"Invalid command!\");\n\t\t}\n\t\tcurMessage = linkedList.toString();\n\t\treturn curMessage;\n\t}", "protected void mainTask() {\n\t logger.log(1, CLASS, \"-\", \"impl\",\n\t\t \"About to read command\");\n\t try { \n\t\tcommand = (COMMAND)connection.receive();\n\t\tlogger.log(1,CLASS, \"-\", \"impl\",\n\t\t\t \"Received command: \"+(command == null ? \"no-command\" : command.getClass().getName()));\n\t } catch (IOException e) {\n\t\tinitError(\"I/O error while reading command:[\"+e+\"]\",command);\n\t\treturn;\n\t } catch (ClassCastException ce) {\n\t\tinitError(\"Garbled command:[\"+ce+\"]\", command);\n\t\treturn;\n\t } \n\t \n\t // 2. Create a handler.\n\t if (command == null) {\n\t\tinitError(\"No command set\", null);\n\t\treturn;\n\t }\n\n\t if (handlerFactory != null) {\n\t\thandler = handlerFactory.createHandler(connection, command);\n\t\tif (handler == null) {\n\t\t initError(\"Unable to process command [\"+command.getClass().getName()+\"]: No known handler\", command);\n\t\t return;\n\t\t}\n\t \n\t\t// 3. Handle the request - handler may send multiple updates to client over long period\n\t\thandler.handleRequest();\n\t }\t \n\t}", "@Override\n public void execute() {\n if(state.getState()!=1) {\n client.printParseMessage();\n return;\n } else if(inputArgs.length < 1) {\n System.out.println(client.strings.getString(\"manage_command_message\"));\n return;\n }\n try {\n client.setDraftTag(inputArgs[0]);\n channel.send(new ReadRequest(client.getDraftTag()));\n ReadReply reply = (ReadReply) channel.receive();\n if(!reply.lines.isEmpty()) {\n String replyLine = reply.lines.get(reply.lines.size() - 1);\n if(Push.CLOSE_LINE.equals(replyLine)) {\n System.out.println(client.strings.getString(\"manage_close_command_message\"));\n return;\n }\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(ReadCommand.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n state.setState(2);\n }", "protected void processCommand(String command) throws EmptyException {\n if (command.equals(\"a\")) {\n doAddTask();\n } else if (command.equals(\"r\")) {\n doRemoveTask();\n } else if (command.equals(\"p\")) {\n doViewList();\n } else if (command.equals(\"m\")) {\n //doMarkComplete();\n } else if (command.equals(\"n\")) {\n doCount();\n } else if (command.equals(\"s\")) {\n doSave();\n } else if (command.equals(\"c\")) {\n doClear();\n } else {\n System.out.println(\"Selection not valid...\");\n }\n }", "private void processCommand()\n {\n String vInput = this.aEntryField.getText();\n this.aEntryField.setText(\"\");\n\n this.aEngine.interpretCommand( vInput );\n }", "@Override\n public void handleIncoming(SoeUdpConnection connection, CommandMessage message, TangibleObject invoker) {\n int sequenceId = message.getSequenceId();\n int commandHash = message.getCommandHash();\n\n float timer = 6; //TODO: Command times lookup\n int error = 0; //TODO: State errors\n int action = 0;\n\n commandDispatcher.dispatchCommand(connection, message, invoker);\n\n// CommandQueueRemove remove = new CommandQueueRemove(\n// invoker.getNetworkId(),\n// actionCounter,\n// timer,\n// error,\n// action);\n// client.sendMessage(remove);\n }", "Command handleExecute(CommandExecute commandExecute);", "public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }", "public void processCommand(String command, MessageReceivedEvent event){\n command = command.toLowerCase();\n String[] parsing = command.split(\" \");\n switch(parsing[1]){\n case \"new\":\n validateNewCraftEntry(parsing, event);\n break;\n case \"list\":\n generateCraftingList(event);\n break;\n case \"help\":\n showHelp(event);\n break;\n case \"listall\":\n listall(event);\n break;\n case \"cancel\":\n cancelCraft(event);\n break;\n }\n }", "@Override\n\tpublic void run() {\n\t\twhile (receivingCommands) {\n\t\t\ttry {\n\t\t\t\tCommandHandler commandHandler = new CommandHandler(readNextLine());\n\t\t\t\tswitch (commandHandler.getCommand()) {\n\t\t\t\tcase REGISTER:\n\t\t\t\t\tString username = commandHandler.getParam(1);\n\t\t\t\t\tString password = commandHandler.getParam(2);\n\t\t\t\t\tfileCatalog.register(username, password);\n\t\t\t\t\tbreak;\n\t\t\t\tcase LOGIN:\n\t\t\t\t\tString username1 = commandHandler.getParam(1);\n\t\t\t\t\tString password1 = commandHandler.getParam(2);\n\t\t\t\t\tjwtToken = fileCatalog.login(username1, password1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIST:\n\t\t\t\t\tList<? extends FileDTO> files = fileCatalog.list(jwtToken);\n\t\t\t\t\tfor (FileDTO file : files) {\n\t\t\t\t\t\tprintDetails(file);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DETAILS:\n\t\t\t\t\tString fileName = commandHandler.getParam(1);\n\t\t\t\t\tFileDTO file = fileCatalog.details(jwtToken, fileName);\n\t\t\t\t\tprintDetails(file);\n\t\t\t\t\tbreak;\n\t\t\t\tcase UPR:\n\t\t\t\t\tString pathFileToUploadReadOnly = commandHandler.getParam(1);\n\t\t\t\t\tString newFileNameOnServerReadOnly = commandHandler.getParam(2);\n\t\t\t\t\tfileCatalog.upload(jwtToken, newFileNameOnServerReadOnly, false);\n\t\t\t\t\t// TODO\n\t\t\t\t\tbreak;\n\t\t\t\tcase UPW:\n\t\t\t\t\tString pathFileToUpload = commandHandler.getParam(1);\n\t\t\t\t\tString newFileNameOnServer = commandHandler.getParam(2);\n\t\t\t\t\tfileCatalog.upload(jwtToken, newFileNameOnServer, true);\n\t\t\t\t\t// TODO\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\tString fileNameToDL = commandHandler.getParam(1);\n\t\t\t\t\tString targetDirectory = commandHandler.getParam(2);\n\t\t\t\t\tString newNameDL = commandHandler.getParam(3);\n\t\t\t\t\tfileCatalog.download(jwtToken, fileNameToDL, targetDirectory, newNameDL);\n\t\t\t\t\t// TODO\n\t\t\t\t\tbreak;\n\t\t\t\tcase DELETE:\n\t\t\t\t\tString fileNameToDelete = commandHandler.getParam(1);\n\t\t\t\t\tfileCatalog.delete(jwtToken, fileNameToDelete);\n\t\t\t\t\t// TODO\n\t\t\t\t\tbreak;\n\t\t\t\tcase LOGOUT:\n\t\t\t\t\tjwtToken = null;\n\t\t\t\t\tsafePrintln(\"You have been logged out.\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\treceivingCommands = false;\n\t\t\t\t\tsafePrintln(\"Good bye!\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase HELP:\n\t\t\t\t\tfor (Command command : Command.values()) {\n\t\t\t\t\t\tif (command == Command.UNKNOWN) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsafePrintln(command.toString().toLowerCase());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsafePrintln(\"Unrecognized command.\");\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tniceErrorPrint(e);\n\t\t\t}\n\t\t}\n\t}", "private void processCommand(String command) {\n if (command.equals(\"1\")) {\n insertItem();\n } else if (command.equals(\"2\")) {\n removeItem();\n } else if (command.equals(\"3\")) {\n viewList();\n } else if (command.equals(\"4\")) {\n saveToDoList();\n } else if (command.equals(\"5\")) {\n loadToDoList();\n } else {\n System.out.println(\"Selection not valid...\");\n }\n }", "protected void channelRead0(ChannelHandlerContext channelHandlerContext, CommandMessage command) throws Exception {\r\n\r\n final Op cmd = command.op;\r\n\r\n // now do the real work\r\n if (this.verbose) {\r\n final StringBuilder log = new StringBuilder(1024);\r\n log.append(cmd);\r\n if (command.element != null) {\r\n log.append(\" \").append(command.element.getKey());\r\n }\r\n log.append(\" \").append(command.key);\r\n logger.info(log.toString());\r\n }\r\n\r\n final Channel channel = channelHandlerContext.channel();\r\n if (cmd == null) {\r\n handleNoOp(command, channel);\r\n } else {\r\n switch (cmd) {\r\n case GET:\r\n handleGet(command, channel);\r\n break;\r\n case GETS:\r\n handleGets(command, channel);\r\n break;\r\n case APPEND:\r\n handleAppend(command, channel);\r\n break;\r\n case PREPEND:\r\n handlePrepend(command, channel);\r\n break;\r\n case DELETE:\r\n handleDelete(command, channel);\r\n break;\r\n case DECR:\r\n handleDecr(command, channel);\r\n break;\r\n case INCR:\r\n handleIncr(command, channel);\r\n break;\r\n case REPLACE:\r\n handleReplace(command, channel);\r\n break;\r\n case ADD:\r\n handleAdd(command, channel);\r\n break;\r\n case SET:\r\n handleSet(command, channel);\r\n break;\r\n case CAS:\r\n handleCas(command, channel);\r\n break;\r\n case STATS:\r\n handleStats(command, channel);\r\n break;\r\n case VERSION:\r\n handleVersion(command, channel);\r\n break;\r\n case QUIT:\r\n handleQuit(channel);\r\n break;\r\n case FLUSH_ALL:\r\n handleFlush(command, channel);\r\n break;\r\n case VERBOSITY:\r\n handleVerbosity(command, channel);\r\n break;\r\n default:\r\n throw new UnknownCommandException(\"unknown command\");\r\n }\r\n }\r\n }", "private void processCommand(String command) {\n if (command.equals(\"a\")) {\n doAddTask();\n } else if (command.equals(\"r\")) {\n doRemoveTask();\n } else if (command.equals(\"c\")) {\n doMarkTaskAsCompleted();\n } else if (command.equals(\"m\")) {\n doModifyTask();\n } else if (command.equals(\"v\")) {\n doViewAllTasks();\n } else if (command.equals(\"ct\")) {\n doViewAllCompletedTasks();\n } else if (command.equals(\"s\")) {\n saveTasks();\n } else {\n System.out.println(\"Invalid selection, kindly select from the options available.\");\n }\n }", "List<Command> receive(final String receiveQueueId) throws ZigBeeException;", "public cl_command_queue getCommandQueue() {\r\n return commandQueue;\r\n }", "private void workOnQueue() {\n }", "private void processCommand(String command) {\n switch (command) {\n case \"reserve\":\n doReserve();\n break;\n case \"view\":\n doView();\n break;\n case \"deposit\":\n doDeposit();\n break;\n }\n }", "private void extractProcessMessagesFromBufferIntoQueue(ByteBuffer byteBuffer){\n // when this function is called, byte buffer is ready for being read\n // i.e. position should point to the last byte written\n ProcessMessage procMsg;\n while((procMsg = extractProcessMessageFromByteBuffer(byteBuffer)) != null){\n // put procMsg into queue\n receivedMessagesQueue.add(procMsg);\n }\n\n // compact buffer for further reading new data\n byteBuffer.compact();\n\n }", "public void onQueue();", "public void command(byte[] cmdMessage) throws SAPIException{\r\n\t\t\t\t//sends command to RBNB\r\n\t\t\t\t\r\n\t\t\t\tsrcMap.PutDataAsByteArray(srcMap.GetIndex(getParameterToStringById(\"sourceChannelCommandName\")), cmdMessage); //cmds channel\t \t\r\n\t \tsrc.Flush(srcMap); \t\r\n\t\t}", "public void process() {\n int command;\n menu();\n while ((command = getCommand()) != EXIT) {\n switch (command) {\n case ADD_CLIENT: addClient();\n break;\n case ADD_PRODUCT: addProduct();\n break;\n case ADD_SUPPLIER: addSupplier();\n break;\n case ASSIGN_PRODUCT: linkProduct();\n break;\n case UNASSIGN_PRODUCT: unlinkProduct();\n break;\n case ACCEPT_SHIPMENT: acceptShipment();\n break;\n case ACCEPT_ORDER: acceptOrder();\n break;\n case PROCESS_ORDER: processOrder();\n break;\n case CREATE_INVOICE: createInvoice();\n break;\n case PAYMENT: payment();\n break;\n case SHOW_CLIENTS: showClients();\n break;\n case SHOW_PRODUCTS: showProducts();\n break;\n case SHOW_SUPPLIERS: showSuppliers();\n break;\n case SHOW_ORDERS: showOrders();\n break;\n case GET_TRANS: getTransactions();\n break;\n case GET_INVOICE: getInvoices();\n break;\n case SAVE: save();\n break;\n case MENU: menu();\n break;\n case TEST: test();\n break;\n }\n }\n }", "public abstract void doCommand(String command);", "@Override\n\tprotected void doAction(Object message) {\n\t\tlogger.info(\"File Scanner Fetch message Name -->:\"+message.toString());\n\t\ttry {\n\t\t\tFileParser.queue.put(message);\n\t\t} catch (InterruptedException e) {\n\t\t\tlogger.error(\"Error on add message to Parser\");\n\t\t}\n\t}", "public static void processCommand(String command) {\n\n\t\tString commandType = command.substring(0, command.indexOf(\" \"));\n\n\t\tswitch (commandType) {\n\t\t\n\t\tcase COMMAND_ADD:\n\t\t\tFileStorage.addEvent(command);\n\t\t\tbreak;\n\n\t\tcase COMMAND_DELETE:\n\t\t\tFileStorage.deleteEvent(command);\n\t\t\tbreak;\n\n\t\tcase COMMAND_EDIT:\n\t\t\tFileStorage.editEvent(command);\n\t\t\tbreak;\n\t\t\n\t\tcase COMMAND_RECUR:\n\t\t\tFileStorage.recurEvent(command);\n\t\t\tbreak;\n\t\t\t\n\t\tcase COMMAND_NAVIGATE:\n\t\t\tFileStorage.navigateDay(command);\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(MESSAGE_INVALID);\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}", "public abstract void onCommand(MessageEvent context) throws Exception;", "public ArrayList<Object> processCommand(byte[] command, CommandController controller)\n\t\t\tthrows CommandControllerException;", "void runQueue();", "public static void processCommand(String command) {\n instance.doCommand(command);\n }", "@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}", "@Override\r\n public void onMessage(MessageEvent message) {\r\n String newMessage = message.getMessage();\r\n String response;\r\n\r\n //split the message on spaces to identify the command\r\n String[] messageArray = newMessage.split(\" \");\r\n \r\n switch (messageArray[0]) {\r\n case \"!command\":\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n if (messageArray.length == 2) {\r\n if (messageArray[1].equals(\"off\")) {\r\n commandsActive = false;\r\n } \r\n if (messageArray[1].equals(\"on\")) {\r\n commandsActive = true;\r\n }\r\n }\r\n }\r\n break;\r\n //command to make a custom command for the bot\r\n case \"!addcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = addCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to add commands.\");\r\n }\r\n }\r\n break;\r\n case \"!commands\":\r\n if (commandsActive) {\r\n if (messageArray.length ==1) {\r\n ArrayList<String> commands = manager.getCommands(message.getChannel().getName());\r\n String commandList = \"The custom commands available to everyone for this channel are: \";\r\n while (!commands.isEmpty()) {\r\n commandList += commands.remove(0) + \", \";\r\n }\r\n message.getChannel().send().message(commandList);\r\n }\r\n }\r\n break;\r\n //command to delete a custom command from the bot\r\n case \"!delcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = delCom(messageArray[1], message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to remove commands.\");\r\n }\r\n }\r\n break;\r\n //command to edit a custom command the bot has\r\n case \"!editcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = editCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to edit commands.\");\r\n }\r\n }\r\n break;\r\n\r\n //default message handling for custom commands\r\n default:\r\n if (commandsActive) {\r\n if (message.getMessage().startsWith(\"!\") && !messageArray[0].equals(\"!permit\")&& !messageArray[0].equals(\"!spam\")) {\r\n customCommands(message);\r\n }\r\n }\r\n break;\r\n }\r\n }", "protected void submitCommand(ServoCommand cmd){\r\n if(cmd==null){\r\n log.warning(\"null cmd submitted to servo command queue\");\r\n return;\r\n }\r\n if(submittedCmdAfterOpen && cmd.equals(lastCmd)){\r\n return; // don't just duplicate command already sent since open\r\n }\r\n if(errorString!=null){\r\n log.warning(errorString);\r\n close();\r\n return;\r\n }\r\n if(!servoQueue.offer(cmd)){ // if queue is full, just clear it and replace with latest command\r\n servoQueue.clear();\r\n servoQueue.offer(cmd);\r\n submittedCmdAfterOpen=true;\r\n if(clearedQueueWarningCount++%PRINT_QUEUE_CLEARED_INTERVAL==0){\r\n log.warning(\"cleared queue to submit latest command (only logging this warning every \"+PRINT_QUEUE_CLEARED_INTERVAL+\" times)\"); // TODO add limited number of warnings here\r\n }\r\n }\r\n lastCmd=cmd;\r\n Thread.yield(); // let writer thread get it and submit a write\r\n }", "public void parseCommand(CommandType command) throws ExecutionException, InterruptedException {\n try {\r\n if (lock.isLocked(new UserSingleType(command.event().getMessageAuthor().asUser().get(), command.event().getServer().get()))) {\r\n command.event().getMessage().delete();\r\n return;\r\n } else if(lock.isChLocked(new UserChannelLockType(new UserSingleType(command.event().getMessageAuthor().asUser().get(), command.event().getServer().get()), command.event().getChannel()))){\r\n command.event().getMessage().delete();\r\n return;\r\n }\r\n }catch (Exception ignored){}\r\n if(command.command().startsWith(prefix)) { // to prevent expressions for unrelated messages\r\n command.api().getServerById(command.event().getServer().get().getId()).get();\r\n if (!command.event().getServer().get().hasPermission(command.api().getYourself(), PermissionType.ADMINISTRATOR)) {// Bot permissions check, without administrator access our bot should be not work\r\n command.event().getMessage().reply(\"This bot cannot be work without Administrator permission.\");\r\n return;\r\n }\r\n if (command.command().equals(prefix + commands[0])) commandAction.commandPing(command);\r\n else if (command.command().equals(prefix + commands[1])) commandAction.commandServer(command);\r\n else if (command.command().equals(prefix + commands[2])) commandAction.commandInf(command);\r\n else if (command.command().equals(prefix + commands[3])) commandAction.commandInvite(command);\r\n else if (command.command().equals(prefix + commands[4])) commandAction.commandKick(command);\r\n else if (command.command().equals(prefix + commands[5])) commandAction.commandBan(command);\r\n else if (command.command().equals(prefix + commands[6])) commandAction.commandMute(command);\r\n else if (command.command().equals(prefix + commands[7])) commandAction.commandUnMute(command);\r\n else if (command.command().equals(prefix + commands[8])) commandAction.commandDef(command);\r\n else if (command.command().equals(prefix + commands[9])) commandAction.commandUnDef(command);\r\n else if (command.command().equals(prefix + commands[10])) commandAction.commandWarn(command);\r\n else if (command.command().equals(prefix + commands[11])) commandAction.commandUnWarn(command);\r\n else if (command.command().equals(prefix + commands[12])) commandAction.commandClear(command);\r\n else if (command.command().equals(prefix + commands[13])) commandAction.commandLock(command, lock);\r\n else if (command.command().equals(prefix + commands[14])) commandAction.commandUnlock(command, lock);\r\n else if (command.command().equals(prefix + commands[15])) commandAction.commandDelete(command);\r\n else if (command.command().equals(prefix + commands[16])) commandAction.commandChLock(command, lock);\r\n else if (command.command().equals(prefix + commands[17])) commandAction.commandChUnlock(command, lock);\r\n else if (command.command().equals(prefix + commands[18])) commandAction.commandUnBanAll(command);\r\n else if (command.command().equals(prefix + commands[19])) commandAction.commandUnlockAll(command, lock);\r\n else if (command.command().equals(prefix + commands[20])) commandAction.commandSet(command);\r\n else if (command.command().equals(prefix + commands[21])) commandAction.commandHelp(command);\r\n }\r\n }", "public String processCommand(Command command) //refactored\n {\n boolean wantToQuit = false;\n //System.out.println(\"hitter boolean\");\n commandWord = command.getAction();//fehler\n //System.out.println(command);\n //System.out.println(\"enum == null\" + (commandWord == null));\n String result = \"\";\n //System.out.println(\"heyho\");\n //System.out.println(result);\n switch(commandWord){\n //case UNKNOWN: return \"I don't know what you mean...\"; break;\n \n case HELP: result += printHelp(); break;\n case GO: result += goRoom(command); break;\n case QUIT: return quit(command);//refactored from refactoring\n default: result += \"I don't know what you mean...\";\n }\n return result;\n }", "@Override\r\n public void execute(Command command) {\n\r\n }", "@Override\n public void post(java.lang.Runnable command) {\n mExecutor.execute(command);\n }", "public void Send(String commandString) {\n try {\n this.commandQueue.put(commandString);\n }\n catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n }", "private void processCommand(Command command) {\n if (command.commandIsUnknown()) {\n System.out.println(\"I don't know what you mean...\");\n } else {\n String commandWord = command.getCommandWord();\n // process all possible commands\n if (commandWord.equals(\"help\")) {\n printHelp();\n } else if (commandWord.equals(\"go\")) {\n if (!command.hasSecondWord()) {\n System.out.println(\"Go where?\");\n } else {\n goDirection(command);\n }\n } else if (commandWord.equals(\"quit\")) {\n if (command.hasSecondWord()) {\n System.out.println(\"Quit what?\");\n } else {\n finished = true;\n }\n }\n }\n }", "@Override\n public void dealWithCommand(MessageReceivedEvent event) {\n List<String> contentSplit = new ArrayList<>(Arrays.asList(event.getMessage().getContentStripped().split(\" \")));\n\n // remove the command part of the message\n contentSplit.remove(0);\n boolean isXpDesired = DetermineArguments.determineIsXpDesired(contentSplit);\n boolean isCollection = DetermineArguments.determineIsCollection(contentSplit);\n long timeToSpend = DetermineArguments.determineTimeToSpend(contentSplit, event.getTextChannel());\n int classLevel = DetermineArguments.determineClassLevel(contentSplit, event.getTextChannel());\n long amountDesired = DetermineArguments.determineAmountDesired(contentSplit, event.getTextChannel());\n\n // be done if something bad was found\n if (timeToSpend == -2 || classLevel == -2 || amountDesired == -2)\n return;\n\n if (contentSplit.isEmpty()) {\n // user did not specify what player they want\n event.getChannel().sendMessage(\"Specify what player you want to analyze.\").queue();\n return;\n }\n String username = contentSplit.get(0);\n WynncraftPlayer player = GetPlayerStats.get(username);\n if (player == null) {\n event.getChannel().sendMessage(\"Either the api is down, or '\" + username + \"' is not a player.\").queue();\n return;\n }\n\n // tell the user we're working on the answer\n event.getMessage().addReaction(\"\\uD83D\\uDEE0\").queue();\n\n List<String> classNames = new ArrayList<>();\n for (WynncraftClass playerClass : player.classes) {\n classNames.add(playerClass.name);\n }\n ChoiceArguments choiceArguments = new ChoiceArguments(\n isXpDesired, isCollection, timeToSpend, amountDesired, classLevel, classNames, player, true);\n\n\n long xpDesiredGivenPerc = 0;\n long emeraldDesiredGivenPerc = 0;\n for (WynncraftClass wynncraftClass : player.classes)\n for (Quest quest : wynncraftClass.questsNotCompleted) {\n if (quest.levelMinimum <= (classLevel == -1 ? wynncraftClass.combatLevel : classLevel)) {\n xpDesiredGivenPerc += quest.xp;\n emeraldDesiredGivenPerc += quest.emerald;\n }\n }\n xpDesiredGivenPerc *= GetAnswers.DEFAULT_PERCENTAGE_AMOUNT;\n emeraldDesiredGivenPerc *= GetAnswers.DEFAULT_PERCENTAGE_AMOUNT;\n\n FinalQuestOptionsAll finalQuestOptionsAll = GetAnswers.getAllFullAnswers(player, choiceArguments);\n String spreadsheetId = SheetsWrite.writeSheet(finalQuestOptionsAll, event.getAuthor().getIdLong(), player.name, true);\n if (spreadsheetId == null) return;\n new QuestRecommendationMessagePlayer(spreadsheetId, finalQuestOptionsAll, event.getChannel(), choiceArguments, xpDesiredGivenPerc, emeraldDesiredGivenPerc);\n\n event.getMessage().removeReaction(\"\\uD83D\\uDEE0\", DiscordBot.client.getSelfUser()).queue();\n }", "private void processCommands(String[] args) {\n int current = 0; //a running total of the parts added to a\n // command\n for (String part : args) {\n command += part;\n if ((part.equals(\";\")) || (part.equals(\"&\"))) { //if it is a delimiter\n if (part.equals(\";\")) { //sequential\n executeSequentially();\n } else { //concurrent\n executeConcurrently();\n }\n } else { //not a delimiter\n if ((current == args.length - 1)) { //contains no delimter in the\n // command (for single commands and the last of a series of\n // commands)\n executeSequentially();//runs as a sequential command\n } else { //not a delmiter and not the end of the commands\n command += \" \"; //add the part to command\n }\n }\n current++;\n }\n }", "public void addCommand(CommandInfo command) {\n\t\ttry {\n\t\t\tcommandsQueue.put(command);\n\t\t} catch(InterruptedException exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "public SeleneseCommand handleCommandResult(String commandResult, FrameAddress frameAddress, String uniqueId) {\r\n SeleneseQueue queue;\r\n if (!SeleniumServer.isProxyInjectionMode()) {\r\n queue = getSeleneseQueue();\r\n }\r\n else {\r\n synchronized(this) {\r\n if (frameAddress.getWindowName().equals(SELENIUM_WINDOW_NAME_UNKNOWN_POPUP)) {\r\n for (FrameAddress f : frameAddressToSeleneseQueue.keySet()) {\r\n // the situation being handled here: a pop-up window has either just loaded or reloaded, and therefore\r\n // doesn't know its name. It uses SELENIUM_WINDOW_NAME_UNKNOWN_POPUP as a placeholder.\r\n // Meanwhile, on the selenium server-side, a thread is waiting for this result.\r\n //\r\n // To determine if this has happened, we cycle through all of the SeleneseQueue objects,\r\n // looking for ones with a matching local frame address (e.g., top.frames[1]), is also a\r\n // pop-up, and which has a thread waiting on a result. If all of these conditions hold,\r\n // then we figure this queue is the one that we want:\r\n if (f.getLocalFrameAddress().equals(frameAddress.getLocalFrameAddress())\r\n && !f.getWindowName().equals(DEFAULT_SELENIUM_WINDOW_NAME)\r\n && frameAddressToSeleneseQueue.get(f).getCommandResultHolder().hasBlockedGetter()) {\r\n frameAddress = f;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n queue = getSeleneseQueue(frameAddress);\r\n }\r\n queue.setUniqueId(uniqueId);\r\n return queue.handleCommandResult(commandResult);\r\n }", "public interface CommandHandler {\n\n\t/**\n\t * Receive and handle the given Command.\n\t * @param c The Command to be handled.\n\t */\n\tpublic void handleCommand(String command);\n}", "private void addCommandToQueue(CancellableCommand command) {\n outstandingRequests.add(command);\n while (outstandingRequests.size() > maxOutstandingRequests) {\n outstandingRequests.poll().onCancelled();\n }\n }", "public void handleCommand(String command, String args[], Player player){\n\t}", "private boolean processCommand(Command command)//Method was given\n {\n if(command.isUnknown())\n {\n System.out.println(\"I don't know what you mean...\");\n return false;\n }\n\n String commandWord = command.getCommandWord();\n if (commandWord.equals(\"help\"))\n printHelp();\n else if (commandWord.equals(\"go\"))\n goRoom(command);\n else if (commandWord.equals(\"talk\"))\n talkToCharacter(currentRoom);\n else if (commandWord.equals(\"grab\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Grab what?\");\n }\n else\n {\n grabItem(secondWord);\n }\n }\n else if (commandWord.equals(\"eat\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Eat what?\");\n }\n else\n {\n eatItem(secondWord);\n }\n }\n else if (commandWord.equals(\"inventory\")) \n player.getInventory();\n else if (commandWord.equals(\"drop\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Drop what?\");\n }\n else\n {\n dropItem(secondWord);\n }\n }\n else if (commandWord.equals(\"inspect\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Inspect what?\");\n }\n else\n {\n inspectItem(secondWord);\n }\n }\n else if (commandWord.equals(\"quit\"))\n {\n if(command.hasSecondWord())\n System.out.println(\"Quit what?\");\n else\n return true; // signal that we want to quit\n }\n else if (commandWord.equals(\"look\"))\n {\n System.out.println(currentRoom.longDescription());\n }\n return false;\n }", "public void process () {\n consoleListenerAndSender.execute(() -> {\n String message = null;\n DataInputStream reader = null;\n try {\n reader = new DataInputStream(new BufferedInputStream(console.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n while (!isServerAvailable()) {\n message = reader.readUTF();\n\n if (Objects.equals(message, \"/quit\")){\n close();\n setQuitCommandAppear(true);\n break;\n }\n\n sender.sendMessage(message);\n message = null;\n\n }\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n serverListenerAndConsoleWriter.execute(() -> {\n try {\n while (!isServerAvailable()) {\n System.out.println(getter.getInputMessage());\n }\n } catch (IOException e) {\n if (!isQuitCommandAppear()) {\n System.out.println(\"[SERVER ISSUE] server is down.\");\n close();\n setServerAvailable(true);\n }\n else {\n System.out.println(\"Quit...\");\n }\n }\n });\n }", "void addCommand(final Runnable command)\n {\n synchronized (command_queue)\n {\n // New maximum queue length (+1 for the one about to get added)\n if (command_queue.size() >= max_size_reached)\n max_size_reached = command_queue.size() + 1;\n command_queue.addLast(command);\n }\n }", "void onMessageProcessingAttempt(String internalQueueName);", "public void processCommand() {\n if (cam != null) {\n // No commands if no draw canvas to retrieve them from!\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_UP) || StdDraw.isKeyPressed(KeyEvent.VK_UP))\n this.setR(this.getR().minus(this.getFacingVector().times(1e8)));\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_DOWN) || StdDraw.isKeyPressed(KeyEvent.VK_DOWN)) \n this.setR(this.getR().plus(this.getFacingVector().times(1e8)));\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_LEFT) || StdDraw.isKeyPressed(KeyEvent.VK_LEFT)) \n this.rot += FOV_INCREMENT;\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_RIGHT) || StdDraw.isKeyPressed(KeyEvent.VK_RIGHT)) \n this.rot -= FOV_INCREMENT; \n }\n }", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}", "private void processMessageQueue(){\n\t\tKIDSGUIAlert m = null;\n\t\tStringBuilder newText = new StringBuilder(logLines.getText());\n\t\twhile ((m = this.logMessages.poll()) != null){\n\t\t\tnewText.append(String.format(\"%s\\n\", m.toString()));\n\t\t}\n\t\tlogLines.setText(newText.toString());\n\t}", "private void handleCommand(Message msg, String commands) {\n String[] tokens = commands.split(\" \");\n String command = tokens[0];\n\n switch(command) {\n case \"query\":\n queryProblems(msg, tokens);\n break;\n case \"help\":\n printHelpMessage(msg, tokens);\n break;\n default:\n // Implement more commands later\n break;\n }\n }", "public void queueMessage(ByteBuffer bb) {\n queue.add(bb);\n processOut();\n updateInterestOps();\n }", "protected void forwardCommand(String from, byte command)\n\t\t\tthrows QueueBlockedException {\n\t\tthis.writer.write(from, command);\n\t}", "@Override\n public void onEvent(Event event) {\n if (event.getClass() != MessageReceivedEvent.class)\n return;\n MessageReceivedEvent msgEvent = (MessageReceivedEvent) event;\n\n String threadName = Thread.currentThread().getName();\n\n for (Command command : commands) {\n if (!command.match(msgEvent))\n continue;\n\n LOG.info(\"Dispatching event to command {}\", command);\n\n // Metrics\n METRICS_RUNNING.labels(command.toString(), threadName)\n .inc();\n Histogram.Timer timer = METRICS_LATENCY.labels(command.toString(), threadName)\n .startTimer();\n\n // Invoke\n Object ret = null;\n try {\n ret = command.getMethod().invoke(command.getInstance(), event);\n } catch (InvocationTargetException ex) {\n // Exception in listener's code\n //todo better logging\n LOG.error(ex.getTargetException());\n continue;\n } catch (IllegalAccessException ex) {\n // Should never happen\n throw new RuntimeException(ex);\n } finally {\n // Metrics\n Runnable endMetrics = () -> {\n LOG.debug(\"Finished dispatching event for {}\", command);\n METRICS_RUNNING.labels(command.toString(), threadName)\n .dec();\n timer.observeDuration();\n };\n\n if (ret instanceof CompletionStage) {\n CompletionStage<?> future = (CompletionStage<?>) ret;\n future.thenRunAsync(endMetrics);\n } else {\n endMetrics.run();\n }\n }\n }\n }", "public void addCommand(String auth, Command command) {\n if(sessionCommandQueue.containsKey(auth)) {\n sessionCommandQueue.get(auth).add(command);\n } else {\n List<Command> list = new ArrayList<>();\n list.add(command);\n sessionCommandQueue.put(auth, list);\n }\n }", "@Override\n public void recordCommandExecution(String commandInputString) {\n\n }", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "public void queueMessage(ByteBuffer bb) {\n\t\tqueue.add(bb);\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "<C, R> void dispatch( CommandMessage<C> command, CommandCallback<? super C, ? super R> callback );", "void handle(S state, C command);", "public void getCommand() {\n\t\t\n\t\tSystem.out.println(\"Enter a command:\");\n\t\tString Input = reader.nextLine(); //takes the user's input and places it in String Input\n\t\t\n\t\t//in the collection of commands, will run loop once for each item in that collection and \n\t\t//stores the item it is looking in the variable created\n\t\tfor (Commandable command : Commands) { \n\t\t\t\n\t\t\tif (command.matchCommand(Input)) {\n\t\t\t\t\n\t\t\t\tcommand.doCommand();\n\t\t\t\treturn;\t//this ends the method to break out of the loop\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Command not recognized\");\n\t}", "public void processInput(String command) {\r\n\t\t//begin\r\n\t\tString word = \"\";\r\n\t\tint i = 0;\r\n\t\tboolean processingInput = true;\r\n\t\t\r\n\t\t//loop that runs through whole command and breaks it apart\r\n\t\twhile(processingInput == true && i < command.length()) {\r\n\t\t\t\r\n\t\t\tif(command.charAt(i) == ',' && i < command.length()) {\r\n\t\t\t\t\r\n\t\t\t\ti += 2;\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\t//word = word.trim();\r\n\t\t\t\tboolean hasError = false;\r\n\t\t\t\t\r\n\t\t\t\tif(word.compareTo(\"publish\") == 0 && checkIfHasCorrectFormat(command, \"publish\") == true) {\r\n\t\t\t\t\tString producer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\tString brandName = \"\";\r\n\t\t\t\t\t//loop that gets producer name from command line\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tproducer += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tproducer = producer.toLowerCase();\r\n\t\t\t\t\t//producer = producer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category from command line\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\t\r\n\t\t\t\t\t\tprodCat += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets brand name from command line\r\n\t\t\t\t\twhile(i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tbrandName += command.charAt(i);\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbrandName = brandName.toLowerCase();\r\n\t\t\t\t\t//brandName = brandName.trim();\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\t//adds producer to producerList\r\n\t\t\t\t\t\taddProducer(producer);\r\n\t\t\t\t\t\t//performs a publish for the given producer\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < producerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tProducer tempProducer = producerList.get(i);\r\n\t\t\t\t\t\t\tif(producer.compareTo(tempProducer.getPublisherName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempProducer.publish(brandName, prodCat);\r\n\t\t\t\t\t\t\t\tproducerList.set(i, tempProducer); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(word.compareTo(\"subscribe\") == 0 && checkIfHasCorrectFormat(command, \"subscribe\") == true) { \r\n\t\t\t\t\tString retailer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the retailer name\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\t\r\n\t\t\t\t\t\tretailer += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tretailer = retailer.toLowerCase();\r\n\t\t\t\t\t//retailer = retailer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category\r\n\t\t\t\t\twhile(i < command.length() && i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tprodCat += command.charAt(i);\t\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\taddRetailer(retailer);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < retailerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tRetailer tempRetailer = retailerList.get(i);\r\n\t\t\t\t\t\t\tif(retailer.compareTo(tempRetailer.getSubscriberName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempRetailer.subscribe(prodCat);\r\n\t\t\t\t\t\t\t\tretailerList.set(i, tempRetailer); //NOT SURE IF I OR I + 1 OR I - 1 ****************************************8\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//broker.subscribeCommand(retailer, prodCat);\r\n\t\t\t\t}\r\n\t\t\t\telse if(word.compareTo(\"unsubscribe\") == 0 && checkIfHasCorrectFormat(command, \"unsubscribe\") == true) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString retailer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the retailer name\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\r\n\t\t\t\t\t\tretailer += command.charAt(i);\t\t\t\t\t\t\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tretailer = retailer.toLowerCase();\r\n\t\t\t\t\tretailer = retailer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category\r\n\t\t\t\t\twhile(i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tprodCat += command.charAt(i);\t\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < retailerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tRetailer tempRetailer = retailerList.get(i);\r\n\t\t\t\t\t\t\tif(retailer.compareTo(tempRetailer.getSubscriberName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempRetailer.unsubscribe(prodCat);\r\n\t\t\t\t\t\t\t\tretailerList.set(i, tempRetailer); //NOT SURE IF I OR I + 1 OR I - 1 ****************************************8\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tprocessingInput = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tword += command.charAt(i);\t\t\t\t\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t\t//end\r\n\t}", "@Override\n public void execute(final Runnable command) {\n WorkerThread actorThread = startActorThread();\n WorkerRef<Runnable> actor = actorThread.bindActor(Runnable.class, command);\n actor.tell().run();\n actorThread.stop();\n }", "public interface Command {\n\t public String execute(String[] request);\n}", "@Override\n public void post(java.lang.Runnable command) {\n mHandler.post(command);\n }", "private boolean processCommand(Command command) \n {\n boolean wantToQuit = false;\n\n CommandWord commandWord = command.getCommandWord();\n\n switch (commandWord) \n {\n case UNKNOWN:\n System.out.println(\"I don't know what you mean...\");\n break;\n\n case HELP:\n printHelp();\n break;\n\n case GO:\n goRoom(command);\n break;\n\n //my command expect when i Quit\n case PICK:\n pickItem();\n break;\n \n //drink the redbull\n case DRINK:\n drink();\n break;\n \n //show inventory\n case SHOW:\n showInventory();\n break;\n \n //show objective\n case GOAL:\n remindGoal();\n break;\n\n case QUIT:\n wantToQuit = quit(command);\n break;\n }\n return wantToQuit;\n }", "public void handleResponse(byte[] result, Command originalCommand);", "public void handleCommand(\n String command, HttpServletRequest request, HttpServletResponse response) {\n JSONObject retValue = null;\n response.setContentType(\"application/json\");\n boolean isPost = \"POST\".equals(request.getMethod());\n try {\n if (command.equals(UPLOAD_TOKEN_PATH)) {\n \t \n \t // Generate an upload path\n \t BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();\n \t retValue = new JSONObject();\n \t // TODO: URL should be based on current env (e.g., mapreduce path may not be consistent)\n \t retValue.put(\"url\", blobstoreService.createUploadUrl(\"/mapreduce/command/upload\"));\n \t \n } else if (command.equals(LIST_CONFIGS_PATH) && !isPost) {\n \n MapReduceXml xml;\n try {\n xml = MapReduceXml.getMapReduceXmlFromFile();\n retValue = handleListConfigs(xml);\n } catch (FileNotFoundException e) {\n retValue = new JSONObject();\n retValue.put(\"status\", \"Couldn't find mapreduce.xml file\");\n }\n } else if (command.equals(LIST_JOBS_PATH) && !isPost) {\n String cursor = request.getParameter(\"cursor\");\n String countString = request.getParameter(\"count\");\n int count = DEFAULT_JOBS_PER_PAGE_COUNT;\n if (countString != null) {\n count = Integer.parseInt(countString);\n }\n \n retValue = handleListJobs(cursor, count);\n } else if (command.equals(CLEANUP_JOB_PATH) && isPost) {\n retValue = handleCleanupJob(request.getParameter(\"mapreduce_id\"));\n } else if (command.equals(ABORT_JOB_PATH) && isPost) {\n retValue = handleAbortJob(request.getParameter(\"mapreduce_id\"));\n } else if (command.equals(GET_JOB_DETAIL_PATH) && !isPost) {\n retValue = handleGetJobDetail(request.getParameter(\"mapreduce_id\"));\n } else if (command.equals(START_JOB_PATH) && isPost) {\n Map<String, String> templateParams = new TreeMap<String, String>();\n Map httpParams = request.getParameterMap();\n for (Object paramObject : httpParams.keySet()) {\n String param = (String) paramObject;\n if (param.startsWith(\"mapper_params.\")) {\n templateParams.put(param.substring(\"mapper_params.\".length()),\n ((String[]) httpParams.get(param))[0]);\n }\n }\n retValue = handleStartJob(templateParams, ((String []) httpParams.get(\"name\"))[0], request);\n } else {\n response.sendError(404);\n return;\n }\n } catch (Throwable t) {\n log.log(Level.SEVERE, \"Got exception while running command\", t); \n try {\n retValue = new JSONObject(); \n retValue.put(\"error_class\", t.getClass().getName());\n retValue.put(\"error_message\",\n \"Full stack trace is available in the server logs. Message: \"\n + t.getMessage());\n } catch (JSONException e) {\n throw new RuntimeException(\"Couldn't create error JSON object\", e);\n }\n }\n try {\n retValue.write(response.getWriter());\n response.getWriter().flush();\n } catch (JSONException e) {\n throw new RuntimeException(\"Couldn't write command response\", e);\n } catch (IOException e) {\n throw new RuntimeException(\"Couldn't write command response\", e);\n }\n }", "private void handleCommand(String commands) throws IOException {\n String[] command = commands.split(String.valueOf(Command.DELIMITER));\n String cmdResult;\n if (command[0].equalsIgnoreCase(String.valueOf(Command.PLAYER_JOINED))) {\n // handlePlayerJoined\n handlePlayerJoined(command[1]);\n } else if (command[0].equalsIgnoreCase(String.valueOf(Command.UPDATE_COLOR))) {\n // handleUpdateColor\n handleColorUpdate(Color.fromString(command[1]));\n } else if (command[0].equalsIgnoreCase(String.valueOf(Command.SYNC_BOARD))) {\n // handleSyncBoard\n updateBoard(command);\n } else if (command[0].equalsIgnoreCase(String.valueOf(Command.MAKE_MOVE))) {\n // handleMakeMove\n handleMove();\n\n\n// } else if (command.equals(Character.toString(ProtocolMessages.EXIT))) {\n// in.close();\n// out.close();\n// sock.close();\n } else {\n clientTUI.showMessage(\"Check your parameters\");\n try {\n sendMessage(\"Unknown Command\");\n } catch (ServerUnavailableException e) {\n e.printStackTrace();\n }\n }\n }", "public interface CommandBus {\n void registerHandler(final CommandHandler<? extends DomainCommand> handler);\n CommandResponse push(final DomainCommand command);\n void pushAndForget(final DomainCommand command);\n}", "private void processSingleCmd(final String[] cmdArgs) {\n\n switch (cmdArgs[0].toUpperCase()) {\n\n case \"PLACE\":\n logger.info(\"PLACE - Request received\");\n GridLocation location = new GridLocation( Integer.parseInt(cmdArgs[1]),\n Integer.parseInt(cmdArgs[2]),\n GridLocation.FACING.valueOf(cmdArgs[3]));\n placeHolder = Optional.of( new Robot(location) );\n break;\n\n case \"MOVE\":\n logger.info(\"MOVE - Request received\");\n if (placeHolder.isPresent()) {\n placeHolder.get().move();\n }\n break;\n\n case \"LEFT\":\n logger.info(\"LEFT - Request received\");\n if (placeHolder.isPresent()) {\n placeHolder.get().left();\n }\n break;\n\n case \"RIGHT\":\n logger.info(\"RIGHT - Request received\");\n if (placeHolder.isPresent()) {\n placeHolder.get().right();\n }\n break;\n\n case \"REPORT\":\n logger.info(\"REPORT - Request received\");\n if (placeHolder.isPresent()) {\n placeHolder.get().report();\n }\n break;\n\n default:\n logger.info(\"NO Intelligible - Request received\");\n // Unable to match any command - ignore\n break;\n }\n }", "@FXML\n\tpublic void onProcessCommand() {\n\t\tString command = prompt.getText().trim();\n\t\tif (!command.isEmpty()) {\n\t\t\t// Print what the user entered to the screen\n\t\t\tscreen.appendText(\"> \" + command + \"\\n\");\n\t\t\tswitch (command) {\n\t\t\t\tcase \"clear\":\n\t\t\t\t\tscreen.clear();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// Print the output of the commandName\n\t\t\t\t\tscreen.appendText(commandDispatch.processCommand(command) + \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Clear the prompt - ready for new input\n\t\t\tprompt.clear();\n\t\t}\n\t}", "public void execute(Command command){\n command.run(field);\n }", "private void handleCommand(String command, Update update){\r\n\t\tSendMessage message= new SendMessage();\t\t\r\n\t\tLong chatId = update.getMessage().getChatId();\r\n\t\tswitch (command){\r\n\t\tcase BotConfig.START_COMMAND:\t\t\t\t\r\n\t\t\tmessage.setText(BotConfig.WELCOME_STRING);\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.HELP_COMMAND:\t\t\t\r\n\t\t\tmessage.setText(BotConfig.HELP_STRING);\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.POLL_COMMAND:\t\t\t\r\n\t\t\tmessage.setText(BotConfig.POLL_STRING);\r\n\t\t\tpoll = new Poll();//Iniciamos la clase...\r\n\t\t\tisPolling = true;//\"Encendemos\" el modo encuesta.\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.POLL_COMMAND_DONE:\r\n\t\t\tisPolling = false;//Reiniciamos la variable al finalizar el comando.\r\n\t\t\thaveQuestion = false;//Reiniciamos la variable para la pregunta.\r\n\t\t\tsendSurvey = true;//Marcamos para enviar la encuesta.\t\t\t\t\r\n\t\t\tmessage.setText(BotConfig.POLL_DONE_STRING);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}\t\t\r\n\t\ttry {\r\n\t\t\tmessage.setChatId(chatId);\r\n\t\t\texecute(message);//Enviamos el mensaje... \r\n if (sendSurvey == true){ \t\r\n \t\r\n \texecute(poll.sendFinishedSurvey(chatId, poll.createSurveyString(poll.createSurvey())));//Enviamos encuesta antes de compartir.\r\n \tsendSurvey = false;//Marcamos como no enviada despues de haberlo hecho.\r\n }\r\n } catch (TelegramApiException e) {\r\n \tBotLogger.error(LOGTAG, e);//Guardamos mensaje y lo mostramos en pantalla de la consola.\r\n e.printStackTrace();\r\n }\r\n\t}", "private void handleCompleteCommand(Command command) {\n if (command.getCommandStatus() == CommandStatus.COMPLETE) {\n List<Frame> frames = commandToFrames(command);\n frames.forEach(frame -> connection.addFrameToSend(frame));\n } else {\n //throw exception\n }\n }", "public void process() {\r\n\t\tdisplayMenu();\r\n\t\tint command = getCommand();\r\n\t\twhile (command != EXIT) {\r\n\t\t\tswitch (command) {\r\n\t\t\tcase ADD_CUSTOMER:\r\n\t\t\t\taddCustomer();\r\n\t\t\t\tbreak;\r\n\t\t\tcase ADD_MODEL:\r\n\t\t\t\taddWasher();\r\n\t\t\t\tbreak;\r\n\t\t\tcase ADD_TO_INVENTORY:\r\n\t\t\t\taddToInventory();\r\n\t\t\t\tbreak;\r\n\t\t\tcase PURCHASE:\r\n\t\t\t\tpurchase();\r\n\t\t\t\tbreak;\r\n\t\t\tcase LIST_CUSTOMERS:\r\n\t\t\t\tlistCustomers();\r\n\t\t\t\tbreak;\r\n\t\t\tcase LIST_WASHERS:\r\n\t\t\t\tlistWashers();\r\n\t\t\t\tbreak;\r\n\t\t\tcase DISPLAY_TOTAL:\r\n\t\t\t\tdisplayTotal();\r\n\t\t\t\tbreak;\r\n\t\t\tcase SAVE:\r\n\t\t\t\tsave();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tdisplayMenu();\r\n\t\t\tcommand = getCommand();\r\n\t\t}\r\n\t\tSystem.out.println(\"Goodbye.\");\r\n\t}", "private void executeCommand() {\n Command command = null;\n\n switch (commandType) {\n case LIST:\n command = new ListCommand(taskManager, parameterData.getDescription());\n break;\n case DONE:\n command = new DoneCommand(taskManager, parameterData.getTaskNumber());\n break;\n case TODO:\n command = new AddCommand(taskManager, TaskType.TODO, parameterData.getDescription());\n break;\n case DEADLINE:\n command = new AddCommand(taskManager,\n TaskType.DEADLINE, parameterData.getDescription(),\n parameterData.getDateTime());\n break;\n case EVENT:\n command = new AddCommand(taskManager,\n TaskType.EVENT, parameterData.getDescription(),\n parameterData.getDateTime());\n break;\n case DELETE:\n command = new DeleteCommand(taskManager, parameterData.getTaskNumber());\n break;\n case BYE:\n command = new ByeCommand(taskManager);\n break;\n case FIND:\n command = new FindCommand(taskManager,\n parameterData.getFilterString(),\n parameterData.getMatchDate(),\n parameterData.getTimeSearch());\n break;\n case HELP:\n command = new HelpCommand(taskManager);\n break;\n default:\n commandUi.printNoCommandRan();\n }\n\n try {\n command.execute();\n } catch (IndexOutOfBoundsException e) {\n commandUi.printTaskDoneNotInRange();\n } catch (IllegalStateException e) {\n commandUi.printInvalidParameters();\n }\n }", "private void sendCommand(String msg) throws InterruptedException {\n commandQueue.put(msg);\n selector.wakeup();\n }", "private void handleInvocationCommand() throws IOException, ClassNotFoundException {\r\n final Object context = m_in.readObject();\r\n final String handle = (String) m_in.readObject();\r\n final String methodName = (String) m_in.readObject();\r\n final Class[] paramTypes = (Class[]) m_in.readObject();\r\n final Object[] args = (Object[]) m_in.readObject();\r\n Object result = null;\r\n try {\r\n result = m_invoker.invoke(handle, methodName, paramTypes, args, context);\r\n } catch (Exception e) {\r\n result = e;\r\n }\r\n m_out.writeObject(result);\r\n m_out.flush();\r\n }", "@Override\n public void execute() {\n this.context.setToken(new Token(context.getLexemeType(), context.getLexemeBuffer().toString()));\n this.context.getLexemeBuffer().setLength(0);\n if (command != null) {\n command.execute();\n }\n }", "@Override\n protected Void doInBackground(String... strings) {\n try {\n this.socket = new Socket(strings[0], Integer.parseInt(strings[1]));\n this.buffer = new DataOutputStream(this.socket.getOutputStream());\n while(true) {\n this.buffer.write((commandQueue.take()+\"\\r\\n\").getBytes());\n this.buffer.flush();\n }\n }\n catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n return null;\n }", "public process dequeue() {\n\t\treturn queue.removeFirst();\n\t}", "public interface CommandSender \n{\n /**\n * Handle a respond from the robot.\n * @param result The result.\n * @param originalCommand The command which was sent to the robot.\n */\n public void handleResponse(byte[] result, Command originalCommand);\n \n /**\n * Handle an error that occured when communicating to the robot.\n * @param code The error code that was sent by the robot.\n */\n public void handleError(int code);\n \n /**\n * Needed when sending a command repetitively to the robot.\n * @return The command string that should be used.\n */\n public Command getCurrentCommand();\n \n}", "public String getUnprocessedCommand() {\n if (currentIndex == 0) {\n // Not necessary but saves initialising a redundant string object\n return command;\n }\n if (isComplete()) {\n /* If there's no remaining command, return an empty string. This allows us to use the String\n * pool and avoid StringIndexOutOfBoundsExceptions. */\n return \"\";\n }\n return command.substring(currentIndex);\n }", "protected String processCommand(String command)\n {\n switch (command)\n {\n case \"HELLO\":\n return \"h\";\n case \"MOVE N\":\n return \"mn\";\n case \"MOVE S\":\n return \"ms\";\n case \"MOVE E\":\n return \"me\";\n case \"MOVE W\":\n return \"mw\";\n case \"PICKUP\":\n return \"p\";\n case \"LOOK\":\n return \"l\";\n case \"QUIT\":\n return \"q\";\n default:\n return \"i\";\n }\n }", "@Override\n\tpublic void execute(ByteBuffer buff) {\n\t\t\n\t}", "@Override\n public void run() {\n try {\n Request command = (Request) cmdInStream.readObject();\n while (!\"EXIT\".equalsIgnoreCase(command.getContent())) {\n log.info(String.format(\"Received command: %s\", command.getContent()));\n\n // Searching for appropriate handler for received request\n RequestHandler request = handlers.get(command.getContent());\n if (request != null) {\n // Processing request and writing response\n Response response = request.handle(command);\n cmdOutStream.writeObject(response);\n }\n else {\n cmdOutStream.writeObject(new Response(\"Incorrect request. Please try again.\"));\n }\n\n // Read next command\n command = (Request) cmdInStream.readObject();\n }\n\n cmdInStream.close();\n cmdOutStream.close();\n\n fileInStream.close();\n fileOutStream.close();\n\n cmdSocket.close();\n fileSocket.close();\n }\n catch (ClassNotFoundException ex) {\n log.error(\"Class can't be found! \" + ex.getMessage());\n }\n catch (IOException ex) {\n log.error(ex.getMessage());\n }\n }", "@Override\r\n\tpublic void handle(I_ConnectionHandler connection, String command) throws Exception {\n\t}", "void readCommand(String command) throws IOException, ClassNotFoundException, InterruptedException;" ]
[ "0.72095084", "0.7159484", "0.6782699", "0.6767279", "0.6697123", "0.66710895", "0.6650539", "0.6368864", "0.63664883", "0.63354856", "0.6321215", "0.62673265", "0.62461036", "0.62345207", "0.61964965", "0.61886007", "0.61867905", "0.6181925", "0.6181433", "0.6112432", "0.6095672", "0.6039344", "0.60320836", "0.60257864", "0.6007464", "0.6003974", "0.59637606", "0.5949839", "0.59204346", "0.5919221", "0.5917442", "0.5891851", "0.589144", "0.58901906", "0.5889402", "0.58685094", "0.58662266", "0.58246493", "0.581122", "0.5793221", "0.5790331", "0.578134", "0.57812995", "0.577966", "0.5772737", "0.57690483", "0.57633996", "0.5758461", "0.573714", "0.5726391", "0.57206714", "0.5720238", "0.5711656", "0.5707525", "0.5698354", "0.5695529", "0.56920135", "0.56891525", "0.56864893", "0.5678871", "0.5677723", "0.56654996", "0.5614434", "0.5610496", "0.56104183", "0.560952", "0.5609484", "0.56088406", "0.55902594", "0.55833524", "0.5579745", "0.5577323", "0.55661035", "0.5561795", "0.5557839", "0.55560285", "0.55372864", "0.55242443", "0.5516965", "0.5506778", "0.550628", "0.5492839", "0.5490373", "0.5487662", "0.5485465", "0.54811966", "0.5478184", "0.54713255", "0.5467571", "0.54543287", "0.5446776", "0.5443463", "0.54348403", "0.5430913", "0.5430485", "0.5420801", "0.54187655", "0.54152775", "0.5414286", "0.54071623" ]
0.79801375
0
Launch the server thread and the console thread
public void launch() throws IOException { sc.configureBlocking(false); var key = sc.register(selector, SelectionKey.OP_CONNECT); mainContext = new MainContext(key, pseudo, this); key.attach(mainContext); treatCommand = new TreatCommand(privateContextMap, mainContext, pseudo, this); sc.connect(serverAddress); console.start(); while (!Thread.interrupted()) { try { selector.select(this::treatKey); processCommands(); } catch (UncheckedIOException tunneled) { throw tunneled.getCause(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n new ServerControl().start();\n new UserMonitor().start();\n boolean listening = true;\n //listen for connection attempt and handle it accordingly\n try (ServerSocket socket = new ServerSocket(4044)) {\n while (listening) {\n new AwaitCommand(Singleton.addToList(socket.accept())).start();\n System.out.println(\"Connection started...\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tThread t = new Thread(new Server());\n\t\tt.start();\n\t\ttry {\n\t\t\tt.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run(){\r\n\t\tSystem.out.println(\"Launching Server\");\r\n\t\tServer srv = new Server(log);\r\n\t\tnew CollectorServer(srv).start();\r\n\t\ttry {\r\n\t\t\tnew ServerUDPThread(srv).start();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error in ServerUDP Broadcast\");\r\n\t\t}\r\n\t}", "public void run() {\n running = true;\n System.out.println(\"Server started on port: \" + port);\n manageClients();\n receive();\n startConsole();\n }", "public void start() {\n threadPoolExecutor.setCorePoolSize(configurations.threadPoolSize());\n new Thread(this::startServer).start();\n }", "public static void main(String[] args){\n\n Executors.newSingleThreadExecutor().execute(new Runnable() {\n public void run() {\n System.out.println(\"Starting\");\n new ScheduleExecutor();\n }\n });\n\n new Server(5821, 10).launch();\n\n }", "public void run(){\n\t\tstartServer();\n\t}", "private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}", "@Override\n public void run() {\n //start the threads\n t1.start();\n t2.start();\n\n LOGGER.log(Level.FINE, \"Starting Server...\");\n\n //wait for the threads to exit.\n try {\n t1.join();\n t2.join();\n } catch (InterruptedException ex) {\n }\n\n //halt (clean up resources).\n halt();\n }", "private void runServer() {\n while(true) {\n // This is a blocking call and waits until a new client is connected.\n Socket clientSocket = waitForClientConnection();\n handleClientInNewThread(clientSocket);\n } \n }", "public static void main(String[] args) {\n\t\t\n\t\tRunnable server = new ServerWorker(3000);\n\t\tnew Thread(server).start();\n\n\t\ttry {\n\t\t Thread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "public void run() {\n\t\trun(null, CommunicationDefaults.CONSOLE_PORT);\n\t}", "public void runServer()\n\t{\n\t\taddText(\"Server started at \" + LocalDateTime.now());\n\t\t\n\t\tint cnt = 0;\n\t\twhile(true)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// Accept a request\n\t\t\t\taddText(\"Server is waiting for connection....\");\n\t\t\t\tSocket client = server.accept();\n\t\t\t\tConnectionThread connect = new ConnectionThread(client);\n\t\t\t\t\n\t\t\t\t// Show message\n\t\t\t\taddText(\"Server is connect!\");\n\t\t\t\taddText(\"Player\" + cnt + \"'s IP address is\" + client.getInetAddress());\n\t\t\t\tcnt++;\n\t\t\t\t\n\t\t\t\t// Add to List\n\t\t\t\tconnectionPool.add(connect);\n\t\t\t\t\n\t\t\t\t// If at least two players, Start the game\n\t\t\t\taddText(\"Pool has \" + connectionPool.size() + \" connection\");\n\t\t\t\tif(connectionPool.size() >= 2)\n\t\t\t\t\tclientStart();\n\t\t\t\t\n\t\t\t\t// Start connectionThread\n\t\t\t\tconnect.start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void startConsole() {\n console = new Thread(\"Console\") {\n @SuppressWarnings(\"ForLoopReplaceableByForEach\")\n public void run() {\n String input;\n Scanner scanner = new Scanner(System.in);\n while (running) {\n input = scanner.nextLine();\n if (input.equals(\"help\")) {\n System.out.println(\"Welcome to the Server command help!\");\n System.out.println(\"Usage: [command] <parameter>\");\n System.out.println(\"\\n---COMMANDS--\");\n System.out.println(\"help - Shows the help menu for all the commands\");\n System.out.println(\"exit - Exits the server and kicks all connected clients\");\n System.out.println(\"kick <client_id> - Kicks the client with specified id\");\n System.out.println(\"port - Shows the current port the server is running on\");\n System.out.println(\"address - Shows the current address(s) of the server\");\n System.out.println(\"clients - Shows the current user(s) online/displaying their ID\");\n } else if (input.equals(\"exit\")) {\n\n } else if (input.startsWith(\"kick\")) {\n int clientID = Integer.parseInt(input.substring(5, input.length()));\n ServerClient c = null;\n for (int i = 0; i < clients.size(); i++) {\n if (clients.get(i).getID() == clientID)\n c = clients.get(i);\n }\n if (c == null) {\n System.out.println(\"No client with the ID \" + clientID + \" was available to kick!\");\n continue;\n }\n send(\"/k//e/\".getBytes(), c.getAddress(), c.getPort());\n } else if (input.equals(\"port\")) {\n System.out.println(\"The server is running on port \" + port + \".\");\n } else if (input.equals(\"address\")) {\n BufferedReader in = null;\n try {\n URL whatismyip = new URL(\"http://checkip.amazonaws.com\");\n in = new BufferedReader(new InputStreamReader(whatismyip.openStream()));\n String ip = in.readLine();\n System.out.println(\"Server is running on the external IP of: \" + ip + \":\" + port);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n } else if (input.equals(\"clients\")) {\n System.out.println(\"Found \" + clients.size() + \" clients.\");\n for (int i = 0; i < clients.size(); i++) {\n ServerClient c = clients.get(i);\n System.out.println(c.getName() + \"(\" + c.getID() + \"): \" + c.getAddress() + \":\" + c.getPort());\n }\n } else {\n System.out.println(\"That is not a command, type 'help' for more...\");\n }\n }\n }\n };\n console.start();\n }", "public static void main (String[] args){\r\n\t\tnew Server().startRunning();\r\n\t}", "public static void main(String[] args) {\n\t\tServer server = new Server();\n\t\tnew Thread(server).start();\n\n\t}", "public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }", "@Test\r\n public void startServerAndThreads() throws IOException {\r\n //init\r\n InetAddress iPAddress = InetAddress.getByName(\"localhost\");\r\n int port = 99;\r\n\r\n Server server = new Server(port, iPAddress);\r\n server.start();\r\n }", "public void run(){\n\t\tinputStreamReader = new InputStreamReader(System.in);\r\n\t\tin = new BufferedReader( inputStreamReader );\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\" + Application.APPLICATION_VENDOR + \" \" + Application.APPLICATION_NAME + \" \" + Application.VERSION_MAJOR + \".\" + Application.VERSION_MINOR + \".\" + Application.VERSION_REVISION + \" (http://ThreatFactor.com)\");\r\n\t\t//System.out.println(\"We are here to help, just go to http://ThreatFactor.com/\");\r\n\t\t\r\n\t\tif( application.getNetworkManager().sslEnabled() )\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 443 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 80 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Interactive console, type help for list of commands\");\r\n\t\t\r\n\t\tcontinueExecuting = true;\r\n\t\twhile( continueExecuting ){\r\n\r\n\t\t\tSystem.out.print(\"> \");\r\n\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tString text = in.readLine();\r\n\t\t\t\t\r\n\t\t\t\tif( continueExecuting && text != null ){\r\n\t\t\t\t\tcontinueExecuting = runCommand( text.trim() );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(AsynchronousCloseException e){\r\n\t\t\t\t//Do nothing, this was likely thrown because the read-line command was interrupted during the shutdown operation\r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\t//Catch the exception and move on, the console listener must not be allowed to exit\r\n\t\t\t\tSystem.err.println(\"Operation Failed: \" + e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t\t//Stop listening. Otherwise, an exception loop may occur. \r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }", "public void startRunning(){\r\n\t\ttry{\r\n\t\t\twhile( true ){\r\n\t\t\t\tserver = new ServerSocket(PORT);\r\n\t\t\t\ttry{\r\n\t\t\t\t\twaitForClient(1);\r\n\t\t\t\t\twaitForClient(2);\r\n\t\t\t\t\tnew ServerThread(connectionClient1, connectionClient2, this).start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch( EOFException e ){\r\n\t\t\t\t\tshowMessage(\"\\nServer ended the connection\");\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tserver.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch( IOException e ){\r\n\t\t}\r\n\t}", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "private void runServer()\n {\n int port = Integer.parseInt(properties.getProperty(\"port\"));\n String ip = properties.getProperty(\"serverIp\");\n \n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Server started. Listening on: {0}, bound to: {1}\", new Object[]{port, ip});\n try\n {\n serverSocket = new ServerSocket();\n serverSocket.bind(new InetSocketAddress(ip, port));\n do\n {\n Socket socket = serverSocket.accept(); //Important Blocking call\n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Connected to a client. Waiting for username...\");\n ClientHandler ch = new ClientHandler(socket, this);\n clientList.add(ch);\n ch.start();\n } while (keepRunning);\n } catch (IOException ex)\n {\n Logger.getLogger(ChatServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private static void startServer() {\n new Thread() {\n public void run() {\n Server server = new Server();\n server.startUDP();\n }\n }.start();\n }", "public static void main(String[] args) {\n\n Server server = new Server();\n // Accepts any new connections and opens a new socket for data transfer\n while (true) {\n Socket connectionSocket = server.AcceptIncomingConnections();\n if (connectionSocket != null) {\n new Thread(new ServerInstance(connectionSocket)).start();\n } else {\n // Error accepting , terminate server\n System.out.println(\"Error accepting incoming connections. Server shutting down\");\n break;\n }\n }\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tinitialiseServer(args[0]);\n\t\t\twhile (running == true) {\n\t\t\t\tif (((numLiveThreads.get()) == 0) && (running == false)) {\n\t\t\t\t\tshutdown();\n\t\t\t\t}\n\t\t\t\thandleIncomingConnection();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\toutputServiceErrorMessageToConsole(e.getMessage());\n\t\t} finally {\n\t\t\tshutdown();\n\t\t}\n\t}", "public static void main(String[] args) {\n\n try (ServerSocket ss = new ServerSocket(PORT)) {\n System.out.println(\"chat.Server is started...\");\n System.out.println(\"Server address: \" + getCurrentIP() + \":\" + PORT);\n\n while (true) {\n Socket socket = ss.accept();\n new Handler(socket).start();\n }\n\n } catch (IOException e) {\n System.out.println(\"chat.Server error.\");\n }\n }", "public static void main(String[] args) throws Exception {\n\t\tServerSocket welcomeSocket = new ServerSocket(6789);\n\t\tSystem.out.println(\"The chat server is running.\");\n\n\t\twhile (true) {\n\t\t\tMessenger request = new Messenger(welcomeSocket.accept());\n\n\t\t\tThread thread = new Thread(request);\n\t\t\t// Start the thread.\n\t\t\tthread.start();\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n final WindowServer server = new WindowServer();\n server.start();\n server.blockUntilShutdown();\n }", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "public void run() { wait for the launcher script to talk to us\n //\n try {\n ssocket.setSoTimeout(30 * 1000); // 30 seconds\n socket = ssocket.accept();\n socket.setSoTimeout(3 * 60 * 1000);\n socket.setTcpNoDelay(true);\n } catch (SocketTimeoutException stmo) {\n String msg = \"timeout error on initial connection from \" + execName();\n task.log(msg, Project.MSG_ERR);\n failure = new BuildException(msg);\n } catch (Exception e) {\n String err = \"error establishing communication with \" + execName();\n String msg = e.getMessage();\n if (msg != null) {\n err = err + \": \" + msg;\n } else {\n err = err + \": \" + e;\n }\n task.log(err, Project.MSG_ERR);\n failure = new BuildException(err);\n }\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tJTextArea output = new JTextArea();\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tJFrame frame = new JFrame(\"server\");\n\t\tPrintStream stream = new PrintStream(new NewOutputStream(output));\n\t\tSystem.setOut(stream);\n\t\tSystem.setErr(stream);\n\n\t\toutput.setEditable(false);\n\t\toutput.setBackground(Color.BLACK);\n\t\toutput.setForeground(Color.WHITE);\n\t\toutput.setFont(Font.createFont(Font.TRUETYPE_FONT, new File(\"res/pixelfont.ttf\")).deriveFont(28f));\n\t\tpanel.add(output);\n\t\tframe.add(panel);\n\t\t\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(800, 600); \n\t\tframe.setVisible(true);\n\t\t\n\t\tSystem.out.println(\"Starting server...\");\n\t\t\n\t\ttry{\n\t\t\t\n\t\tint port = threads.startServer();\n\t\tSystem.out.println(\"Server started on port \" + port + \"!\");\n\t\t\n\t\tthreads.startThread();\n\t\t\n\t\t} catch (BindException error) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t}", "private void runServer()\n\t{\n\t\tif(sm == null)\n\t\t{\n\t\t\tsm = new ServerManager();\n\t\t}\n\t\t\n\t\tint port = 1209;\n\t\ttry \n\t\t{\n\t\t\twaitUser(sm, port);\n\t\t\t//이 아래 로직이 실행된다는건 유저가 다 들어왔다는 뜻임. 즉 게임 시작할 준비 되었음을 의미함\t\t\t\n\t\t\tGame.getInstance().runGame();\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[Server.runServer()] error >>> : \" + e.getMessage());\n\t\t}\n\t}", "public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }", "public static void main(String[] args) {\n\t\ttry{\n\t\t\tServerSocket socket = new ServerSocket(5004);\n\t\t\tSystem.out.println(\"Server is up and running!!!\");\n\t\t\twhile(true){\n\t\t\t\tSocket serverSocket = socket.accept();\n\t\t\t\t//thread creation\n\t\t\t\tThread t = new Thread(new PeerConnect(serverSocket));\n\t\t\t\tt.start();\n\t\t\t}\t\t\n\t\t}\n\t\tcatch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n ServerSocket serverSocket = null;\n \n /* Create the server socket */\n try {\n serverSocket = new ServerSocket(9999);\n } catch (IOException e) {\n System.out.println(\"IOException: \" + e);\n System.exit(1);\n }\n room r = new room(\"Lobby\");\n ChatServerThread.addRoom(r);\n /* In the main thread, continuously listen for new clients and spin off threads for them. */\n while (true) {\n try {\n /* Get a new client */\n Socket clientSocket = serverSocket.accept();\n \n /* Create a thread for it and start! */\n ChatServerThread clientThread = new ChatServerThread(clientSocket);\n ChatServerThread.addClient(clientThread);\n new Thread(clientThread).start();\n\n } catch (IOException e) {\n System.out.println(\"Accept failed: \" + e);\n System.exit(1);\n }\n }\n }", "public void startServer() {\n server.start();\n }", "public void run()\n {\n Utilities.debugLine(\"WebServer.run(): Runing Web Server\", DEBUG);\n\n running = true;\n\n ServerSocketConnection ssc;\n try\n {\n ssc = (ServerSocketConnection) Connector.open(\"socket://:\" + PORT);\n\n do\n {\n Utilities.debugLine(\"WebServer.run(): Socket Opened, Waiting for Connection...\", DEBUG);\n SocketConnection sc = null;\n sc = (SocketConnection) ssc.acceptAndOpen();\n Thread t = new Thread(new ConnectionHandler(sc));\n t.setPriority(Thread.MIN_PRIORITY);\n t.start();\n\n//--------------------------------------- DEBUG THREAD NUMBER ---------------------------------\n try\n {\n System.out.println(\"Active Threads: \" + Thread.activeCount());\n }\n catch (Exception e)\n {\n System.out.println(\"There was an eror getting the thread count.\");\n }\n//--------------------------------------- DEBUG THREAD NUMBER ---------------------------------\n\n }\n while (running);\n ssc.close();\n }\n\n catch (Exception e)\n {\n Utilities.debugLine(e.toString() + e.getMessage(), true);\n }\n }", "public static void main(String[] args) throws Exception {\n System.out.println(\"The chat server is running.\");\n ServerSocket listener = new ServerSocket(PORT);\n try {\n while (true) {\n new Handler(listener.accept()).start();\n }\n } finally {\n listener.close();\n }\n }", "private void launchRemote(Stage stage) throws Exception { \n\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\"); \n\t\t\n\t\t// thread of the server connecting to the game and of the game \n\t\tThread serverThread = new Thread(() -> { \n\t\t\tRemotePlayerServer server = new RemotePlayerServer(new GraphicalPlayerAdapter()); \n\t\t\tserver.run(); \n\t\t }); \n\t\tserverThread.setDaemon(true); \n\t\tserverThread.start(); \n\t }", "@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }", "public void start() {\n system = ActorSystem.create(\"http-server\", config);\n\n Settings settings = SettingsExtension.SettingsExtensionProvider.get(system);\n\n vHostHandlers = settings.vHostConfigs()\n .stream()\n .map(vc -> new AkkaTcpHandler(system, vc))\n .collect(Collectors.toList());\n\n vHostHandlers.forEach(VHostHandler::start);\n\n Runtime.getRuntime().addShutdownHook(new Thread(this::terminate));\n }", "public synchronized void start() {\n\t\trunning=true;\n\t\tnew Thread(this).start();\n\t\t\n\t\tif(JOptionPane.showConfirmDialog(this, \"Do you want to run the server\")==0){\n\t\t\tsocketServer = new GameServer(this);\n\t\t\tsocketServer.start();\n\t\t\t\n\t\t}\n\t\tsocketClient=new GameClient(this, \"localhost\");\n\t\tsocketClient.start();\n\t}", "public void start() throws IOException{\n\t\tSystem.out.println(\"starting new chatclient with socket ID ...\"); //socketID is currently determined in chatserverthread so inaccessible\n\t\tstrOut = new DataOutputStream(new BufferedOutputStream (socket.getOutputStream()) );\n\t\tconsole = new BufferedReader(new InputStreamReader(System.in)); //sets up environment for client msgs\n\t\n\t\t//Note: Later, Rather than reading in the console, data must be retrieved consistently from the GUI\n\t\t//Try again\n\t\t\n\t\tif(thread == null){\n\t\t\tclient = new ChatClientThread(this, socket);\n\t\t\tthread = new Thread(this);\n\t\t\tthread.start();\n\t\t\t//Where should this go?\n\t\t\t//Is there another way to start a gui for each new client?\n\t\t\t//Does the run method in here interfere with the run method below?\n\t\t}\n\t\t\n\t}", "private void consoleRun() {\n try {\n var scan = new Scanner(System.in);\n while (scan.hasNextLine()) {\n var msg = scan.nextLine();\n sendCommand(msg);\n }\n } catch (InterruptedException e) {\n logger.info(\"Console thread has been interrupted\");\n } finally {\n logger.info(\"Console thread stopping\");\n }\n }", "public static void main(String[] args) {\n startServer();\n Application.launch(GUI.class, args);\n }", "@Override\n public void run() {\n //Create server socket\n try (ServerSocket serverSocket = new ServerSocket(serverPort))\n {\n //In loop to continuously accept connections from client\n //main thread doing this\n while (true)\n {\n System.out.println(\"Waiting for client(s) to connect..\");\n //Socket represents connection to client\n Socket clientSocket = serverSocket.accept();\n System.out.println(\"Accepted connection from \" + clientSocket);\n //Message to write to client when connected via outputstream\n OutputStream outputStream = clientSocket.getOutputStream();\n outputStream.write((\"You have connected. Please write: login <username> to login!\\n\" + \"Write <help> for list of additional commands!\\n\").getBytes());\n //Server worker, handles communication with client socket\n ServerWorker worker = new ServerWorker(this, clientSocket);\n //Adding worker to workerlist\n workerList.add(worker);\n //Starting thread worker\n worker.start();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n \tWelcome console = null;\n\t\ttry {\n\t\t\t//console = new Welcome(conn);\n\t\t\tconsole = new Welcome();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \tconsole.start();\n }", "protected void mainTask() {\n\ttry {\n\t socket = serverSocket.accept();\t\n\t spawnConnectionThread(socket);\n\t} catch (IOException e) {\n\t return;\n\t}\n }", "public void run() {\n\t\ttry {\n\t\t\tinternalSocket = new Socket(\"localhost\", getPort());\n\t\t\tin = new ObjectInputStream(socket.getInputStream());\n\n\t\t\tinternalOut = new ObjectOutputStream(\n\t\t\t\t\tinternalSocket.getOutputStream());\n\t\t} catch (IOException e1) {\n\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\treturn;\n\t\t}\n\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tString message = in.readUTF();\n\n\t\t\t\t// take message and redirect this message to\n\t\t\t\t// second console\n\t\t\t\tsendMessage(message);\n\n\t\t\t\tif (message.equalsIgnoreCase(\"bye\")) {\n\t\t\t\t\tclose();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (Exception efEx) {\n\t\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\t\ttry {\n\t\t\t\t\tclose();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tconsoleOut(MESSAGE_ERROR_EXEC);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private void runProgram() {\n\n try {\n ServerSocket ss = new ServerSocket(8088);\n Dispatcher dispatcher = new Dispatcher(allmsg,allNamedPrintwriters,clientsToBeRemoved);\n Cleanup cleanup = new Cleanup(clientsToBeRemoved,allClients);\n cleanup.start();\n dispatcher.start();\n logger.initializeLogger();\n\n while (true) {\n Socket client = ss.accept();\n InputStreamReader ir = new InputStreamReader(client.getInputStream());\n PrintWriter printWriter = new PrintWriter(client.getOutputStream(),true);\n BufferedReader br = new BufferedReader(new InputStreamReader(client.getInputStream()));\n String input = br.readLine();\n System.out.println(input);\n String name = input.substring(8);\n logger.logEventInfo(name + \" has connected to the chatserver!\");\n allClients.put(name,client);\n allNamedPrintwriters.put(name,printWriter);\n ClientHandler cl = new ClientHandler(name,br, printWriter, allmsg);\n Thread t = new Thread(cl);\n t.start();\n allmsg.add(\"ONLINE#\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void launch() throws IOException {\n initBinding();\n var request = this.password == null ? new AnonymousConnection(login)\n : new AuthentificatedConnection(login, password);\n\n this.uniqueContext.putInQueue(request.toBuffer());\n console.setDaemon(true);\n console.start();// run stdin thread\n\n var lastCheck = System.currentTimeMillis();\n while (!Thread.interrupted()) {\n // printKeys();\n try {\n if (uniqueContext.isClosed()) {\n console.interrupt();\n selector.close();\n serverSocketChannel.close();\n sc.close();\n return;\n }\n selector.select(this::treatKey);\n processCommands();\n var currentTime = System.currentTimeMillis();\n if (currentTime >= lastCheck + TIMEOUT) {\n lastCheck = currentTime;\n clearInvalidSelectionKey();\n }\n } catch (UncheckedIOException tunneled) {\n throw tunneled.getCause();\n }\n }\n }", "public static void main(String[] args) {\n \n try {\n boolean useGUI = false;\n int i = -1;\n\n // Parse options. Add additional options here if you have to. Do not\n // forget to mention their usage in the help-string!\n while(args[++i].startsWith(\"-\")) {\n if(args[i].toLowerCase().equals(\"-help\")) {\n System.out.println(USAGE + String.format(\"%n%nwhere options include:\", args));\n System.out.println(\" -help Show this text.\");\n System.out.println(\" -gui Show a graphical user interface.\");\n System.exit(0);\n }\n else if(args[i].toLowerCase().equals(\"-gui\")) {\n useGUI = true;\n }\n }\n \n String mode = args[i++];\n String connectionType = args[i++];\n\n if(mode.toLowerCase().equals(\"server\"))\n {\n int port = Integer.parseInt(args[i++]);\n \n // Start server\n if(connectionType.toLowerCase().equals(\"tcp\"))\n {\n try\n {\n Player player = new Player();\n Server server = new ConnectionServerTCP(port, player);\n \n Thread cs = new Thread(server);\n cs.start();\n Log.log(\"Main: Starting Thread ConnectionServer (\"+cs.getName()+\")\");\n \n cs.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n } else if(connectionType.toLowerCase().equals(\"udp\"))\n {\n try\n {\n Player player = new Player();\n Server server = new ConnectionServerTCP(port, player);\n \n Thread cs = new Thread(server);\n cs.start();\n Log.log(\"Main: Starting Thread ConnectionServer (\"+cs.getName()+\")\");\n \n cs.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n } else if(connectionType.toLowerCase().equals(\"mc\"))\n {\n try\n {\n Player player = new Player();\n Server server = new ConnectionServerMC(port, player);\n \n Thread cs = new Thread(server);\n cs.start();\n Log.log(\"Main: Starting Thread ConnectionServer (\"+cs.getName()+\")\");\n \n cs.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n }\n else if(mode.toLowerCase().equals(\"client\"))\n {\n String host = args[i++];\n int port = Integer.parseInt(args[i++]);\n String username = args[i++];\n \n // Start client\n if(connectionType.toLowerCase().equals(\"tcp\"))\n {\n try\n {\n ClientGUI gui = new ClientGUI();\n RadioClientTCP client = new RadioClientTCP(gui);\n gui.setContext(client);\n \n Thread rc = new Thread(client);\n new Thread(gui).start();\n rc.start();\n Log.log(\"Main: Starting Thread RadioClient (\"+rc.getName()+\")\");\n \n //client.connect(new InetSocketAddress(host, port));\n \n rc.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n } else if(connectionType.toLowerCase().equals(\"udp\"))\n {\n try\n {\n ClientGUI gui = new ClientGUI();\n RadioClientUDP client = new RadioClientUDP(gui);\n gui.setContext(client);\n \n Thread rc = new Thread(client);\n new Thread(gui).start();\n rc.start();\n Log.log(\"Main: Starting Thread RadioClient (\"+rc.getName()+\")\");\n \n //client.connect(new InetSocketAddress(host, port));\n \n rc.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n } else if(connectionType.toLowerCase().equals(\"mc\"))\n {\n try\n {\n ClientGUI gui = new ClientGUI();\n RadioClientMC client = new RadioClientMC(gui);\n gui.setContext(client);\n \n Thread rc = new Thread(client);\n new Thread(gui).start();\n rc.start();\n Log.log(\"Main: Starting Thread RadioClient (\"+rc.getName()+\")\");\n \n //client.connect(new InetSocketAddress(host, port));\n \n rc.join();\n \n Log.notice(\"Main: shuting down\");\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n else\n throw new IllegalArgumentException(\"Illegal connection method\");\n }\n else\n throw new IllegalArgumentException(\"Illegal program mode\");\n }\n catch(ArrayIndexOutOfBoundsException e) {\n System.err.println(USAGE);\n }\n catch(NumberFormatException e) {\n System.err.println(USAGE);\n }\n catch(IllegalArgumentException e) {\n System.err.println(USAGE);\n }\n }", "public static void main(String[] args){\n\t\tif (args.length != 1) {\n\t\t\tSystem.out.println(\"Usage: java EchoServer <EchoServer port>\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tEchoServerMultiThreaded echoServerMultiThreaded = new EchoServerMultiThreaded();\n\t\techoServerMultiThreaded.start(args);\n\t}", "public static void main(String[] args) throws Exception {\n\t\tServer server = new Server();\n\t\tserver.serverFrame.setVisible(true);\n\t\tServerSocket listener = new ServerSocket(PORT);\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tnew Client(listener.accept()).start();\n\t\t\t}\n\t\t} finally {\n\t\t\tlistener.close();\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n\t\tServerSocket socket = new ServerSocket(port);\n\t\tSystem.out.println(\"Port \"+port+\" open\");\n\t\tServer server = new Server();\n\t\tnew ScoreThread().start();\n\t\twhile(true){\n\t\t\tSocket client = socket.accept();\n\t\t\tnew ServerThread(client, server).start();\n\t\t\tSystem.out.println(\"New connection with client \"+client.getInetAddress().getHostAddress());\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\n\t\tServerSocket sSocket;\n\t\ttry {\n\t\t\tsSocket = new ServerSocket(15001);\n\t\t\tSystem.out.println(\"server listening at \" + sSocket.getLocalPort());\n\t\t\twhile (true) {\n\t\t\t\t// this is an unique socket for each client\n\t\t\t\tSocket socket = sSocket.accept();\n\t\t\t\tSystem.out.println(\"Client with port number: \" + socket.getPort() + \" is connected\");\n\t\t\t\t// start a new thread for handling requests from the client\n\t\t\t\tClientRequestHandler requestHandler = new ClientRequestHandler(sketcher, socket, scene, playerMap);\n\t\t\t\tnew Thread(requestHandler).start();\n\t\t\t\t// start a new thread for handling responses for the client\n\t\t\t\tClientResponseHandler responseHandler = new ClientResponseHandler(socket, scene, playerMap);\n\t\t\t\tnew Thread(responseHandler).start();\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t}\n\t}", "public static void main(String[] args) {\n try {\n Thread t = new GreetingServer(4445);\n System.out.println(\"started\");\n t.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void run()\n\t{\n\t\trunning = true;\n\t\tSystem.out.println(\"Server started on port \" + port);\n\t}", "public static void main(String[] args) throws IOException {\n log.info(\"The ticket to ride server is running.\");\n\n try (ServerSocket listener = new ServerSocket(9001)) {\n while (true) {\n Socket socket = listener.accept();\n\n MiniServer h = new MiniServer(socket);\n\n new Thread(h::go).start();\n }\n } catch (BindException be) {\n log.error(\"Cannot start server\", be);\n JOptionPane.showMessageDialog(null, \"Cannot start server\",\n be.getMessage(), JOptionPane.ERROR_MESSAGE);\n System.exit(1);\n }\n }", "public static void main(String[] args) throws IOException\n {\n ServerSocket listener = new ServerSocket(8080);\n try\n {\n while (true)\n {\n Socket clientSocket = listener.accept();\n new Thread(new JavaServer(clientSocket)).start();\n }\n }\n finally\n {\n listener.close();\n }\n }", "public void toThread() {\n\t\t// TODO Auto-generated method stub\n\t\tnew Thread(this).start();\n\t\tclient.start();\n\t}", "public Server(int port, mainViewController viewController, LogViewController consoleViewController){\n isRunningOnCLI = false;\n this.viewController = viewController;\n this.port = port;\n this.consoleViewController = consoleViewController;\n viewController.serverStarting();\n log = new LoggingSystem(this.getClass().getCanonicalName(),consoleViewController);\n log.infoMessage(\"New server instance.\");\n try{\n this.serverSocket = new ServerSocket(port);\n //this.http = new PersonServlet();\n log.infoMessage(\"main.Server successfully initialised.\");\n clients = Collections.synchronizedList(new ArrayList<>());\n ServerOn = true;\n log.infoMessage(\"Connecting to datastore...\");\n //mainStore = new DataStore();\n jettyServer = new org.eclipse.jetty.server.Server(8080);\n jettyContextHandler = new ServletContextHandler(jettyServer, \"/\");\n jettyContextHandler.addServlet(servlets.PersonServlet.class, \"/person/*\");\n jettyContextHandler.addServlet(servlets.LoginServlet.class, \"/login/*\");\n jettyContextHandler.addServlet(servlets.HomeServlet.class, \"/home/*\");\n jettyContextHandler.addServlet(servlets.DashboardServlet.class, \"/dashboard/*\");\n jettyContextHandler.addServlet(servlets.UserServlet.class, \"/user/*\");\n jettyContextHandler.addServlet(servlets.JobServlet.class, \"/job/*\");\n jettyContextHandler.addServlet(servlets.AssetServlet.class, \"/assets/*\");\n jettyContextHandler.addServlet(servlets.UtilityServlet.class, \"/utilities/*\");\n jettyContextHandler.addServlet(servlets.EventServlet.class, \"/events/*\");\n //this.run();\n } catch (IOException e) {\n viewController.showAlert(\"Error initialising server\", e.getMessage());\n viewController.serverStopped();\n log.errorMessage(e.getMessage());\n }\n }", "public void run() {\n ServerSocketChannelFactory acceptorFactory = new OioServerSocketChannelFactory();\n ServerBootstrap server = new ServerBootstrap(acceptorFactory);\n\n // The pipelines string together handlers, we set a factory to create\n // pipelines( handlers ) to handle events.\n // For Netty is using the reactor pattern to react to data coming in\n // from the open connections.\n server.setPipelineFactory(new EchoServerPipelineFactory());\n\n server.bind(new InetSocketAddress(port));\n }", "public static void main(String[] args) {\n Server server = new Server(1234);\n server.listen();\n \n // YOUR CODE HERE\n // It is not required (or recommended) to implement the server in\n // this runner class.\n }", "public void startServer(){\r\n try {\r\n\r\n while(true){\r\n\r\n s = sc.accept();\r\n new ServerThread(s).start();\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n try {\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n\tpublic void run() {\n\t\tlog(\"Running on port \" + serverSocket.getLocalPort());\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\t// accept incomming connections\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t//log(\"New connection from \" + client_socket.getRemoteSocketAddress());\n\t\t\t\t// create a new connection handler and run in a separate thread\n\t\t\t\tTrackerRequestHandler handler = new TrackerRequestHandler(this, clientSocket);\n\t\t\t\texecutor.execute(handler);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog(\"Problem accepting a connection\");\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\r\n if (args.length > 0 && args[0] != null && args[0].equals(\"server\")) {\r\n ServerCore serverCore = new ServerCore();\r\n new ServerNetworkCore(serverCore, serverCore.getReceiveQueue());\r\n new Thread(serverCore).start();\r\n } else {\r\n ClientCore clientCore = new ClientGameCore();\r\n GUICore gui =\r\n new GUICore(clientCore.getComponentManager(), clientCore.getEntityManager(), clientCore.getEventManager(),\r\n clientCore.getTimer());\r\n clientCore.setGUI(gui);\r\n ClientNetworkCore network =\r\n new ClientNetworkCore(clientCore.getNetworkSendQueue(), clientCore.getNetworkReceiveQueue(), null);\r\n new Thread(clientCore).start();\r\n new Thread(network).start();\r\n }\r\n }", "public static void main(String[] args) throws Exception {\n\t\tnew DashBoardServer().start();\n\t}", "public void launch() throws NotBoundException, IOException\n\t{\n\t\t//call method to connect to server\t\t\n\t\tServerManager serverConnect = initialConnect();\t\n\t\n\t\t//get Setup menu from server\n\t\tSetUpMenu newSetup = new SetUpMenu(serverConnect);\n\t\tnewSetup.welcomeMenu();\n\t}", "@Override\r\n\tpublic void start() {\n\t\tscavenger.start();\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (!serverSocket.isClosed()) {\r\n\t\t\t\t\tSocket socket = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsocket = serverSocket.accept();\r\n\t\t\t\t\t\tscavenger.addSocket(socket);\r\n\t\t\t\t\t\tnew SynchronousSocketThread(socket).start();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}", "public static void main(String[] args) {\n\n CLInterface cli = new CLInterface();\n cli.start();\n\n GUInterface gui = new GUInterface();\n new Thread(gui).start();\n }", "public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\n }", "public static void main(String[] args) throws Exception {\n ServerSocket listener = new ServerSocket(PORT);\n try {\n while (true) {\n new Handler(listener.accept()).start();\n }\n } finally {\n listener.close();\n }\n }", "public static void main(String[] args)\n {\n MessageHandler runner = new MessageHandler();\n runner.processArgs(args);\n \n String command = runner.getConfiguration(\"command\");\n String host = runner.getConfiguration(\"host\");\n int port = runner.getConfiguration().getInt(\"port\");\n \n boolean isStart = false;\n boolean isRestart = false;\n boolean isStatus = false;\n \n if ( true ) {\n if (command.equalsIgnoreCase(\"shutdown\")){\n command = SHUTDOWN;\n }\n else if(command.equalsIgnoreCase(\"status\")) {\n command = STATUS;\n isStatus = true;\n } else if(command.equalsIgnoreCase(\"restart\")) {\n command = RESTART;\n }\n else if( command.equalsIgnoreCase(\"start\") ){\n command = START;\n isStart = true;\n }\n }\n \n if( port > -1 ) {\n if( !isStart ){\n boolean needsStarted = false;\n \n try {\n runner.client(host, port,command);\n } catch(IOException ex) {\n String showCommand = command;\n if ( showCommand != null)\n showCommand = command;\n Helper.writeLog(1,\"unable to send command: '\" + showCommand + \"' stack: \" + ex.toString());\n if( isStatus ){\n needsStarted = true;\n }\n }\n \n if( isRestart ){\n try {\n command = START + \"@\" + SECRETCODE;\n \n runner.client(host, port,command);\n } catch(IOException ex) {\n String showCommand = command;\n if ( showCommand != null)\n showCommand = command;\n Helper.writeLog(1,\"unable to send command: '\" + showCommand + \"' stack: \" + ex.toString());\n }\n }\n\n if( needsStarted ){\n runner.startServer(port);\n }\n else {\n System.exit(0);\n }\n }\n else {\n runner.startServer(port);\n }\n }\n }", "public static void main(String[] args){\n\t\tString user_id=\"Server\";\n\t\tString host = \"\", password=\"\";\n\t\tint port = 0; //The port number\n\t\ttry{\n\t\t\tpassword = args[0];\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"ERROR: No password provided for logging onto server console, connection aborted\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry{\n\t\t\thost = args[1];\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\thost = \"localhost\";\n\t\t}\n\t\ttry{\n\t\t\tport = Integer.parseInt(args[2]);\n\t\t}catch (ArrayIndexOutOfBoundsException e){\n\t\t\tport = DEFAULT_PORT;\n\t\t}\n\t\tServerConsole serv= new ServerConsole(user_id, host, password, port);\n\t\tserv.accept(); //Wait for console data\n\t}", "public static void main(String[] args) {\r\n int port = 5000;\r\n Server server = new Server(port);\r\n\r\n //Start the server thread:\r\n server.start();\r\n }", "public static void main(String[] args) {\r\n ChatServer server = new ChatServer(portNumber);\r\n server.startServer();\r\n }", "public static void main(String[] args) {\n Client client = new Client();\n client.start();\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }", "public void start()\n {\n isRunning = true;\n try\n {\n //metoden opretter en ny socket for serveren på den valgte port\n ServerSocket serverSocket = new ServerSocket(port);\n //mens serveren kører venter den på en client\n while (isRunning)\n {\n serverDisplay(\"Serveren venter på clienter på port: \" + port);\n //accepterer clienten på socketen\n Socket socket = serverSocket.accept();\n\n if (!isRunning)\n {\n break;\n }\n // laver en ny thread til clienten med socketen der er blevet accepteret\n HandleClientThread handleClientThread = new HandleClientThread(socket);\n\n // her blever tråden tilføjet til arryet af clienter\n clientThreadArrayList.add(handleClientThread);\n // Starer handleclient tråden som håndtere clienter\n handleClientThread.start();\n }\n try\n {\n //Her lukker serveren socketen\n serverSocket.close();\n for (int i = 0; i < clientThreadArrayList.size() ; i++)\n {\n HandleClientThread hct = clientThreadArrayList.get(i);\n try\n {\n hct.inputStream.close();\n hct.outputStream.close();\n hct.socket.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Uknowen command \" + e);\n }\n }\n }\n catch (Exception e)\n {\n serverDisplay(\"Kunne ikke lukke serveren og clienterne pga. \" + e);\n }\n }\n catch (IOException e)\n {\n String message = dateFormat.format(new Date()) + \"Fejl på ny server socket\" + e + \"\\n\";\n serverDisplay(message);\n }\n }", "public static void main(String[] args) {\n\t\tSettingUI serverUI = new SettingUI(\"server\");\n\n\t\t//System.out.print(\"Port(eg.1111): \");\n\t\t// int portNumber = 1111;\n\t\t// int portNumber = console.nextInt();\n\t\t// GameServer gameServer = new GameServer(portNumber);\n\t\t// gameServer.setUpChat();\n\t\t// gameServer.start();\n\t}", "public void run(){\n\n Thread t;\n try {\n t = new Thread(command);\n t.start();\n if (DEBUG) System.out.println(\"Virtual Machine: \" + command_file + \" started\");\n exit_state = command.getExitStatus();\n } catch (Exception e){\n e.printStackTrace();\n System.out.println(\"error executing \" + command_file + \": \" + e.toString());\n exit_state = false;\n }\n\n\n }", "@Override\n public void run() {\n try {\n registerWithServer();\n initServerSock(mPort);\n listenForConnection();\n\t} catch (IOException e) {\n Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, e);\n setTextToDisplay(\"run(): \" + e.getMessage());\n setConnectedStatus(false);\n\t}\n }", "public void startThread() {\n\t\tif (this.serverConnectorUsed <= Byte.MAX_VALUE) {\n\t\t\tthis.serverConnectorUsed++;\n\t\t\tLOG.info(\"Running new thread. Now pool is \"+Integer.toString(MAX_THREADS-this.serverConnectorUsed)+\" / \"+Integer.toString(MAX_THREADS));\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString[] arguments = new String[8];\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Arguments for first camera/server connection\");\n\t\tSystem.out.println(\"rt@argus-N, insert chosen N:\");\n\t\targuments[0] = scan.nextLine();\n\t\tSystem.out.println(\"Insert chosen proxyport ****:\");\n\t\targuments[1] = scan.nextLine();\n\t\tSystem.out.println(\"Arguments for second camera/server connection\");\n\t\tSystem.out.println(\"rt@argus-N, insert chosen N:\");\n\t\targuments[2] = scan.nextLine();\n\t\tSystem.out.println(\"Insert chosen proxyport ****:\");\n\t\targuments[3] = scan.nextLine();\n\n\t\tClient client = new Client();\n\n\t\tGUIThread gui = new GUIThread(client);\n\n\t\tgui.start();\n\n\t\tServer1 s = new Server1(arguments[0], \"6077\", \"0\", arguments[1]);\n\t\ts.start();\n\t\tServer2 s2 = new Server2(arguments[2], \"6078\", \"1\", arguments[3]);\n\t\ts2.start();\n\t}", "public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }", "public static void main(String[] args) throws InterruptedException {\n listen();\n }", "public void run(){\n\n\t\tServerSocket socketEcoute;\n\t\ttry {\n\t\t\tsocketEcoute = new ServerSocket();\n\t\t\tsocketEcoute.bind(new InetSocketAddress(this.defaultPort));\n\t\t\tSystem.out.println(\"Port manager started on : \"+this.defaultPort);\n\t\t\twhile(true){\n\t\t\t\tSocket socketConnexion = socketEcoute.accept();\n\t\t\t\tSystem.out.println(\"Someone is connected on PortManager\");\n\t\t\t\t\n\t\t\t\tnew PortManagerThread(socketConnexion,this.ctrl).start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void start() throws Exception {\n PropertiesLoader properties = new PropertiesLoader();\n String jar = properties.get(\"h2.jar.file.path\");\n String port = properties.get(\"h2.port\");\n log.info(String.format(\"Starting H2 server: %s %s\", jar, port));\n\n String[] cmdArray = {\n \"java\", \"-cp\", jar, \"org.h2.tools.Server\",\n \"-tcp\", \"-tcpPort\", port, \"-tcpAllowOthers\",\n \"-ifNotExists\"\n };\n\n log.info(\"H2 > \" + Arrays.toString(cmdArray));\n\n process = Runtime.getRuntime().exec(cmdArray);\n InputStream is = process.getInputStream();\n InputStream err = process.getErrorStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n BufferedReader errReader = new BufferedReader(new InputStreamReader(err));\n List<String> msgs = new ArrayList<>();\n final CountDownLatch latch = new CountDownLatch(1);\n Thread t = new Thread(() -> {\n try {\n String line;\n String errLine;\n while (process.isAlive()) {\n line = reader.readLine();\n if (line != null) {\n log.info(\"H2 > \" + line);\n msgs.add(line);\n if (line.contains(\"TCP server running\")) {\n log.info(\"H2 Server started ...\");\n latch.countDown();\n return;\n }\n }\n errLine = errReader.readLine();\n if (errLine != null) {\n log.error(\"H2 err > \" + errLine);\n msgs.add(\"e: \" + errLine);\n }\n }\n int exitValue = process.exitValue();\n if (exitValue == 0) {\n log.info(\"H2 Server process exited OK\");\n } else {\n log.error(\"H2 Server process exited with error: \" + exitValue + \", msgs: \" + msgs);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n latch.countDown();\n }, \"H2-thread\");\n t.start();\n latch.await();\n }", "private void setUpServerThread() {\n\t\ttry {\n\t\t\tthis.incomingMsgNodes = new TCPServerThread(0, this);\n\t\t\tThread thread = new Thread(incomingMsgNodes);\n\t\t\tthread.start();\n\t\t\tthis.myServerThreadPortNum = incomingMsgNodes.getPort();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble creating Server Socket\");\n\t\t}\n\t}", "private void start() {\r\n\t\tif (running)\r\n\t\t\treturn;\r\n\t\trunning = true;\r\n\t\tthread = new Thread(this);//creates threat to run program on\r\n\t\tthread.start();\r\n\t}", "public void run() {\n\t\tString currentDirectory = System.getProperty(\"user.home\");\n\n\t\ttry {\n\t\t\tbis = new BufferedInputStream(socket.getInputStream());\n\t\t\tisr = new InputStreamReader(bis);\n\t\t\tbos = new BufferedOutputStream(socket.getOutputStream());\n\t\t\tosw = new OutputStreamWriter(bos);\n\n\t\t\tosw.write(\"Welcome to Java Telnet Server\\n\");\n\t\t\tosw.write(\"\\t\" + System.getProperty(\"os.name\") + \" - \"\n\t\t\t\t\t+ System.getProperty(\"os.arch\"));\n\t\t\tosw.write(\"\\n\\n\");\n\t\t\tosw.flush();\n\n\t\t\twhile (stopper) {\n\t\t\t\tosw.write(\"$ \");\n\t\t\t\tosw.flush();\n\n\t\t\t\t// read until enter or return (13) key is pressed\n\t\t\t\tint character;\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\twhile ((character = isr.read()) != 13)\n\t\t\t\t\tsb.append((char) character);\n\n\t\t\t\t// split buffer and extract - command, options and arguments\n\t\t\t\tString[] commandArray = sb.toString().trim().split(\"\\\\s+\");\n\n\t\t\t\tString command = (commandArray.length >= 1) ? commandArray[0]\n\t\t\t\t\t\t: null;\n\t\t\t\tArrayList<String> commandOptions = new ArrayList<String>();\n\t\t\t\tArrayList<String> commandArguments = new ArrayList<String>();\n\n\t\t\t\tfor (int i = 1; i < commandArray.length; i++) {\n\t\t\t\t\tif (commandArray[i].startsWith(\"-\")) {\n\t\t\t\t\t\tcommandOptions.add(commandArray[i]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcommandArguments.add(commandArray[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlogger.info(\"Command : \" + command + \" Options : \"\n\t\t\t\t\t\t+ commandOptions.toString() + \" Arguments : \"\n\t\t\t\t\t\t+ commandArguments.toString());\n\n\t\t\t\t// process command\n\t\t\t\t// check if command is to exit\n\t\t\t\tif (command.equals(\"exit\") || command.equals(\"quit\")\n\t\t\t\t\t\t|| command.equals(\"bye\")) {\n\t\t\t\t\tosw.write(\"See ya!\\n\");\n\t\t\t\t\tosw.flush();\n\t\t\t\t\tstopper = false;\n\t\t\t\t} else {\n\t\t\t\t\t// get the command from factory and execute\n\t\t\t\t\tAbstractCommand abstractCommand = CommandFactory\n\t\t\t\t\t\t\t.getCommandInstance(command);\n\t\t\t\t\tif (abstractCommand != null) {\n\t\t\t\t\t\t// set command options\n\t\t\t\t\t\tabstractCommand.setOptions(commandOptions\n\t\t\t\t\t\t\t\t.toArray(new String[commandOptions.size()]));\n\t\t\t\t\t\t//set command arguments\n\t\t\t\t\t\tabstractCommand.setArguments(commandArguments\n\t\t\t\t\t\t\t\t.toArray(new String[commandArguments.size()]));\n\t\t\t\t\t\t// set console to output\n\t\t\t\t\t\tabstractCommand.setConsole(osw);\n\t\t\t\t\t\t// set current working directory\n\t\t\t\t\t\tabstractCommand.setCurrentDirectory(currentDirectory);\n\t\t\t\t\t\tabstractCommand.execute();\n\t\t\t\t\t\t// get the current directory after command execution\n\t\t\t\t\t\tcurrentDirectory = abstractCommand\n\t\t\t\t\t\t\t\t.getCurrentDirectory();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tosw.write(command + \": command not found\\n\");\n\t\t\t\t\t\tosw.flush();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlogger.debug(\"Failed to read/write from input/output streams\\n\");\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Close all open streams\n\t\t\ttry {\n\t\t\t\tbis.close();\n\t\t\t\tisr.close();\n\t\t\t\tbos.close();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t\tlogger.debug(\"Failed closing input/output streams\\n \");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t// Try closing client connection\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t} catch (IOException e2) {\n\t\t\t\tlogger.debug(\"Closing of client socket failed\\n \");\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\tnew ServerFrame().setVisible(true);\r\n\t}", "public static void main(String[] args) {\n\n // Set up the thread pool\n threadPool = Executors.newFixedThreadPool(THREAD_POOL_SIZE);\n\n // The server socket that waits for clients to connect\n // Opened in a try-catch block\n try (ServerSocket serverSocket = new ServerSocket(SERVER_PORT_NUMBER)) {\n // looping continuously to accept connections from clients\n while (true) {\n // try-catch to catch IOException cause by the accept() method\n try {\n // getting a client connection, creating a runnable and granting it a thread.\n Socket clientConnectionSocket = serverSocket.accept();\n System.out.println(\"received a request\");\n ServeRequestRunnable serveClientRunnable = new ServeRequestRunnable(clientConnectionSocket);\n threadPool.submit(serveClientRunnable);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n threadPool.shutdown();\n }\n }", "public static void main(String args[]) {\n if (args.length == 1) {\n System.out.println(\"Attempting to start server on port: \" + args[0]);\n try {\n portNumber = Integer.parseInt(args[0]);\n }\n catch (Exception e) {\n throw new IllegalArgumentException(\"Port number invalid\");\n }\n }\n else if (args.length == 0) {\n System.out.println(\"Attempting to start server on default port: \" + portNumber);\n }\n else {\n throw new IllegalArgumentException(\"Too many arguments. \"\n + \"Should be in form: java Server <port-no>\");\n }\n\n try {\n serverSocket = new ServerSocket(portNumber);\n\n System.out.println(\"Server started\");\n\n while (true) {\n clientSocket = serverSocket.accept(); // listen for clients\n\n System.out.println(\"Client accepted \" + clientSocket.getInetAddress()\n + \":\" + clientSocket.getPort());\n\n // run ServerThread for newly connected client in a new thread and start thread\n int i = 0;\n Login.loadUsers();\n for (i = 0; i < maxClients; i++) {\n if (clients[i] == null) {\n (clients[i] = new ServerThread(clientSocket, clients)).start();\n break;\n }\n }\n\n // if client pool is full, close socket\n if (i == maxClients) {\n PrintStream os = new PrintStream(clientSocket.getOutputStream());\n os.println(\"Server too busy. Please try later.\");\n os.close();\n clientSocket.close();\n }\n }\n }\n catch (IOException i) {\n System.err.println(i);\n }\n finally {\n close();\n }\n }", "public static void main(String args[]) {\n int portNumber = 2228;\r\n if (args.length < 1) {\r\n System.out.println(\"Usage: java MultiThreadChatServerSync <portNumber>\\n\"\r\n + \"Now using port number=\" + portNumber);\r\n } else {\r\n portNumber = Integer.valueOf(args[0]);\r\n }\r\n\r\n try {\r\n serverSocket = new ServerSocket(portNumber);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n\r\n /*\r\n * Create a client socket for each connection and pass it to a new client\r\n * thread.\r\n */\r\n while (true) {\r\n try {\r\n clientSocket = serverSocket.accept();\r\n int i = 0;\r\n for (i = 0; i < maxClientsCount; i++) {\r\n if (threads[i] == null) {\r\n (threads[i] = new clientThread(clientSocket, threads, history, userList)).start();\r\n break;\r\n }\r\n }\r\n if (i == maxClientsCount) {\r\n PrintStream os = new PrintStream(clientSocket.getOutputStream());\r\n os.println(\"Server too busy. Try later.\");\r\n os.close();\r\n clientSocket.close();\r\n }\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n loadServer();\n\n }", "public void run() {\n clientLogger.info(\"Client \" + name + \" started working\");\n EventLoopGroup group = new NioEventLoopGroup();\n try {\n Bootstrap bootstrap = new Bootstrap()\n .group(group)\n .channel(NioSocketChannel.class)\n .handler(new ClientInitializer());\n Channel channel = bootstrap.connect(host, port).sync().channel();\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n while (true) {\n channel.write(in.readLine() + \"\\r\\n\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n group.shutdownGracefully();\n }\n clientLogger.info(\"Client \" + name + \" finished working\");\n }" ]
[ "0.74649715", "0.7169403", "0.71412915", "0.7092498", "0.7039563", "0.7037782", "0.70306784", "0.7024329", "0.69930226", "0.6985114", "0.69808084", "0.6979317", "0.6949695", "0.69479644", "0.693943", "0.69390136", "0.6903342", "0.69006777", "0.68889934", "0.68854886", "0.6839543", "0.683109", "0.6810929", "0.67547715", "0.6720824", "0.6701456", "0.669501", "0.66874665", "0.66609687", "0.6652297", "0.66253424", "0.66173965", "0.66049296", "0.65995485", "0.65943426", "0.65818906", "0.6573941", "0.65659994", "0.65658367", "0.65621644", "0.6548275", "0.6538122", "0.651973", "0.65168875", "0.6510006", "0.6497271", "0.64930624", "0.6488594", "0.64869195", "0.64788055", "0.647836", "0.64726055", "0.6467464", "0.6464119", "0.64631", "0.6461684", "0.6461617", "0.6460523", "0.6454052", "0.6447173", "0.64461505", "0.6437733", "0.64269894", "0.6426397", "0.6426302", "0.6407287", "0.64029205", "0.6393095", "0.6388704", "0.638486", "0.63840437", "0.6361619", "0.6354203", "0.6353043", "0.6350482", "0.6348349", "0.6341896", "0.6332551", "0.63317955", "0.6326389", "0.632405", "0.63128024", "0.63112086", "0.6306902", "0.6306573", "0.6299424", "0.6293903", "0.62901384", "0.62866783", "0.6282918", "0.62748927", "0.62748617", "0.6273709", "0.62734747", "0.6271725", "0.6268786", "0.6264257", "0.6263358", "0.62568986", "0.62565845", "0.625477" ]
0.0
-1
Treat the key in selection loop
private void treatKey(SelectionKey key) { try { if (key.isValid() && key.isConnectable()) { var ctx = (ClientContext) key.attachment(); ctx.doConnect(); } if (key.isValid() && key.isWritable()) { var ctx = (ClientContext) key.attachment(); ctx.doWrite(); } if (key.isValid() && key.isReadable()) { var ctx = (ClientContext) key.attachment(); ctx.doRead(); } } catch (IOException ioe) { throw new UncheckedIOException(ioe); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void selectorGenero(java.util.Scanner key) {\n\t\tint selector2;\n\t\tdo {\n\t\t\tSystem.out.println(\"1 para hombre 2 para mujer\");\n\t\t\tselector2 = key.nextInt();\n\t\t\t\n\t\t\tswitch(selector2) {\n\t\t\tcase 1:\n\t\t\t\tthis.setGenero(Genero.H);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tthis.setGenero(Genero.M);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while(selector2 < 1 || selector2 > 2);\n\t\t\n\t}", "public SelectionKey getSelectionKey(){\n return key;\n }", "private void handleSelectedKeys() throws Exception\n {\n\n final Set<SelectionKey> selectedKeys = selector.selectedKeys();\n if (selectedKeys.isEmpty())\n {\n return;\n }\n\n final Iterator<SelectionKey> iter = selectedKeys.iterator();\n while (iter.hasNext())\n {\n final SelectionKey key = iter.next();\n if (key.isReadable())\n {\n handleReadable(key);\n iter.remove();\n }\n }\n }", "@Override\r\n\tpublic void keyPressed() {\n\t\tl.key();\r\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(1));\r\n\t\t\t}", "void keySequencePassed();", "default void interactWith(Key key) {\n\t}", "public void hitKey() {\n }", "private void processSelectedKeys() {\r\n Iterator<SelectionKey> it = selector.selectedKeys().iterator();\r\n while (it.hasNext()) {\r\n // remove the selected key to not process it twice\r\n SelectionKey key = it.next();\r\n it.remove();\r\n\r\n // erase flags of ready operation\r\n key.interestOps(key.interestOps() & ~key.readyOps());\r\n\r\n if (key.isAcceptable()) {\r\n ((AcceptHandler) key.attachment()).handleAccept();\r\n }\r\n if (key.isValid() && key.isConnectable()) {\r\n ((ConnectHandler) key.attachment()).handleConnect();\r\n }\r\n if (key.isValid() && key.isReadable()) {\r\n ((ReadWriteHandler) key.attachment()).handleRead();\r\n }\r\n if (key.isValid() && key.isWritable()) {\r\n ((ReadWriteHandler) key.attachment()).handleWrite();\r\n }\r\n }\r\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(2));\r\n\t\t\t}", "public void keyPressed(KeyEvent event)\n\t{\n int keyCode = event.getKeyCode();\n \n int arrowUp = 38;\n int arrowDown = 40;\n \n int oldIndex = indexOfCurrentSelectedComponent;\n if (keyCode == arrowDown)\n {\n indexOfCurrentSelectedComponent++;\n }\n if (keyCode == arrowUp)\n {\n indexOfCurrentSelectedComponent--;\n }\n \n while (oldIndex != indexOfCurrentSelectedComponent)\n {\n if (indexOfCurrentSelectedComponent > components.size() - 1)\n {\n indexOfCurrentSelectedComponent = 0;\n }\n else if (indexOfCurrentSelectedComponent < 0)\n {\n indexOfCurrentSelectedComponent = components.size() - 1;\n }\n \n GlComponent component = components.get(indexOfCurrentSelectedComponent);\n if (component instanceof GlButton)\n {\n ((GlButton) component).setSelected(true);\n break;\n } \n else if (keyCode == arrowDown)\n {\n indexOfCurrentSelectedComponent++;\n } \n else if (keyCode == arrowUp)\n {\n indexOfCurrentSelectedComponent--;\n }\n \n }\n \n if (oldIndex != -1 && components.get(oldIndex) instanceof GlButton)\n {\n ((GlButton) components.get(oldIndex)).setSelected(false);\n }\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(1));\r\n\t\t\t}", "public void setKey(SelectionKey key) {\n this._key = key;\n }", "@Override\n\tpublic void keyPressed() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(2));\r\n\t\t\t}", "void keyPressed(String code);", "public abstract void keyPressed(int k);", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(0));\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(0));\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(3));\r\n\t\t\t}", "public void keyPressed() {\n\t ackEvent();\n if (key == ' ') {\n pauseTic = !pauseTic;\n EventQueue.getInstance().togglePause();\n }\n if (key == '.') {\n EventQueue.getInstance().beginEvents();\n } else if (key == '\\n') {\n if (pauseTic) { //only let this run if the display is paused\n StringManager.getInstance().ticAllOneCycle();\n }\n }else KeyMap.getInstance().run(key);\n }", "@Override\n public void key() {\n \n }", "protected void keyTyped(char par1, int par2) {}", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void triggerKeyPress(KeyEvent e) {\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n menuSelection++;\n } else if (e.getKeyCode() == KeyEvent.VK_UP) {\n menuSelection--;\n if (menuSelection < 0) {\n menuSelection = menuLengths[menuState] - 1;\n }\n } else if (e.getKeyCode() == KeyEvent.VK_ENTER) {\n handleEnterPress();\n }\n\n menuSelection %= menuLengths[menuState];\n\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public abstract void keyPressed(int key);", "public void keyPressed(KeyEvent event){\r\n\t\t\tchar input = event.getKeyChar();\r\n\t\t\tSystem.out.println(event.getExtendedKeyCode());\r\n\t\t\tif(event.getExtendedKeyCode()== 10){\r\n\t\t\t equals.doClick();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tswitch(input){\r\n\t\t\t\tcase '0': button0.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '1': button1.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '2': button2.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '3': button3.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '4': button4.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '5': button5.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '6': button6.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '7': button7.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '8': button8.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '9': button9.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '.': dot.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '+': plus.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '-': minus.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '/': divide.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '*': multiply.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '=': equals.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '\b': del.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '\u001b': clear.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'c': clear.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(4));\r\n\t\t\t}", "private void setKey() {\n\t\t \n\t}", "@Override\n public void keyPressed(KeyEvent e) {\n \n \n }", "protected void processKeyPressed(KeyEvent e) {\n int key = e.getKeyCode();\n boolean control = e.isControlDown();\n boolean shift = e.isShiftDown();\n boolean alt = e.isAltDown();\n int flags;\n\n if (shift && control)\n flags = SelectFlags.ADD_RANGE;\n else if (shift)\n flags = SelectFlags.ADD_RANGE;\n else if (control)\n flags = SelectFlags.RESET_ANCHOR;\n else\n flags = SelectFlags.CLEAR | SelectFlags.ADD_ITEM | SelectFlags.RESET_ANCHOR;\n\n switch (key) {\n case KeyEvent.VK_DOWN:\n if (alt)\n break;\n if ((autoAppend || control) && subfocus == (getCount()-1) && !isReadOnly() && writeModel.isVariableSize()) {\n writeModel.addItem(null);\n setSubfocus(getCount() - 1, SelectFlags.CLEAR | SelectFlags.ADD_ITEM | SelectFlags.RESET_ANCHOR);\n e.consume();\n }\n else if (subfocus != (getCount()-1)) {\n setSubfocus(subfocus + 1, flags);\n e.consume();\n }\n break;\n case KeyEvent.VK_UP:\n if (alt)\n break;\n if (subfocus > 0) {\n setSubfocus(subfocus - 1, flags);\n e.consume();\n }\n break;\n case KeyEvent.VK_PAGE_UP:\n if (alt)\n break;\n if (subfocus > 0) {\n pageJump(false, flags);\n e.consume();\n }\n break;\n case KeyEvent.VK_PAGE_DOWN:\n if (alt)\n break;\n if (subfocus != (getCount()-1)) {\n pageJump(true, flags);\n e.consume();\n }\n break;\n case KeyEvent.VK_HOME:\n if (alt)\n break;\n if (subfocus > 0) {\n if (control && !shift)\n setSubfocus(0, SelectFlags.CLEAR | SelectFlags.ADD_ITEM | SelectFlags.RESET_ANCHOR);\n else\n setSubfocus(0, flags);\n e.consume();\n }\n break;\n case KeyEvent.VK_END:\n if (alt)\n break;\n if (subfocus != (getCount()-1)) {\n if (control && !shift)\n setSubfocus(getCount() - 1, SelectFlags.CLEAR | SelectFlags.ADD_ITEM | SelectFlags.RESET_ANCHOR);\n else\n setSubfocus(getCount() - 1, flags);\n e.consume();\n }\n break;\n case KeyEvent.VK_SPACE:\n if (!alt && !shift) {\n if (control && selection.contains(subfocus))\n selection.remove(subfocus);\n else\n selection.add(subfocus);\n if (isToggleItem(subfocus))\n startEdit(subfocus);\n e.consume();\n }\n break;\n case KeyEvent.VK_INSERT:\n if (alt)\n break;\n if (!isReadOnly() && writeModel.isVariableSize()) {\n writeModel.addItem(subfocus, null);\n e.consume();\n }\n break;\n case KeyEvent.VK_DELETE:\n if (alt)\n break;\n if (control && !isReadOnly() && writeModel.isVariableSize() && getCount() > 0) {\n writeModel.remove(subfocus);\n if (subfocus == getCount())\n setSubfocus(getCount() - 1);\n e.consume();\n }\n break;\n case KeyEvent.VK_ENTER:\n if (control && editor == null && canSet(subfocus, false))\n startEdit(subfocus);\n else\n fireActionEvent();\n e.consume();\n break;\n case KeyEvent.VK_F2:\n if (editor == null && !isToggleItem(subfocus) && canSet(subfocus, false)) {\n startEdit(subfocus);\n e.consume();\n }\n break;\n case KeyEvent.VK_J: // debug painting\n if (shift && control && alt)\n debugPaint = !debugPaint;\n break;\n case KeyEvent.VK_KANJI:\n case 0xE5: // VK_PROCESSKEY:\n startEdit(subfocus);\n break;\n default: return;\n }\n }", "SelectionKeyHandler getSelectionKeyHandler();", "void keyPress(int key);", "public SelectionKey getKey() {\n return this._key;\n }", "@Override\n\tpublic void keyPressed() {\n\t\tif (key == ENTER || key == RETURN) {\n\t\t\tnewGame();\n\t\t\treturn;\n\t\t}\n\n\t\tif (state == State.GAME_OVER)\n\t\t\treturn;\n\n\t\tif (key == ' ') {\n\t\t\tTimer_Procedures.togglePauseResume(this);\n\t\t\treturn;\n\t\t}\n\n\t\t// no fair playing with timer paused\n\t\tif (state != State.PLAYING)\n\t\t\treturn;\n\n\t\tString legal = \"QWERTYUASDFGHJZXCVVBNMqwertyuasdfghjzxcvbnm+=-_Pp \";\n\t\tif (legal.indexOf(key) < 0) {\n\t\t\tmessage = 8;\n\t\t\treturn;\n\t\t}\n\n\t\tif (\"+=-_ \".indexOf(key) >= 0) {\n\t\t\tswitch (key) {\n\t\t\tcase ' ':\n\t\t\t\tTimer_Procedures.togglePauseResume(this);\n\t\t\t\tbreak;\n\t\t\tcase '=':\n\t\t\tcase '+':\n\t\t\t\tgrid.addColumn();\n\t\t\t\tbreak;\n\t\t\tcase '_':\n\t\t\tcase '-':\n\t\t\t\tstate = State.FIND_SET;\n\t\t\t\thighlightCounter = 0;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tint col = \"qazQAZ\".indexOf(key) >= 0 ? 0\n\t\t\t\t: \"wsxWSX\".indexOf(key) >= 0 ? 1\n\t\t\t\t\t\t: \"edcEDC\".indexOf(key) >= 0 ? 2\n\t\t\t\t\t\t\t\t: \"rfvRFV\".indexOf(key) >= 0 ? 3\n\t\t\t\t\t\t\t\t\t\t: \"tgbTGB\".indexOf(key) >= 0 ? 4\n\t\t\t\t\t\t\t\t\t\t\t\t: \"yhnYHN\".indexOf(key) >= 0 ? 5 : \"ujmUJM\".indexOf(key) >= 0 ? 6 : 7;\n\t\tint row = \"qwertyuQWERTYU\".indexOf(key) >= 0 ? 0 : \"asdfghjASDFGHJ\".indexOf(key) >= 0 ? 1 : 2;\n\n\t\tif (col < currentCols) {\n\t\t\tgrid.updateSelected(col, row);\n\t\t} else {\n\t\t\tmessage = 8;\n\t\t}\n\t}", "@Override\n\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\n\t\t}", "public void setKey(char key){ this.key = key;}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "public void keyPressed(KeyEvent e) \r\n { \r\n keyUser = e.getKeyCode();\r\n }", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t\n\t}", "public void keyPressed(KeyEvent e) {\n \n }", "public void keyPressed(KeyEvent e) {\n \n }", "public void keyPressed(KeyEvent e) {\n \n }", "public void keyTyped (KeyEvent e){\n switch (e.getKeyChar()){\n case '1':\n one.doClick(); break;\n case '2':\n two.doClick(); break;\n case '3':\n three.doClick(); break;\n case '4':\n four.doClick(); break;\n case '5':\n five.doClick(); break;\n case '6':\n six.doClick(); break;\n case '7':\n seven.doClick(); break;\n case '8':\n eight.doClick(); break;\n case '9':\n nine.doClick(); break;\n case '0':\n zero.doClick(); break;\n case 'c':\n case 'C':\n case KeyEvent.VK_ESCAPE:\n clear.doClick(); break;\n case '+':\n add.doClick(); break;\n case '-':\n subtract.doClick(); break;\n case '*':\n multiply.doClick(); break;\n case '/':\n divide.doClick(); break;\n case '=':\n equals.doClick(); break;\n }\n }", "public void hileraReconocer (javafx.scene.input.KeyEvent keyEvent) {\r\n char car = keyEvent.getCharacter().charAt(0);\r\n \r\n if(j==1){\r\n if ((car < 'a' || car > 'z') && (car < 'A' || car > 'Z') ) {\r\n keyEvent.consume();\r\n } \r\n }else{\r\n if ((car < '0' || car > '9') ) {\r\n keyEvent.consume();\r\n } \r\n }\r\n \r\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tSystem.out.println(e.getKeyChar()+\" ta precionando a tecla igual um idiota\");\n\t\t\t\tSystem.out.println(e.getKeyCode());\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public void keyPressed(KeyEvent e) {}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent evt) {\n\t\t\n\t}", "private void typeKey(char keyChar) {\r\n if(keyChar == '1') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(1);\r\n }\r\n if(keyChar == '2') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(2);\r\n }\r\n if(keyChar == '3') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(3);\r\n }\r\n if(keyChar == '4') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(4);\r\n }\r\n if(keyChar == 's' || keyChar == 'S')\r\n restart.typed(true);\r\n if(keyChar == 'n' || keyChar == 'N')\r\n System.exit(0); // TODO: funciona estando en inselection y no deberia\r\n }", "@Override\n\t\t\t\tpublic void keyPressed(KeyEvent arg0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void keyPressed(KeyEvent e) {}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t}", "@Override\n public void keyPressed(KeyEvent e) {\n\n\n }", "public void keyPressed(int key) {\n\t\tif(key==GameSystem.DOWN){\n\t\t\tif(dSelected==DEATH.RESTART){\n\t\t\t\tdSelected=DEATH.BACKTOMENU;\n\t\t\t}\n\t\t}\n\t\telse if(key==GameSystem.UP){\n\t\t\tif(dSelected==DEATH.BACKTOMENU){\n\t\t\t\tdSelected=DEATH.RESTART;\n\t\t\t}\t\n\t\t}\n\t\telse if(key==GameSystem.CONFIRM){\n\t\t\tif(dSelected==DEATH.BACKTOMENU){\n\t\t\t\tGameSystem.TWO_PLAYER_MODE=false;\n\t\t\t\tGameSystem.PLAYER_ONE_CHOSEN=false;\n\t\t\t\tMenu.backToMenu();\n\t\t\t}\n\t\t\telse if(dSelected==DEATH.RESTART){\n\t\t\t\tMenu.toGameMode();\n\t\t\t}\n\t\t}\n\t}", "public void keyPressed( KeyEvent e ) { }", "@Override\n public void keyPressed(Iterator<Integer> iterator) {\n this.selectedKeyboardController.keyPressed(iterator);\n\n // notify scene observers\n this.scene.notifyObservers();\n }", "@Override\r\n public void keyPressed(KeyEvent e) {\n \r\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "void keyPressed(int keycode);", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t}" ]
[ "0.6652541", "0.6570009", "0.6530367", "0.6466208", "0.6439196", "0.643155", "0.6422353", "0.6418088", "0.6415438", "0.63669413", "0.6351163", "0.6338357", "0.6336042", "0.63147646", "0.6244489", "0.6235188", "0.62296736", "0.62162894", "0.6211629", "0.62019557", "0.62009454", "0.618957", "0.61844724", "0.61672014", "0.6161089", "0.6154372", "0.61537606", "0.6136369", "0.61202914", "0.61202914", "0.61202914", "0.61118823", "0.6108532", "0.610434", "0.6102175", "0.60962355", "0.6083556", "0.60825956", "0.6073526", "0.6052858", "0.6044586", "0.60174465", "0.60174465", "0.60174465", "0.60174465", "0.60174465", "0.60174465", "0.60174465", "0.60063815", "0.6005338", "0.6005338", "0.6005338", "0.6005338", "0.6005338", "0.6005338", "0.6005338", "0.6005338", "0.6005338", "0.60018873", "0.60018873", "0.60018873", "0.60016716", "0.59975576", "0.59961", "0.5994648", "0.59882015", "0.59868485", "0.59861404", "0.598317", "0.5977958", "0.5974343", "0.59742004", "0.59736985", "0.59736985", "0.59736985", "0.59736985", "0.5973041", "0.59726197", "0.59712774", "0.59702677", "0.5962959", "0.59578586", "0.59578586", "0.59578586", "0.59578586", "0.59578586", "0.59578586", "0.59578586", "0.59578586", "0.59565", "0.59560525", "0.59560525", "0.59560525", "0.59560525", "0.5953466", "0.5948781", "0.5948781", "0.5948781", "0.5948781", "0.5946816" ]
0.59914505
65
Closing silently without IOEXception
private void silentlyClose(SelectionKey key) { Channel sc = (Channel) key.channel(); try { sc.close(); } catch (IOException e) { // ignore exception } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void forceClose();", "public void close() {}", "void close() throws Exception;", "void close() throws Exception;", "@Override\n public void close() {\n //no-op\n }", "void close() throws Exception;", "@Override\n public synchronized void forceClose() throws IOException {\n disconnect(true);\n }", "public void interrupt() {\n close();\n }", "void close(boolean evictOnClose) throws IOException;", "public synchronized void close() {}", "public void close() throws Exception {\n System.out.println(\"Closing\");\n \n throw new Exception(\"oh no\"); // The great thing in Java 7 is that, even though this line will throw an exception, but the \"Closing\" would still be executed.\n }", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "void close() throws IOException;", "public void close() {\n // should i do something ?\n }", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws java.io.IOException { throw new RuntimeException(\"Stub!\"); }", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "public void safeClose(){\r\n\t\tthis.isRun = false;\r\n\t}", "public void close() {\n System.exit(0);\n }", "public void close() {\n }", "public void close() {\n }", "public void close() {\n }", "@Override\n public void close() throws IOException\n {\n\n // do nothing\n }", "private void gracefullyShutdown() {\n try {\n this.inputStream.close();\n this.outputStream.close();\n } catch (IOException e) {\n // If there is an exception then there's nothing to be done.\n }\n }", "public abstract void close();", "public abstract void close();", "public abstract void close();", "public abstract void close();", "public abstract void close();", "@Override\r\n\tprotected void doClose() throws Exception {\n\t\t\r\n\t}", "public void close() {\n if (cleanup != null) {\n cleanup.disable();\n }\n if (isOpen()) {\n forceClose();\n }\n }", "@Override\n public void closing() {\n }", "public void close() {\n }", "public void close() {\n }", "public void close() {\n }", "public void close() {\r\n\t}" ]
[ "0.7433253", "0.74244493", "0.74195653", "0.74195653", "0.73711663", "0.72185135", "0.7188966", "0.7166616", "0.7102688", "0.7101046", "0.7092512", "0.7075443", "0.7075443", "0.7075443", "0.7075443", "0.7075443", "0.7075443", "0.7075443", "0.7075443", "0.7075443", "0.7075443", "0.7075443", "0.70544165", "0.70524615", "0.70524615", "0.70524615", "0.70524615", "0.70524615", "0.70524615", "0.70524615", "0.70524615", "0.7035577", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.70329714", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7027928", "0.7023721", "0.6991481", "0.694589", "0.694589", "0.694589", "0.6941671", "0.6917454", "0.6909565", "0.6909565", "0.6909565", "0.6909565", "0.6909565", "0.6904776", "0.6904038", "0.6900252", "0.68863755", "0.68863755", "0.68863755", "0.6879932" ]
0.0
-1
The entry point of application.
public static void main(String[] args) throws NumberFormatException, IOException { if (args.length != 3) { usage(); return; } if (args[0].length() > 9) { System.out.println("Login name cannot exceed 9 caracters"); return; } Pattern pattern = Pattern.compile("[^a-zA-Z0-9]"); Matcher matcher = pattern.matcher(args[0]); if (matcher.find()) { System.out.println("Login cannot contains special characters"); return; } new ClientChatOs(args[0], new InetSocketAddress(args[1], Integer.parseInt(args[2]))).launch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\trunApplication();\n\t}", "public static void main(String[] args) {\n startApplication();\n }", "public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}", "public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResources.MainControl = new Control();\r\n // Starts main application\r\n GlobalResources.MainControl.StartApplication();\r\n }", "public static void main( String[] args )\n\t{\n\t\trunApp();\n\t}", "public static void main(String[] args){\n // app.run(args);\r\n new SpringApplicationBuilder(MainApplication.class).web(true).run(args);\r\n }", "public static void main(String[] args){\n\n MyApp myApp = new MyApp(); //1\n myApp.runMyApp(); //2\n System.out.println(\"End of Program\"); //3\n }", "public MainEntryPoint() {\r\n\r\n }", "public static void main(String[] args)\n { \n // Create a new instance of the application and make the currently\n \tEntryPoint theApp = new EntryPoint(); \n \t// running thread the application's event dispatch thread.\n theApp.enterEventDispatcher();\n }", "@Override\n public void run(ApplicationArguments args) {\n }", "public static void main() {\n \n }", "@Override public void run(ApplicationArguments args) {\n }", "public static void main(String[] args) {\n new MyApp();\n }", "public static void main(String[] args) {\n\t\tnew App();\r\n\t}", "public static void main(String[] args) {\r\n\t\t/* application object */\r\n\t\tCustomersApp myAp = new CustomersApp();\r\n\t\t/* run the application */\r\n\t\tmyAp.run();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n // Start App\n EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() { new App(); }\n });\n }", "public AuctionApp() {\r\n runAuctionApp();\r\n }", "public static void main(String args[]){\n\n createConnection();\n\n if (conn == null) {\n System.err.println(\"Failed to establish connection!\");\n }\n\n new App();\n\n }", "public static void main(String[] args) {\n App.main(args);\n }", "public static void main(final String... args) {\n\n Application.launch();\n }", "public static void main(String[] args) {\r\n SunSpotHostApplication app = new SunSpotHostApplication();\r\n app.run();\r\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"*** START MAIN() ***\");\n\t\tSpringApplication.run(BeshstoreApplication.class, args);\n\t\tSystem.out.println(\"*** END MAIN() ***\");\n\t}", "public void startApp()\r\n\t{\n\t}", "public ParkingApp() {\n runApp();\n }", "public static void main(String[] args)\n {\n Injector guice = Guice.createInjector(new DiscountGuiceModule());\n\n // Inject the application which contains a separate object graph which contains all the business logic\n // When we call the top level class, BasicApplication, guice will inject every static dependency that we request\n // via @Inject\n BasicApplication basicApplication = guice.getInstance(BasicApplication.class);\n\n // now start the application\n basicApplication.start();\n }", "public static void main(String[] args) {\n Startup.main(args);\n }", "public static void main(String[] args) throws Exception {\n URL webRootLocation = MainView.class.getResource(\"/webapp/\"); //src/masin\n URI webRootUri = webRootLocation.toURI();\n\n WebAppContext context = new WebAppContext();\n context.setBaseResource(Resource.newResource(webRootUri));\n context.setContextPath(\"/\");\n context.setAttribute(\"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\", \".*\");\n context.setConfigurationDiscovered(true);\n context.setConfigurations(new Configuration[]{\n new AnnotationConfiguration(),\n new WebInfConfiguration(),\n new WebXmlConfiguration(),\n new MetaInfConfiguration()\n });\n context.getServletContext().setExtendedListenerTypes(true);\n context.addEventListener(new ServletContextListeners());\n\n Server server = new Server(8080);\n server.setHandler(context);\n server.start();\n server.join();\n }", "public void run() {\n\t\tport(8080);\n\n\t\t// Main Page, welcome\n\t\tget(\"/\", (request, response) -> \"Welcome!\");\n\n\t\t// Date\n\t\tget(\"/date\", (request, response) -> {\n\t\t\tDate d = new Date(\"frida.org\", Calendar.getInstance().get(Calendar.YEAR),\n\t\t\t\t\tCalendar.getInstance().get(Calendar.MONTH), Calendar.getInstance().get(Calendar.DAY_OF_MONTH));\n\t\t\treturn om.writeValueAsString(d);\n\t\t});\n\n\t\t// Time\n\t\tget(\"/time\", (request, response) -> {\n\t\t\tTime t = new Time(\"frida.org\", Calendar.getInstance().get(Calendar.HOUR),\n\t\t\t\t\tCalendar.getInstance().get(Calendar.MINUTE), Calendar.getInstance().get(Calendar.SECOND));\n\t\t\treturn om.writeValueAsString(t);\n\t\t});\n\t}", "public static void main(String[] args) {\n // Configure MongoDB and Morphia\n \n \n // Define route handlers\n get(\"/\", PersonController.sayHello);\n }", "public static void main(String[] args) {\n WeatherApplication gui = new WeatherApplication( );\n \n // make window visible\n gui.setVisible( true );\n \n }", "public static void main(String[] args) {\n Application.launch(App.class, args);\n }", "public static void main(String[] args) {\n\t\tnew LoipeApp();\n\t}", "public static void main(String[] args) {\n\n Application.launch(args);\n }", "public static void main(String[] args) {\n \n SpringApplication.run(App.class, args);\n }", "public static void main(String[] args) {\n Application.launch(args);\n }", "@Override\n\t public void run(ApplicationArguments args) throws Exception {\n\n\t }", "public static void main(String args[]){\r\n Application theApp = new Application();\r\n theApp.createAccounts();\r\n theApp.processAccounts();\r\n theApp.outputAccounts();\r\n\r\n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(HimalayanKitchenBackendStarter.class, args);\t\t\n\t}", "public static void main(String[] args) { \n\t\t//we are calling a static method and passing it the name of the class where we have our Main method.\t\t\n\t\tSpringApplication.run(CourseApiApp.class, args);\n\t}", "public static void main(String[] args) {\n staticFiles.location(\"/public\");\n\n //This will listen to GET requests to /model and return a clean new model\n get(\"/model/:Version\", (req, res) -> newModel( req ));\n\n //This will listen to POST requests and expects to receive a game model, as well as location to fire to\n post(\"/fire/:Version/:row/:col/:hard\", (req, res) -> fireAt( req ));\n //This will handle the scan feature\n post(\"/scan/:Version/:row/:col/:hard\", (req, res) -> scan( req ));\n\n //This will listen to POST requests and expects to receive a game model, as well as location to place the ship\n post(\"/placeShip/:Version/:id/:row/:col/:orientation/:hard\", (req, res) -> placeShip( req ));\n }", "public static void main ( String[] args ) {\n PhoneBook myApp = new PhoneBook(); \r\n }", "public static void main(String[] args) {\n\t\tAbstractDataHandlerFactory dataHandlerFactory = DataHandler.getDataHandlerInstance(); \n\t\t\n\t\t// Create a Controller object to begin the application and control code flow \n\t\tController control = new Controller(dataHandlerFactory);\t\n\t}", "public static void main(String[] args){\n\t\tView view = new View();\r\n\t\tDatabaseInteraction model = new DatabaseInteraction();\r\n\r\n\t\t//Initialize controller. \r\n\t\tController controller = new Controller(view,model);\r\n\r\n\t\t//Connect database, start user interaction, and let the controller respond to user options. \r\n\t\tmodel.connectDatabase();\r\n\t\tcontroller.userInteracion();\r\n\t\tcontroller.respondToUserOption();\r\n\r\n\t}", "public static void main(String[] args) {\n staticFiles.location(\"/public\");\n //This will listen to GET requests to /model and return a clean new model\n get(\"/model\", (req, res) -> newModel());\n //This will listen to POST requests and expects to receive a game model, as well as location to fire to\n post(\"/fire/:row/:col\", (req, res) -> fireAt(req));\n //This will listen to POST requests and expects to receive a game model, as well as location to place the ship\n post(\"/placeShip/:id/:row/:col/:orientation\", (req, res) -> placeShip(req));\n }", "public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }", "public static void main(String[] args) {\n MainController mainController = new MainController();\n mainController.showView();\n SessionManager.getSessionManager().getSession();\n }", "public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(StwwmakerApplication.class, args);\n\t}", "public static void main(String[] args) {\n\t\tSpringApplication.run(Application.class, args);\n\n\t\t\n\t}", "public static void main(String[] args) {\n Injector guice = Guice.createInjector(new DiscountGuiceModule());\n\n // Creates separate object graph with business logic, etc. Instantiate the main object on that\n MainAppWithCustomFactory application = guice.getInstance(MainAppWithCustomFactory.class);\n\n // Start your app\n application.start();\n }", "public static void main(String[] args) {\n InitStart.Init();\r\n new MainMenuView().displayMenu();\r\n\r\n }", "public static void main(String[] args) {\n new GraphicStudyApp();\n }", "public Main() {\n \n \n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(PatyalApplication.class, args);\n\t}", "public static void main(String[] args)\n {\n MyApp theApp = new MyApp(); \n theApp.enterEventDispatcher();\n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(ResturantAppApplication.class, args);\n\t}", "public static void main(String[] args) {\n if (Config.Api.URL.contains(\"localhost\")) {\n Server.main(new String[0]);\n }\n Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();\n config.setTitle(Config.Game.TITLE);\n config.setWindowedMode(Config.Game.WIDTH, Config.Game.HEIGHT);\n config.setWindowIcon(Config.Game.ICON);\n config.setResizable(false);\n new Lwjgl3Application(new BubbleSpinner(), config);\n }", "public static void main(String[] args) {\r\n // TODO code application logic here\r\n ObjectFactory.getUIinstance().getHomeInstance().setVisible(true);\r\n }", "public MainEntry() {\n\t\tthis.taskController = new Controller();\n\t}", "public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(AnzEngineeringApplication.class, args);\n\t}", "public static void main(String args[]) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tnew AppStarter();\n\t\t\t}\n\t\t});\t\n\t}", "public static void main(String[] args){\n FinagoController finagoController = new FinagoController();\n finagoController.run();\n }", "private Main() {\n\n super();\n }", "public static void main(String... args) {\n\t\tApplication.launch(View.class, args);\n\t}", "public static void main(String[] args) {\n\t\tHelloAiming app = new HelloAiming();\n app.setConfigShowMode(ConfigShowMode.AlwaysShow);\n\t\tapp.start();\n\n\t}", "public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }", "public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }", "public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }", "public static void main(String[] args) {\n SpringApplication.run(Application.class, args);\n }", "public static void main(final String[] args) {\n\n System.setProperty(\"org.restlet.engine.loggerFacadeClass\", \"org.restlet.ext.slf4j.Slf4jLoggerFacade\");\n\n // Start application with the command line arguments\n Bootstrapper.launchApp(new OImaging(args));\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tApplication.launch(args);\r\n\t}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public static void main(String []args){\n\n }", "public DefaultApplication() {\n\t}", "public static void main(String[] args) {\n\t\tApplication.launch(args); // Not needed for running from the command line\n\t}", "public static void main(String[] args) {\n SpringApplication.run(ArtworkApplication.class, args);\n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(Application.class, args);\n\t}", "public static void main(String[] args) {\n\t\tSpringApplication.run(Application.class, args);\n\t}", "public static void main(String[] args) {\n\n SpringApplication.run(Application.class, args);\n // AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n }", "public static void main(String[] args){\n System.setProperty(\"spring.jackson.serialization.INDENT_OUTPUT\", \"true\");\n\n SpringApplication application = new SpringApplication(Application.class);\n application.addListeners(new ApplicationPidFileWriter(\"ms-recommendation.pid\"));\n application.run(args);\n }", "public static void main(final String[] args) throws Exception {\n new ApiApplication().run(args);\n }", "public static void main(String[] args) {\n launch(RestaurantManagementApp.class, args);\n }", "public static void main(String[] args) {\n\t\tnew SpringApplicationBuilder(Application.class).web(true).run(args);\n\t}", "public static void main(String[] args)\r\n {\r\n Ipoki app = new Ipoki();\r\n app.enterEventDispatcher();\r\n }", "@Override\n protected void appStart() {\n }", "public static void main(String args[]) {\n Greeting.ToyApp toyApp = DaggerGreeting_ToyComponent.builder().build().toyApp();\n toyApp.greeting.sayHello();\n }", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n\t\t\n\t\tApplication.launch(args);\n\t\t\n\t\t\n\t\t\n\n\t}", "public MainApp() {\n initComponents();\n }", "public static void main(String[] args) {\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n ctx.register(ApplicationConfig.class);\n ctx.register(ApplicationContext.class);\n ctx.register(PersistenceContext.class);\n ctx.register(ProductionContext.class);\n ctx.register(SwaggerConfig.class);\n\n SpringApplication.run(Application.class);\n }", "public static void main(String[] args) {\n SpringApplication.run(MyLotoApplication.class, args);\n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(ApiApplication.class, args);\n\t}", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public static void main(String[] args) {\n\t\tSpringApplication.run(ManolitoBackApplication.class, args);\n\t\t//SpringApplication.run(ManolitoBackApplication.class, \"--debug\");\n\t\n\t}", "public static void main(String[] args) {\n\t\tApplication.launch(Main.class, args);\n\t}", "public static void main(String[] args) {\n LogInController logInController = new LogInController();\n logInController.initController();\n \n }", "public static void main(String[] args) {\n // Create the system.\n Application.launch( args );\n }", "public static void main (String []args){\n }", "public static void main(String[] args) {\n\t\tApplication.launch(args);\n\n\t}", "public static void main(String[] args)\r\n {\n\t\t System.out.println(\"************* Welocome To My Application ************* \");\r\n\t\t MainMenu();\r\n }" ]
[ "0.73630613", "0.7347031", "0.7215883", "0.71634805", "0.71544456", "0.71317524", "0.7123426", "0.7119055", "0.70908254", "0.7038634", "0.7020937", "0.7018889", "0.70058846", "0.7001001", "0.69867754", "0.6964717", "0.6941777", "0.693072", "0.69003654", "0.6891231", "0.68892854", "0.68789196", "0.6877498", "0.6848687", "0.684384", "0.6834209", "0.680974", "0.6806298", "0.6799862", "0.6798445", "0.67952025", "0.6758019", "0.6750142", "0.67395455", "0.6735814", "0.6730339", "0.67196625", "0.67109424", "0.6710178", "0.670756", "0.66934216", "0.66886985", "0.6685946", "0.6664809", "0.6657899", "0.66574305", "0.66540635", "0.6649639", "0.66483486", "0.66476285", "0.6647542", "0.66465086", "0.6635075", "0.6633407", "0.6631268", "0.66275764", "0.6617482", "0.6614574", "0.6607494", "0.659264", "0.6589237", "0.6585533", "0.6582555", "0.65814507", "0.6580764", "0.65743166", "0.65720123", "0.65720123", "0.65720123", "0.65720123", "0.6567401", "0.655267", "0.6550088", "0.65488786", "0.6548491", "0.65484685", "0.6543597", "0.653707", "0.653707", "0.6532345", "0.6531918", "0.6531708", "0.6531565", "0.65314555", "0.65293294", "0.65292287", "0.6526775", "0.65242136", "0.6516836", "0.6515459", "0.65075153", "0.6506322", "0.6505312", "0.65042216", "0.65009314", "0.6498618", "0.6498417", "0.64978623", "0.6493323", "0.6490639", "0.64902043" ]
0.0
-1
Checking connexion to the server and sending ConnexionFrame
public void doConnect() throws IOException { if (!sc.finishConnect()) { return; // the selector gave a bad hint } // Sending pseudo var newConnexio = new ConnexionFrame(pseudo); queueMessage(newConnexio.asByteBuffer().flip()); updateInterestOps(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void connexionServeur() {\r\n\r\n\t\tString serverIp = JOptionPane\r\n\t\t\t\t.showInputDialog(\"Entrez le nom du serveur.\");\r\n\t\ttry {\r\n\t\t\tsocket = new Socket(serverIp, 4456);\r\n\t\t\tlogger.info(\"Connexion au socket serveur.\");\r\n\r\n\t\t\tThread t = new Thread(new EnvoiPresence(socket));\r\n\t\t\tt.start();\r\n\r\n\t\t\tThread t2 = new Thread(new ReceptionListUser(socket, mainView));\r\n\t\t\tt2.start();\r\n\r\n\t\t} catch (ConnectException e) {\r\n\t\t\tJOptionPane.showMessageDialog(new Frame(),\r\n\t\t\t\t\t\"Le serveur Draw Me An Idea n'est pas lancé\", \"Erreur\", 1);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (UnknownHostException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "public static void serverConnected() {\r\n jButton5.setEnabled(false);\r\n jButton4.setEnabled(false);\r\n jButton6.setEnabled(true);\r\n jButton1.setEnabled(true);\r\n jTextField1.setEnabled(true);\r\n log(\"GREEN\", \"[Status] - Connected !\");\r\n }", "private void sendUpdateConnectionInfo() {\n\n }", "private static boolean AttemptConnect() {\n try {\n if (Connect()) {\n Log.Confirmation(\"Connected to server on: \" + socket);\n // send connection type\n dos.writeUTF(\"viewer\");\n return true;\n } else {\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }", "void responseSent( C conn ) ;", "public void OnConnectSuccess();", "public synchronized boolean start(){\n \n\t\t/**\n\t\t * CONNECT TO SERVER\n\t\t */\n\t\tboolean connection = connectToServer(oml_server);\n \n\t\t/**\n\t\t * CREATE THE HEADER\n\t\t */\n\t\tcreate_head();\n \n\t\t/**\n\t\t * SEND THE HEADER\n\t\t */\n\t\tboolean injection = inject_head();\n\t\t\n\t\tif( connection && injection ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "private void connectToServer() {\n\n try {\n this.socket = new Socket(InetAddress.getByName(serverIP), this.port);\n\n oos = new ObjectOutputStream(socket.getOutputStream());\n oos.flush();\n ois = new ObjectInputStream(socket.getInputStream());\n\n Message connectMessage = new Message(Message.CLIENT_CONNECT);\n connectMessage.setMessage(userName);\n sendToServer(connectMessage);\n\n Message message;\n while (true){// wait for welcome message\n message = (Message) ois.readObject();\n if(message != null && message.getType() == Message.WELCOME){\n handleMessage(message);\n break;\n }\n }\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "void onConnectToNetByIPSucces();", "public boolean testConnection() {\r\n boolean toReturn = true;\r\n\r\n String[] paramFields = {};\r\n SocketMessage request = new SocketMessage(\"admin\", \"ping\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\", paramFields);\r\n SocketMessage response = handleMessage(request);\r\n if (isSuccessful(response)) {\r\n toReturn = true;\r\n } else {\r\n toReturn = false;\r\n }\r\n\r\n return toReturn;\r\n }", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "public void conectServer() {\n\n\t}", "private boolean isConnected() {\n\t\treturn (this.serverConnection!=null); \n }", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }", "protected abstract boolean isConnected();", "public static boolean isConnectedToInternet() {\n String pingServerURL = pingBackUrl.substring(0, pingBackUrl.indexOf(\"/\", \"http://url\".length()));\n try {\n URL url = new URL(pingServerURL);\n HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n urlConn.connect();\n return (HttpURLConnection.HTTP_NOT_FOUND != urlConn.getResponseCode());\n } catch (MalformedURLException e) {\n LOG.error(\"LeadCapture : Error creating HTTP connection to the server : \" + pingServerURL);\n \n } catch (IOException e) {\n LOG.error(\"LeadCapture : Error creating HTTP connection to the server : \" + pingServerURL);\n }\n return false;\n }", "public static boolean sendCredentials() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.requestLoginVerification());\n ClientService.receiveMessageFromServer(connectionToServer);\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return !ClientService.getLastMessageFromServer().contains(XML_Manager.XML_NODES.Error.toString());\n }", "private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella.infoSocket.getLocalAddress().getHostAddress();\n\tif((host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getHostAddress())||host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getCanonicalHostName()))&&(simpella.serverPortNo==port || simpella.downloadPortNo==port)){\n\t\tproceedFlag=0;\n\t\tSystem.out.println(\"Client: Self Connect not allowed\");\n\t\t}\n\twhile(iterator.hasNext() && proceedFlag==1)\n\t{\n\t\tSocket sock=(Socket)iterator.next();\n\t\t\n\t\tif((host.equalsIgnoreCase(sock.getInetAddress().getHostAddress()) || host.equalsIgnoreCase(sock.getInetAddress().getCanonicalHostName())) && port==sock.getPort()){\n\t\t\tproceedFlag=0; \n\t\t\tSystem.out.println(\"Client: Duplicate connection to same IP/port not allowed\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\tif(proceedFlag==1)\n\t\t{\n\t\n\t\n\tbyte type=04;\n\tMessage msg=new Message(type);\n\ttry {\n\t\tConnection.outgoingConnPackRecv[noOfConn]=0;\n\t\tConnection.outgoingConnPackSent[noOfConn]=0;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]=0;\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]=0;\n\t\t\n\t\tclientSideSocket[noOfConn]=new Socket(host,port);\n\t\tSystem.out.println(\"Client:TCP Connection established...Begin handshake\");\n\t\toutToServer[noOfConn]=new ObjectOutputStream(clientSideSocket[noOfConn].getOutputStream());\n\t\tinFromServer[noOfConn]=new ObjectInputStream(clientSideSocket[noOfConn].getInputStream());\n\t\tString strToServer=\"SIMPELLA CONNECT/0.6\\r\\n\";\n\t\tbyte[] byteArray= strToServer.getBytes(\"UTF-16LE\");\n\t\tmsg.setPayload(byteArray);\n \t\n\t\tSystem.out.println(\"Client:\"+new String(byteArray));\n\t\t//outToServer.writeUTF(\"SIMPELLA CONNECT/0.6\\r\\n\");\n\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray.length+23;\n\t\toutToServer[noOfConn].writeObject((Object)msg);\n\t\tConnection.outgoingConnPackRecv[noOfConn]++;\n\t\t\n\t\tMessage msg1=(Message) inFromServer[noOfConn].readObject();\n\t\tbyte[] fromServer=msg1.getPayload();\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]+=fromServer.length+23;\n\t\tString strFromServer=new String(fromServer);\n\t\tSystem.out.println(\"Server:\"+strFromServer);\n\t\tif(msg1.getMessage_type()==05)\n\t\t\t{\n\t\t\tstrToServer=\"SIMPELLA/0.6 200 thank you for accepting me\\r\\n\";\n\t\t\tbyte[] byteArray1= strToServer.getBytes(\"UTF-16LE\");\n\t\t\tMessage m=new Message((byte)05);\n\t\t\tm.setPayload(byteArray1);\n\t\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray1.length+23;\n\t\t\toutToServer[noOfConn].writeObject((Object)m);\n\t\t\t\n\t\t\tConnection.connections.add(clientSideSocket[client.noOfConn]);\n\t\t\tConnection.outgoingConnection[client.noOfConn]=clientSideSocket[client.noOfConn];\n\t\t\tConnection.clientOutStream[client.noOfConn]=outToServer[client.noOfConn];\n\t\t\tnew clientSocketListen(clientSideSocket[noOfConn],outToServer[noOfConn],inFromServer[noOfConn]);\n\t\t\tupdate();\n\t\t\tnoOfConn++;\n\t\t\t//System.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"<open>:Cannot open connection to \"+host+\" at this time\");\n\t\t\t\tclientSideSocket[noOfConn].close();\n\t\t\t\tinFromServer[noOfConn].close();\n\t\t\t\toutToServer[noOfConn].close();\n//\t\t\t\tSystem.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\t\n\t\t\n\t} catch (UnknownHostException e) {\n\t\tSystem.out.println(\"Unknown Host: Destination host unreachable\");\n\t\t//e.printStackTrace();\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Connection Refused/Destination host unreachable\");\n\t}\n\t\t}\n\t}", "public OnlineTicTacToeFrame( InetAddress addr, int port ) {\n // set up a TCP connection with my counterpart\n \ttry {\n \t server = new ServerSocket( port );\n // ITEM 1: set the server non-blocking, (i.e. time out beyon 1000) \n \t server.setSoTimeout(1000);\n \t \n \t} catch ( Exception e ) {\n \t error( e );\n \t}\n \t\n \tboolean isO;\n \t\n \t// While accepting a remote request, try to send my connection request\n \twhile ( true ) {\n \t try {\n \t\t\n \t \t// ITEM 2: Try to accept a connection as a server\n \t \t//The accept method waits until a client starts up and requests a\n \t \t//connection on the host and port of this server\n \t \tclient = server.accept();\n \t } catch ( SocketTimeoutException ste ) {\n \t\t// Couldn't receive a connection request withtin INTERVAL\n \t } catch ( IOException ioe ) {\n \t\terror( ioe );\n \t }\n \t // Check if a connection was established. If so, leave the loop\n \t if ( client != null ) {\n \t \tSystem.out.println( \"Successfully acquired connection by listenting\" );\n \t \tisO = false;\n \t \t\n \t \tbreak;\n \t }\n\n \t try {\n \t // ITEM 3: Try to request a connection as a client\n \t\t client = new Socket(addr,port); \n \t\t \n \t } catch ( IOException ioe ) {\n \t\t// Connection refused\n \t }\n \t // Check if a connection was established, If so, leave the loop\n \t if ( client != null ) {\n \t \tSystem.out.println( \"Successfully acquired connection by sending request\" );\n \t \tisO = true;\n \t \n \t \tbreak;\n \t }\n \t} \t\n \t\n \t// Exchange a message with my counter part.\n \ttry {\n \t System.out.println( \"TCP connection established...\" );\n \t /* ITEM 4: Create an ObjectOutputStream object */;\n \t output= new ObjectOutputStream(client.getOutputStream()); \n \t /* ITEM 5: Create an InputOutputStream Object */ ;\n \t input= new ObjectInputStream( client.getInputStream( ) ); \n \t \n \t} catch ( Exception e ) {\n \t error( e );\n \t}\n \t\n \t\n \t// set up a window\n makeWindow( isO ); // or makeWindow( false );\n // start my counterpart thread\n Counterpart counterpart = new Counterpart(input,this);\n counterpart.start();\n }", "public boolean authToServer() throws ClientChatException{\n\n\t\t// On crée un objet container pour contenir nos donnée\n\t\t// On y ajoute un AdminStream de type Authentification avec comme params le login et le mot de pass\n \tAuthentificationRequest request = new AuthentificationRequest(login, pass);\n\t\t\n\t\t//Auth sur le port actif\n\t\ttry {\n\t\t\t// On tente d'envoyer les données\n\t\t\toos_active.writeObject(request);\n\t\t\t// On tente de recevoir les données\n\t\t\tAuthentificationResponse response = (AuthentificationResponse)ois_active.readObject();\n\n\t\t\t// On switch sur le type de retour que nous renvoie le serveur\n\t\t\t// !!!Le type enum \"Value\" est sujet à modification et va grandir en fonction de l'avance du projet!!!\n\t\t\tswitch(response.getResponseType()){\n\t\t\tcase AUTH_SUCCESS:\n\t\t\t\t\n\t\t\t\towner = response.getOwner();\n\t\t\t\t\n\t\t\t\t//creation du socket\n\t\t\t\ttry {\n\t\t\t\t\ts_passive = new Socket(address, 3003);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new ClientChatException(ClientChatException.IO_ERREUR, \n\t\t\t\t\t\"ERROR : passive socket creation failed!\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// On crée le flux sortant !!!OBLIGATOIRE de créer le flux sortant avant le flux entrant!!!\n\t\t\t\ttry {\n\t\t\t\t\toos_passive = new ObjectOutputStream(s_passive.getOutputStream());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new ClientChatException(ClientChatException.IO_ERREUR, \n\t\t\t\t\t\"ERROR : passive OOS creation failed!\");\n\t\t\t\t}\n\t\t\t\t// On crée le flux entrant\n\t\t\t\ttry {\n\t\t\t\t\tois_passive = new ObjectInputStream(s_passive.getInputStream());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new ClientChatException(ClientChatException.IO_ERREUR, \n\t\t\t\t\t\"ERROR : passive OIS creation failed!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trequest = new AuthentificationRequest(owner);\t\t\t\n\t\t\t\t//Auth sur le port passif\n\t\t\t\ttry {\n\t\t\t\t\t// On tente d'envoyer les données\n\t\t\t\t\toos_passive.writeObject(request);\n\t\t\t\t\t// On tente de recevoir les données\n\t\t\t\t\tresponse = (AuthentificationResponse)ois_passive.readObject();\n\n\t\t\t\t\t// On switch sur le type de retour que nous renvoie le serveur\n\t\t\t\t\t// !!!Le type enum \"Value\" est sujet à modification et va grandir en fonction de l'avance du projet!!!\n\t\t\t\t\tswitch(response.getResponseType()){\n\t\t\t\t\tcase AUTH_SUCCESS:\n\t\t\t\t\t\topResult = \"Welcome!\";\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase AUTH_FAIL:\n\t\t\t\t\t\topResult = \"ERROR : check login/pwd! (passive socket)\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch(Exception e){\n\t\t\t\t\tthrow new ClientChatException (ClientChatException.IO_ERREUR, \"ERROR: Communication Error (passive)\");\n\t\t\t\t}\n\t\t\t\n\t\t\tcase AUTH_FAIL:\n\t\t\t\topResult = \"ERROR : check login/pwd! (active socket)\";\n\t\t\t\treturn false;\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new ClientChatException (ClientChatException.IO_ERREUR, \"ERROR: Communication Error (active)\");\n\t\t}\n\t\treturn true;\n }", "private boolean connectServer() {\n\t\tclNetwork networkInfo = new clNetwork();\n\t\ttry {\n\t\t\tSocket _socket = new Socket(dstAddress, networkInfo.NTP_PORT);\n\t\t\t_socket.setSoTimeout(1000);\n\t\t\t_socket.setTcpNoDelay(true);\n\t\t\topenedSocket = _socket;\n\t\t\tinStream = openedSocket.getInputStream();\n\t\t\toutStream = openedSocket.getOutputStream();\n\t\t\treturn true;\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }", "private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tObject server = serverDefinition.getServerFlag().getFlag();\n\t\t\t\t\tif (server == null) {\n\t\t\t\t\t\tshowPanel(CONNECTING_PANEL);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowPanel(CONNECTED_PANEL);\n\t\t\t\t\t}\n\t\t\t\t}", "private void msgNoServerConnection() {\r\n\thandler.sendEmptyMessage(1); // enviar error al cargar\r\n }", "public boolean start() {\n\t\t// Tenta se conectar ao servidor\n\t\ttry {\n\t\t\tsocket = new Socket(server, port); //assimila o socket e busca conexão caso a porta esteja aberta\n\t\t} \n\t\tcatch(Exception ec) {\n\t\t\tdisplay(\"Não foi possível estabelecer a conexão com o servidor\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString msg = \"Conexão estabelecida com servidor [\" + socket.getInetAddress() + \":\" + socket.getPort()+\"]\";\n\t\tdisplay(msg);\n\t\n\t\t\n\t\t\n\t\t//\tCria canal de entrada e canal de saida com servidor\n\t\ttry\n\t\t{\n\t\t\tsInput = new ObjectInputStream(socket.getInputStream());\n\t\t\tsOutput = new ObjectOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Não foi possível criar canais de comunicação\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// INCIA THREAD ( escuta o servidor ) \n\t\tnew ListenFromServer().start();\n\t\t\n\t\t\n\t\t// tenta enviar a primeira mensagem\n\t\ttry\t{\n\t\t\tsOutput.writeObject(username);\n\t\t} catch (IOException eIO) {\n\t\t\tdisplay(\"A comunicação não foi estabelecida por completo, a conexão será desfeita\");\n\t\t\tdisconnect();\n\t\t\treturn false;\n\t\t}\n\n\t\t//retorna true para validar a conexão estabelecida\n\t\treturn true;\n\t}", "public boolean connectServer(User user){\n echange = context.socket(ZMQ.REQ);\n echange.connect(adresse);\n \n //on envoi la demande de connexion\n String message = encode(user.getNick())+encode(\"CONNECT\")+encode(user.getPgpKey())+encode(user.getSignature());\n echange.send(message.getBytes(),0);\n \n //on attend la réponse du server\n byte[] reply = echange.recv(0);\n String repServer = new String(reply);\n String[] tmp = repServer.split(this.msgDelimiter);\n System.out.print(\"Received : \");\n for(int i=0;i<tmp.length;i++){\n tmp[i]=new String (DatatypeConverter.parseBase64Binary(tmp[i]));\n System.out.print(tmp[i]+\" \");\n }\n System.out.println(\"\");\n \n if(tmp[0].equals(\"CONNECT\")){\n cleUID=tmp[1];\n System.out.println(\"Connexion au server OK, cleUID = \" +cleUID);\n return true;\n }\n else{\n System.out.println(\"Connexion au server echoué\");\n return false;\n }\n }", "private void treatFrame(Frame frame) throws IOException {\n if (frame instanceof PublicMessage) {\n var pm = (PublicMessage) frame;\n System.out.println(pm.getPseudo() + \": \" + pm.getMsg());\n\n } else if (frame instanceof PrivateMessage) {\n var pm = (PrivateMessage) frame;\n System.out.println(\"Private message from \" + pm.getPseudo() + \": \" + pm.getMsg());\n } else if (frame instanceof ErrorFrame) {\n var ef = (ErrorFrame) frame;\n var efCode = ef.getCode();\n if (efCode == 1) {\n System.out.println(\"Login already used by another client\");\n silentlyClose();\n closed = true;\n return;\n } else if (efCode == 2) {\n System.out.println(\"Receiver does not exist\");\n return;\n } else if (efCode == 0) {\n silentlyClose();\n return;\n }\n } else if (frame instanceof PrivateConnexionRequest) {\n var pcr = (PrivateConnexionRequest) frame;\n System.out.println(\"Private connexion request from: \" + pcr.getRequester() +\n \" (/accept \" + pcr.getRequester() + \" or /decline \" + pcr.getRequester() + \")\");\n clientChatOs.privateContextMap.put(pcr.getRequester(),\n new PrivateContext(State.PENDING_TARGET, clientChatOs));\n } else if (frame instanceof PrivateConnexionDecline) {\n var pcd = (PrivateConnexionDecline) frame;\n System.out.println(\"Private connexion request with: \" + pcd.getReceiver() +\n \" declined\");\n clientChatOs.privateContextMap.remove(pcd.getReceiver());\n } else if (frame instanceof IdPrivateFrame) {\n var ipd = (IdPrivateFrame) frame;\n if (ipd.getRequester().equals(pseudo)) {\n clientChatOs.privateContextMap.get(ipd.getReceiver())\n .initializePrivateConnexion(ipd.getConnectId());\n } else {\n clientChatOs.privateContextMap.get(ipd.getRequester())\n .initializePrivateConnexion(ipd.getConnectId());\n }\n }\n }", "@Override\n\tprotected void onConnect() {\n\t\tLogUtil.debug(\"server connect\");\n\n\t}", "private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed\r\n log(\"GRAY\", \"[Client ] - Connecting to server ...\");\r\n\r\n try {\r\n String host = JOptionPane.showInputDialog(\"Address:\", \"137.30.209.204\");\r\n\r\n if (host != null && connection.connect(host)) {\r\n // Client connected to the Server\r\n setTitle(\"ChatRSA - Client\");\r\n jButton5.setEnabled(false);\r\n jButton4.setEnabled(false);\r\n jButton6.setEnabled(true);\r\n jButton1.setEnabled(true);\r\n jTextField1.setEnabled(true);\r\n log(\"GREEN\", \"[Status ] - Connected !\");\r\n\r\n } else {\r\n ChatWindow.log(\"GRAY\", \"[Client ] - Cancelled\");\r\n }\r\n\r\n } catch (UnknownHostException ex) {\r\n ChatWindow.log(\"GRAY\", \"[ Error] - connection can not be established in this host.\");\r\n } catch (IOException ex) {\r\n ChatWindow.log(\"GRAY\", \"[ Error] - connection can not be established in this host.\");\r\n }\r\n }", "@Override\r\n public Object connect() {\n if(status()){\r\n //creates thread that checks messages in the network\r\n System.out.println(\"notifying network that connection is good\");\r\n notifyObservers(this);\r\n }\r\n return socket;\r\n }", "private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }", "private void checkConnection(){\n NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();\n\n // if activeNetwork is not null, and a network connection is detected,\n // isConnected is true\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n\n // prepare output to indicate connection status\n String message = isConnected ? \"Connection Detected!\" : \"No Connection Detected!\";\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void networkIsOk() {\n\n\t}", "void toConnect() throws Exception {\n\t\tnameField.setVisible(false);\n\t\tf.setTitle(nameField.getText());\n\t\tsocketToServer = new Socket(\"127.0.0.1\", 5050);\n\t\tmyOutputStream = new ObjectOutputStream(socketToServer.getOutputStream());\n\t\tmyInputStream = new ObjectInputStream(socketToServer.getInputStream()); \n\t\tconnected();\n\t\tstart();\n\t}", "private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed\r\n try {\r\n\r\n if (isServing) {\r\n isServing = false;\r\n connection.listen(false);\r\n jButton5.setEnabled(true);\r\n jButton4.setText(\"Enable Server\");\r\n setTitle(\"ChatRSA \");\r\n ChatWindow.log(\"GRAY\", \"[ Server] - Closed\");\r\n } else {\r\n isServing = true;\r\n connection.listen(true);\r\n jButton5.setEnabled(false);\r\n jButton4.setText(\"Disable Server\");\r\n setTitle(\"ChatRSA - Server\");\r\n ChatWindow.log(\"GRAY\", \"[ Server] - Waiting for Connection ...\");\r\n }\r\n\r\n } catch (IOException ex) {\r\n ChatWindow.log(\"GRAY\", \"[ Error] - Maybe another server is already connected \");\r\n }\r\n }", "public boolean connect(){\r\n\r\n\t\t// Connect to server via TCP socket\r\n\t\ttry {\r\n\r\n\t\t\tclient = new Socket(host, port);\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"[EXCEPTION] connecting to server\");\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Connection to server could not be made. Try again later.\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\r\n\t\t// Get input and output Streams\r\n\t\ttry {\r\n\r\n\t\t\tpw = new PrintWriter(client.getOutputStream());\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(client.getInputStream()));\r\n\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"[EXCEPTION] creating streams\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Connection to server SUCESSFULL\");\r\n\t\treturn true;\r\n\t}", "@Override\n public void Connected() {\n if (strClientSerial != null) {\n LoginInfo_Req();\n }\n }", "public boolean confirmConnection(){\n boolean connected = isConnectingToInternet();\n if(!connected){\n DialogFragment restartQuit = new ConnectionDialogueFragment();\n\n\n\n restartQuit.show(_activity.getFragmentManager(), \"NoInternetConnection\");\n\n\n }\n return connected;\n }", "private void setup_client_socket()\n {\n try\n {\n System.out.println(\"Setting up client socket\");\n final InetAddress addr = InetAddress.getByAddress(serverIP);\n //if you request a socket to a nonexistent addr, then\n requestSocket = new Socket(addr, 2008);\n \n out = new ObjectOutputStream(requestSocket.getOutputStream());\n out.flush();\n in = new ObjectInputStream(requestSocket.getInputStream());\n \n out.writeObject(\"confour\");\n System.out.println(\"waiting for response from server\");\n String msg = (String)in.readObject(); //waiting or starting\n System.out.println(\"readin: \"+ msg);\n\n if(msg.equals(\"waiting\"))\n {\n System.out.println(\"waiting for \\\"starting\\\"\");\n\n //create window\n\n wait_window.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n JButton accept = new JButton(\"CANCEL\");\n\n accept.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) \n {\n iquit = true;\n wait_window.dispose();\n }\n });\n\n wait_window.add(accept);\n wait_window.setLocation(300, 300);\n wait_window.setSize(400, 200);\n wait_window.setVisible(true);\n wait_window.paintAll(wait_window.getGraphics());\n //window done\n\n myTurn = true;\n System.out.println(\"its my turn\");\n }\n else\n {\n myTurn = false; \n System.out.println(\"its NOT my turn\");\n }\n }\n catch(ConnectException ce)\n {\n System.err.println(\"Connection timed out - invalid ip most like\");\n final JFrame quit_window = new JFrame(\"Unable to connect to given IP\");\n JButton accept = new JButton(\"OK\");\n accept.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n quit_window.dispose();\n\n }\n });\n quit_window.add(accept);\n quit_window.setLocation(300, 300);\n quit_window.setSize(400, 200);\n quit_window.setVisible(true);\n this.dispose();\n }\n catch(ClassNotFoundException classNot)\n { \n System.err.println(\"data received in unknown format\"); \n }\n catch(UnknownHostException unknownHost)\n {\n System.err.println(\"You are trying to connect to an unknown host!\");\n final JFrame quit_window = new JFrame(\"Unable to connect to given IP - Unknown Host\");\n JButton accept = new JButton(\"OK\");\n accept.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n quit_window.dispose();\n\n }\n });\n quit_window.add(accept);\n quit_window.setLocation(300, 300);\n quit_window.setSize(400, 200);\n quit_window.setVisible(true);\n this.dispose();\n }\n catch(IOException ioException)\n {\n ioException.printStackTrace();\n }\n }", "public void goOnline()\n\t{\t\t\n\t\ttry {\n\t\t\tchatConnection.openConnection(connectionconfig);\n\t\t\tgetMainWindow().displayOnlineSymbol();\n\t\t\tconfig_ok = true;\n\t\t} catch (Exception e) {\n\t\t\tconfig_ok = false;\n\t\t\tcreateConnectionConfigurationDialog(e.getMessage());\n\t\t\t\n\t\t}\n\t}", "public void connecting() {\n\n }", "public void conectar() {\n\t\tif (isOnline()) {\n\t\t\tregister_user();\n\n\t\t} else {\n\t\t\tToast notification = Toast.makeText(this,\n\t\t\t\t\t\"Activa tu conexión a internet\", Toast.LENGTH_SHORT);\n\t\t\tnotification.setGravity(Gravity.CENTER, 0, 0);\n\t\t\tnotification.show();\n\t\t\t//progreso.setVisibility(View.GONE);\n\t\t\tsetProgressBarIndeterminateVisibility(false);\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n mAndroidServer.listenForConnections(new AndroidServer.ConnectionCallback() {\n @Override\n public void connectionResult(boolean result) {\n if (result == true) {\n Toast.makeText(mActivity, \"SUCCESSFULLY CONNECTED TO A VIEWER\", Toast.LENGTH_LONG);\n }\n }\n });\n\n }", "private void checkConnectivity() throws NotConnected\n\t{\n\t\tif (!s_ctx.isConnected())\n\t\t{\n\t\t\tthrow new NotConnected(\"Cannot operate: not conected to context\");\n\t\t}\n\t}", "private void startClientConnection() {\r\n\t\t\t\r\n\t//\tStringBuilder sbreq = new StringBuilder();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*making connection request*/\r\n\t\t\tclientsoc = new Socket(ip,port);\r\n\t\t\t\r\n\t\t\t/*Input and output streams for data sending and receiving through client and server sockets.*/\r\n\t\t\tdis = new DataInputStream(clientsoc.getInputStream());\t\r\n\t\t\tdos = new DataOutputStream(clientsoc.getOutputStream());\r\n\t\t\t\r\n\t\t\tStringBuilder sbconnreq = new StringBuilder();\r\n\r\n\t\t\t/*Building the Http Connection Request and passing Client name as body. Thus the Http Header\r\n\t\t\tare encoded around the client name data.*/\r\n\t\t\tsbconnreq.append(\"POST /\").append(\"{\"+clientname+\"}\").append(\"/ HTTP/1.1\\r\\n\").append(host).append(\"\\r\\n\").\r\n\t\t\tappend(userAgent).append(\"\\r\\n\").append(contentType).append(\"\\r\\n\").append(contentlength).append(clientname.length()).append(\"\\r\\n\").\r\n\t\t\tappend(date).append(new Date()).append(\"\\r\\n\");\r\n\t\t\t\r\n\t\t\tdos.writeUTF(sbconnreq.toString());\r\n\r\n\t\t\totherusers = new ArrayList<>(10);\r\n\t\t\tusertimestamp = new HashMap<>(10);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You have logged in. You can start Chatting: \" + clientname);\r\n\t\t\tconnected = true;\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "private void acceptConnection() throws Exception {\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \"TcpConnectionListener.acceptConnection()\");\n\n Socket sock = proxyService.getServerSocket().accept();\n String inaddr = sock.getInetAddress().getHostAddress();\n\n connectionCount++;\n\n if (logger.isLoggable(BasicLevel.INFO))\n logger.log(BasicLevel.INFO, \" -> accept connection from \" + inaddr);\n\n try {\n sock.setTcpNoDelay(true);\n\n // Fix bug when the client doesn't use the right protocol (e.g. Telnet)\n // and blocks this listener.\n sock.setSoTimeout(timeout);\n\n InputStream is = sock.getInputStream();\n NetOutputStream nos = new NetOutputStream(sock);\n\n byte[] magic = StreamUtil.readByteArrayFrom(is, 8);\n for (int i = 0; i < 5; i++) {\n if (magic.length == i || magic[i] != MetaData.joramMagic[i] && magic[i] > 0) {\n String errorMsg = \"Bad magic number. Client is not compatible with JORAM.\";\n protocolErrorCount++;\n throw new IllegalAccessException(errorMsg);\n }\n }\n if (magic[7] != MetaData.joramMagic[7]) {\n if (magic[7] > 0 && MetaData.joramMagic[7] > 0) {\n String errorMsg = \"Bad protocol version number \" + magic[7] + \" != \" + MetaData.joramMagic[7];\n protocolErrorCount++;\n throw new IllegalAccessException(errorMsg);\n }\n \n logger.log(BasicLevel.WARN,\n \"Wildcard protocol version number: from stream = \" + magic[7] + \", from MetaData = \" + MetaData.joramMagic[7]);\n }\n\n //read the ack mode(noAckedQueue)\n boolean noAckedQueue = StreamUtil.readBooleanFrom(is);\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> read noAckedQueue = \" + noAckedQueue);\n if (noAckedQueue)\n TcpProxyService.createExecutors();\n \n long dt = Math.abs(StreamUtil.readLongFrom(is) - System.currentTimeMillis());\n if (dt > clockSynchroThreshold)\n logger.log(BasicLevel.WARN, \" -> bad clock synchronization between client and server: \" + dt);\n StreamUtil.writeTo(dt, nos);\n\n Identity identity = Identity.read(is);\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> read identity = \" + identity);\n\n int key = StreamUtil.readIntFrom(is);\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> read key = \" + key);\n\n int heartBeat = 0;\n if (key == -1) {\n heartBeat = StreamUtil.readIntFrom(is);\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> read heartBeat = \" + heartBeat);\n }\n \n if (logger.isLoggable(BasicLevel.INFO))\n logger.log(BasicLevel.INFO, \" -> open connection \" + identity + \"/\" + key + \" - \" + heartBeat);\n \n GetProxyIdNot gpin = new GetProxyIdNot(identity, inaddr);\n AgentId proxyId;\n try {\n gpin.invoke(AdminTopic.getDefault());\n proxyId = gpin.getProxyId();\n } catch (Exception exc) {\n if (logger.isLoggable(BasicLevel.WARN))\n logger.log(BasicLevel.WARN, \" -> login failed\", exc);\n failedLoginCount++;\n StreamUtil.writeTo(1, nos);\n StreamUtil.writeTo(exc.getMessage(), nos);\n nos.send();\n return;\n }\n\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> open connection, proxyId=\" + proxyId);\n \n IOControl ioctrl;\n ReliableConnectionContext ctx;\n if (key == -1) {\n OpenConnectionNot ocn = new OpenConnectionNot(Type.RELIABLE, heartBeat, noAckedQueue);\n ocn.invoke(proxyId);\n StreamUtil.writeTo(0, nos);\n ctx = (ReliableConnectionContext) ocn.getConnectionContext();\n key = ctx.getKey();\n StreamUtil.writeTo(key, nos);\n nos.send();\n ioctrl = new IOControl(sock);\n } else {\n GetConnectionNot gcn = new GetConnectionNot(key);\n try {\n gcn.invoke(proxyId);\n } catch (Exception exc) {\n if (logger.isLoggable(BasicLevel.WARN))\n logger.log(BasicLevel.WARN, \"TcpConnectionListener: reconnection failed\", exc);\n StreamUtil.writeTo(1, nos);\n StreamUtil.writeTo(exc.getMessage(), nos);\n nos.send();\n return;\n }\n ctx = (ReliableConnectionContext) gcn.getConnectionContext();\n StreamUtil.writeTo(0, nos);\n nos.send();\n ioctrl = new IOControl(sock, ctx.getInputCounter());\n\n // Close the remaining connection if it exists\n TcpConnection tcpConnection = proxyService.getConnection(proxyId, key);\n if (tcpConnection != null) {\n tcpConnection.close();\n }\n }\n\n // Reset the timeout in order to enable the server to indefinitely\n // wait for requests.\n sock.setSoTimeout(0);\n\n TcpConnection tcpConnection = new TcpConnection(ioctrl, ctx, proxyId, proxyService, identity);\n tcpConnection.start();\n } catch (IllegalAccessException exc) {\n if (logger.isLoggable(BasicLevel.ERROR))\n logger.log(BasicLevel.ERROR, \"TcpConnectionListener: close connection\", exc);\n sock.close();\n throw exc;\n } catch (IOException exc) {\n if (logger.isLoggable(BasicLevel.WARN))\n logger.log(BasicLevel.WARN, \"TcpConnectionListener: close socket\", exc);\n sock.close();\n throw exc;\n }\n }", "public void talk() {\n\t try{\t\n\t \twhile(exit) {\n\t\t \t\t//Definizione stream per la comunicazione\n\t\t \t\ttastiera = new BufferedReader(new InputStreamReader(System.in));\n\t\t \t\tout = new DataOutputStream(connection.getOutputStream());\n\t\t\t\t in = new DataInputStream(connection.getInputStream());\n\t\t\t\t \n\t\t \t\t//Invio messaggio\n\t\t\t\t System.out.println(\"Inserisci il messaggio da mandare al server: \\n\");\n\t\t\t\t mess = tastiera.readLine();\n\t\t\t\t\tout.writeUTF(mess + \"\\n\");\n\t\t\t\t\t\n\t\t\t\t\t//Ricezione risposta server\n\t\t\t\t\tservermess = in.readUTF();\n\t\t\t System.out.println(\"Risposta dal server: \"+servermess);\n\t\t\t if(mess.equals(\"FINE\")) {\n\t\t\t \texit = false;\n\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t }\n\t \tfinally {\n\t\t\t try {\n\t\t\t\t if (connection!=null)\n\t\t\t\t {\n\t\t\t\t connection.close();\n\t\t\t\t System.out.println(\"Connessione chiusa!\");\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t catch(IOException e){\n\t\t\t System.err.println(\"Errore nella chiusura della connessione!\");\n\t\t\t }\n\t \t}\t\n \t}", "private boolean validateConnection() {\n boolean success = _vcVlsi.testConnection();\n if (!success) {\n _log.log(Level.WARNING, \"Found VC connection dropped; reconnecting\");\n return connect();\n }\n return success;\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(500, 500, 500, 500);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnSend = new JButton(\"Send\");\r\n\t\tbtnSend.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tString msgg = textMessage.getText();\r\n\t\t\t\tStringBuilder sbpostreq = new StringBuilder();\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*Building HTTP Post method header to send to client*/\r\n\t\t\t\t\tsbpostreq.append(\"POST /\").append(msgg).append(\"/ HTTP/1.1\\r\\n\").append(host).append(\"\\r\\n\").\r\n\t\t\t\t\tappend(userAgent).append(\"\\r\\n\").append(contentType).append(\"\\r\\n\").append(contentlength).append(msgg.length()).append(\"\\r\\n\").\r\n\t\t\t\t\tappend(date).append(new Date()).append(\"\\r\\n\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tdos.writeUTF(sbpostreq.toString());\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.getMessage();\r\n\t\t\t\t}\r\n\t\t\t\ttextMessage.setText(\"\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSend.setBounds(380, 328, 89, 40);\r\n\t\tframe.getContentPane().add(btnSend);\r\n\t\t\r\n\t\ttextMessage = new JTextField();\r\n\t\ttextMessage.setBounds(25, 320, 345, 57);\r\n\t\tframe.getContentPane().add(textMessage);\r\n\t\ttextMessage.setColumns(10);\r\n\t\t\r\n\t\tJButton btnlogin = new JButton(\"Connect\");\r\n\t\tbtnlogin.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\t/*Code to make sure the already logged in client can't connect again by using boolean flag\r\n*/\t\t\t\tif(connected == true) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You are already connected !\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*Only if client is not already logged in, will it be able to \r\n\t\t\t\tsend connection request to server*/\r\n\t\t\t\telse if(connected == false) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tclientname = textRegName.getText();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*Checking for bad client usernames and accepting only alphanumeric names*/\r\n\t\t\t\t\tif(clientname.equals(null)||clientname.trim().isEmpty()||(!Pattern.matches(regex, clientname)))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an alphanumeric username to connect to server! \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/*calling the method to start client connection.*/\r\n\t\t\t\t\t\tstartClientConnection();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnlogin.setBounds(270, 60, 89, 23);\r\n\t\tframe.getContentPane().add(btnlogin);\r\n\t\t\r\n\t\t/*Implementation of Client's LogOut feature by clicking LogOut button*/\r\n\t\tJButton btnlogout = new JButton(\"LOGOUT\");\r\n\t\tbtnlogout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\tStringBuilder sbconnreq = new StringBuilder();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*Building the HTTP Request for LogOut i.e Closing the connection*/ \r\n\t\t\t\t\tsbconnreq.append(\"GET /\").append(\" \").append(\"/ HTTP/1.1\\r\\n\").append(host).append(\"\\r\\n\").\r\n\t\t\t\t\tappend(userAgent).append(\"\\r\\n\").append(contentType).append(\"\\r\\n\").append(contentlength).append(clientname.length()).append(\"\\r\\n\").\r\n\t\t\t\t\tappend(date).append(new Date()).append(\"\\r\\n\").append(connection).append(\"\\r\\n\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tdos.writeUTF(sbconnreq.toString());\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You have logged out.\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*Boolean flag set to false to indicate this client can login again*/\r\n\t\t\t\t\tconnected = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tclientsoc.close();\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnlogout.setBounds(177, 406, 89, 23);\r\n\t\tframe.getContentPane().add(btnlogout);\r\n\t\t\r\n\t\ttextRegName = new JTextField();\r\n\t\ttextRegName.setBounds(64, 61, 188, 20);\r\n\t\tframe.getContentPane().add(textRegName);\r\n\t\ttextRegName.setColumns(10);\r\n\t\t\r\n\t\t/*Button for regsitering username to server*/\r\n\t\tJLabel lblRegisterMsg = new JLabel(\"Register username with server\");\r\n\t\tlblRegisterMsg.setBounds(65, 31, 195, 14);\r\n\t\tframe.getContentPane().add(lblRegisterMsg);\r\n\t\t\r\n\t\tscrollPane = new JScrollPane();\r\n\t\tscrollPane.setBounds(25, 96, 428, 193);\r\n\t\tframe.getContentPane().add(scrollPane);\r\n\t\t\r\n\t\tchatArea = new JTextArea();\r\n\t\tscrollPane.setViewportView(chatArea);\r\n\t\tchatArea.setEditable(false);\r\n\t\t\r\n\t}", "void serverLostConnection();", "@FXML\n\tpublic void xButtonConnectar(ActionEvent event) {\n\t\ttry {\n\t\t\tsocket = new Socket(\"localhost\", PORT);\n\t\t\txButtonConnectar.setDisable(true);\n\t\t\txButtonCalcular.setDisable(false);\n\t\t\txLabelInfo.setVisible(true);\n\t\t\t\n\t\t\t//recibir id\n\t\t\tobjetInputStream = new ObjectInputStream(socket.getInputStream());\n\t\t\tthis.idClient = (Integer) objetInputStream.readObject();\n\t\t\tSystem.out.println(\"(CLIENTE) cliente conectado [ID asignada: \"+idClient+\"]\");\n\t\t\tthis.xLabelID.setText(idClient+\"\");\n\t\t\t\n\t\t\t//enviar confirmacion\n\t\t\tobjetOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjetOutputStream.writeObject(new Boolean(true));\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"(CLIENTE) No se ha podido conectar\");\n\t\t}\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ts=new Socket();\n\t\t\t\ttry {\n\t\t\t\t\ts.connect(new InetSocketAddress(InetAddress.getByName(ip), 21111), 2000);\n\t\t\t\t\tin=s.getInputStream();\n\t\t\t\t\tdis=new DataInputStream(in);\n\t\t\t\t\tout=s.getOutputStream();\n\t\t\t\t\tdos=new DataOutputStream(out);\n\t\t\t\t\tsendString(pass);\n\t\t\t\t\twhile(state)\n\t\t\t\t\t{\n\t\t\t\t\t\tint bufferSize=dis.readInt();\n\t\t\t\t\t\tfinal byte[] buffer=new byte[bufferSize];\n\t\t\t\t\t\tdis.readFully(buffer);\n\t\t\t\t\t\t\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tif(new String(buffer).equals(\"WRONG\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"wrong password\", Toast.LENGTH_LONG).show();\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if(new String(buffer).equals(\"ACCEPT\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"ACCEPTED\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\ts.close();\n\t\t\t\t\tstate=false;\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"error first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"error first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t\t\tstate=false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "public void onConnection();", "private boolean Conectividad(){\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n if (networkInfo != null && networkInfo.isConnected()) {\n return true;\n } else {\n return false;\n }\n }", "public static void processConnection() throws IOException {\n // enable enterField so client user can send messages\n setTextFieldEditable(true);\n\n do // process messages sent from server\n {\n try // read message and display it\n {\n message = (String) input.readObject(); // read new message\n displayMessage(\"\\nReceived from Server:\"); // display message\n displayMessage(\"\\n\" + message); // display message\n\n //登录界面\n if (message.equalsIgnoreCase(\"LOGIN TRUE\")) {\n role = (String) input.readObject();\n if (role.equalsIgnoreCase(\"Browser\")) {\n Browser user = new Browser(username, password, role);\n mainFrame = new MainFrame(user);\n mainFrame.setVisible(true);\n } else if (role.equalsIgnoreCase(\"Operator\")) {\n Operator user = new Operator(username, password, role);\n mainFrame = new MainFrame(user);\n mainFrame.setVisible(true);\n } else if (role.equalsIgnoreCase(\"Administrator\")) {\n Administrator user = new Administrator(username, password, role);\n mainFrame = new MainFrame(user);\n mainFrame.setVisible(true);\n }\n loginframe.dispose();\n } else if (message.equalsIgnoreCase(\"LOGIN FALSE1\")) {\n JOptionPane.showMessageDialog(null, \"用户名不存在,请重新输入!\", \"提示\", JOptionPane.WARNING_MESSAGE);\n } else if (message.equalsIgnoreCase(\"LOGIN FALSE2\")) {\n JOptionPane.showMessageDialog(null, \"密码错误,请重新输入!\", \"提示\", JOptionPane.WARNING_MESSAGE);\n }\n\n //个人界面\n if (message.equalsIgnoreCase(\"ChangeSelfInfo TRUE\")) {\n JOptionPane.showMessageDialog(null, \"修改密码成功\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.selfFrame.refresh();\n } else if (message.equalsIgnoreCase(\"ChangeSelfInfo FALSE1\")) {\n JOptionPane.showMessageDialog(null, \"登录密码错误,请重新输入!\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.selfFrame.refresh();\n } else if (message.equalsIgnoreCase(\"ChangeSelfInfo FALSE2\")) {\n JOptionPane.showMessageDialog(null, \"两次新密码不一致,请重新输入!\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.selfFrame.refresh();\n }\n\n //用户管理界面\n if (message.equalsIgnoreCase(\"AddUser TRUE\")) {\n JOptionPane.showMessageDialog(null, \"添加用户成功\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n else if (message.equalsIgnoreCase(\"AddUser FALSE1\")) {\n JOptionPane.showMessageDialog(null, \"请输入用户名\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n else if (message.equalsIgnoreCase(\"AddUser FALSE2\")) {\n JOptionPane.showMessageDialog(null, \"请输入密码\", \"提示\", JOptionPane.WARNING_MESSAGE);\n }\n else if (message.equalsIgnoreCase(\"AddUser FALSE3\")) {\n JOptionPane.showMessageDialog(null, \"用户名已存在,无法添加\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n else if (message.equalsIgnoreCase(\"AddUser FALSE4\")) {\n JOptionPane.showMessageDialog(null, \"添加用户失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n else if(message.equalsIgnoreCase(\"ChangeUser TRUE\")) {\n JOptionPane.showMessageDialog(null, \"修改用户成功\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n else if(message.equalsIgnoreCase(\"ChangeUser FALSE1\")){\n JOptionPane.showMessageDialog(null, \"请输入密码\", \"提示\", JOptionPane.WARNING_MESSAGE);\n }\n else if(message.equalsIgnoreCase(\"ChangeUser FALSE2\")){\n JOptionPane.showMessageDialog(null, \"修改用户失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n else if(message.equalsIgnoreCase(\"DeleteUser TRUE\")){\n JOptionPane.showMessageDialog(null, \"删除用户成功\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n else if(message.equalsIgnoreCase(\"DeleteUser FALSE1\")){\n JOptionPane.showMessageDialog(null, \"无法删除当前用户\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n else if(message.equalsIgnoreCase(\"DeleteUser FALSE2\")) {\n JOptionPane.showMessageDialog(null, \"删除用户失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n mainFrame.userFrame.fresh();\n }\n //文件界面\n if (message.equalsIgnoreCase(\"Downloading file\")) {\n\n String filename = (String) input.readObject();\n displayMessage(\"\\nReceived from Server:\"); // display message\n displayMessage(\"\\n\" + filename); // display message\n File aim = new File(\"C:\\\\Users\\\\a's\\\\Desktop\\\\实验文件\\\\Java多线程实验\\\\downloadfile\\\\\" + filename);\n FileOutputStream out = new FileOutputStream(aim);\n\n try {\n byte[] bt = new byte[1024];\n int len = 1024;\n while ((input.read(bt, 0, len)) != -1) {\n out.write(bt);\n out.flush();\n System.out.println(\"1\");\n }\n } catch (IOException e) {\n System.out.println(\"IO流异常\");\n }\n\n if (aim.exists()) {\n JOptionPane.showMessageDialog(null, \"下载文件成功\", \"提示\", JOptionPane.WARNING_MESSAGE);\n displayMessage(\"\\nDownload successfully\");\n } else {\n JOptionPane.showMessageDialog(null, \"下载文件失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n displayMessage(\"\\nDownload unsuccessfully\");\n }\n } else if (message.equalsIgnoreCase(\"Download file failed\")) {\n JOptionPane.showMessageDialog(null, \"下载文件失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n } else if (message.equalsIgnoreCase(\"Uploading file\")) {\n String filename = (String) input.readObject();\n\n File src = new File(\"C:\\\\Users\\\\a's\\\\Desktop\\\\实验文件\\\\Java多线程实验\\\\uploadfile\\\\\" + filename);\n\n InputStream is = new FileInputStream(src);\n\n byte[] bt = new byte[1024];\n int len = 1024;\n while ((is.read(bt, 0, len)) > 0) {\n output.write(bt);\n }\n output.flush();\n\n JOptionPane.showMessageDialog(null, \"上传文件成功\", \"提示\", JOptionPane.WARNING_MESSAGE);\n } else if (message.equalsIgnoreCase(\"Upload file failed\")) {\n JOptionPane.showMessageDialog(null, \"上传文件失败\", \"提示\", JOptionPane.WARNING_MESSAGE);\n }\n\n } // end try\n catch (ClassNotFoundException classNotFoundException) {\n displayMessage(\"\\nUnknown object type received\");\n } // end catch\n\n } while (!message.equals(\"TERMINATE\"));\n }", "private void doConnect() throws Exception {\n try {\n Registry reg = LocateRegistry.getRegistry(conf.getNameServiceHost(), conf.getNameServicePort());\n server = (IChatServer) reg.lookup(conf.getServerName());\n } catch (RemoteException e) {\n throw new Exception(\"rmiregistry not found at '\" + conf.getNameServiceHost() + \":\" +\n conf.getNameServicePort() + \"'\");\n } catch (NotBoundException e) {\n throw new Exception(\"Server '\" + conf.getServerName() + \"' not found.\");\n }\n\n //Unir al bot al canal com a usuari\n //el Hashcode li afig un valor unic al nom, per a que ningu\n //li copie el nom com a usuari\n user = new ChatUser(\"bot \" + this.hashCode(), this);\n if (!server.connectUser(user))\n throw new Exception(\"Nick already in use\");\n\n //Comprovar si hi ha canals en el servidor.\n IChatChannel[] channels = server.listChannels();\n if (channels == null || channels.length == 0)\n throw new Exception(\"Server has no channels\");\n \n //Unir el bot a cadascun dels canals\n for (IChatChannel channel : channels) {\n channel.join(user);\n }\n\n System.out.println(\"Bot unit als canals i preparat.\");\n }", "private void connectButtonListener() {\n JButton connectButton = gui.getButton_Connect();\n\n ActionListener actionListener = (ActionEvent actionEvent) -> {\n connectButton.setEnabled(false);\n establishServerConnection();\n };\n\n connectButton.addActionListener(actionListener);\n }", "public void Conectar(){\n Executors.newSingleThreadExecutor().execute(() -> {\n try {\n ws.connect();\n // se indica que el proposito del mensaje es identificar este nodo.\n // para lo cual se manda en el cuerpo que se trata de una tablet origin\n // y se envia la identificacion.\n String mensaje = buildMessage(this.PROPOSITO_ID, this.id, this.TABLET_ORIG);\n ws.sendText(mensaje);\n } catch (WebSocketException e) {\n e.printStackTrace();\n }\n });\n }", "protected synchronized boolean checkConnectivity() {\n return this.connect();\n }", "protected abstract void onConnect();", "@Override\n\tpublic void run() {\n\t\t\n\t\ttry{\n\t\tServerEncoderDecoder encodeco = new ServerEncoderDecoder();\n\t\t\n\t\t\tbyte[] datatoWrite = new byte[2000];\n\t\t\t\tdatatoWrite = encodeco.encodeData(packet);\n\t\t\tserverConnection.getOutput().println(new String(datatoWrite));\n\t\t\tString ack = serverConnection.getInput().readLine();\n\t\t\tif(ack.equals(\"ACK\")){\n\t\t\t\t//System.out.println(\"ACK for request obtained\");\n\t\t\t\tCoordinator.incrementCounter();\n\t\t\t}\n\t\t\n\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void run() {\n sendMessageToClient(\"Connexion au serveur réussie\");\n\n while (isActive) {\n try {\n String input = retrieveCommandFromClient();\n handleCommand(input);\n } catch (ServerException e) {\n System.out.println(e.getMessage());\n sendMessageToClient(e.getMessage());\n } catch (ClientOfflineException e) {\n System.out.println(\"Client # \" + clientId + \" deconnecte de facon innattendue\");\n deactivate();\n }\n }\n\n close();\n }", "public void startCheckConnection(OperatorContext context) {\r\n\t\tcheckConnectionThread = context.getThreadFactory().newThread(new Runnable() {\r\n\t\t\t\r\n\t\t@Override\r\n\t\tpublic void run() {\r\n\t\t\tint i = 0;\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t// check the JDBC connection every 5 seconds \r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t Thread.sleep(5000);\r\n System.out.println(\"checkConnection \" + i++);\r\n\t\t\t\t} \r\n\t\t\t\tcatch(InterruptedException ex) \r\n\t\t\t\t{\r\n\t\t\t\t Thread.currentThread().interrupt();\r\n\t\t\t\t}\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\tif (!jdbcClientHelper.isValidConnection()) {\t\r\n System.out.println(\"JDBC connection is invalid \");\t\t\t\t\t\r\n\t\t\t\t\ttry \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// f connection files it tries to reset JDBC connection\r\n\t\t\t\t\t\t// it is depending to the reconnection policy parameters\r\n\t\t\t\t\t\tresetJDBCConnection();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e2) {\r\n\t\t\t\t\t\tif (!jdbcClientHelper.isValidConnection() && hasErrorPort){\r\n\t\t try \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// if connection files it sends a sqlcode = -1 to the error output port\r\n\t\t JDBCSqlStatus jSqlStatus = new JDBCSqlStatus();\r\n\t\t jSqlStatus.sqlCode = -1;\r\n\t\t jSqlStatus.sqlMessage = \"Invalid Connection\";\r\n\t\t\t\t\t\t\t\t// submit error message\r\n\t\t\t\t\t\t\t\tsubmitErrorTuple(errorOutputPort, null, jSqlStatus);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcatch (Exception e1) {\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t \r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e3) {\r\n\t\t\t\t}\t\r\n\t\t\t} // end while\r\n\t\t} // end of run()\r\n\t\t\r\n\t\t}); \r\n\t\t\r\n\t\t// start checkConnectionThread\r\n\t\tcheckConnectionThread.start();\r\n\t}", "public NegotiationReturn workAsServer() {\n this.isClient = false;\n\n peer_mac_address = null;\n ServerSocket serverSocket = null;\n Socket socket = null;\n int code = 0;\n NegotiationReturn negReturn;\n boolean restartAfterwards = false;\n\n try {\n // use the port to start\n serverSocket = new ServerSocket(PORT);\n serverSocket.setSoTimeout(serverTimeoutMillis);\n Log.d(TAG, \"doInBackground: Server is waiting for connection\");\n\n // accept one connection\n socket = serverSocket.accept();\n socket.setSoTimeout(serverTimeoutMillis);\n\n // wrap the socket\n socketWrapper = new SocketWrapper(socket);\n\n // WAIT FOR CLIENT\n String hello = socketWrapper.getLine();\n\n if (hello == null || hello.contains(\"java.net.SocketException\")) {\n return error(R.string.no_hello_received, true);\n }\n\n // Check: Is the peer in the same role as we are\n // server and server or client and client MAKES NO SENSE\n if (hello.contains(\"SERVER\") && !isClient || hello.contains(\"CLIENT\") && isClient){\n return error(R.string.err_pairing_roles_broken, true);\n }\n\n // Whether we want to provide a hotspot or use one\n if (isConsumer) {\n negReturn = runConsumerProtocol(socketWrapper.getClientAddress().getHostAddress());\n } else {\n negReturn = runHotspotProtocol(socketWrapper.getClientAddress().getHostAddress());\n }\n peer_mac_address = negReturn.mac;\n code = negReturn.code;\n restartAfterwards = negReturn.restartAfterwards;\n\n } catch (SocketTimeoutException ste) {\n Log.d(TAG, \"workAsServer: ### Timed out\");\n code = R.string.err_timeout;\n peer_mac_address = null;\n restartAfterwards = true;\n } catch (IOException e) {\n Log.d(TAG, e.getMessage());\n code = R.string.err_io_exception;\n peer_mac_address = null;\n restartAfterwards = true;\n } finally {\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (serverSocket != null) {\n try {\n serverSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return new NegotiationReturn(code, peer_mac_address, restartAfterwards);\n }", "private synchronized void UI_RefreshConnStatus ()\r\n\t{\r\n\t\tTCPClient used=null;\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\tused=_roboCOM;\r\n\t\t}\r\n\t\tLog.e(TAG, \"Is conection Active ACCE : \" + isConnectionActive());\r\n\t\t\r\n\t\tif (!isConnecting())\r\n\t\t{\r\n\t\t\tif (old_conn_status==-2) return;\r\n\t\t\told_conn_status=-2;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (used!=null)\r\n\t\t{\r\n\t\t\tif (old_conn_status!=used.getConnStatus())\r\n\t\t\t{\r\n\t\t\t\told_conn_status=used.getConnStatus();\r\n\t\t\t\tLog.e(TAG,\"Connections Status ACCE : \" + used.getConnStatusStr());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n public void run() {\n JSONObject res = LoginAction.login_test(iptext);\r\n try {\r\n if (res != null) {\r\n Message message = new Message();\r\n message.obj = \"连接成功\";\r\n message.what = 1;\r\n loginHandler.sendMessage(message);\r\n // builder.dismiss();\r\n } else {\r\n Message message = new Message();\r\n message.obj = \"连接失败\";\r\n message.what = 1;\r\n loginHandler.sendMessage(message);\r\n }\r\n } catch (Exception e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }", "public static void sendOK() {\n try {\n Server destServer = ServerState.getInstance().getServers().get(sourceID);\n MessageTransfer.sendServer(\n ServerMessage.getOk( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent OK to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n System.out.println(\"INFO : Server s\"+sourceID+\" has failed. OK message cannot be sent\");\n }\n }", "private void waitForConnection() throws IOException{\n\t\tshowMessage(\"\\n Waiting for a Punk Ass Bitch to connection... \\n \");\n\t\tConnection = server.accept();\n\t\tshowMessage(\"Now connected to \" + Connection.getInetAddress().getHostName() + \". Punk.\");\n\t\t//this is your own IP address, the machine running the the code\n\t\t//\n\t\t\n\t}", "@Test\n public void serverPingsClient() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.sendFrame().ping(false, 2, 0);\n peer.acceptFrame();// PING\n\n peer.play();\n // play it back\n connect(peer);\n // verify the peer received what was expected\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(0, ping.streamId);\n Assert.assertEquals(2, ping.payload1);\n Assert.assertEquals(0, ping.payload2);\n Assert.assertTrue(ping.ack);\n }", "@SubscribeEvent\n public void onFMLNetworkClientConnectedToServer(ClientConnectedToServerEvent event) {\n if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.contains(\"hypixe\")) {\n hypixel = true;\n bedwars = false; // As the player hasn't joined a Bedwars game yet\n }\n }", "public static void startChatServer() {\n\t\tbyte[] buffer = new byte[1024];\n\t\tStreamConnectionNotifier cn = null;\n\t\ttry {\n\t\t\tLocalDevice local = LocalDevice.getLocalDevice();\n\t\t\tlocal.setDiscoverable(DiscoveryAgent.GIAC);\n\t\t\tcn = (StreamConnectionNotifier) Connector.open(INSECURE_URL);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tOutputThread t = null;\n\t\t\tStreamConnection sock = null;\n\t\t\tInputStream is = null;\n\t\t\tOutputStream os = null;\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"accepting connection:\");\n\t\t\t\tsock = cn.acceptAndOpen();\n\t\t\t\tSystem.out.println(\"accept!: \" + Charset.defaultCharset());\n\t\t\t\tis = sock.openInputStream();\n\t\t\t\tos = sock.openOutputStream();\n\n\t\t\t\tt = new OutputThread(os);\n\t\t\t\tt.start();\n\n\t\t\t\twhile (t.isAlive()) {\n\t\t\t\t\t//TODO: use timeout read?\n\t\t\t\t\tint len = is.read(buffer);\n\t\t\t\t\t// printAsHex(buffer, len);\n\t\t\t\t\tif (len > 0) {\n\t\t\t\t\t\tSystem.out.println(\"received message(\" + len + \"): \" + new String(buffer, 0, len));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//TODO: check connection is live or not,\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tt.interrupt();\n\t\t\t\tt = null;\n\t\t\t\ttry {\n\t\t\t\t\tsock.close();\n\t\t\t\t\tcn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static boolean register() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.requestRegistration());\n ClientService.receiveMessageFromServer(connectionToServer);\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return !ClientService.getLastMessageFromServer().contains(XML_Manager.XML_NODES.Error.toString());\n }", "public void clientConnected(ServerConnection conn){\r\n System.out.println(\"Client Connected: \"+ conn.getIP());\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic synchronized boolean doActivity() {\n\t\tJSONObject json = new JSONObject();\n\t\tjson.put(\"command\", SERVER_ANNOUNCE);\n\t\tjson.put(\"id\", id);\n\t\tjson.put(\"load\", loadConnections.size());\n\t\tjson.put(\"hostname\", Settings.getLocalHostname());\n\t\tjson.put(\"port\", Settings.getLocalPort());\n\t\tfor (Connection cons : broadConnections) {\n\t\t\tcons.writeMsg(json.toJSONString());\n\t\t}\n\t\treturn false;\n\t}", "void handleConnectionOpened();", "@Override\n\tpublic void onOpen(org.java_websocket.WebSocket conn,\n\t\t\tClientHandshake handshake) {\n\t\t System.out.println(\"有人连接Socket conn:\" + conn);\n\t // l++;\n\t\t logger.info(\"有人连接Socket conn:\" + conn.getRemoteSocketAddress());\n\t\t l++;\n\t\t\n\t}", "boolean hasDisconnect();", "@Override\n\tpublic boolean canConnect() {\n return false;\n }", "public static boolean connect2Server() {\n\t\ttry {\n\t\t\tinetAdd = InetAddress.getByName(null);\n\t\t\ts = new Socket(inetAdd, PORT);\n\t\t\toos = new ObjectOutputStream(s.getOutputStream());\n\t\t\tois = new ObjectInputStream(s.getInputStream());\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore connessione al server\");\n\t\t}\n\t\treturn false;\n\t}", "private void testConnection(){ \n\t\t\tconnection=false;\n\t\t\tip = ipfield.getText().toString();\n\t\t\tLog.d(null,\"ip is \"+ip);\n\t\t\tif(ip.equals(\"\")) \n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Enter an IP Address\", Toast.LENGTH_SHORT).show();\n\t\t\telse{\n\t\t\t\tRunnable runnable = new Runnable(){\n\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tSocket s = new Socket(ip,6969);\n\t\t\t\t\t\t\t\ts.close();\n\t\t\t\t\t\t\t\tconnection=true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t catch (UnknownHostException e1) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tLog.d(null, \"Wrong ip\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t\tLog.d(null, \"Wrong ip\");\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tThread thread = new Thread(runnable);\n\t\t\t\tthread.start();\n\t\t\t}\n\t}", "void onConnect(IServerConnection<_ATTACHMENT> connection);", "public void connectionControl() throws ServerOfflineException {\n\t\tServer.connectionCheck(this.serverTyp, this.connection);\n\t}", "public void serverSideOk();" ]
[ "0.64481235", "0.6381067", "0.6250349", "0.6186855", "0.6174586", "0.6151514", "0.61206335", "0.604332", "0.6033598", "0.59790075", "0.5977764", "0.59530425", "0.59448516", "0.59448516", "0.59448516", "0.59448516", "0.59448516", "0.59448516", "0.59448516", "0.59448516", "0.5931161", "0.5907838", "0.5906138", "0.5906138", "0.5906138", "0.5906138", "0.5906138", "0.5904341", "0.5901288", "0.587981", "0.5878796", "0.58761275", "0.5868192", "0.5865383", "0.5864826", "0.5861061", "0.58503526", "0.5844619", "0.5844619", "0.58298576", "0.58052856", "0.5804113", "0.58030266", "0.5793573", "0.5783814", "0.5776508", "0.5776271", "0.5774795", "0.5769813", "0.5756963", "0.57542306", "0.5749918", "0.57329667", "0.57277703", "0.5720474", "0.5718629", "0.571784", "0.571356", "0.57080907", "0.57041055", "0.570288", "0.56836385", "0.56808466", "0.5679735", "0.56740403", "0.56717616", "0.56675154", "0.5666636", "0.56661975", "0.5662506", "0.5662096", "0.5656233", "0.56549156", "0.5650612", "0.5641767", "0.5639951", "0.5635082", "0.56346524", "0.5633514", "0.56146705", "0.5611157", "0.5605508", "0.56032556", "0.5602186", "0.5599779", "0.55962473", "0.55961096", "0.5590207", "0.5583516", "0.5583235", "0.55816036", "0.5578094", "0.55779034", "0.556503", "0.5562575", "0.55608344", "0.55598783", "0.55557775", "0.5552304", "0.55520415", "0.5550415" ]
0.0
-1
Update the interestOps of the key looking only at values of the boolean closed and of both ByteBuffers. The convention is that both buffers are in writemode before the call to updateInterestOps and after the call. Also it is assumed that process has been be called just before updateInterestOps.
private void updateInterestOps() { var interesOps = 0; if (!closed && bbin.hasRemaining()) { interesOps = interesOps | SelectionKey.OP_READ; } if (bbout.position() != 0) { interesOps |= SelectionKey.OP_WRITE; } if (interesOps == 0) { silentlyClose(); return; } key.interestOps(interesOps); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateInterestOps() {\n\t\tvar interesOps = 0;\n\t\tif (!closed && bbin.hasRemaining()) {\n\t\t\tinteresOps = interesOps | SelectionKey.OP_READ;\n\t\t}\n\t\tif (!closed && bbout.position() != 0) {\n\t\t\tinteresOps |= SelectionKey.OP_WRITE;\n\t\t}\n\t\tif (interesOps == 0) {\n\t\t\tsilentlyClose();\n\t\t\treturn;\n\t\t}\n\t\tkey.interestOps(interesOps);\n\t}", "private void updateInterestOps() {\n var interesOps = 0;\n if (state != State.CLOSED && bbin.hasRemaining()) {\n interesOps = interesOps | SelectionKey.OP_READ;\n }\n if (bbout.position() != 0) {\n interesOps |= SelectionKey.OP_WRITE;\n }\n if (interesOps == 0) {\n silentlyClose();\n return;\n }\n key.interestOps(interesOps);\n }", "private void updateInterestOps() {\n\t\t\tvar interestOps = 0x0;\n\n\t\t\tif ( !closed && bb.hasRemaining() ) {\n\t\t\t\tinterestOps |= SelectionKey.OP_READ;\n\n\t\t\t}\n\n\t\t\tif ( bb.position() > 0 ) {\n\t\t\t\tinterestOps |= SelectionKey.OP_WRITE;\n\t\t\t}\n\n\t\t\tif ( interestOps == 0 ) {\n\t\t\t\tsilentlyClose();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tkey.interestOps(interestOps);\n\t\t}", "@Override\n public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n state = State.CLOSED;\n }\n processIn();\n updateInterestOps();\n }", "protected synchronized SSLSelectionKey interestData(int nOps)\n {\n if (nOps != m_nOpsInterestData)\n {\n int nOpsApp = m_nOpsInterestApp;\n if (nOpsApp != 0)\n {\n ((SSLSelector) selector()).setInterestOps(m_delegate, (nOps | nOpsApp\n | m_nOpsInterestProtocol) & ~m_nOpsInterestExclude);\n }\n // else; application isn't interested in forward progress now; don't force it\n\n m_nOpsInterestData = nOps;\n }\n return this;\n }", "protected void markKeysReadable(boolean fReadable)\n {\n for (SSLSelectionKey key = m_keyFirst; key != null;\n key = key.m_keyNext)\n {\n if (fReadable)\n {\n // mark the channel as read ready\n key.setDataReadyOps(SelectionKey.OP_READ);\n // add interest in OP_WRITE to help avoid getting blocked in selector\n key.interestData(SelectionKey.OP_WRITE);\n }\n else // no data buffered\n {\n // unmark the channel as read ready\n key.setDataReadyOps(0);\n // remove artificial OP_WRITE interest\n key.interestData(0);\n }\n }\n }", "private void process(ByteBuffer output, final byte[] input, int inPos, KeyStream keyStream) {\n ByteBuffer buf = ByteBuffer.allocate(BLOCK_SIZE_IN_BYTES).order(ByteOrder.LITTLE_ENDIAN);\n int pos = inPos;\n int inLen = input.length - inPos;\n int todo;\n while (inLen > 0) {\n todo = inLen < BLOCK_SIZE_IN_BYTES ? inLen : BLOCK_SIZE_IN_BYTES;\n buf.asIntBuffer().put(keyStream.next());\n for (int j = 0; j < todo; j++, pos++) {\n output.put((byte) (input[pos] ^ buf.get(j)));\n }\n inLen -= todo;\n }\n }", "public void processKeystrokes() {\n\t\t// Only send an update if the keystroke count object is not null and we have\n\t\t// keystroke activity\n\t\t//\n\t\tif (this.hasData()) {\n\t\t\t\n\t\t\tthis.endUnendedFiles();\n\n\t\t\t//\n\t\t\t// Send the info now\n\t\t\t//\n\t\t\tthis.sendKeystrokeData(this);\n\t\t}\n\t}", "public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n closed = true;\n }\n processIn();\n updateInterestOps();\n }", "protected synchronized SSLSelectionKey interestProtocol(int nOps, int nExclusions)\n {\n if (!(nOps == m_nOpsInterestProtocol && nExclusions == m_nOpsInterestExclude))\n {\n int nOpsApp = m_nOpsInterestApp;\n if (nOpsApp != 0)\n {\n ((SSLSelector) selector()).setInterestOps(m_delegate, (nOps | nOpsApp\n | m_nOpsInterestData) & ~nExclusions);\n }\n // else; application isn't interested in forward progress now; don't force it\n\n m_nOpsInterestProtocol = nOps;\n m_nOpsInterestExclude = nExclusions;\n }\n return this;\n }", "void updateInterest() {\n // FIXME: Currently unimplemented\n }", "private void doWrite() throws IOException {\n\t\t\tbb.flip();\n\t\t\tsc.write(bb);\n\t\t\tbb.compact();\n\n\t\t\tupdateInterestOps();\n\t\t}", "@Override\n public void run () {\n try {\n int i = 0;\n String tupleString = this.inReadEnds[i].getNextString();\n while (tupleString != null && i < this.inReadEnds.length - 1){\n BMap tempStore = BMap.makeBMap(tupleString);\n mapStore = BMap.or(mapStore, tempStore);\n i++;\n tupleString = this.inReadEnds[i].getNextString();\n }\n \n BMap tempStore = BMap.makeBMap(tupleString);\n this.mapStore = BMap.or(mapStore, tempStore);\n \n this.outWriteEnd.putNextString(mapStore.getBloomFilter());\n this.outWriteEnd.close();\n } \n catch (Exception e) {\n ReportError.msg(this.getClass().getName() + \" \" + e);\n }\n }", "int updateByPrimaryKeySelective(BasicInfoPrecursorProcessType record);", "private void updateBinary(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// check if access to this file is allowed\r\n\t\tif (!fileAccessAllowed(UPDATE_BINARY))\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// use P1 and P2 as offset\r\n\t\tshort offset = Util.makeShort(buffer[ISO7816.OFFSET_P1], buffer[ISO7816.OFFSET_P2]);\r\n\t\t// impossible to start updating from offset larger than max size of file\r\n\t\t// this however does not imply that the file length can not change\r\n\t\tJCSystem.beginTransaction();\r\n\t\t//@ open valid();\r\n\t\tif (selectedFile == masterFile)\r\n\t\t\tISOException.throwIt(ISO7816.SW_FILE_INVALID); //~allow_dead_code Dead because fileAccessAllowed() checks that selectedFile instanceof ElementaryFile and masterFile is not an ElementaryFile.\r\n\t\t//@ open selected_file_types(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _);\r\n\t\tshort size = ((ElementaryFile) selectedFile).getMaxSize();\r\n\t\tif (offset > size)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t// number of bytes in file starting from offset\r\n\t\t// short remaining = (short) (size - offset);\r\n\t\t// get the new data\r\n\t\tshort byteRead = apdu.setIncomingAndReceive();\r\n\t\t// check Lc\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\tif ((lc == 0) || (byteRead == 0))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t// update file\r\n\t\tif (offset < 0 || ISO7816.OFFSET_CDATA + lc > buffer.length || offset + lc > size)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t((ElementaryFile) selectedFile).updateData(offset, buffer, ISO7816.OFFSET_CDATA, lc);\r\n\t\t// //@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t}", "public boolean put2BuffMap( byte[] rec){\n\t\t/**\n\t\t * update\n\t\t */\n\t\t\n\t\tKey key = new Key(rec);\n\t\t\n\t\tif(buffMap.containsKey(key)){\n\t\t\tint val = buffMap.get(key)+1;\n\t\t\tbuffMap.replace(key, val);\n\t\t}else{\n\t\t\tbuffMap.put(key, 1);\n\t\t}\n\t\treturn true;\n\t}", "public void filterImage() {\n\n if (opIndex == lastOp) {\n return;\n }\n\n lastOp = opIndex;\n switch (opIndex) {\n case 0:\n biFiltered = bi; /* original */\n return;\n case 1:\n biFiltered = ImageNegative(bi); /* Image Negative */\n return;\n\n case 2:\n biFiltered = RescaleImage(bi);\n return;\n\n case 3:\n biFiltered = ShiftImage(bi);\n return;\n\n case 4:\n biFiltered = RescaleShiftImage(bi);\n return;\n\n case 5:\n biFiltered = Add(bi, bi1);\n return;\n\n case 6:\n biFiltered = Subtract(bi, bi1);\n return;\n\n case 7:\n biFiltered = Multiply(bi, bi1);\n return;\n\n case 8:\n biFiltered = Divide(bi, bi1);\n return;\n\n case 9:\n biFiltered = NOT(bi);\n return;\n\n case 10:\n biFiltered = AND(bi, bi1);\n return;\n\n case 11:\n biFiltered = OR(bi, bi1);\n return;\n\n case 12:\n biFiltered = XOR(bi, bi1);\n return;\n\n case 13:\n biFiltered = ROI(bi);\n return;\n\n case 14:\n biFiltered = Negative_Linear(bi);\n return;\n\n case 15:\n biFiltered= Logarithmic_function(bi);\n return;\n\n case 16:\n biFiltered = Power_Law(bi);\n return;\n\n case 17:\n biFiltered = LUT(bi);\n return;\n\n case 18:\n biFiltered = Bit_planeSlicing(bi);\n return;\n\n case 19:\n biFiltered = Histogram(bi1,bi2);\n return;\n\n case 20:\n biFiltered = HistogramEqualisation(bi,bi3);\n return;\n\n case 21:\n biFiltered = Averaging(bi1);\n return;\n\n case 22:\n biFiltered = WeightedAveraging(bi1);\n return;\n\n case 23:\n biFiltered = fourNeighbourLaplacian(bi1);\n return;\n\n case 24:\n biFiltered= eightNeighbourLaplacian(bi1);\n return;\n\n case 25:\n biFiltered = fourNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 26:\n biFiltered = eightNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 27:\n biFiltered = Roberts(bi1);\n return;\n\n case 28:\n biFiltered = SobelX(bi1);\n return;\n\n case 29:\n biFiltered = SobelY(bi1);\n return;\n\n case 30:\n biFiltered = Gaussian(bi1);\n return;\n\n case 31:\n biFiltered = LoG (bi1);\n return;\n\n case 32:\n biFiltered = saltnpepper(bi4);\n return;\n\n case 33:\n biFiltered = minFiltering(bi4);\n return;\n\n case 34:\n biFiltered = maxFiltering(bi4);\n return;\n\n case 35:\n biFiltered = maidpointFiltering(bi4);\n return;\n\n case 36:\n biFiltered = medianFiltering(bi4);\n return;\n\n case 37:\n biFiltered = simpleThresholding(bi5);\n return;\n\n case 38:\n biFiltered = automatedThresholding(bi6);\n return;\n\n case 39:\n biFiltered = adaptiveThresholding(bi7);\n return;\n }\n }", "private void processSelectedKeys() {\r\n Iterator<SelectionKey> it = selector.selectedKeys().iterator();\r\n while (it.hasNext()) {\r\n // remove the selected key to not process it twice\r\n SelectionKey key = it.next();\r\n it.remove();\r\n\r\n // erase flags of ready operation\r\n key.interestOps(key.interestOps() & ~key.readyOps());\r\n\r\n if (key.isAcceptable()) {\r\n ((AcceptHandler) key.attachment()).handleAccept();\r\n }\r\n if (key.isValid() && key.isConnectable()) {\r\n ((ConnectHandler) key.attachment()).handleConnect();\r\n }\r\n if (key.isValid() && key.isReadable()) {\r\n ((ReadWriteHandler) key.attachment()).handleRead();\r\n }\r\n if (key.isValid() && key.isWritable()) {\r\n ((ReadWriteHandler) key.attachment()).handleWrite();\r\n }\r\n }\r\n }", "@Override\n\tpublic void handleKeyInputs(Map<Integer, Boolean> keys) {\n\t\t\n\t}", "final void channelInterestChangedCallback() {\n Channel ch = getIOChannel();\n if (ch != null) {\n boolean writable = ch.isWritable();\n\n eventSerializeLock.lock();\n try {\n if (previousEvent == OUTPUT_DISABLED && writable) {\n fireOutputRecovered();\n } else if (previousEvent == OUTPUT_RECOVERED && !writable) {\n fireOutputDisabled();\n }\n } finally {\n eventSerializeLock.unlock();\n }\n }\n }", "@Override\n public void updateWithObservationsFromDatastreamOnly(SensingDevice sensingDevice, Datastream datastream) {\n }", "int updateByPrimaryKeySelective(QuestionWithBLOBs record);", "int updateByPrimaryKeySelective(XxAreaWithBLOBs record);", "@Override\r\n\t\tpublic void reduce(MyCompoundKey key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n\t\t\tif (flagDoFW) {\r\n\r\n\t\t\t\tString idkplusFW = null;\r\n\r\n\t\t\t\t// line 1\r\n\t\t\t\t// ordered set of id's on which to compute next id\r\n\t\t\t\tTreeSet<Sig> tsFW = new TreeSet<Sig>();\r\n\r\n\t\t\t\tboolean flagDoOnce = true;\r\n\t\t\t\t// line 2\r\n\t\t\t\tfor (Text val : values) {\r\n\t\t\t\t\t//\t\t\t\t\tSystem.out.println(\"key:\" + context.getCurrentKey());\r\n\t\t\t\t\tif (context.getCurrentKey().order == 0) {\r\n\r\n\t\t\t\t\t\tString[] line = val.toString().split(\" \");\r\n\r\n\t\t\t\t\t\t// line 4\r\n\t\t\t\t\t\tSig s = new Sig(line[1].toString(), line[3].toString());\r\n\t\t\t\t\t\tif (!tsFW.contains(s)) {\r\n\t\t\t\t\t\t\ttsFW.add(s);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// line 5 end\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (context.getCurrentKey().order == 1) {\r\n\t\t\t\t\t\tif (flagDoOnce) {\r\n\t\t\t\t\t\t\tflagDoOnce = false;\r\n\t\t\t\t\t\t\tif (tsFW.size() == 0) {\r\n\t\t\t\t\t\t\t\tidkplusFW = hash(\"0\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tidkplusFW = hash(tsFW.toString());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (idkplusFW == null) {\r\n\t\t\t\t\t\t\tSystem.err.println(\"Cannot have null sig here\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tString[] line = val.toString().split(\" \");\r\n\r\n\t\t\t\t\t\t// line 10\r\n\t\t\t\t\t\tString newLine = line[0] + \" \" + line[1] + \" \" + line[2] + \" \" + idkplusFW;\r\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(\"newline:\" + newLine);\r\n\t\t\t\t\t\t//\t\t\t\tcontext.write(new Text(\"\"), new Text(newLine));\r\n\t\t\t\t\t\tmultipleOutputs.write(new Text(\"\"), new Text(newLine), context.getConfiguration().get(\"vs.outbasepath\") + File.separatorChar + \"graph\" + File.separatorChar + \"graph\");\r\n\t\t\t\t\t\t// line 11 end\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (flagDoOnce) {\r\n\t\t\t\t\tif (tsFW.size() == 0) {\r\n\t\t\t\t\t\tidkplusFW = hash(\"0\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tidkplusFW = hash(tsFW.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// line 12, 13\r\n\t\t\t\tText k = new Text();\r\n\t\t\t\tText v = new Text();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tk.set(key.s);\r\n\t\t\t\t\tv.set(idkplusFW);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\tSystem.out.println(\"k:\" + k + \", v:\" + v);\r\n\r\n\t\t\t\t// place s first to order by s\r\n\t\t\t\t//\t\t\t\tmultipleOutputs.write(k, v, context.getConfiguration().get(\"vs.outbasepath\") + File.separatorChar + \"nodes\" + File.separatorChar + \"nodes\");\r\n\r\n\t\t\t\t// place block first to order by block id\r\n\t\t\t\tmultipleOutputs.write(v, k, context.getConfiguration().get(\"vs.outbasepath\") + File.separatorChar + \"nodes\" + File.separatorChar + \"nodes\");\r\n\t\t\t}\r\n\r\n\t\t}", "public void streamClosed(boolean inStream) throws IOException {\n if (!isGet) {\n if ((!inStream) && (!isDone)) {\n // to deal with outputstream in put operation\n\n boolean more = true;\n\n if ((privateOutput != null) && (privateOutput.size() <= 0)) {\n byte[] headerArray = OBEXHelper.createHeader(requestHeaders, false);\n if (headerArray.length <= 0)\n more = false;\n }\n // If have not sent any data so send all now\n if (replyHeaders.responseCode == -1) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n }\n\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x02);\n }\n\n /*\n * According to the IrOBEX specification, after the final put, you\n * only have a single reply to send. so we don't need the while\n * loop.\n */\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n\n sendRequest(0x82);\n }\n isDone = true;\n } else if ((inStream) && (isDone)) {\n // how to deal with input stream in put stream ?\n isDone = true;\n }\n } else {\n isValidateConnected = false;\n if ((inStream) && (!isDone)) {\n\n // to deal with inputstream in get operation\n // Have not sent any data so send it all now\n\n if (replyHeaders.responseCode == -1) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n }\n\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n if (!sendRequest(0x83)) {\n break;\n }\n }\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x83, null, replyHeaders, privateInput);\n }\n isDone = true;\n } else if ((!inStream) && (!isDone)) {\n // to deal with outputstream in get operation\n // part of the data may have been sent in continueOperation.\n\n boolean more = true;\n\n if ((privateOutput != null) && (privateOutput.size() <= 0)) {\n byte[] headerArray = OBEXHelper.createHeader(requestHeaders, false);\n if (headerArray.length <= 0)\n more = false;\n }\n\n if (privateInput == null) {\n privateInput = new PrivateInputStream(this);\n }\n if ((privateOutput != null) && (privateOutput.size() <= 0))\n more = false;\n\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x03);\n }\n sendRequest(0x83);\n // parent.sendRequest(0x83, null, replyHeaders, privateInput);\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n\n }\n }\n }", "protected final boolean canModifyBuffer() {\n return (_ioContext != null);\n }", "public void incrHedgedReadOps() {\n hedgedReadOps.inc();\n }", "private void processIn(ClientChatos client, SelectionKey key) throws IOException {\n\t\tfor (var cpt =0 ; ; cpt++) {\n\t\t\tboolean isPrivateConnection = client.isConnectionPrivate(key);\n\t\t\tProcessStatus status;\n\t\t\tif (isPrivateConnection && cpt == 0) {\n\t\t\t\tstatus = httpReader.process(bbin, key);\n\t\t\t} else {\n\t\t\t\tstatus = reader.process(bbin);\n\t\t\t}\n\t\t\tswitch (status) {\n\t\t\tcase DONE:\n\t\t\t\tif (isPrivateConnection && cpt == 0) {\n\t\t\t\t\tData value = httpReader.get();\n\t\t\t\t\tvalue.decode(client, key);\n\t\t\t\t\thttpReader.reset();\n\t\t\t\t} else {\n\t\t\t\t\tData value = reader.get();\n\t\t\t\t\tvalue.decode(client, key);\n\t\t\t\t\treader.reset();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase REFILL:\n\t\t\t\treturn;\n\t\t\tcase ERROR:\n\t\t\t\tsilentlyClose();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public ByteBuf setBoolean(int index, boolean value)\r\n/* 265: */ {\r\n/* 266:280 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 267:281 */ return super.setBoolean(index, value);\r\n/* 268: */ }", "int updateByPrimaryKeySelective(ResPartnerBankEntityWithBLOBs record);", "public void incorporateBitMapInfo(final BitMap otherFlags) {\n _bitMap |= otherFlags.getBitMap(); // logical OR\n }", "@Override\n\tpublic void setOptimizeMergeBuffer(boolean arg0) {\n\n\t}", "int updateByPrimaryKeyWithBLOBs(StatusReplies record);", "Get<K, C> setFilterOp(BooleanOp op);", "public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n updateInterestOps();\n }", "public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n updateInterestOps();\n }", "protected void updateFlags() {\n USE_CANNY = USE_CANNY && mainInterface.DEBUG_FRAME;\n DEBUG_PREP_FRAME = DEBUG_PREP_FRAME && mainInterface.DEBUG_FRAME;\n DEBUG_CONTOURS = DEBUG_CONTOURS && mainInterface.DEBUG_FRAME;\n DEBUG_POLY = DEBUG_POLY && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_MARKERS = DEBUG_DRAW_MARKERS && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_MARKER_ID = DEBUG_DRAW_MARKER_ID && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_SAMPLING = DEBUG_DRAW_SAMPLING && mainInterface.DEBUG_FRAME;\n }", "public boolean update(ConProcess conProcess) throws AppException;", "@Override\n public void function() {\n App.memory.setMemory(op2, Memory.convertBSToBoolArr(Memory.length32(Integer.toBinaryString(\n op1 * Integer.parseInt(App.memory.getMemory(op2, 1 << 2 + 2 + 1), 2)))));\n }", "@Override\r\n\tpublic void visit(SimplePin pin) {\n\t\tboolean pinMod;\r\n\t\tif (isForward()) {\r\n\t\t\tpinMod = pin.propagateValuesForward();\r\n\t\t} else {\r\n\t\t\tpinMod = pin.propagateValuesBackward();\r\n\t\t}\r\n\t\tmodified |= pinMod;\r\n\t}", "int updateByPrimaryKeySelective(ChannelAli record);", "private void updateChildesValues(int value){\n\n for (int i = 0; i < mDataSize; i++) {\n\n if(((value >> i) & 1) == 1){\n mChildTags.get(i).setValue(true);}\n else {mChildTags.get(i).setValue(false);}\n }\n }", "void freeze() {\n setState(State.FROZEN); // prevent new puts to this chunk\n while (pendingOps.get() != 0) ;\n }", "ReadPolyState(boolean isAccept){\n this.isAccept = isAccept; \n }", "boolean doLogicalReplaceUnlocked(final TCServerMap map, final Object key, final Object current,\n final Object newValue, MetaDataDescriptor mdd)\n throws AbortedOperationException;", "private void commitAll(){\n if(isDiskBufferEnabled && persistenceService != null){\n persistenceService.commit(WIKIDATA_SYNONYMY_BUFFER);\n persistenceService.commit(WIKIDATA_HYPERNYMY_BUFFER);\n persistenceService.commit(WIKIDATA_ASK_BUFFER);\n }\n }", "public void updateInterest(){\n //Caculate when all fields are available\n String amountStr = amountInput.getText().toString();\n String yieldStr = annualizedYieldInput.getText().toString();\n String bankStr = bankInput.getText().toString();\n\n if (mStartDate!=null && mEndDate!=null\n && !Utils.isNullOrEmpty(amountStr)\n && !Utils.isNullOrEmpty(yieldStr)\n && !Utils.isNullOrEmpty(bankStr)){\n\n float days = Utils.getDiffDays(mStartDate,mEndDate);\n mAmount = Float.valueOf(amountStr);\n mYield = Float.valueOf(yieldStr);\n\n //Caculate the value\n mInterest = mAmount * (mYield/100)*(days/ Constants.DAYS_OF_ONE_YEAR);\n mInterest = Utils.roundFloat(mInterest);\n //Update the interest in UI\n expectedInterestInput.setText(Utils.formatFloat(mInterest));\n Log.d(Constants.LOG_TAG, \"start = \" + mStartDate.toString() + \"\\nend = \" + mEndDate.toString()\n + \"\\ndays = \" + days + \"\\namount = \" + mAmount + \"\\nyield = \" + mYield + \"\\ninterest = \" + mInterest);\n }\n }", "synchronized void flushAll(int txnum) {\n\t \n for (ExerciseBuffer buff : bufferpool)\n if (buff.isModifiedBy(txnum))\n buff.flush();\n }", "int updateByPrimaryKeyWithBLOBs(AliUserInfoDO record);", "public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {\n\n updateBinaryStream(columnIndex, x, -1);\n }", "int updateByPrimaryKeyWithBLOBs(Yqbd record);", "@Override\n\tpublic void multiPut(List<KeyValueVersion> ops) throws RemoteException,\n\t\t\tInterruptedException {\n\t\t\n\t}", "public void updateByteMetrics() {\n try {\n for (Optional<Fork> fork : this.forks) {\n if (fork.isPresent()) {\n fork.get().updateByteMetrics();\n }\n }\n } catch (IOException ioe) {\n LOG.error(\"Failed to update byte-level metrics for task \" + this.taskId);\n }\n }", "public void operate(FlowProcess flowProcess, FunctionCall<NullContext> funcCall) {\n Tuple tuple = funcCall.getArguments().getTuple();\n TupleEntryCollector collector = funcCall.getOutputCollector();\n Tuple outTuple = new Tuple();\n String inKey = tuple.getString(0);\n String inValue = tuple.getString(1);\n int outKey;\n int outValue;\n HashMap<String, Integer> index = ExportPinterestPrefsWorkflow.getIndex();\n int highestID = ExportPinterestPrefsWorkflow.getHighestID();\n if( index.containsKey(inKey) ){\n outKey = index.get(inKey);\n } else { //new id-string mapping\n outKey = highestID;\n index.put(inKey, outKey);\n highestID += 1;\n }\n if( index.containsKey(inValue) ){\n outValue = index.get(inValue);\n } else { //new id-string mapping\n outValue = highestID;\n index.put(inValue, outValue);\n highestID += 1;\n }\n outTuple.add(outKey);\n outTuple.add(outValue+\"\\t1.0\");\n collector.add(outTuple);\n ExportPinterestPrefsWorkflow.setHighestID(highestID);\n ExportPinterestPrefsWorkflow.setIndex(index);//todo not sure this is needed if index is a reference to enclosing class's index it's already modified. If it's a deep copy yikes, copied with every get?????\n }", "int updateByPrimaryKeyWithBLOBs(AnnouncementDO record);", "int updateByPrimaryKeySelective(IntegralExchange record);", "int updateByPrimaryKeySelective(ResourceWithBLOBs record);", "private synchronized void saveData() throws RuntimeException {\r\n // if too much, serialize\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n // write out to the other file\r\n FileWriter fw = null;\r\n BufferedWriter bw = null;\r\n try {\r\n // read from the current toggle file\r\n fr = new FileReader(getToggleFile());\r\n br = new BufferedReader(fr);\r\n // change files\r\n toggle = !toggle;\r\n fw = new FileWriter(getToggleFile());\r\n bw = new BufferedWriter(fw);\r\n // sort the items\r\n ProjectFilePart[] pfps = (ProjectFilePart[]) buf.toArray(new ProjectFilePart[0]);\r\n Arrays.sort(pfps);\r\n int pfpsIndex = 0;\r\n // read/copy the lines\r\n for (String line = br.readLine(); line != null; line = br.readLine()) {\r\n // if it is empty, skip\r\n if (line.trim().equals(\"\")) {\r\n continue;\r\n // load the project file part\r\n }\r\n ProjectFilePart pfp = convertToProjectFilePart(line);\r\n // check which is less\r\n if (pfpsIndex >= pfps.length || pfp.compareTo(pfps[pfpsIndex]) <= 0) {\r\n bw.write(convertToStringLine(pfp));\r\n } else if (pfp.compareTo(pfps[pfpsIndex]) > 0) {\r\n // write all of the ones that are less\r\n while (pfpsIndex < pfps.length && pfp.compareTo(pfps[pfpsIndex]) > 0) {\r\n bw.write(convertToStringLine(pfps[pfpsIndex]));\r\n pfpsIndex++;\r\n }\r\n // write out the current entry\r\n bw.write(convertToStringLine(pfp));\r\n } else {\r\n System.out.println(\"Skipping \" + pfp.getRelativeName());\r\n }\r\n }\r\n // write the rest\r\n for (; pfpsIndex < pfps.length; pfpsIndex++) {\r\n bw.write(convertToStringLine(pfps[pfpsIndex]));\r\n }\r\n // clear the buffer\r\n buf.clear();\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n } finally {\r\n // close the input\r\n IOUtil.safeClose(br);\r\n IOUtil.safeClose(fr);\r\n // flush the output\r\n try {\r\n bw.flush();\r\n } catch (Exception e) {\r\n }\r\n try {\r\n fw.flush();\r\n } catch (Exception e) {\r\n }\r\n // close the output\r\n IOUtil.safeClose(bw);\r\n IOUtil.safeClose(fw);\r\n }\r\n }", "int updateByPrimaryKeySelective(ItemStockDO record);", "int updateByPrimaryKeySelective(BPBatchBean record);", "public void C(boolean bl2) {\n this.h = bl2;\n synchronized (this) {\n long l10 = this.m;\n long l11 = 2;\n this.m = l10 |= l11;\n }\n this.notifyPropertyChanged(36);\n super.requestRebind();\n }", "public void updateInterestAPI(long userId, String interests, String userHandle, String sessionToken){\n final Handler mainHandler = new Handler(context.getMainLooper());\n profileApi.updateInterest(Long.toString(userId), interests.trim(), userHandle, sessionToken)\n .subscribeOn(Schedulers.io())\n .subscribe(new Action1<InterestResponse>() {\n @Override\n public void call(InterestResponse response) {\n\n mainHandler.post(new Runnable() {\n @Override\n public void run() {\n bus.post(new InterestUpdateEvent());\n\n UIHelper.getInstance().dismissProgressDialog();\n }\n });\n }\n }, new Action1<Throwable>() {\n @Override\n public void call(Throwable throwable) {\n Log.e(\"Mobisys: \", \"cannot update interest\", throwable);\n mainHandler.post(new Runnable() {\n @Override\n public void run() {\n UIHelper.getInstance().dismissProgressDialog();\n UIHelper.getInstance().showAlert(context, \"Please try again later.\");\n }\n });\n\n\n }\n });\n }", "public void handleUpdateState(QSTile.BooleanState booleanState, Object obj) {\n boolean z;\n int i;\n int i2 = 1;\n boolean z2 = obj == QSTileImpl.ARG_SHOW_TRANSIENT_ENABLING;\n if (booleanState.slash == null) {\n booleanState.slash = new QSTile.SlashState();\n }\n boolean z3 = z2 || this.mHotspotController.isHotspotTransient();\n checkIfRestrictionEnforcedByAdminOnly(booleanState, \"no_config_tethering\");\n if (obj instanceof CallbackInfo) {\n CallbackInfo callbackInfo = (CallbackInfo) obj;\n booleanState.value = z2 || callbackInfo.isHotspotEnabled;\n i = callbackInfo.numConnectedDevices;\n z = callbackInfo.isDataSaverEnabled;\n } else {\n booleanState.value = z2 || this.mHotspotController.isHotspotEnabled();\n i = this.mHotspotController.getNumConnectedDevices();\n z = this.mDataSaverController.isDataSaverEnabled();\n }\n booleanState.icon = this.mEnabledStatic;\n booleanState.label = this.mContext.getString(R$string.quick_settings_hotspot_label);\n booleanState.isTransient = z3;\n booleanState.slash.isSlashed = !booleanState.value && !z3;\n if (z3) {\n booleanState.icon = QSTileImpl.ResourceIcon.get(17302458);\n }\n booleanState.expandedAccessibilityClassName = Switch.class.getName();\n booleanState.contentDescription = booleanState.label;\n boolean z4 = booleanState.value || booleanState.isTransient;\n if (z) {\n booleanState.state = 0;\n } else {\n if (z4) {\n i2 = 2;\n }\n booleanState.state = i2;\n }\n String secondaryLabel = getSecondaryLabel(z4, z3, z, i);\n booleanState.secondaryLabel = secondaryLabel;\n booleanState.stateDescription = secondaryLabel;\n }", "public void process() {\n cycleID.incrementAndGet();\r\n List<ChunkBB> chunkbbs;\r\n synchronized (loadedChunks) {\r\n chunkbbs = new LinkedList<>(loadedChunks);\r\n }\r\n\r\n Condition cond = chunkbbs.stream().map(\r\n b -> GAIA_STATES.WORLD_UUID.eq(b.getWorld())\r\n .and(GAIA_STATES.X.gt(b.getX() * 16))\r\n .and(GAIA_STATES.Z.gt(b.getZ() * 16))\r\n .and(GAIA_STATES.X.le(b.getX() * 16 + 16))\r\n .and(GAIA_STATES.Z.le(b.getZ() * 16 + 16))\r\n ).reduce(DSL.falseCondition(), (a, b) -> a.or(b));\r\n\r\n Gaia.DBI().submit((conf) -> {\r\n DSLContext ctx = DSL.using(conf);\r\n ctxref.set(ctx);\r\n ReturnContainer rec;\r\n\r\n while ((rec = input.poll()) != null) {\r\n switch (rec.getState()) {\r\n case DELETE:\r\n LOG.fine(\"[\" + cycleID + \"]Deleting:\\n\" + rec);\r\n ctx.executeDelete(rec.getRec());\r\n break;\r\n case UPDATE:\r\n try {\r\n LOG.fine(\"[\" + cycleID + \"]Updating:\\n\" + rec);\r\n ctx.executeUpdate(rec.getRec());\r\n } catch (Exception e) {\r\n LOG.log(Level.SEVERE, \"[\" + cycleID + \"]Failed to update record.\\n\" + rec.getRec(), e);\r\n }\r\n break;\r\n default:\r\n LOG.severe(\"[\" + cycleID + \"]Failed to process record.\\n\" + rec.getRec() + \"\\nUnknown state: \" + rec.getState());\r\n }\r\n }\r\n if (output.isEmpty()) {\r\n List<GaiaStatesRecord> recs = ctx\r\n .selectFrom(GAIA_STATES)\r\n .where(GAIA_STATES.TRANSITION_TIME.lt(new Timestamp(System.currentTimeMillis())))\r\n .and(cond)\r\n .fetch();\r\n if (!recs.isEmpty()) {\r\n LOG.fine(\"Adding \" + recs.size() + \" records to output queue.\");\r\n output.addAll(recs);\r\n }\r\n }\r\n ctxref.set(null);\r\n });\r\n }", "int updateByPrimaryKeySelective(CommonQuestionStrategyType record);", "public void putBooleanData(String key, Boolean value) {\n editor.putBoolean(key, value);\n editor.apply();\n }", "public void doWrite() throws IOException {\n\t\tbbout.flip();\n\t\tsc.write(bbout);\n\t\tbbout.compact();\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "int updateByPrimaryKeyWithBLOBs(MemberAdvisoryComment record);", "void setPendingBinaryOperation(DoubleBinaryOperator op);", "int updateByPrimaryKeyWithBLOBs(ResPartnerBankEntityWithBLOBs record);", "protected void processStartedObserving(int gameNumber, String whiteName, String blackName, int wildNumber, String ratingCategoryString,\n boolean isRated, int whiteInitial, int whiteIncrement, int blackInitial, int blackIncrement, boolean isPlayedGame, String exString,\n int whiteRating, int blackRating, long gameID, String whiteTitles, String blackTitles, boolean isIrregularLegality,\n boolean isIrregularSemantics, boolean usesPlunkers, String fancyTimeControls) {\n if (!isPlayedGame) {\n return;\n }\n Player whitePlayer = tournamentService.findPlayer(whiteName);\n Player blackPlayer = tournamentService.findPlayer(blackName);\n if (whitePlayer == null) return;\n if (blackPlayer == null) return;\n Game game = tournamentService.findGame(gameNumber);\n if (game == null) {\n alertManagers(\"A game has started on an unpredicted board: {0} - {1} {2}\", gameNumber, whiteName, blackName);\n game = tournamentService.findPlayerGame(whitePlayer);\n }\n if (game == null) {\n alertManagers(\"I am totally confused. I don't have a scheduled game for: {0} {1}\", whiteName, blackName);\n return;\n }\n tournamentService.updateGameStatus(game, GameState.PLAYING);\n tournamentService.flush();\n game.needsAnnounce = true;\n game.whitePlayer = whitePlayer;\n game.blackPlayer = blackPlayer;\n game.observerCountCurrent = 0;\n command.spoof(\"ROBOadmin\", \"observe {0}\", gameNumber);\n command.sendAdminCommand(\"spoof {0} set busy 2\", whitePlayer);\n command.sendAdminCommand(\"spoof {0} set busy 2\", blackPlayer);\n command.qsuggest(\"USCLTD\", \"observe {0}\", gameNumber);\n command.sendAdminCommand(\"spoof {0} ;-notify USCL; +notify USCLTD\", whitePlayer);\n command.sendAdminCommand(\"spoof {0} ;-notify USCL; +notify USCLTD\", blackPlayer);\n /* Announcement will occur when the move list arrives, since we can then tell if it's a resumed game. */\n }", "private void addUpdateOp(Uri uri) {\n ContentProviderOperation.Builder builder =\n newUpdateCpo(uri, mIsSyncOperation, mIsYieldAllowed).withValues(mValues);\n mIsYieldAllowed = false;\n mBatchOperation.add(builder.build());\n }", "int updateByPrimaryKeySelective(SpecialCircumstance record);", "int updateByPrimaryKeySelective(AccountPaymentMethodEntityWithBLOBs record);", "public void update(byte[] bArr, int i, int i2) {\n checkNotDone();\n this.digest.update(bArr, i, i2);\n }", "@Override\n public void update(int bit)\n {\n this.mixer.update(bit);\n this.bpos = (this.bpos + 1) & 7;\n this.c0 = (this.c0 << 1) | bit;\n\n if (this.c0 > 255)\n { \n this.buffer[this.pos&MASK2] = (byte) this.c0;\n this.pos++;\n this.c4 = (this.c4 << 8) | (this.c0 & 0xFF);\n this.hash = (((this.hash*43707) << 4) + this.c4) & MASK1;\n final int shiftIsBinary = ((this.c4 >>> 31) | ((this.c4 & 0x00800000) >>> 23) | \n ((this.c4 & 0x00008000) >>> 15) | ((this.c4 & 0x80) >>> 7)) << 4;\n this.c0 = 1;\n\n // Select Neural Net\n this.mixer.setContext(this.c4 & 0x07FF);\n \n // Add contexts to NN\n this.addContext(this.c4 ^ (this.c4 & 0xFFFF));\n this.addContext(hash(C1, this.c4 << 24)); // hash with random primes\n this.addContext(hash(C2, this.c4 << 16)); \n this.addContext(hash(C3, this.c4 << 8));\n this.addContext(hash(C4, this.c4 & 0xF0F0F0F0));\n this.addContext(hash(C5, this.c4));\n this.addContext(hash(this.c4>>shiftIsBinary, \n (this.buffer[(this.pos-6)&MASK2]<<8)| (this.buffer[(this.pos-5)&MASK2]))); \n \n // Find match\n this.findMatch(); \n\n // Keep track of new match position\n this.hashes[this.hash] = this.pos;\n }\n\n // Add inputs to NN\n for (int i=this.ctxId-1; i>=0; i--)\n {\n if (this.cp[i] != 0)\n this.states[this.cp[i]] = STATE_TABLE[(this.states[this.cp[i]]<<1)|bit]; \n \n this.cp[i] = (this.ctx[i] + this.c0) & MASK3; \n this.mixer.addInput(SM[(i<<8)|this.states[this.cp[i]]]); \n }\n\n if (this.bpos == 7)\n this.ctxId = 0;\n \n if (this.matchLen > 0) \n this.addMatchContext();\n\n // Get prediction from NN\n int p = this.mixer.get();\n \n // Adjust with APM\n p = this.apm.get(bit, p, this.c0);\n this.pr = p + ((p - 2048) >>> 31); \n }", "@Override\n\tprotected void processPostUpdateStream(KStream<String, Event> events) {\n\n\t}", "int updateByPrimaryKeySelective(BasicInfoAnodeBurningLossRate record);", "public void update(byte[] paramArrayOfbyte, int paramInt1, int paramInt2) throws XMLSignatureException {\n/* 231 */ this.signatureAlgorithm.engineUpdate(paramArrayOfbyte, paramInt1, paramInt2);\n/* */ }", "int updateByPrimaryKeySelective(TDictAreas record);", "int updateByPrimaryKeyWithBLOBs(XxAreaWithBLOBs record);", "public void updateIndication() {\n int i;\n if (TextUtils.isEmpty(this.mTransientIndication)) {\n this.mWakeLock.setAcquired(false);\n }\n Log.i(\"KeyguardIndication\", \"updateIndication: mVisible \" + this.mVisible + \" mDozing \" + this.mDozing + \" mTransientIndication \" + this.mTransientIndication + \" mPowerPluggedIn \" + this.mPowerPluggedIn + \" mShouldUpdateBatteryIndication \" + this.mShouldUpdateBatteryIndication + \" mUpArrowIndication \" + this.mUpArrowIndication);\n if (this.mVisible) {\n if (this.mDozing) {\n if (!TextUtils.isEmpty(this.mTransientIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mTransientIndication);\n this.mTextView.setTextColor(this.mTransientTextColor);\n } else {\n this.mTextView.switchIndication((CharSequence) null);\n }\n } else if (!TextUtils.isEmpty(this.mTransientIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mTransientIndication);\n this.mTextView.setTextColor(this.mTransientTextColor);\n } else if (this.mPowerPluggedIn) {\n if (this.mShouldUpdateBatteryIndication) {\n this.mHandler.removeMessages(6);\n this.mHandler.sendEmptyMessageDelayed(6, 500);\n }\n } else if (Build.IS_CM_CUSTOMIZATION_TEST && this.mSignalAvailable && !this.mIsCMSingleClicking) {\n this.mTextView.switchIndication((int) R.string.emergency_call_string);\n this.mTextView.setTextColor(getTextColor());\n } else if (this.mUpdateMonitor.isFaceUnlock() && this.mUpdateMonitor.isStayScreenFaceUnlockSuccess() && shouldShowFaceTransientIndication()) {\n this.mTextView.switchIndication((int) R.string.face_unlock_success);\n this.mTextView.setTextColor(getTextColor());\n } else if (!TextUtils.isEmpty(this.mUpArrowIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mUpArrowIndication);\n this.mTextView.setTextColor(getTextColor());\n ImageView imageView = this.mUpArrow;\n if (this.mDarkMode) {\n i = R.drawable.miui_default_lock_screen_up_arrow_dark;\n } else {\n i = R.drawable.miui_default_lock_screen_up_arrow;\n }\n imageView.setImageResource(i);\n } else {\n this.mTextView.switchIndication((CharSequence) this.mRestingIndication);\n this.mTextView.setTextColor(getTextColor());\n }\n }\n }", "int updateByPrimaryKeyWithBLOBs(AccuseInfo record);", "@NotNull\n @Generated\n @Selector(\"filterDataVerdictWithFilterInbound:peekInboundBytes:filterOutbound:peekOutboundBytes:\")\n public static native NEFilterNewFlowVerdict filterDataVerdictWithFilterInboundPeekInboundBytesFilterOutboundPeekOutboundBytes(\n boolean filterInbound, @NUInt long peekInboundBytes, boolean filterOutbound, @NUInt long peekOutboundBytes);", "public void BufferUpdates()\n {\n //Clear the dispatch list and start buffering changed entities.\n DispatchList.clear();\n bBufferingUpdates = true;\n }", "int updateByPrimaryKeyWithBLOBs(QuestionWithBLOBs record);", "private void processBuffer(boolean flushBuffer, boolean endOfInput) throws IOException {\n decodeBuffer(flushBuffer || endOfInput);\n if (!endOfInput && !flushBuffer && cb.position() < PROCESS_THRESHOLD) {\n return;\n }\n cb.flip();\n found = SubstituteUtil.processSubstitute(cb, substitute, endOfInput, outputCharset, stream);\n // Write the tail bytes in the byte buffer if required\n if (bb.position() > 0 && (found || endOfInput)) {\n bb.flip();\n while (bb.hasRemaining()) {\n stream.write(bb.get());\n }\n bb.clear();\n }\n }", "int updateByPrimaryKeySelective(AutoAssessDetailWithBLOBs record);", "public void not() {\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\tif (!i.hasNext())\n\t\t\treturn;\n\t\twhile (true) {\n\t\t\tfinal RunningLengthWord rlw1 = i.next();\n\t\t\tif (rlw1.getRunningLength() > 0)\n\t\t\t\trlw1.setRunningBit(!rlw1.getRunningBit());\n\t\t\tfor (int j = 0; j < rlw1.getNumberOfLiteralWords(); ++j) {\n\t\t\t\ti.buffer()[i.dirtyWords() + j] =\n\t\t\t\t\t\t~i.buffer()[i.dirtyWords() + j];\n\t\t\t}\n\t\t\tif (!i.hasNext()) {// must potentially adjust the last dirty word\n\t\t\t\tif (rlw1.getNumberOfLiteralWords() == 0)\n\t\t\t\t\treturn;\n\t\t\t\tint usedbitsinlast = this.sizeinbits % wordinbits;\n\t\t\t\tif (usedbitsinlast == 0)\n\t\t\t\t\treturn;\n\t\t\t\ti.buffer()[i.dirtyWords() + rlw1.getNumberOfLiteralWords() - 1] &=\n\t\t\t\t\t\t((oneMask) >>> (wordinbits - usedbitsinlast));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void mo1087b() {\n this.f1007h = new SparseBooleanArray();\n notifyDataSetChanged();\n }", "public R visit(BinOp n) {\n R _ret=null;\n n.f0.accept(this);\n Integer temp = (Integer)n.f1.accept(this);\n //new\n \n ArrayList<Integer> newHold = use.get(statementNumber);\n newHold.add(temp);\n use.put(statementNumber, newHold);\n \n //new\n \n \n if(temp >= arguments){\n\t ArrayList<Integer> hold = live.get(temp);\n\t hold.add(statementNumber);\n\t live.put(temp, hold);\n }\n n.f2.accept(this);\n return _ret;\n }", "public void rasterScanning(){\r\n ReadParameter embedPara = new ReadParameter();\r\n QuantisationEmbedding subband = new QuantisationEmbedding();\r\n int i,j,k,p;\r\n double[] coeffStream, modCoeffStream;\r\n //Modification in selected subband only\r\n if(embedPara.getSubbandChoice().compareTo(\"LF\") == 0){\r\n //Embed in low low subband only\r\n //Initialise the coefficient stream to be modified\r\n coeffStream = new double[subband.getSubbandLL().length * subband.getSubbandLL()[0].length];\r\n modCoeffStream = coeffStream; \r\n k=0;\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n coeffStream[k++] = subband.getSubbandLL()[i][j];\r\n }\r\n }\r\n \r\n // Coeff modification\r\n modCoeffStream = subband.rasterEmbed(coeffStream);\r\n \r\n // Write it back in proper order\r\n k = 0; // Reset k value\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandLL()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n \r\n } else if(embedPara.getSubbandChoice().compareTo(\"HF\") == 0){\r\n //Embed in high frequency subband only\r\n //Initialise the coefficient stream to be modified\r\n coeffStream = new double[subband.getSubbandLL().length * subband.getSubbandLL()[0].length * 3];\r\n modCoeffStream = coeffStream; \r\n k=0;\r\n \r\n // Make it fir three high frequency subbands\r\n for(p=0; p<3; p++){\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n if(p==0){ //Get LH Subband values\r\n coeffStream[k++] = subband.getSubbandLH()[i][j];\r\n \r\n } else if(p==1){ //Get HL Subband values\r\n coeffStream[k++] = subband.getSubbandHL()[i][j];\r\n \r\n } else if(p==2){ //Get HH Subband values\r\n coeffStream[k++] = subband.getSubbandHH()[i][j];\r\n \r\n } // End of if-else condition \r\n } // End of inner loop\r\n } \r\n } // End of outer loop\r\n \r\n \r\n // Coeff modification\r\n modCoeffStream = subband.rasterEmbed(coeffStream);\r\n \r\n \r\n // Write it back in proper order\r\n k=0; // Reset k value\r\n //Write back LH Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandLH()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back HL Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandHL()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back HH Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandHH()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n \r\n \r\n } else if(embedPara.getSubbandChoice().compareTo(\"AF\") == 0){\r\n //Embed in all subbands\r\n //Initialise the coefficient stream to be modified\r\n coeffStream = new double[subband.getSubbandLL().length * subband.getSubbandLL()[0].length * 4];\r\n modCoeffStream = coeffStream; \r\n k=0;\r\n \r\n // Make it fir three high frequency subbands\r\n for(p=0; p<4; p++){\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n if(p==0){ //Get LL Subband values\r\n coeffStream[k++] = subband.getSubbandLL()[i][j];\r\n \r\n } else if(p==1){ //Get LH Subband values\r\n coeffStream[k++] = subband.getSubbandLH()[i][j];\r\n \r\n } else if(p==2){ //Get HL Subband values\r\n coeffStream[k++] = subband.getSubbandHL()[i][j];\r\n \r\n } else if(p==3){ //Get HH Subband values\r\n coeffStream[k++] = subband.getSubbandHH()[i][j];\r\n \r\n } // End of if-else condition \r\n } // End of inner loop\r\n } \r\n } // End of outer loop\r\n \r\n \r\n \r\n // Coeff modification\r\n modCoeffStream = subband.rasterEmbed(coeffStream);\r\n \r\n \r\n \r\n // Write it back in proper order\r\n k = 0; //Reset k value\r\n //Write back LL Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandLL()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back LH Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandLH()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back HL Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandHL()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back HH Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandHH()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n } // End subband choice if-else condition\r\n \r\n }", "public void updateData(Trick completedTrick);", "void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}", "DoubleBinaryOperator getPendingBinaryOperation();", "int updateByPrimaryKeySelective(PathologyInfo record);", "protected void _setBooleanElement(int index, boolean value) {\n\t\tint bitOffset = Math.multiplyExact(index, this.step);\n\t\t// the number of the Bit in the byte it is in\n\t\tbyte bitnum = (byte) (bitOffset % Constants.BITS_PER_BYTE);\n\t\t// position of the byte in the data section\n\t\tint position = (this.ptr + bitOffset / Constants.BITS_PER_BYTE);\n\t\tbyte oldValue = this.segment.buffer.get(position);\n\t\t// the left side of the '|' zeros the selected bit; the right side sets the new value\n\t\tthis.segment.buffer.put(position, (byte) ((oldValue & (~(1 << bitnum))) | ((value ? 1 : 0) << bitnum)));\n\t}", "private void processIn() throws IOException {\n for (; ; ) {\n var status = fr.process(bbin);\n switch (status) {\n case ERROR:\n silentlyClose();\n return;\n case REFILL:\n return;\n case DONE:\n Frame frame = fr.get();\n fr.reset();\n treatFrame(frame);\n break;\n }\n }\n }", "int updateByPrimaryKeySelective(CmsCouponBatch record);", "int updateByPrimaryKeySelective(ComplainNoteDO record);" ]
[ "0.70488226", "0.7000103", "0.69438744", "0.4956687", "0.4737158", "0.47318372", "0.46210945", "0.46103773", "0.46097934", "0.45904484", "0.45635337", "0.45585048", "0.441614", "0.43986446", "0.43336758", "0.431432", "0.42986003", "0.42907014", "0.42676666", "0.41937026", "0.41926578", "0.41804624", "0.41677436", "0.41664183", "0.4160195", "0.41388208", "0.41365013", "0.41004983", "0.40953216", "0.40838444", "0.4061384", "0.40577915", "0.40571493", "0.40536547", "0.40452397", "0.40452397", "0.40320083", "0.40236402", "0.4018011", "0.4016813", "0.40161413", "0.40138632", "0.4011932", "0.401164", "0.4007562", "0.3986566", "0.3985958", "0.39616436", "0.39600542", "0.39534825", "0.3943517", "0.39335778", "0.39259297", "0.39237803", "0.39195415", "0.39136213", "0.391183", "0.38982084", "0.389335", "0.3887403", "0.38870728", "0.38819963", "0.38805678", "0.3878874", "0.38780543", "0.38779706", "0.38723233", "0.3870646", "0.38501918", "0.38487512", "0.38483766", "0.38482484", "0.38482034", "0.3846565", "0.38425177", "0.38407227", "0.38404018", "0.3835717", "0.38342646", "0.3833672", "0.38325274", "0.38230968", "0.38197947", "0.38196084", "0.38187417", "0.3815907", "0.38143805", "0.3814254", "0.3813657", "0.38085762", "0.3806851", "0.3801091", "0.37918943", "0.3790162", "0.3780398", "0.3778655", "0.3777279", "0.37769765", "0.37766656", "0.37764505" ]
0.7082172
0
Add a message to the message queue, tries to fill bbOut and updateInterestOps
public void queueMessage(ByteBuffer bb) { queue.add(bb); processOut(); updateInterestOps(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void queueMessage(ByteBuffer bb) {\n\t\tqueue.add(bb);\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "public void queueMessage(Message message);", "public void append(Serializable message){\n taskQueue.addLast(message);\n unlockWaiter();//unblocks for taskQueue\n unlockPoolWaiter();//unblocks for threadPool\n }", "void addToQueue(WebhookMessage msg);", "abstract void addMessage(Message message);", "public void addToMessageQueue(String message)\r\n {\r\n messageQueue.appendText(message + \"...\" + \"\\n\");\r\n }", "public void addMessage(Message message)\n\t{\n\t\tmessages.add(message);\n\t\tsize+=messages.size();\n\t}", "public void addMessage() {\n }", "private void addMessageToQueue( byte[] buffer ){\n \tsynchronized (this.messages) {\n byte message[] = new byte[buffer.length\n - Constants.MESSAGE_ID_LEN - 1];\n for (int i = Constants.MESSAGE_ID_LEN + 1; i < buffer.length; i++) {\n message[i - Constants.MESSAGE_ID_LEN - 1] = buffer[i];\n }\n messages.add(message);\n }\n }", "public Message addMessage(Message p);", "protected void enqueue(StdPeerMessage message)\n {\n// if (DEBUG) {\n// if (message.type == StdPeerMessage.REQUEST) {\n// System.out.println(System.nanoTime() + \" [stdpc] enqueue: req \" + message.index + \" \" + (message.begin >> 14));\n// } else {\n// System.out.println(\"[stdpc] enqueue: \" + message.type);\n// }\n// }\n\n if (message.type == StdPeerMessage.CHOKE)\n {\n // remove reply messages with piece (block) data\n // from the send queue (due to spec)\n for (int i = sendQueue.size() - 1; 0 <= i; i--) {\n StdPeerMessage pm = sendQueue.get(i);\n if (pm.type == StdPeerMessage.PIECE) {\n sendQueue.remove(i);\n TorrentStorage.Block block = (TorrentStorage.Block) message.params;\n block.release();\n pmCache.release(pm);\n }\n }\n // set choke status\n choke = true;\n // send choke asap\n sendQueue.add(0, message);\n }\n else if (message.type == StdPeerMessage.CANCEL)\n {\n // remove the linked request if it's still in the queue\n for (int i = sendQueue.size() - 1; 0 <= i; i--) {\n StdPeerMessage pm = sendQueue.get(i);\n if ((pm.type == StdPeerMessage.REQUEST)\n && (pm.index == message.index)\n && (pm.begin == message.begin)\n && (pm.length == message.length)) // this check is redundant as length is fixed\n {\n sendQueue.remove(i);\n pmCache.release(pm);\n // don't really enqueue CANCEL as the linked request\n // has been found and removed\n pmCache.release(message);\n return;\n }\n }\n // send asap\n sendQueue.add(0, message);\n }\n else {\n if (message.type == StdPeerMessage.INTERESTED) {\n interested = true;\n }\n else if (message.type == StdPeerMessage.NOT_INTERESTED) {\n interested = false;\n }\n else if (message.type == StdPeerMessage.UNCHOKE) {\n choke = false;\n }\n\n // enqueue message\n sendQueue.add(message);\n }\n\n// sendQueue.forEach(pm -> System.out.println(\" -x> \" + System.identityHashCode(pm) + pm.type + \" ,\" + pm.index +\",\" + pm.begin +\",\" + pm.length) );\n\n }", "public synchronized boolean add(Cincamimis message) throws QueueException\r\n {\r\n if(message==null) return false;\r\n if(measurementQueue==null) throw new QueueException(\"CINCAMIMIS Queue not found\");\r\n \r\n boolean rdo=measurementQueue.offer(message);\r\n \r\n if(rdo)\r\n {\r\n this.notifyObservers();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public synchronized boolean addKeepingLast(Cincamimis message) throws QueueException, InterruptedException\r\n {\r\n if(message==null) return false;\r\n if(measurementQueue==null) throw new QueueException(\"CINCAMIMIS Queue not found\");\r\n \r\n boolean rdo=measurementQueue.offer(message);\r\n \r\n while(!rdo)\r\n {\r\n measurementQueue.take();\r\n rdo=measurementQueue.offer(message);\r\n }\r\n \r\n if(rdo)\r\n {\r\n this.notifyObservers();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public void enqueue(Message msg){\n\t\tqueue.add(msg);\n\t}", "private void pushBeaconMessage(BeaconMessage beaconMessage) {\n if (messageQueue.size() >= maximumSize) {\r\n return;\r\n }\r\n // Adding the beacon messages is synchronized as it is typical for producer consumer scenarios.\r\n synchronized(this.messageQueue) {\r\n this.messageQueue.add(beaconMessage);\r\n // Wake up all threads that are waiting for incoming messages.\r\n this.messageQueue.notifyAll();\r\n }\r\n }", "protected void handleOutboundMessage(Object msg) {\n/* 741 */ outboundMessages().add(msg);\n/* */ }", "protected void addMessage(IDBSMessage pMessage){\n\t\twMessages.add(pMessage);\n\t}", "public void putMessage (Message message);", "public void addNotifyMessage(NotifyMessage msg) {\n messageQueue.offer(msg);\n }", "public void addMessage(String message);", "private void writeNextMessageInQueue() {\n // This should not happen in practice since this method is private and should only be called\n // for a non-empty queue.\n if (mMessageQueue.isEmpty()) {\n Log.e(TAG, \"Call to write next message in queue, but the message queue is empty.\");\n return;\n }\n\n if (mMessageQueue.size() == 1) {\n writeValueAndNotify(mMessageQueue.remove().toByteArray());\n return;\n }\n\n mHandler.post(mSendMessageWithTimeoutRunnable);\n }", "public static void PushMessage( Message t_message )\n\t{\n\t\tm_tMessageQueue.add(t_message);\n\t}", "public void addMessage(String msg){messages.add(msg);}", "@Override\n\tpublic void addToQueue() {\n\t}", "protected int putMessage(Message message) throws InterruptedException {\n log.trace(\"MessageListenerImpl.putMessage() start ...\");\n return addMessage(message);\n }", "public void addMessage(String message) {\r\n returnObject.addMessage(message);\r\n }", "public void add(Message message){\n if (message.getContent().length() <= 280) {\n this.messages.add(message);\n }\n //this.messages.add(message);\n }", "public void sendMessage(Event event){\n // find the last queue and add the message to that\n // if the last queue is full then create a new queue and add to that\n if(messageQueues.size() <= 0){\n Queue<Event> newQueue = new LinkedList<>();\n Queue<Event> newBackupQueue = new LinkedList<>();\n messageQueues.add(newQueue);\n backupMessageQueues.add(newBackupQueue);\n// System.out.println(\"Size of new Q: \" + messageQueues.size());\n }\n\n // getting hold of the working queue and the backup queue.\n Queue<Event> queue = messageQueues.get(messageQueues.size() - 1);\n Queue<Event> backupQueue = backupMessageQueues.get(backupMessageQueues.size() - 1);\n\n try{\n if(queue.size() >= queueSize){\n Queue<Event> newQueue = new LinkedList<>();\n Queue<Event> newBackupQueue = new LinkedList<>();\n // throw an excpetion for a certain message\n if(event.payload.trim().equals(\"CrashQueue\"))\n // this is done to simulate the queue crashing when it tries to add messages\n throw new Exception(\"Queue has been crashed\");\n // adding the message to both the backup and the main queue\n newQueue.add(event);\n messageQueues.add(newQueue);\n\n newBackupQueue.add(event);\n backupMessageQueues.add(newBackupQueue);\n } else {\n if(event.payload.trim().equals(\"CrashQueue\"))\n // this is done to simulate the queue crashing when it tries to add messages\n throw new Exception(\"Queue has been crashed\");\n queue.add(event);\n backupQueue.add(event);\n }\n }catch(Exception e){\n System.out.println(\"Queue crashed, switching it with the backup queue\");\n // if the queue fails then switch it with the backup queue and create a new backup\n messageQueues = backupMessageQueues;\n // create a duplicate backup message queue\n }\n// System.out.println(\"The message queuesss are : \" + messageQueues);\n }", "private void add(Pair<MarketDataRequestAtom,Event> inData)\n {\n getQueue().add(inData);\n }", "@Override\n public void addMessage(String message) {\n messages.add(message);\n }", "public void add(Message aMessage) \n { \n elements[tail] = aMessage; \n tail = (tail + 1) % elements.length; \n count++; \n }", "public void addMessage(byte[] message) throws RemoteException;", "public void addBid(GameMessage bidMsg) {\r\n Queue<GameMessage> msgList = msgMapping.get(bidMsg.getGameId());\r\n if (msgList == null) {\r\n msgList = new LinkedList<>();\r\n msgMapping.put(bidMsg.getGameId(), msgList);\r\n }\r\n msgList.add(bidMsg);\r\n bidCount ++;\r\n }", "public synchronized void enqueue(Object msg) {\n\t\tqueue.add(msg);\n\n\t\t// if any threads wait on empty queue then wake them up\n\t\tnotifyAll();\n\t}", "public void addNextMessage(String message){\n synchronized (ChatMessage){\n hasMessages = true;\n ChatMessage.push(message);\n }\n }", "@Override\n\tprotected void doAction(Object message) {\n\t\tlogger.info(\"File Scanner Fetch message Name -->:\"+message.toString());\n\t\ttry {\n\t\t\tFileParser.queue.put(message);\n\t\t} catch (InterruptedException e) {\n\t\t\tlogger.error(\"Error on add message to Parser\");\n\t\t}\n\t}", "public synchronized void add (Message message) throws IOException {\n list.add(message);\n\n FileWriter fileWriter = null;\n BufferedWriter bufferedWriter = null;\n\n try {\n fileWriter = new FileWriter(file, true);\n bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.write(message.longToString());\n bufferedWriter.newLine();\n } finally {\n if (bufferedWriter != null) {\n bufferedWriter.close();\n }\n\n if (fileWriter != null) {\n fileWriter.close();\n }\n }\n }", "public void insertMsg (SimpleMessage msg) {\t\t\n\t\trouter.add(msg);\n\t\tSimpleMessage peek = router.peek();\n\t\tif ((double)peek.size/1000 <= maxUpload - totSize){\n\t\t\ttotSize+= sendMsg()/1000;\n\t\t}\n\t}", "@Override\r\n\tpublic void onMessage(BmobMsg message) {\n\t\trefreshNewMsg(message);\r\n\t}", "public void postMessage(Message message){\n messageRepository.addMessage(message);\n }", "public void addMessage(EventMessage message) {\n }", "public void enqueue(String message) {\n\t\tqueue.add (message);\n\t}", "public void logMessage(HistoricalMessage message) {\n if (message.getBody() != null) {\r\n logQueue.add(message);\r\n }\r\n }", "protected void handleInboundMessage(Object msg) {\n/* 748 */ inboundMessages().add(msg);\n/* */ }", "public void addMessage(Message message) {\n history.add(message);\n }", "@Override\n\tpublic Future<Integer> write(ByteBuffer bb) {\n\t\tthis.outcomingMessageQ.offer(bb);\n\n\t\t/*\n\t\t * Read the Q and send the packet util the Q is empty.\n\t\t * \n\t\t * This method will for ever called after the offer call on the Q to\n\t\t * make sure write will be triggered if the Q isn't empty.\n\t\t */\n\t\treturn sendOne();\n\n\t}", "public synchronized void addMessage(Message message) {\n\t\tif (message == null) throw new IllegalArgumentException(\"Cannot process NULL message\") ;\n\t\tSystem.out.println(\"Processing...\");\n\t\t\n\t\tString username = message.toUserName() ;\n\t\t\n\t\tif (messageMap.containsKey(username)) {\n\t\t\t//retrieve the set of messages addressed to the user\n\t\t\tmessageMap.get(username).add(message) ;\n\t\t\t\n\t\t}else {\n\t\t\tList<Message> newMessageList = new ArrayList<Message>();\n\t\t\tnewMessageList.add(message);\n\t\t\tmessageMap.put(username, (List<Message>)newMessageList );\n\t\t}\n\t}", "@Override\n\tpublic int add(Message t) {\n\t\treturn 0;\n\t}", "String addReceiveQueue();", "protected void addChannelToReadCompletePendingQueue() {\n/* 354 */ while (!Http2MultiplexHandler.this.readCompletePendingQueue.offer(this)) {\n/* 355 */ Http2MultiplexHandler.this.processPendingReadCompleteQueue();\n/* */ }\n/* */ }", "public void addMessage(ChatMessage message) {\n sqLiteHandler.addMessageToDB(message, this);\n messages.add(message);\n }", "public Message addMessage(Message message)\n {\n message.setId(messages.size() + 1);\n messages.put(message.getId(), message);\n return message;\n }", "private void saveOrUpdateNewMessageRealm(_Message message) {\r\n\r\n //realm required to submit from separate thread. IF I do operation in ui thread,\r\n //I need .allowQueriesOnUiThread(true), that's no need in my case\r\n executor.execute(() -> {\r\n // use Realm on background thread\r\n _RealmController.insertOrUpdateNewMessage(message);\r\n });\r\n }", "public void addMessage(Message message) {\n\t\tmessageList.addMessage(message);\n\t\tscrollBar.setValue(scrollBar.getMaximum());\n\t\trepaint();\n\t}", "public void addMessage(Object object)\r\n\t{\r\n\t\tmessageList.add(object);\r\n\t}", "void addMessageBody(ByteBuffer msgBody);", "@Override\n public synchronized void push(String queueName, QueueMessage message) throws QueueFullException {\n if(this.itemsInQueue == this.ringBufferQueue.length) {\n throw new QueueFullException(\"The queue is full\");\n }\n\n int pushLocation = this.pushQueueLocation;\n boolean search = true;\n\n // Find the first free space starting from the last location\n while(search) {\n if(this.ringBufferQueue[pushLocation] == null) {\n search = false;\n }\n else {\n pushLocation = this.incrementPosition(pushLocation);\n }\n }\n\n message.setQueueLocation(pushLocation);\n this.ringBufferQueue[pushLocation] = message;\n\n // Move the next push location to where we inserted as anything before is filled\n this.pushQueueLocation = this.incrementPosition(pushLocation);\n this.itemsInQueue++;\n }", "public void push(String message) throws IOException;", "public void addMessage(String message) {\n\t\tthis.message = message;\n\t}", "@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n String add(@RequestBody Message message) throws Exception {\n\n producer.send(message);\n return \"Received message: \" + message.getMessageType() + \"::\" + message.getMessageBody();\n\n }", "private synchronized void addMessage(String user, String message) {\n\t\tchatData.addElement(new ChatMessage(user, message));\n\t\tif (chatData.size() > 20)\n\t\t\tchatData.removeElementAt(0);\n\t}", "@Override\n\tpublic MessagePojo addMessage(MessagePojo message) {\n\t\treturn null;\n\t}", "private void addCommandToQueue(CancellableCommand command) {\n outstandingRequests.add(command);\n while (outstandingRequests.size() > maxOutstandingRequests) {\n outstandingRequests.poll().onCancelled();\n }\n }", "public void queueMessage(Message message) {\r\n\t\tsynchronized (this.messages) {\r\n\t\t\tif (this.sendMessages)\r\n\t\t\t\tthis.messages.add(message);\r\n\t\t}\r\n\t}", "public synchronized void write(String message) {\n\t\tcontent.add(message);\n\n\t\tnotify();\n }", "public void addMessage(BaseMessage message, final Callback callback){\n final ID id = new ID(message);\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n addMessageInl(id, callback);\n }\n });\n }", "void push(String message);", "public void recieveMessage( final String message ) {\r\n messages.add( message );\r\n }", "private synchronized void processMessage(Message m) throws JMSException {\n\n\t\t// get message counter. this value is set by the FailoverQSender.\n\t\tint ct = m.getIntProperty(FailoverQSender.MESSAGE_COUNTER);\n\t\t// log the message\n\t\t//log(\"received message: \" + ct +\", current connected broker: \" + this.getCurrentConnectedBrokerAddress());\n\t\t\n\t\t// saved the data in data holder.\n\t\tdata.addElement(new Integer(ct));\n\t}", "public void addIntoQueue(Integer block_id){\n if(this.queue_set){\n if(this.queue.contains(block_id) == false){\n this.queue.add(block_id);\n }\n }\n }", "@Override\n public void send(Message message) {\n\n expensiveResource.addToResourcesQueue(message);\n expensiveResource.processNextMessage();\n\n }", "private void writeMessage(Message message) throws IOException {\n Message.Command temp = message.getCommand();\n if (temp != Message.Command.GET_RESERVED && temp != Message.Command.GET_AVAILABLE) {\n connectionLoggerService.add(\"Bank : \" + message.toString());\n }\n objectOutputStream.reset();\n objectOutputStream.writeObject(message);\n }", "public void addMessage(ChatMessage message) {\n Log.w(TAG, \"addMessage to chat\");\n chatMessages.add(message);\n adapter.notifyDataSetChanged();\n }", "public synchronized void bufferMessage() throws Exception\r\n {\r\n\r\n System.out.println(\"BUFFER: Message from future round received. Buffering message.\");\r\n // Wait until node moves to next round.\r\n wait();\r\n\r\n }", "private void addMessageToUI (Message message) {\n if (message == null) {\n return;\n }\n\n //find the correct position based on timestamp\n int index = chatMessages.size() - 1;\n while (index >= 0 && message.getTimestamp() < chatMessages.get(index).getTimestamp()) {\n index--;\n }\n\n //update inerted message show time/sender flags\n Message lastMsg = index >= 0 ? chatMessages.get(index) : null;\n message.showMessageTime = lastMsg == null || message.getTimestamp() - lastMsg.getTimestamp() > Message.GROUP_TIME_THRESHOLD;\n message.showMessageSender = lastMsg == null || message.showMessageTime || !message.getSenderId().equals(lastMsg.getSenderId());\n chatMessages.add(index + 1, message);\n chatRoomAdapter.notifyItemInserted(index + 1);\n\n //upate next message show time/sender flags\n Message nextMsg = index + 2 < chatMessages.size() ? chatMessages.get(index + 2) : null;\n if (nextMsg != null) {\n boolean nextMsgShowMsgTime = nextMsg.getTimestamp() - message.getTimestamp() > Message.GROUP_TIME_THRESHOLD;\n boolean nextMsgShowMsgSender = nextMsgShowMsgTime || !nextMsg.getSenderId().equals(message.getSenderId());\n if (nextMsgShowMsgTime != nextMsg.showMessageTime || nextMsgShowMsgSender != nextMsg.showMessageSender) {\n nextMsg.showMessageTime = nextMsgShowMsgTime;\n nextMsg.showMessageSender = nextMsgShowMsgSender;\n chatRoomAdapter.notifyItemChanged(index + 2);\n }\n }\n\n chatLayoutManager.scrollToPosition(chatMessages.size() - 1);\n }", "public boolean addPutRequest( CellMessage msg , RequestImpl req ){\n // assign a new bitfile to this request\n //\n String group = req.getStorageGroup() ;\n String bfid = new Bfid().toString() ;\n long size = req.getFileSize() ;\n req.setBfid( bfid ) ;\n \n say( \"addPutRequest : bfid=\"+bfid+\";group=\"+group+\";size=\"+size ) ;\n \n BitfileId bitfile = new BitfileId( bfid , size ) ;\n bitfile.setParameter( req.getParameter() ) ;\n //\n // store the bitfile into the database\n try{\n _dataBase.storeBitfileId( group , bitfile ) ;\n }catch( DatabaseException dbe ){\n String error = \"StorageGroup not found : \"+group ;\n req.setReturnValue( 11 , error ) ;\n msg.revertDirection() ;\n esay( \"Sending problem : \"+error ) ;\n try{\n sendMessage( msg ) ;\n }catch(Exception ee ){\n esay( \"PANIC : can't return error msg to \"+msg.getDestinationPath() ) ;\n }\n return false ;\n }\n //\n // send the first BB-OK\n //\n CellPath bbReplyPath = (CellPath)msg.getSourceAddress().clone() ;\n bbReplyPath.revert() ;\n try{\n sendMessage( new CellMessage( bbReplyPath , req ) ) ;\n }catch(Exception nrtc ){\n esay( \"Door cell seems to have disappeared\" ) ;\n return false ;\n }\n \n return true ;\n \n }", "@Override\r\n\tpublic void addMessage(Integer receive_id, Integer send_id, String content,Timestamp createtime) {\n\t\tString sql=\"insert into message(receive_id,send_id,content,createtime,isread,result) values(?,?,?,?,?,?)\";\r\n\t\tObject[] args=new Object[] {receive_id,send_id,content,createtime,0,0};\r\n\t\ttry {\r\n\t\t\tupdate(conn, sql, args);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void addMessage(Message message) {\n this.messages.add(message);\n if(message.getProfile()!= this){\n message.setProfile(this);\n }\n }", "@Override\r\n public void handleMessage(Message inputMessage){\n Log.i(\"graphql insert\", \"made it to the callback\");\r\n //grab the data\r\n CreateBuyableItemMutation.CreateBuyableItem item = response.data().createBuyableItem();\r\n //make a new buyable item with it\r\n buyableItems.add(new BuyableItem(item));\r\n recyclerView.getAdapter().notifyDataSetChanged();\r\n\r\n }", "public void addMessage(DataMessage message) {\n\t\tthis.tableModel.addMessage(message);\n\t\tthis.showLastMessage();\n\t}", "public interface HoldBackQueueListener {\n public void messagePutInHoldBackQueue(Message message);\n public void messageRemovedFromHoldBackQueue(Message message);\n}", "private void push() {\n ImmutableSortedSet<T> myAvailable = _outstanding.apply(\n new Syncd.Transformer<ImmutableSortedSet<T>, ImmutableSortedSet<T>>() {\n public Tuple<ImmutableSortedSet<T>, ImmutableSortedSet<T>> apply(ImmutableSortedSet<T> aBefore) {\n final SortedSet<T> myRemaining = new TreeSet<>(new MessageComparator<T>());\n\n // Identify those messages that are sequentially contiguous from _floor and can be passed on\n //\n ImmutableSortedSet<T> myAccessible =\n new ImmutableSortedSet.Builder<>(new MessageComparator<T>()).addAll(\n Iterables.filter(aBefore, new Predicate<T>() {\n public boolean apply(T aMessage) {\n Long myCurrent = _floor.get();\n\n if (aMessage.getSeq() == myCurrent) {\n // This message can be sent out to listeners so long as we're first to try\n //\n if (_floor.testAndSet(myCurrent, myCurrent + 1))\n return true;\n } else\n // This message must remain\n //\n myRemaining.add(aMessage);\n\n // Couldn't send message out or it must remain\n //\n return false;\n }\n })\n ).build();\n\n return new Tuple<>(new ImmutableSortedSet.Builder<>(\n new MessageComparator<T>()).addAll(myRemaining).build(),\n myAccessible);\n }\n }\n );\n\n send(myAvailable);\n archive(myAvailable);\n }", "private void writeMessageInDataFile(String message){\n try {\n String messageToWrite = \"\\n\" + this + message;\n messagesManager.add(messageToWrite); // adds last message to last 15 messages queue\n Files.write(Paths.get(\"messages.txt\"), messageToWrite.getBytes(), StandardOpenOption.APPEND); // writes last message in messages database\n }catch (IOException e) {\n System.err.println(\"*** ERROR ***\\nCouldn't write in data file.\");\n }\n }", "@Override\n public void replicationFinished()\n {\n MyMessage dummyMessage = new MyMessage(this);\n registration().getQueue().enqueue(dummyMessage);\n registration().getQueue().dequeue();\n examination().getQueue().enqueue(dummyMessage);\n examination().getQueue().dequeue();\n vaccination().getQueue().enqueue(dummyMessage);\n vaccination().getQueue().dequeue();\n syringes().getQueue().enqueue(dummyMessage);\n syringes().getQueue().dequeue();\n //End of dummy message\n \n getFinishTime().addSample(currentTime());\n \n getCoolingLengths().addSample(currentTime() - 32400);\n getArrivals().addSample(enviroment().getArrivals());\n getDepartures().addSample(enviroment().getDepartures());\n\n getRegistrationWaitings().addSample(registration().getWaitingStat().mean());\n getExaminationWaitings().addSample(examination().getWaitingStat().mean());\n getVaccinationWaitings().addSample(vaccination().getWaitingStat().mean());\n\n getRegistrationQueueLengths().addSample(registration().getQueueStat().mean());\n getExaminationQueueLengths().addSample(examination().getQueueStat().mean());\n getVaccinationQueueLengths().addSample(vaccination().getQueueStat().mean());\n\n double efficiency = 0.0;\n for (Staff personal : registration().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getRegistrationEfficiency().addSample(efficiency / registration().getPersonal().size());\n\n efficiency = 0.0;\n for (Staff personal : examination().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getExaminationEfficiency().addSample(efficiency / examination().getPersonal().size());\n\n efficiency = 0.0;\n for (Staff personal : vaccination().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getVaccinationEfficiency().addSample(efficiency / vaccination().getPersonal().size());\n\n getWaitingRoomFilling().addSample(waitingRoom().getFillingStat().mean());\n\n getRefillWaitings().addSample(syringes().getWaitingStat().mean());\n getRefillQueueLengths().addSample(syringes().getQueueStat().mean());\n \n getLunchLengths().addSample(canteen().getLunchLengthStat().mean());\n \n super.replicationFinished();\n }", "public void sendFromMessageQueue() throws IOException {\n Date canSendDate = new Date(lastReceiveMsgDate.getTime() + 2000);\n if (canSendDate.before(new Date())) {\n String msg = messageQueue.poll();\n if (msg == null)\n return;\n\n output.writeBytes(msg + \"\\n\");\n }\n }", "public void sendBack(SelectionKey key, String message) {\r\n\t\tsocketChannel = (SocketChannel) key.channel(); \r\n\t\tmessage += \"\\r\\n\";\r\n\t\tbuffer = CharBuffer.wrap(message);\r\n\t\twhile (buffer.hasRemaining()) {\r\n\t\t\ttry {\r\n\t\t\t\tsocketChannel.write(Charset.defaultCharset().encode(buffer));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong x = System.nanoTime();\r\n\t\tserviceTime = x - pollTime;\r\n\t\tresponseTime = x - currentJob.queueEntranceTime;\r\n\t\ttimeInSystem = x - currentJob.timeOfArrival;\r\n\t\t\r\n\t\ttimes.add(myNumber + \"\\t\" + type + \"\\t\" + queueTime + \"\\t\" + workerTime +\"\\t\" + processingTime +\"\\t\" + serviceTime +\"\\t\" + responseTime +\"\\t\" + timeInSystem );\r\n\t\tnumOfRequests.incrementAndGet();\r\n\t\tmyNumOfRequests++;\r\n\t}", "public void addMessage(MessageInterface message) {\n \tInteger prevId = message.getPreviousHopId();\n \tInteger nextId = message.getNextHopId();\n \tint distance = networkGraph.getDistance(prevId, nextId);\n travelingMessages.put(message, distance);\n }", "void requestRebuildNextTime(String message);", "private void _addMessage(LogMessage logMessage) {\n\t\tString realmName = logMessage.getRealm();\n\t\tLinkedHashSet<LogMessage> logMessages = this.logMessagesByRealmAndId.computeIfAbsent(realmName,\n\t\t\t\tOperationsLog::newHashSet);\n\t\tlogMessages.add(logMessage);\n\n\t\t// store under locator\n\t\tLinkedHashMap<Locator, LinkedHashSet<LogMessage>> logMessagesLocator = this.logMessagesByLocator.computeIfAbsent(\n\t\t\t\trealmName, this::newBoundedLocatorMap);\n\t\tLinkedHashSet<LogMessage> messages = logMessagesLocator.computeIfAbsent(logMessage.getLocator(),\n\t\t\t\tOperationsLog::newHashSet);\n\t\tmessages.add(logMessage);\n\n\t\t// prune if necessary\n\t\tList<LogMessage> messagesToRemove = _pruneMessages(realmName, logMessages);\n\n\t\t// persist changes for non-transient realms\n\t\tStrolchRealm realm = getContainer().getRealm(realmName);\n\t\tif (!realm.getMode().isTransient())\n\t\t\tpersist(realm, logMessage, messagesToRemove);\n\t}", "@Override\n public void addMessage(byte[] message) throws RemoteException {\n Logger.getGlobal().log(Level.INFO,\"Ajout d'un message dans le composant post de nom : \" + this.getName());\n if(SerializationUtils.deserialize(message) instanceof _DefaultMessage){\n try {\n _DbConnectionManager.serializeJavaObjectToDB(this.dbConnection, message, this.getName(), _Component.postTableName);\n } catch (SQLException e1) {\n Logger.getGlobal().log(Level.SEVERE,\"Error save default message to bd in component : \" + this.getName());\n e1.printStackTrace();\n }\n }else{\n Logger.getGlobal().log(Level.INFO,\"Impossible de sauvegarder ce message, n'est pas un _DefaultMessage dans le component : \" + this.getName());\n }\n }", "private void sendInternal(Payload payload) {\n synchronized (internalLock) {\n outBuffer.addLast(payload);\n pendingMessages = true;\n internalLock.notify();\n }\n }", "void consumeMessage(String message);", "public void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\tSystem.out.println(\"&&&&&&&&&&&&&&&\");\n\t\tSystem.out.println(message.getClass());\n\t\t/*\n\t\t obj.put(\"start\",startDate);\n obj.put(\"end\",endDate);\n obj.put(\"topicName\",topicName_New);\n obj.put(\"bf\",bf);\n\t\t */\n\t\tSystem.out.println(\"topic on which data has been received is :\"+topic);\n\t\tSystem.out.println(\"the data packet from the broker has been received in JSON\");\n\t\t\n\t\t\n\t\tByteArrayInputStream baos = new ByteArrayInputStream(message.getPayload());\n\t\tSystem.out.println(\"after message payload\");\n\t\tObjectInputStream outputStream = new ObjectInputStream(baos);\n\t\t\n\t\tJSONObject datapacket=null;\n\t\ttry{\n\t\t\t datapacket=(JSONObject)outputStream.readObject();\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(\"koi to gadbad hai\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"parsing the data from the json packets.....started\");\n\t\tBloomFilter bfilter=new BloomFilter(0.01,1000);\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tbyte[] buffer=(byte[]) datapacket.get(\"bf\");\n\t\t\tByteBuffer bb=ByteBuffer.wrap(buffer);\n\t\t\t\n\t\t\tbfilter.deSerialize(bb);\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(\"error in getting the bloom filter\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"bloom filter obtained\");\n\t\tString TOPIC_TOSUBSCRIBE=(String) datapacket.get(\"topicName\");\n\t\t\n\t\tString SD=(String) datapacket.get(\"start\");\n\t\tString ED=(String) datapacket.get(\"end\");\n\t\t\n\t\tSystem.out.println(\"printing the bloom filter object parametersss....\");\n\t\tSystem.out.println(bfilter.getBitVectorSize());\n\t\tSystem.out.println(bfilter.getNumberOfEntries());\n\t\t\n\t\t\n\t\tSystem.out.println(\"deserialization object checking=== \"+bfilter.contains(\"random string10000\"));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tFile file = new File(\"/Users/gaurav/Desktop/BrokerMessages.txt\");\n\t\tif (!file.exists()) {\n\t\t\tfile.createNewFile();\n\t\t}\n\tSystem.out.println(\"control in callback subscriber\");\n//\t\t\n//\t\tSystem.out.println(\"file absolute path :\" + file.getAbsoluteFile());\n\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile(), true);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tString h = message.toString();\n\t\tbw.write(h);\n\t\tbw.write(\"\\n\");\n\t\tbw.close();\n\n\t\tSystem.out.println(\"Done\");\n\n\t\tif (\"testing/LWT\".equals(topic)) {\n\t\t\tSystem.err.println(\"Sensor gone!\");\n\t\t}\n\t}", "public void receive(Message message) {\n\t\t\tappReceiver.getBufferReceive().add(message);\r\n\t\t\t\t\r\n\t\t}", "void sendMessage(long queueId, byte[] content, int prio) throws IOException, MlmqException;", "private void addMsg(Msg value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureMsgIsMutable();\n msg_.add(value);\n }", "private void addMsg(Msg value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureMsgIsMutable();\n msg_.add(value);\n }", "public <T> void process(Message<T> tMessage) {\n eb.publish(addressBook.getResult(), process(tMessage.body().toString()), addressBook.getDeliveryOptions(tMessage));//.addHeader(\"buffer_size\", buffer.getBuffSize() + \"\"));\n }", "private synchronized void onRequest(ObjectMessage message) {\n try {\n Serializable request = message.getObject(); //serializer.requestFromString(message.getText());\n activeRequests.put(request, message);\n requestListener.receivedRequest(request);\n } catch (JMSException ex) {\n Logger.getLogger(AsynchronousReplier.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void addMsg(String msg) {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Add New Message -> \"+msg);\n this.messages.add(msg);\n }" ]
[ "0.7339381", "0.66190666", "0.6566185", "0.6484902", "0.6370694", "0.6329281", "0.62989306", "0.62852776", "0.62818575", "0.627524", "0.6265", "0.62477595", "0.6246814", "0.62434965", "0.62243587", "0.62224376", "0.6170891", "0.6150008", "0.60892206", "0.60626304", "0.6053026", "0.5945985", "0.59184223", "0.59073895", "0.5898506", "0.5889729", "0.58885974", "0.58743143", "0.58675146", "0.5852778", "0.5849687", "0.5829147", "0.58281857", "0.5822155", "0.58155286", "0.5805164", "0.5803166", "0.57920915", "0.5784423", "0.57823694", "0.5781348", "0.57564193", "0.5742558", "0.57403356", "0.57392085", "0.57346123", "0.57117575", "0.5707192", "0.5703507", "0.5693698", "0.5687842", "0.568543", "0.5673175", "0.5662819", "0.5659395", "0.56568265", "0.5639066", "0.5632903", "0.5600286", "0.5596019", "0.55836666", "0.5553561", "0.5547739", "0.5545963", "0.55345154", "0.5497602", "0.54950607", "0.5476904", "0.5475935", "0.5466518", "0.54643816", "0.54558516", "0.54555863", "0.5448378", "0.54471105", "0.5436994", "0.5431039", "0.54188955", "0.541673", "0.5413762", "0.5411483", "0.5408224", "0.54077834", "0.5406263", "0.540579", "0.54055893", "0.54024535", "0.5400662", "0.53988045", "0.53913224", "0.53878903", "0.53827477", "0.5380612", "0.5378645", "0.53636044", "0.5362684", "0.5362684", "0.53476506", "0.5343611", "0.5342174" ]
0.74364066
0
Try to fill bbout from the message queue
private void processOut() { while (!queue.isEmpty()) { var bb = queue.peek(); if (bb.remaining() <= bbout.remaining()) { queue.remove(); bbout.put(bb); } else { break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void queueMessage(ByteBuffer bb) {\n queue.add(bb);\n processOut();\n updateInterestOps();\n }", "private void processOut() {\n\t\tsynchronized (lock){\n\t\twhile (!queue.isEmpty()) {\n\t\t\tvar bb = queue.peek();\n\t\t\tif (bb.remaining() <= bbout.remaining()) {\n\t\t\t\tqueue.remove();\n\t\t\t\tbbout.put(bb);\n\t\t\t}\n\t\t}}\n\t}", "@Override\n\tpublic Future<Integer> write(ByteBuffer bb) {\n\t\tthis.outcomingMessageQ.offer(bb);\n\n\t\t/*\n\t\t * Read the Q and send the packet util the Q is empty.\n\t\t * \n\t\t * This method will for ever called after the offer call on the Q to\n\t\t * make sure write will be triggered if the Q isn't empty.\n\t\t */\n\t\treturn sendOne();\n\n\t}", "public void queueMessage(ByteBuffer bb) {\n\t\tqueue.add(bb);\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "private void workOnQueue() {\n }", "private void dequeueMessages()\n\t{\n\t\twhile (_msg_queue.size() > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t_ml.messageReceived( (Serializable) _msg_queue.removeFirst());\n\t\t\t}\n\t\t\tcatch (RuntimeException rte)\n\t\t\t{\n\t\t\t\trte.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public synchronized void bufferMessage() throws Exception\r\n {\r\n\r\n System.out.println(\"BUFFER: Message from future round received. Buffering message.\");\r\n // Wait until node moves to next round.\r\n wait();\r\n\r\n }", "protected void addChannelToReadCompletePendingQueue() {\n/* 354 */ while (!Http2MultiplexHandler.this.readCompletePendingQueue.offer(this)) {\n/* 355 */ Http2MultiplexHandler.this.processPendingReadCompleteQueue();\n/* */ }\n/* */ }", "public Object consumeBloqueante();", "private void writeNextMessageInQueue() {\n // This should not happen in practice since this method is private and should only be called\n // for a non-empty queue.\n if (mMessageQueue.isEmpty()) {\n Log.e(TAG, \"Call to write next message in queue, but the message queue is empty.\");\n return;\n }\n\n if (mMessageQueue.size() == 1) {\n writeValueAndNotify(mMessageQueue.remove().toByteArray());\n return;\n }\n\n mHandler.post(mSendMessageWithTimeoutRunnable);\n }", "protected abstract long waitOnQueue();", "public void h() {\n long currentTimeMillis = System.currentTimeMillis();\n this.m.sendEmptyMessageDelayed(48, q.c(currentTimeMillis));\n this.m.sendEmptyMessageDelayed(49, q.d(currentTimeMillis));\n }", "void blockUntilFreeSlotForMessage() throws InterruptedException {\n lock.lockInterruptibly();\n try {\n while (messageQueue.size() == messageCapacity) {\n messageQueueNotFull.await();\n }\n } finally {\n lock.unlock();\n }\n }", "@Override\n public void handleMessage(Message msg) {\n sendEmptyMessageDelayed(0, 3000);\n if (resClient.getSendBufferFreePercent() <= 0.05) {\n Toast.makeText(StreamingActivity.this, \"sendbuffer is full,netspeed is low!\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\tpublic void waitMail() {\n\t\tif (Harness.TRACE)\n\t\t\tHarness.trace(String.format(\"[HarnessMailbox] WaitMail from %d, timeout %d\",\n\t\t\t\t\t\t\t\t\t\t(int)mailbox_number, timeout));\n\t\t\n\t\tif (mail_count[mailbox_number] > 0) {\n\t\t\twait_result = MSG_RECEIVED;\n\t\t\texecution_result = MSG_RECEIVED;\n\t\t\tmessage = mail_message[mailbox_number];\n\n\t\t\tif (Harness.TRACE)\n\t\t\t\tHarness.trace(String.format(\"[HarnessMailbox] Message from %d is %d = 0x%x\",\n\t\t\t\t\t\t\t\t\t\t\t(int)mailbox_number, (int)message, (int)message));\n\t\t\t\n\t\t\tmail_count[mailbox_number]--;\n\t\t} else {\n\t\t\twait_result = TIMEOUT_OCCURRED;\n\t\t\texecution_result = TIMEOUT_OCCURRED;\n\t\t\tmessage = 0;\n\t\t}\n\t}", "private boolean queueFullError() {\n\t\tSystem.out.println(\"Queue Full!!!\");\n\t\treturn false;\n\t}", "private void dealChatMsg() {\n /*\n r4 = this;\n r0 = new java.util.LinkedList;\n r0.<init>();\n r1 = com.tomatolive.library.ui.activity.live.PrepareLiveActivity.class;\n monitor-enter(r1);\n r2 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n if (r2 == 0) goto L_0x0033;\n L_0x000c:\n r2 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0038 }\n if (r2 == 0) goto L_0x0015;\n L_0x0014:\n goto L_0x0033;\n L_0x0015:\n r2 = 0;\n L_0x0016:\n r3 = 5;\n if (r2 >= r3) goto L_0x0029;\n L_0x0019:\n r3 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n r3 = r3.poll();\t Catch:{ all -> 0x0038 }\n r3 = (com.tomatolive.library.model.ChatEntity) r3;\t Catch:{ all -> 0x0038 }\n if (r3 == 0) goto L_0x0029;\n L_0x0023:\n r0.add(r3);\t Catch:{ all -> 0x0038 }\n r2 = r2 + 1;\n goto L_0x0016;\n L_0x0029:\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n r1 = new com.tomatolive.library.ui.activity.live.-$$Lambda$PrepareLiveActivity$WexsRlm5pU6uK-2JwaAGWgcPHqs;\n r1.<init>(r4, r0);\n r4.handlerMainPost(r1);\n return;\n L_0x0033:\n r0 = 1;\n r4.asleep = r0;\t Catch:{ all -> 0x0038 }\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n return;\n L_0x0038:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tomatolive.library.ui.activity.live.PrepareLiveActivity.dealChatMsg():void\");\n }", "public void propagate(XQueue in, XQueue[] out) throws JMSException {\n Message inMessage = null;\n String msgStr = null, ruleName = null;\n StringBuffer strBuf = null;\n Object o;\n Map rule;\n Browser browser;\n MessageFilter[] filters = null;\n Template template = null;\n AssetList taskList = null;\n String[] propertyName = null, propertyValue = null;\n long[] outInfo = null, ruleInfo = null, taskInfo;\n int[] ruleMap;\n long currentTime, sessionTime;\n long count = 0;\n int mask, ii, hbeat, retry;\n int i = 0, id, hid, tid, m, n;\n int cid = -1; // the cell id of the message in input queue\n int rid = 0; // the id of the ruleset\n int oid = 0; // the id of the output queue\n boolean dspBody = false, inDetail = ((debug & DEBUG_REPT) > 0);\n boolean ckBody = false;\n byte[] buffer = new byte[bufferSize];\n\n i = in.getCapacity();\n if (capacity != i) { // assume it only occurs at startup\n new Event(Event.WARNING, name + \": \" + in.getName() +\n \" has the different capacity of \" + i + \" from \" +\n capacity).send();\n capacity = i;\n msgList.clear();\n msgList = new AssetList(name, capacity);\n cells.clear();\n cells = new CollectibleCells(name, capacity);\n }\n\n // initialize patterns\n n = ruleList.size();\n filters = new MessageFilter[n];\n browser = ruleList.browser();\n ruleMap = new int[n];\n i = 0;\n while ((rid = browser.next()) >= 0) {\n rule = (Map) ruleList.get(rid);\n filters[i] = (MessageFilter) rule.get(\"Filter\");\n if (filters[i] != null) {\n if ((!ckBody) && filters[i].checkBody())\n ckBody = true;\n }\n ruleMap[i++] = rid;\n }\n\n // update assetList\n n = out.length;\n for (i=0; i<n; i++) {\n Object[] asset = (Object[]) assetList.get(i);\n asset[ASSET_XQ] = out[i];\n outInfo = assetList.getMetaData(i);\n if (outInfo[OUT_CAPACITY] != out[i].getCapacity())\n outInfo[OUT_CAPACITY] = out[i].getCapacity();\n }\n pool = out[outLinkMap[POOL_OUT]];\n poolInfo = assetList.getMetaData(outLinkMap[POOL_OUT]);\n if (pool.getCapacity() != reqList.getCapacity()) { // rereate reqList\n reqList.clear();\n reqList = new AssetList(name, pool.getCapacity());\n }\n\n n = ruleMap.length;\n strBuf = new StringBuffer();\n // set all groups active at startup but the first\n hid = heartbeat.length - 1;\n hbeat = heartbeat[hid];\n currentTime = System.currentTimeMillis();\n sessionTime = currentTime;\n ii = 0;\n while (((mask = in.getGlobalMask()) & XQueue.KEEP_RUNNING) > 0) {\n if ((mask & XQueue.STANDBY) > 0) // standby temporarily\n break;\n if ((cid = in.getNextCell(waitTime)) >= 0) { // got a new msg\n currentTime = System.currentTimeMillis();\n\n if ((inMessage = (Message) in.browse(cid)) == null) {\n in.remove(cid);\n new Event(Event.WARNING, name + \": \" + Event.traceStack(\n new JMSException(\"null msg from \"+in.getName()))).send();\n continue;\n }\n\n msgStr = null;\n rid = 0;\n i = 0;\n try {\n if (ckBody)\n msgStr = MessageUtils.processBody(inMessage, buffer);\n for (i=1; i<n; i++) {\n if (filters[i].evaluate(inMessage, msgStr)) {\n rid = ruleMap[i];\n break;\n }\n }\n }\n catch (Exception e) {\n String str = name;\n Exception ex = null;\n if (e instanceof JMSException)\n ex = ((JMSException) e).getLinkedException();\n if (ex != null)\n str += \" Linked exception: \" + ex.toString() + \"\\n\";\n new Event(Event.ERR, str + \" failed to apply the filter \"+i+\n \": \" + Event.traceStack(e)).send();\n i = -1;\n }\n\n ruleName = ruleList.getKey(rid);\n ruleInfo = ruleList.getMetaData(rid);\n\n if (i < 0) // failed on filter\n oid = outLinkMap[FAILURE_OUT];\n else if (TYPE_ACTION != (int) ruleInfo[RULE_PID]) // bypass\n oid = (int) ruleInfo[RULE_OID];\n else try { // to init the monitor and to add it to taskList\n rule = (Map) ruleList.get(rid);\n propertyName = (String[]) rule.get(\"PropertyName\");\n template = (Template) rule.get(\"Template\");\n Map<String,Object> task=initTask(template,buffer,inMessage);\n if (task != null && task.size() > 0) {\n String key = (String) task.get(\"Name\");\n TimeWindows tw = (TimeWindows) task.get(\"TimeWindow\");\n if (ruleInfo[RULE_TTL] > 0)\n tw.setStopTime(currentTime + ruleInfo[RULE_TTL]);\n if (propertyName != null) // copy properties over\n copyProperties(propertyName, task, inMessage);\n taskList = (AssetList) rule.get(\"TaskList\");\n id = taskList.add(key, new long[TASK_TIME+1], task);\n if ((debug & DEBUG_UPDT) > 0)\n new Event(Event.DEBUG, name + \" \" + ruleName +\n \" added a new task of \" + key + \" from \" + cid +\n \" to \" + id + \" with \" + taskList.size() + \" \" +\n ruleInfo[RULE_PEND]).send();\n if (id >= 0) {\n taskInfo = taskList.getMetaData(id);\n for (i=0; i<=TASK_TIME; i++)\n taskInfo[i] = 0;\n taskInfo[TASK_ID] = -1;\n taskInfo[TASK_GID] = -1;\n taskInfo[TASK_STATUS] = NODE_READY;\n taskInfo[TASK_TIME] = currentTime;\n ruleInfo[RULE_PEND] ++;\n ruleInfo[RULE_TIME] = currentTime;\n if (ruleInfo[RULE_OPTION] > 0) { // on wait\n // hold the message until it is done \n taskInfo[TASK_GID] = cid;\n continue;\n }\n oid = outLinkMap[BYPASS_OUT];\n }\n else { // failed to add to the list\n MonitorReport report;\n report = (MonitorReport) task.get(\"Report\");\n if (report != null)\n report.destroy();\n task.clear();\n if (taskList.getID(key) < 0) {\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to add new task of \" + key +\n \" \" + taskList.size() + \"/\" +\n ruleInfo[RULE_EXTRA]).send();\n oid = outLinkMap[FAILURE_OUT];\n }\n else {\n new Event(Event.WARNING, name +\": \"+ruleName+\n \" has an active task for \" + key).send();\n oid = outLinkMap[BYPASS_OUT];\n }\n }\n }\n else { // failed to init occurrence\n oid = outLinkMap[FAILURE_OUT];\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to init a new task\").send();\n }\n }\n catch (Exception e) {\n oid = outLinkMap[FAILURE_OUT];\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to create a new task: \" +\n Event.traceStack(e)).send();\n }\n\n if ((debug & DEBUG_PROP) > 0)\n new Event(Event.DEBUG, name+\" propagate: cid=\" + cid +\n \" rid=\" + rid + \" oid=\" + oid).send();\n\n if (displayMask > 0) try {// display message\n if (dspBody)\n msgStr = MessageUtils.processBody(inMessage, buffer);\n new Event(Event.INFO, name+\": \"+ruleName+\" processed msg \"+\n (count + 1)+\":\"+MessageUtils.display(inMessage, msgStr,\n displayMask, displayPropertyName)).send();\n }\n catch (Exception e) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" failed to display msg: \" + e.toString()).send();\n }\n\n count += passthru(currentTime, inMessage, in, rid, oid, cid, 0);\n feedback(in, -1L);\n }\n\n currentTime = System.currentTimeMillis();\n if (currentTime < sessionTime) { // session not due yet\n if (pool.collectible() > 0)\n collect(in, outLinkMap[RESULT_OUT]);\n if (msgList.size() > 0)\n feedback(in, -1L);\n continue;\n }\n\n inDetail = ((debug & DEBUG_REPT) > 0);\n m = 0;\n browser.reset();\n while ((rid = browser.next()) >= 0) { // update active rulesets\n ruleInfo = ruleList.getMetaData(rid);\n if (ruleInfo[RULE_PID] != TYPE_ACTION)\n continue;\n if ((hbeat % (int) ruleInfo[RULE_MODE]) != 0) // not active\n continue;\n if (ruleInfo[RULE_PEND] <= 0) // empty rule\n continue;\n\n ruleName = ruleList.getKey(rid);\n rule = (Map) ruleList.get(rid);\n taskList = null;\n if (rule == null || rule.size() <= 0) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" is empty\").send();\n continue;\n }\n taskList = (AssetList) rule.get(\"TaskList\");\n if (taskList == null) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" has no taskList\").send();\n continue;\n }\n if (inDetail)\n new Event(Event.DEBUG, name + \": \" + ruleName +\n \" is active with \" + taskList.size() + \" tasks\").send();\n if (taskList.size() <= 0)\n continue;\n retry = (int) ruleInfo[RULE_GID];\n Browser b = taskList.browser();\n while ((tid = b.next()) >= 0) { // dispatch tasks\n taskInfo = taskList.getMetaData(tid);\n id = (int) taskInfo[TASK_ID];\n if (id < 0) { // ready for next run\n ObjectEvent msg = new ObjectEvent();\n msg.setPriority(Event.INFO);\n msg.setAttribute(\"name\", taskList.getKey(tid));\n msg.setBody(taskList.get(tid));\n id = pool.reserve(waitTime);\n if (id >= 0) { // reserved\n if (reqList.existsID(id)) { // preoccupied?\n collect(currentTime, id, in,\n outLinkMap[RESULT_OUT]);\n }\n pool.add(msg, id);\n taskInfo[TASK_ID] = id;\n taskInfo[TASK_STATUS] = NODE_RUNNING;\n taskInfo[TASK_TIME] = currentTime;\n taskInfo[TASK_RETRY] = 0;\n reqList.add(String.valueOf(id),\n new long[]{rid, tid}, msg, id);\n poolInfo[OUT_SIZE] ++;\n poolInfo[OUT_TIME] = currentTime;\n poolInfo[OUT_QTIME] = currentTime;\n m ++;\n if (inDetail)\n strBuf.append(\"\\n\\t\" + ruleName + \"/\" +\n taskList.getKey(tid) + \": \" + tid + \" \" +\n id + \" \" + taskInfo[TASK_RC] + \" \" +\n taskInfo[TASK_COUNT]);\n }\n else { // failed to reserve\n new Event(Event.ERR, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" failed to reserve \"+\n \"from \" + pool.getName() + \" \" + pool.depth()+\n \":\" + pool.size() + \"/\" + id).send();\n }\n }\n else if (ruleInfo[RULE_GID] > 0 &&\n taskInfo[TASK_RETRY] >= ruleInfo[RULE_GID]) { // stuck\n taskInfo[TASK_RETRY] ++;\n if (taskInfo[RULE_STATUS] == NODE_RUNNING ||\n taskInfo[RULE_STATUS] == NODE_READY)\n taskInfo[RULE_STATUS] = NODE_RETRYING;\n new Event(Event.ERR, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" timed out and stuck \"+\n taskInfo[TASK_RETRY] + \" times at \" + id).send();\n }\n else {\n taskInfo[TASK_RETRY] ++;\n new Event(Event.WARNING, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" timed out and stuck \"+\n taskInfo[TASK_RETRY] + \" times at \" + id).send();\n }\n }\n }\n\n if (pool.collectible() > 0)\n collect(in, outLinkMap[RESULT_OUT]);\n if (msgList.size() > 0)\n feedback(in, -1L);\n\n if (inDetail && strBuf.length() > 0) {\n new Event(Event.DEBUG, name + \" RULE/KEY: TID ID RC COUNT - \" +\n m + \" \" + hid + \" \" + hbeat + \" \" + pool.size() + \":\" +\n pool.depth() + \" \" + reqList.size() +\n strBuf.toString()).send();\n strBuf = new StringBuffer();\n }\n\n hid ++;\n if (hid >= heartbeat.length) { // reset session\n hid = 0;\n sessionTime += heartbeat[hid];\n }\n else {\n sessionTime += heartbeat[hid] - hbeat;\n }\n hbeat = heartbeat[hid];\n currentTime = System.currentTimeMillis();\n if (currentTime > sessionTime) // reset sessionTime\n sessionTime = currentTime;\n }\n }", "private void extractProcessMessagesFromBufferIntoQueue(ByteBuffer byteBuffer){\n // when this function is called, byte buffer is ready for being read\n // i.e. position should point to the last byte written\n ProcessMessage procMsg;\n while((procMsg = extractProcessMessageFromByteBuffer(byteBuffer)) != null){\n // put procMsg into queue\n receivedMessagesQueue.add(procMsg);\n }\n\n // compact buffer for further reading new data\n byteBuffer.compact();\n\n }", "public void sendMessage(Event event){\n // find the last queue and add the message to that\n // if the last queue is full then create a new queue and add to that\n if(messageQueues.size() <= 0){\n Queue<Event> newQueue = new LinkedList<>();\n Queue<Event> newBackupQueue = new LinkedList<>();\n messageQueues.add(newQueue);\n backupMessageQueues.add(newBackupQueue);\n// System.out.println(\"Size of new Q: \" + messageQueues.size());\n }\n\n // getting hold of the working queue and the backup queue.\n Queue<Event> queue = messageQueues.get(messageQueues.size() - 1);\n Queue<Event> backupQueue = backupMessageQueues.get(backupMessageQueues.size() - 1);\n\n try{\n if(queue.size() >= queueSize){\n Queue<Event> newQueue = new LinkedList<>();\n Queue<Event> newBackupQueue = new LinkedList<>();\n // throw an excpetion for a certain message\n if(event.payload.trim().equals(\"CrashQueue\"))\n // this is done to simulate the queue crashing when it tries to add messages\n throw new Exception(\"Queue has been crashed\");\n // adding the message to both the backup and the main queue\n newQueue.add(event);\n messageQueues.add(newQueue);\n\n newBackupQueue.add(event);\n backupMessageQueues.add(newBackupQueue);\n } else {\n if(event.payload.trim().equals(\"CrashQueue\"))\n // this is done to simulate the queue crashing when it tries to add messages\n throw new Exception(\"Queue has been crashed\");\n queue.add(event);\n backupQueue.add(event);\n }\n }catch(Exception e){\n System.out.println(\"Queue crashed, switching it with the backup queue\");\n // if the queue fails then switch it with the backup queue and create a new backup\n messageQueues = backupMessageQueues;\n // create a duplicate backup message queue\n }\n// System.out.println(\"The message queuesss are : \" + messageQueues);\n }", "private void receive() {\n\t\tMQGetMessageOptions gmo = new MQGetMessageOptions();\n\t\tif (keepMessages) {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t| MQConstants.MQGMO_BROWSE_FIRST;\n\t\t} else {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2;\n\t\t\tif (syncPoint) {\n\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t}\n\t\t}\n\t\tgmo.matchOptions = MQConstants.MQMO_NONE;\n\t\tgmo.waitInterval = this.waitInterval;\n\n\t\ttry {\n\t\t\tint lastSeqNo = 0;\n\t\t\tlong lastTs = 0;\n\t\t\tint messagecounter = 0;\n\t\t\twhile (true) {\n\t\t\t\tif (!(qmgr.isConnected())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\tif (!(queue.isOpen())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\thaltFileExists();\n\t\t\t\tif (haltStatus) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t} else {\n\t\t\t\t\treadQueue = true;\n\t\t\t\t}\n\t\t\t\tint queueNotInhibited = queue.getInhibitGet();\n\t\t\t\tif (queueNotInhibited == MQConstants.MQQA_GET_INHIBITED) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t}\n\t\t\t\tproduceCounts();\n\t\t\t\tif (readQueue) {\n\t\t\t\t\tqueueDepth = queue.getCurrentDepth();\n\t\t\t\t\tif (queueDepth != 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trcvMessage = new MQMessage();\n\t\t\t\t\t\t\tif (mqccsid != 0) {\n\t\t\t\t\t\t\t\trcvMessage.characterSet = mqccsid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqueue.get(rcvMessage, gmo);\n\t\t\t\t\t\t\trecordCountsRcvd++;\n\t\t\t\t\t\t\tstrLen = rcvMessage.getMessageLength();\n\t\t\t\t\t\t\tstrData = new byte[strLen];\n\t\t\t\t\t\t\trcvMessage.readFully(strData);\n\t\t\t\t\t\t\tmessagePutMs = rcvMessage.putDateTime.getTimeInMillis();\n\t\t\t\t\t\t\tseqNo = rcvMessage.messageSequenceNumber;\n\t\t\t\t\t\t\tif (lastTs == messagePutMs && seqNo == 1) {\n\t\t\t\t\t\t\t\tseqNo = lastSeqNo + seqNo;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmsgText = new String(strData);\n\t\t\t\t\t\t\tjsonOut = new JSONArray();\n\t\t\t\t\t\t\tjsonKey = new JSONObject();\n\t\t\t\t\t\t\tjsonValue = new JSONObject();\n\t\t\t\t\t\t\tjsonKey.put(\"key\", Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tjsonValue.put(\"value\", msgText);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgKey: \" + Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgValue: \" + msgText);\n\t\t\t\t\t\t\tjsonOut.put(jsonKey);\n\t\t\t\t\t\t\tjsonOut.put(jsonValue);\n\t\t\t\t\t\t\tmsgList.add(jsonOut.toString());\n\t\t\t\t\t\t\tlastTs = messagePutMs;\n\t\t\t\t\t\t\tlastSeqNo = seqNo;\n\t\t\t\t\t\t\tmessagecounter++;\n\t\t\t\t\t\t\t// move cursor to next message\n\t\t\t\t\t\t\tif (msgList.size() > maxUMsg / 2) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (msgList.size() > queueDepth) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (keepMessages) {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT | MQConstants.MQGMO_BROWSE_NEXT;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT;\n\t\t\t\t\t\t\t\tif (syncPoint) {\n\t\t\t\t\t\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (MQException e) {\n\t\t\t\t\t\t\tif (e.reasonCode == MQConstants.MQRC_NO_MSG_AVAILABLE) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else if (e.reasonCode == MQConstants.MQRC_SYNCPOINT_LIMIT_REACHED) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\tCalendar.getInstance().getTime() + \" - MQ Reason Code: \" + e.reasonCode);\n\t\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\t\t\tSystem.out.println(Calendar.getInstance().getTime() + \" - Error: \" + ioe.getMessage());\n\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t}\n\t\t\t\t\tthreadWait();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Throwable t) {\n\t\t\t// restart if there is any other error\n\t\t\trestart(Calendar.getInstance().getTime() + \" - Error receiving data from Queue or QMGR\", t);\n\t\t}\n\n\t}", "public void announcingBusBoarding() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tBusDriver busDriver = (BusDriver) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.BD_ANNOUNCING_BOARDING);\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\t\tclientCom.close();\n\t}", "private void AsyncPush(String topic){\n\t\t\t\t \t\n\t \t/**\n\t \t * output a map, delete existed items\n\t \t */\n\t \t//Map<Key, Integer> deduplicatedBuff = mergeDuplicatedItemsAndDelte(buff);\n\t \t\n\t \t//not in, create, delay\n\t \tif(!producerMap.containsKey(topic)){\n\t \t\ttry {\n\t\t\t\t\t\t\tCreateProducer(topic,LogicController.batchMessagesMaxMessagesPerBatch);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t \t\t \n\t \t}\n\t \tlog.info(\"#publish\"+topic+\", \"+buffMap.size());\n\t \tProducer<byte[]> producer = producerMap.get(topic);\n\t \t/**\n\t \t * init set, copy to hash set\n\t \t */\n\t \t//Set<Key> Keys = Sets.newConcurrentHashSet(buffMap.keySet());\n\t \t\n\t \t \n\t \tfor (Key key : buffMap.keySet()){\n\t \t\t \n\t \t\t //if(buffMap.containsKey(key)){\n\t \t\t \n\t \t\t \n\t \t\t if(buffMap.containsKey(key)){\n\t \t\t\t Integer val = buffMap.get(key);\n\t \t\t\t //clear,skip\n\t \t\t\t if(val<=0){buffMap.remove(key);continue;}\n\t \t\t\t //concenate\n\t \t\t\t byte[] out = createKVByte(key,val);\n\t \t\t\t \n\t \t\t\t//get producer\n\t\t\t \t\t\t \n\t\t\t \t\t\t //byte[] tempTable = new byte[](buffMap);\n\t\t producer.sendAsync(out).thenRun(() -> {\n\t\t\t messagesSent.increment();\n\t\t\t bytesSent.add(out.length);\n\t\t\t //update\n\t\t\t TopicMap.replace(topic, TopicMap.get(topic)+out.length);\t\n\t\t\t \n\t\t\t //delete\n\t\t\t rescaleBufferMap(buffMap,key,val);\n\t\t\t \n\t\t\t //CheckNumberPacketsEnoughEndMessageAndSend(topic);\n\t\t\t //buffMap.remove(key);\n\t\t\t //remove from the set\n\t\t\t //ier.remove();\n\t\t\t \t\t \t\t \n\t\t\t }).exceptionally(ex -> {\n\t\t\t log.warn(\"Write error on message\", ex);\n\t\t\t //System.exit(-1);\n\t\t\t return null;\n\t\t\t });\n\t \t\t }\n\t \t\t }\n\t \t\t \n\t \t }", "@Override\n public void run() {\n destination nextState = desembarque.whatShouldIDo(id,finalDest, nMalasTotal,log);\n bagCollect getBag = null;\n switch (nextState) {\n case WITH_BAGGAGE:\n \n // System.out.println(\"tenho bagagem -----------------\");\n do {\n if ( (getBag=recolha.goCollectABag(id,log) ) == bagCollect.MINE) {\n nMalasEmPosse++;\n }\n //System.out.println(\"ID: \" + id + \" posse: \" + nMalasEmPosse + \" total: \" + nMalasTotal);\n //System.out.println(getBag.toString());\n\n } while (nMalasEmPosse < nMalasTotal && getBag != bagCollect.NOMORE);\n if (nMalasEmPosse < nMalasTotal) {\n recolha.reportMissingBags(id, nMalasTotal - nMalasEmPosse,log);\n }\n transicao.goHome(id,log);\n break;\n case IN_TRANSIT:\n int ticket; //bilhete para entrar no autocarro.\n ticket = transferencia.takeABus(log,id);\n auto.enterTheBus( log,ticket,id);\n auto.leaveTheBus(id, log,ticket);\n transicao.prepareNextLeg(id,log);\n break;\n case WITHOUT_BAGGAGE:\n transicao.goHome(id,log);\n break;\n }\n }", "private synchronized void flushMessageQueue() {\n\t\tif(peers.size() > 0) {\n\t\t\twhile(!noPeersMessageQueue.isEmpty()) {\n\t\t\t\tpropagateToAllPeers(noPeersMessageQueue.poll());\n\t\t\t}\n\t\t}\n\t}", "private void processMessageQueue(){\n\t\tKIDSGUIAlert m = null;\n\t\tStringBuilder newText = new StringBuilder(logLines.getText());\n\t\twhile ((m = this.logMessages.poll()) != null){\n\t\t\tnewText.append(String.format(\"%s\\n\", m.toString()));\n\t\t}\n\t\tlogLines.setText(newText.toString());\n\t}", "public void readMessages() {\n if (!this.isConnectedToClientServer){return;}\n String inputMessage = inputQueue.poll();\n if (inputMessage != null){\n try{\n ClientMessageType messageType = ClientMessageParser.parse(inputMessage);\n if (messageType == ClientMessageType.INCOMING_BALL){\n //parses the message to get a ball, which is then added to the board\n Ball ball = ClientMessageParser.parseIncomingBall(inputMessage);\n board.addBall(ball);\n }\n else if (messageType == ClientMessageType.WALL_INVISIBILITY){\n //parses the messages to find out which boundary to make invisible, and does so\n BoundarySide whichBoundary = ClientMessageParser.parseWallInvisibility(inputMessage, board.neighbors);\n board.makeInvisible(whichBoundary);\n }\n else if (messageType == ClientMessageType.WALL_VISIBILITY){\n //parses the messages to find out which boundary to make visible, and does so\n BoundarySide whichBoundary = ClientMessageParser.parseWallVisibility(inputMessage, board.neighbors);\n board.makeVisible(whichBoundary);\n }\n else if (messageType == ClientMessageType.DISCONNECT_CLIENT){\n disconnectFromClientAndServer();\n }\n } catch (IncorrectFormatException e){\n //don't do anything --> message is not parsed, but play on this board still continues\n }\n }\n }", "public void prepareTheBill(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(3, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "private void consume()\r\n\t{\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tSubscriberMessage sifMsg = queue.blockingPull();\t\t\t\t\r\n\t\t\tif (sifMsg != null)\r\n\t\t\t{\r\n\t\t\t\tlogger.debug(consumerID+\" has receive a message from its SubscriberQueue.\");\r\n\t\t\t\tif (sifMsg.isEvent())\r\n\t\t\t\t{\r\n\t\t\t\t\tSIFEvent sifEvent = new SIFEvent(sifMsg.getSIFObject(), sifMsg.getEventAction());\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubscriber.processEvent(sifEvent, sifMsg.getZone(), sifMsg.getMappingInfo(), consumerID);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.error(\"Failed processing SIF Event for subscriber \"+subscriber.getId()+\": \"+ex.getMessage()+\"\\nEvent Data:\\n\"+sifEvent, ex);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSIFDataObject sifObj = sifMsg.getSIFObject();\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubscriber.processResponse(sifObj, sifMsg.getZone(), sifMsg.getMappingInfo(), consumerID);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.error(\"Failed processing SIF Object for subscriber \"+subscriber.getId()+\": \"+ex.getMessage()+\"\\nSIF Object Data:\\n\"+((sifObj == null) ? \"null\" : sifObj.toXML()), ex);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlogger.error(consumerID+\" has encountered a problem receiving a message from its SubscriberQueue.\");\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "@Override\n public void upcall(ReadMessage message) throws IOException, ClassNotFoundException {\n\t MessageObject readMessage = (MessageObject) message\n .readObject();\n message.finish();\n \tReceivePortIdentifier requestor = readMessage.requestor;\n MessageObject response = new MessageObject();\n if(requestor == null)\n\t \treturn;\n synchronized (masterJobsList){\n if(readMessage.messageType == MessageObject.message_id.JOB_STEALING){\n // Provide slave with one another job\n synchronized (jobListBusy){\n if(masterJobsList.size() > 0){\n response.messageType = MessageObject.message_id.JOB_BOARD;\n response.data = masterJobsList.get(0);\n masterJobsList.remove(0);\n response.maximumBound = solutionsStep;\n }\n }\n\n SendPort replyPort = myIbis.createSendPort(replyPortType);\n replyPort.connect(requestor);\n WriteMessage reply = replyPort.newMessage();\n reply.writeObject((response));\n reply.finish();\n replyPort.close();\n\n\n } else if (readMessage.messageType == MessageObject.message_id.SOLUTIONS_NUM){\n --jobCounter;\n Pair<Integer, Integer> res = (Pair<Integer, Integer>)readMessage.data;\n System.out.println(\"GOT RESULT (\" + res.getKey() + \" ; \" + res.getValue() + \")\");\n synchronized(jobListBusy){\n if(res.getValue() < solutionsStep){\n solutionsNum = res.getKey();\n solutionsStep = res.getValue();\n endTime = System.currentTimeMillis();\n } else if (res.getValue() == solutionsStep){\n solutionsNum += res.getKey();\n endTime = System.currentTimeMillis();\n } else {\n // do nothing\n }\n if(jobCounter == 0)\n jobListBusy.notify();\n }\n\n }\n\n }\n }", "protected void onQueued() {}", "@Override\n public void run() {\n reprocessPendingMessage();\n }", "public void onQueue();", "@Override public void run() {\n waitUntil(\"message\", new Condition() {\n @Override public boolean isMet() {\n return false;\n }\n }, 0);\n }", "@Override\n public void flush() {\n new QueueConsumer().run();\n }", "String addReceiveQueue();", "@Override\n public void replicationFinished()\n {\n MyMessage dummyMessage = new MyMessage(this);\n registration().getQueue().enqueue(dummyMessage);\n registration().getQueue().dequeue();\n examination().getQueue().enqueue(dummyMessage);\n examination().getQueue().dequeue();\n vaccination().getQueue().enqueue(dummyMessage);\n vaccination().getQueue().dequeue();\n syringes().getQueue().enqueue(dummyMessage);\n syringes().getQueue().dequeue();\n //End of dummy message\n \n getFinishTime().addSample(currentTime());\n \n getCoolingLengths().addSample(currentTime() - 32400);\n getArrivals().addSample(enviroment().getArrivals());\n getDepartures().addSample(enviroment().getDepartures());\n\n getRegistrationWaitings().addSample(registration().getWaitingStat().mean());\n getExaminationWaitings().addSample(examination().getWaitingStat().mean());\n getVaccinationWaitings().addSample(vaccination().getWaitingStat().mean());\n\n getRegistrationQueueLengths().addSample(registration().getQueueStat().mean());\n getExaminationQueueLengths().addSample(examination().getQueueStat().mean());\n getVaccinationQueueLengths().addSample(vaccination().getQueueStat().mean());\n\n double efficiency = 0.0;\n for (Staff personal : registration().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getRegistrationEfficiency().addSample(efficiency / registration().getPersonal().size());\n\n efficiency = 0.0;\n for (Staff personal : examination().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getExaminationEfficiency().addSample(efficiency / examination().getPersonal().size());\n\n efficiency = 0.0;\n for (Staff personal : vaccination().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getVaccinationEfficiency().addSample(efficiency / vaccination().getPersonal().size());\n\n getWaitingRoomFilling().addSample(waitingRoom().getFillingStat().mean());\n\n getRefillWaitings().addSample(syringes().getWaitingStat().mean());\n getRefillQueueLengths().addSample(syringes().getQueueStat().mean());\n \n getLunchLengths().addSample(canteen().getLunchLengthStat().mean());\n \n super.replicationFinished();\n }", "void recive() throws IOException, TimeoutException, InterruptedException, Exception\n {\n ConnectionFactory connfac = new ConnectionFactory();\n connfac.setHost(hostName);\n connfac.setUsername(\"student\");\n connfac.setPassword(\"cph\");\n \n //make the connection\n Connection conn = connfac.newConnection();\n //make the channel for messaging\n Channel chan = conn.createChannel();\n \n //Declare a queue\n chan.exchangeDeclare(ExchangeName.OUTPUT_LOAN_REQUEST, \"fanout\");\n String queueName = chan.queueDeclare().getQueue();\n chan.queueBind(queueName,ExchangeName.OUTPUT_LOAN_REQUEST,\"\");\n \n\t System.out.println(\" [*] Waiting for messages on \"+ ExchangeName.OUTPUT_LOAN_REQUEST +\". To exit press CTRL+C\");\n \n\t QueueingConsumer consumer = new QueueingConsumer(chan);\n\t chan.basicConsume(queueName, true, consumer);\n\t \n //start polling messages\n\t while (true) {\n\t QueueingConsumer.Delivery delivery = consumer.nextDelivery();\n\t String m = new String(delivery.getBody());\n\t System.out.println(\" [x] Received '\" + m + \"'\");\n Gson gson = new GsonBuilder().create();\n Message fm = gson.fromJson(m, Message.class);\n int creditScore = creditScore(fm.getSsn());\n fm.setCreditScore(creditScore);\n fm.setSsn(fm.getSsn().replace(\"-\", \"\"));\n send(fm);\n \n \n\t }\n \n \n }", "@Override\n\tpublic void invoke() {\n\t\t\n\t\tIBuffer b = Buffer.getBuffer();\n\t\tint r = b.getRemainingCapacity();\n\t\t\n\t\t// the buffer is empty - this means that invoke was called after a grid was removed\n\t\t// and we need to fill it up to prevent starvation. Ideally the only way this could\n\t\t// happen is if the buffer size was 1\n\t\tif (r == 0) {\n\t\t\tPublisher.getInstance().send(new ProduceMessage());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (r < b.getCapacity())\n\t\t\tPublisher.getInstance().send(new ProduceMessage());\n\t\t\n\t\tif (r > 0)\n\t\t\tPublisher.getInstance().send(new ConsumeMessage());\n\t\t\n\t}", "@Override\n public void run() {\n //gets messages\n byte[] b = new byte[65000];\n try {\n multicastSocket = new MulticastSocket(mcastPort);\n multicastSocket.joinGroup(InetAddress.getByName(mscastAdress));\n\n while (true) {\n try {\n DatagramPacket received = new DatagramPacket(b, b.length);\n multicastSocket.receive(received);\n DealWithPacketBackup deal = new DealWithPacketBackup(received , multicastSocket , Peer.getPeerId());\n Peer.getExecutor().execute(deal);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }", "public static void checkQueue(){\n if(Duel.getLobby().getQueue().size() >= 2){\n Duel.getGameManager().startingAGame();\n// for(Player player : Bukkit.getOnlinePlayers()){\n// if(Lobby.getQueue().get(0).equals(player.getUniqueId()) || Lobby.getQueue().get(1).equals(player.getUniqueId())){\n// Duel.getGameManager().startingAGame();\n// }\n// for(UUID uuid : Lobby.getQueue()){\n// Duel.getGameManager().startingAGame();\n// }\n }\n }", "@Override\n public void run() {\n try {\n boolean busy = true;\n while (busy) {\n AbstractBasicMessage msg = readMsg();\n if (msg != null) {\n busy = msg.operate(this.persistor, this.pushServer);\n }\n }\n } catch (IOException e) {\n // Treat an IOException as a termination of the message\n // exchange, and let this message-processing thread die.\n\n // CODE VON DOZENTEN...\n } catch (OperationNotSupportedException ex) {\n System.out.println(\"Error while reading incoming message\");\n ex.printStackTrace();\n }\n }", "public void run() {\n\t\tString line = null;\n\t\tMessage message;\n\t\tBufferQueueElement<Message> messageList = new BufferQueueElement<Message>();\n\t\tlong t1 = System.nanoTime();\n\t long t2 = 0;\n\t\ttry {\n\t\t\twhile ((line = messageIO.readMessage()) != null) {\n\t\t\t\tt2 = System.nanoTime();\n\t\t\t\t/* Ok, we can close the stream. But process the last message list. */\n\t\t\t\tif (CLOSE_STREAM.equals(line)) {\n\t\t\t\t\tmessageList.setStreamClosed(true);\n\t\t\t\t\tqueue.put(messageList);\n\t\t\t\t\tbreak;\n\t\t\t\t} else if((t2 - t1) < ONE_SECOND) {\n\t\t\t\t\tmessage = new Message(line);\n\t\t\t\t\tmessageList.setMessageElement(message);\n\t\t\t\t} else {\n\t\t\t\t\tqueue.put(messageList);\n\t\t\t\t\tmessageList = new BufferQueueElement<Message>();\n\t\t\t\t\tt1 = System.nanoTime();\n\t\t\t\t\tmessage = new Message(line);\n\t\t\t\t\tmessageList.setMessageElement(message);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n public void run()\n {\n while (true) {\n if (isReadyToStop && (buffer.poll() == null)) {\n System.out.println(\"Thread stop\");\n producerClient.close();\n return;\n }\n try {\n Message msg = buffer.poll(config.getBufferPollTimeout());\n if (msg == null) {\n // ignore it\n continue;\n }\n System.out.println(\"Sent out: [\" + msg + \"]\");\n if (msg.getTopic().isPresent()) {\n String topic = msg.getTopic().get();\n Optional<Function<String, Integer>> function = funcMapBuffer.get(topic);\n function.ifPresent(stringLongFunction -> {\n int fiberId = stringLongFunction.apply(msg.getKey());\n msg.setFiberId(fiberId);\n producerClient.send(topic, fiberId, msg);\n });\n // else ignore this message\n }\n // else ignore this message\n }\n catch (InterruptedException ignored) {\n // if poll nothing, enter next loop\n }\n }\n }", "private void addFromQueue()\n\t{\n\t\twhile( humanQueue.size()>0 )\n\t\t\thumans.add(humanQueue.remove(0));\n\t\twhile( zombieQueue.size()>0 )\n\t\t\tzombies.add(zombieQueue.remove(0));\n\t}", "public abstract void backoffQueue();", "protected void enqueue(StdPeerMessage message)\n {\n// if (DEBUG) {\n// if (message.type == StdPeerMessage.REQUEST) {\n// System.out.println(System.nanoTime() + \" [stdpc] enqueue: req \" + message.index + \" \" + (message.begin >> 14));\n// } else {\n// System.out.println(\"[stdpc] enqueue: \" + message.type);\n// }\n// }\n\n if (message.type == StdPeerMessage.CHOKE)\n {\n // remove reply messages with piece (block) data\n // from the send queue (due to spec)\n for (int i = sendQueue.size() - 1; 0 <= i; i--) {\n StdPeerMessage pm = sendQueue.get(i);\n if (pm.type == StdPeerMessage.PIECE) {\n sendQueue.remove(i);\n TorrentStorage.Block block = (TorrentStorage.Block) message.params;\n block.release();\n pmCache.release(pm);\n }\n }\n // set choke status\n choke = true;\n // send choke asap\n sendQueue.add(0, message);\n }\n else if (message.type == StdPeerMessage.CANCEL)\n {\n // remove the linked request if it's still in the queue\n for (int i = sendQueue.size() - 1; 0 <= i; i--) {\n StdPeerMessage pm = sendQueue.get(i);\n if ((pm.type == StdPeerMessage.REQUEST)\n && (pm.index == message.index)\n && (pm.begin == message.begin)\n && (pm.length == message.length)) // this check is redundant as length is fixed\n {\n sendQueue.remove(i);\n pmCache.release(pm);\n // don't really enqueue CANCEL as the linked request\n // has been found and removed\n pmCache.release(message);\n return;\n }\n }\n // send asap\n sendQueue.add(0, message);\n }\n else {\n if (message.type == StdPeerMessage.INTERESTED) {\n interested = true;\n }\n else if (message.type == StdPeerMessage.NOT_INTERESTED) {\n interested = false;\n }\n else if (message.type == StdPeerMessage.UNCHOKE) {\n choke = false;\n }\n\n // enqueue message\n sendQueue.add(message);\n }\n\n// sendQueue.forEach(pm -> System.out.println(\" -x> \" + System.identityHashCode(pm) + pm.type + \" ,\" + pm.index +\",\" + pm.begin +\",\" + pm.length) );\n\n }", "Message pull();", "public LQT_Message_Queue() {\n\ta_list = new LinkedList<LQT_Message>();\n }", "public void testMaximumMessages() throws Exception {\n for (int i = 0; i < 1024 + 1; i++) {\n sendMessage(i);\n waitForMs(50);\n }\n\n sendMessage(0);\n waitForMs(40);\n // Check if the oldest one has been already evicted.\n CellBroadcastMessage cbmTest =\n (CellBroadcastMessage) mServiceIntentToVerify.getExtras().get(\"message\");\n CellBroadcastMessage cbm = new CellBroadcastMessage(createMessage(0));\n\n compareCellBroadCastMessage(cbm, cbmTest);\n mActivityIntentToVerify = null;\n }", "public void takeABus() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tPassenger passenger = (Passenger) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.PASSENGERS_WAITING);\n\t\tpkt.setId(passenger.getPassengerId());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\n\t\tpassenger.setCurrentState(pkt.getState());\n\t\tclientCom.close();\n\t}", "private void m57235e() {\n if (this.f41223d != null) {\n this.f41223d.sendEmptyMessage(1);\n }\n }", "void processQueue();", "void notifyBlockComplete(MessageSnapshot snapshot);", "@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private void refill(MessagingEvent evt) {\n disruptorPublish(evt);\n }", "private void push() {\n ImmutableSortedSet<T> myAvailable = _outstanding.apply(\n new Syncd.Transformer<ImmutableSortedSet<T>, ImmutableSortedSet<T>>() {\n public Tuple<ImmutableSortedSet<T>, ImmutableSortedSet<T>> apply(ImmutableSortedSet<T> aBefore) {\n final SortedSet<T> myRemaining = new TreeSet<>(new MessageComparator<T>());\n\n // Identify those messages that are sequentially contiguous from _floor and can be passed on\n //\n ImmutableSortedSet<T> myAccessible =\n new ImmutableSortedSet.Builder<>(new MessageComparator<T>()).addAll(\n Iterables.filter(aBefore, new Predicate<T>() {\n public boolean apply(T aMessage) {\n Long myCurrent = _floor.get();\n\n if (aMessage.getSeq() == myCurrent) {\n // This message can be sent out to listeners so long as we're first to try\n //\n if (_floor.testAndSet(myCurrent, myCurrent + 1))\n return true;\n } else\n // This message must remain\n //\n myRemaining.add(aMessage);\n\n // Couldn't send message out or it must remain\n //\n return false;\n }\n })\n ).build();\n\n return new Tuple<>(new ImmutableSortedSet.Builder<>(\n new MessageComparator<T>()).addAll(myRemaining).build(),\n myAccessible);\n }\n }\n );\n\n send(myAvailable);\n archive(myAvailable);\n }", "private void sendMessage()\n\t{\n\t\tfinal String message = messageTextArea.getText(); \n\t\tif(message.length() == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tmessageTextArea.setText(\"\");\n\t\ttry\n\t\t{\n\t\t\teventsBlockingQueue.put(new MessageEvent(message));\n\t\t}\n\t\tcatch (final InterruptedException e1)\n\t\t{\n\t\t}\n\t}", "@Override\n public void run() {\n while (!bShutDown || !messageCache.isEmpty()) {\n try {\n while (!messageCache.isEmpty()) {\n HttpMessage httpMessage = messageCache.poll();\n if (httpMessage != null) {\n SendResult result = sendMessageWithHostInfo(\n httpMessage.getBodies(), httpMessage.getGroupId(),\n httpMessage.getStreamId(), httpMessage.getDt(),\n httpMessage.getTimeout(), httpMessage.getTimeUnit());\n httpMessage.getCallback().onMessageAck(result);\n }\n }\n TimeUnit.MILLISECONDS.sleep(proxyClientConfig.getAsyncWorkerInterval());\n } catch (Exception exception) {\n logger.error(\"exception caught\", exception);\n }\n }\n }", "public void sendFromMessageQueue() throws IOException {\n Date canSendDate = new Date(lastReceiveMsgDate.getTime() + 2000);\n if (canSendDate.before(new Date())) {\n String msg = messageQueue.poll();\n if (msg == null)\n return;\n\n output.writeBytes(msg + \"\\n\");\n }\n }", "protected void syncConsumeLoop(MessageConsumer requestConsumer) {\n try {\n Message message = requestConsumer.receive(5000);\n if (message != null) {\n onMessage(message);\n } else {\n System.err.println(\"No message received\");\n }\n } catch (JMSException e) {\n onException(e);\n }\n }", "public int onEnd() {\n\t\t\t\tflushMessageQueue();\n\t\t\t\treturn 0;\n\t\t\t}", "void onMessageProcessingAttempt(String internalQueueName);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\thandler.sendEmptyMessage(0);\n\t\t\t}", "public int queue() \n { return waiting; }", "pb4server.BuffBagAskReq getBuffBagAskReq();", "public void parkTheBus() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tBusDriver busDriver = (BusDriver) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.BD_ARRIVING);\n\t\tpkt.setState(busDriver.getBusDriverState());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\t\tclientCom.close();\n\t\tbusDriver.setBusDriverState(pkt.getState());\n\t}", "@Ignore(\"Надо переделать!!\")\n @Test\n public void testFull() throws Exception {\n // SYSTEM.DEF.SVRCONN/TCP/vs338(1414)\n // SYSTEM.ADMIN.SVRCONN/TCP/vs338(1414)\n // UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\n\n MQQueueConnectionFactory cf = new MQQueueConnectionFactory();\n\n\n // Config\n cf.setHostName(\"vs338\");\n cf.setPort(1414);\n cf.setTransportType(WMQConstants.WMQ_CM_CLIENT);\n cf.setQueueManager(\"QM_MBROKER10_TEST\");\n cf.setChannel(\"SYSTEM.ADMIN.SVRCONN\");\n\n SingleActionJob job =\n SingleActionJobBuilder.create()\n .withClass(MovementCreateTask.class)\n\n// .withProps(\n// \"mq.type = queue\\n\" +\n// \"mq.host = vs338\\n\" +\n// \"mq.port = 1414\\n\" +\n// \"mq.queueManager = QM_MBROKER10_TEST\\n\" +\n// \"mq.channel = SYSTEM.DEF.SVRCONN\\n\" +\n// \"mq.batchSize = 1\\n\" + //todo\n// \"mq.topics = LIRQ!!!!:UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF:UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\"+\n// \";BALIRQ:UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF:UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\\n\"+\n// \"mq.user=er22228\\n\" +\n// \"mq.password=Vugluskr6\"\n//\n// )//;MIDAS_UPDATE:UCBRU.ADP.BARSGL.V4.ACDENO.MDSUPD.NOTIF\n\n .build();\n jobService.executeJob(job);\n \n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n\n }", "public void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\tSystem.out.println(\"&&&&&&&&&&&&&&&\");\n\t\tSystem.out.println(message.getClass());\n\t\t/*\n\t\t obj.put(\"start\",startDate);\n obj.put(\"end\",endDate);\n obj.put(\"topicName\",topicName_New);\n obj.put(\"bf\",bf);\n\t\t */\n\t\tSystem.out.println(\"topic on which data has been received is :\"+topic);\n\t\tSystem.out.println(\"the data packet from the broker has been received in JSON\");\n\t\t\n\t\t\n\t\tByteArrayInputStream baos = new ByteArrayInputStream(message.getPayload());\n\t\tSystem.out.println(\"after message payload\");\n\t\tObjectInputStream outputStream = new ObjectInputStream(baos);\n\t\t\n\t\tJSONObject datapacket=null;\n\t\ttry{\n\t\t\t datapacket=(JSONObject)outputStream.readObject();\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(\"koi to gadbad hai\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"parsing the data from the json packets.....started\");\n\t\tBloomFilter bfilter=new BloomFilter(0.01,1000);\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tbyte[] buffer=(byte[]) datapacket.get(\"bf\");\n\t\t\tByteBuffer bb=ByteBuffer.wrap(buffer);\n\t\t\t\n\t\t\tbfilter.deSerialize(bb);\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(\"error in getting the bloom filter\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"bloom filter obtained\");\n\t\tString TOPIC_TOSUBSCRIBE=(String) datapacket.get(\"topicName\");\n\t\t\n\t\tString SD=(String) datapacket.get(\"start\");\n\t\tString ED=(String) datapacket.get(\"end\");\n\t\t\n\t\tSystem.out.println(\"printing the bloom filter object parametersss....\");\n\t\tSystem.out.println(bfilter.getBitVectorSize());\n\t\tSystem.out.println(bfilter.getNumberOfEntries());\n\t\t\n\t\t\n\t\tSystem.out.println(\"deserialization object checking=== \"+bfilter.contains(\"random string10000\"));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tFile file = new File(\"/Users/gaurav/Desktop/BrokerMessages.txt\");\n\t\tif (!file.exists()) {\n\t\t\tfile.createNewFile();\n\t\t}\n\tSystem.out.println(\"control in callback subscriber\");\n//\t\t\n//\t\tSystem.out.println(\"file absolute path :\" + file.getAbsoluteFile());\n\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile(), true);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tString h = message.toString();\n\t\tbw.write(h);\n\t\tbw.write(\"\\n\");\n\t\tbw.close();\n\n\t\tSystem.out.println(\"Done\");\n\n\t\tif (\"testing/LWT\".equals(topic)) {\n\t\t\tSystem.err.println(\"Sensor gone!\");\n\t\t}\n\t}", "private void IntervalEndMessageAndSend0() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\tString topic;\n\t\t\tIterator<String> ier = TopicMap.keySet().iterator();\n\t\t\twhile(ier.hasNext()){\n\t\t\t\ttopic = ier.next();\n\t\t\t\t//AsyncPushOneFlow(topic, new byte[](new Key(new byte[]{0,0,0}),Sub4SketchingKVStream.endSignal));\n\t\t\t}\n\t\t\t}", "public void newQueue(){\r\n\t\tgenerateQueue();\r\n\t\trefreshLeft = true;\r\n\t}", "@Override\n\tpublic void msgAtBed() {\n\t\t\n\t}", "public synchronized void checkTimeoutMessages() {\n SQSMessage SQSMessage;\n String receiptHandler;\n long currentTimeStampDifference;\n for (Map.Entry pairs : receivedMessages.entrySet()) {\n SQSMessage = (SQSMessage) pairs.getValue();\n currentTimeStampDifference = System.currentTimeMillis() - SQSMessage.getReceivedTimeStamp();\n if (currentTimeStampDifference > SQSMessage.getDefaultVisibilityTimeout()) {\n receiptHandler = (String) pairs.getKey();\n SQSMessageQueue.addFirst(SQSMessage);\n receivedMessages.remove(receiptHandler);\n }\n }\n }", "@Override\n public void run() {\n Message message;\n while(true){\n logger.debug(\"SMS Reader Thread is waiting for incoming messages\");\n message = messageQueue.getInputSMS().poll() ;\n logger.debug(\"SMS message has been received from \"+ message.getFromWhom());\n view.receivedMessages.append(message.getFromWhom().toString() +\" :\");\n view.receivedMessages.append(message.getData() + \"\\n\");\n view.setPreferredSize(new Dimension(view.getSize().height+10, view.getSize().width));\n view.jScrollPaneReceivedMessages.getVerticalScrollBar().setValue(view.jScrollPaneReceivedMessages.getVerticalScrollBar().getMaximum());\n view.revalidate();\n }\n }", "@Override\n public void finishMessageSending() {\n for (int i = 0; i < fragNum; ++i) {\n long bytesWriten = cacheOut[i].bytesWriten();\n cacheOut[i].finishSetting();\n cacheOut[i].writeLong(0, bytesWriten - SIZE_OF_LONG);\n\n if (bytesWriten == SIZE_OF_LONG) {\n logger.debug(\n \"[Finish msg] sending skip msg from {} -> {}, since msg size: {}\",\n fragId,\n i,\n bytesWriten);\n continue;\n }\n if (i == fragId) {\n nextIncomingMessageStore.digest(cacheOut[i].getVector());\n logger.info(\n \"In final step, Frag [{}] digest msg to self of size: {}\",\n fragId,\n bytesWriten);\n } else {\n grapeMessager.sendToFragment(i, cacheOut[i].getVector());\n logger.info(\n \"In final step, Frag [{}] send msg to [{}] of size: {}\",\n fragId,\n i,\n bytesWriten);\n }\n }\n // if (maxSuperStep > 0) {\n // grapeMessager.ForceContinue();\n // maxSuperStep -= 1;\n // }\n\n // logger.debug(\"[Unused res] {}\", unused);\n // logger.debug(\"adaptor hasNext {}, grape hasNext{}\", adaptorHasNext, grapeHasNext);\n // logger.debug(\"adaptor next {}, grape next {}\", adaptorNext, grapeNext);\n // logger.debug(\"adaptor neighbor {}, grape neighbor {}\", adaptorNeighbor,\n // grapeNeighbor);\n }", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\twhile(runFlg){\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\twhile(mQueue.getSize() >0 ){\n\t\t\t\t\t\tbyte[] data = getData();\n\t\t\t\t\t\tmOut.write(data);\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\tLog.e(TAG,e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void ClearUnsentQueue() {\n \t\tjobqueue.clear();\n \t}", "private void sendQueue() {\r\n firePropertyChange(\"boardQueue\", null, myBoardQueue);\r\n firePropertyChange(\"scaleQueue\", null, myScaleDialogQueue);\r\n firePropertyChange(\"gui\", null, this);\r\n }", "public static void testIBMMQReceiveData(){\n\n MQParam param = new MQParam();\n param.setHost(\"10.86.92.194\");\n param.setPort(30099);\n param.setCcsid(1208);\n param.setChannel(\"SVRCONN_GW_OUT\");\n param.setQueueManager(\"ESB_OUT\");\n param.setQueueName(\"EIS.QUEUE.REQUEST.OUT.GCDCHZWMES\");\n param.setReplyToQueueName(\"EIS.QUEUE.RESPONSE.IN.GCDCHZWMES\");\n param.setUserId(\"mqm\");\n param.setPassword(\"mqm\");\n\n new Thread(new IBMSenderThread(param,\"data1\")).run();\n new Thread(new IBMSenderThread(param,\"datata22\")).run();\n new Thread(new IBMSenderThread(param,\"datatatata333\")).run();\n }", "public void run() {\n // If we've sent all the messages\n if (count >= bombAmount)\n {\n SwapSendButton(0);\n }\n // If we get our defuseal text\n if (bombDefuse.equals(SmsListener.messageBody))\n {\n SwapSendButton(0);\n Toast.makeText(getApplicationContext(), \"Bomb Defused\", Toast.LENGTH_SHORT).show();\n }\n else if (count < bombAmount && !bombDefuse.equals(SmsListener.messageBody))\n {\n // a delay of 0 doesn't work IRL\n // So in truth the quickest you can send a text bomb is 1 second apart\n if (delayAmount < 1)\n {\n smsManager.sendTextMessage(phoneNumber, \"ME\", messageToSend, null, null);\n handler.postDelayed(this, ((delayAmount + 1) * 1000));\n ++count;\n }\n else\n {\n smsManager.sendTextMessage(phoneNumber, \"ME\", messageToSend, null, null);\n handler.postDelayed(this, (delayAmount * 1000));\n ++count;\n }\n }\n }", "public InMemoryQueueService(){\n this.ringBufferQueue = new QueueMessage[10000];\n }", "private void initializeSlotMapForQueue() throws AndesException, ConnectionException {\n int databaseReadsCounter = 0;\n int restoreMessagesCounter = 0;\n long messageCountOfQueue = messageStore.getMessageCountForQueue(queueName);\n\n LongArrayList messageIdList = messageStore.getNextNMessageIdsFromQueue(queueName, 0, slotSize);\n int numberOfMessages = messageIdList.size();\n\n databaseReadsCounter++;\n restoreMessagesCounter = restoreMessagesCounter + messageIdList.size();\n\n long lastMessageID;\n long firstMessageID;\n long lastStatPublishTime = System.currentTimeMillis();\n\n while (numberOfMessages > 0) {\n int lastMessageArrayIndex = numberOfMessages - 1;\n lastMessageID = messageIdList.get(lastMessageArrayIndex);\n firstMessageID = messageIdList.get(0);\n\n if (log.isDebugEnabled()) {\n log.debug(\"Created a slot with \" + messageIdList.size() + \" messages for queue (\" + queueName + \")\");\n }\n\n if (AndesContext.getInstance().isClusteringEnabled()) {\n SlotManagerClusterMode.getInstance().updateMessageID(queueName,\n AndesContext.getInstance().getClusterAgent().getLocalNodeIdentifier(), firstMessageID,\n lastMessageID, lastMessageID);\n } else {\n SlotManagerStandalone.getInstance().updateMessageID(queueName, lastMessageID);\n }\n\n long currentTimeInMillis = System.currentTimeMillis();\n if (currentTimeInMillis - lastStatPublishTime > STAT_PUBLISHING_INTERVAL) {\n // messageCountOfQueue is multiplied by 1.0 to convert it to double\n double recoveredPercentage = (restoreMessagesCounter / (messageCountOfQueue * 1.0)) * 100.0;\n log.info(restoreMessagesCounter + \"/\" + messageCountOfQueue + \" (\" + Math.round(recoveredPercentage)\n + \"%) messages recovered for queue \\\"\" + queueName + \"\\\"\");\n lastStatPublishTime = currentTimeInMillis;\n }\n\n // We need to increment lastMessageID since the getNextNMessageMetadataFromQueue returns message list\n // including the given starting ID.\n messageIdList = messageStore.getNextNMessageIdsFromQueue(queueName, lastMessageID + 1, slotSize);\n numberOfMessages = messageIdList.size();\n //increase value of counters\n databaseReadsCounter++;\n restoreMessagesCounter = restoreMessagesCounter + messageIdList.size();\n }\n\n log.info(\"Recovered \" + restoreMessagesCounter + \" messages for queue \\\"\" + queueName + \"\\\" using \"\n + databaseReadsCounter + \" database calls\");\n }", "MessageDto dequeueMessage(MessageQueryInfoDto messageQueryInfo) throws IOException, MlmqException;", "private void messageReceived(GoToBagCheck goToBagCheck) {\r\n\t\tBaggage baggage = goToBagCheck.getBaggage();\r\n\t\tBagCheckReport bagCheckReport = new BagCheckReport(baggage,\r\n\t\t\t\tbaggage.doesBaggagePass());\r\n\r\n\t\tlogger.debug(\"BagCheck \"+ this.lineNumber +\" sent a bagCheckReport message to its Security.\");\r\n\t\tsecurityActor.tell(bagCheckReport);\r\n\r\n\t}", "public void run() {\r\n while(true) { // outer loop\r\n if(first) // we already have the queue CAS acquired\r\n first=false;\r\n else {\r\n if(!queue.acquire())\r\n return;\r\n }\r\n\r\n try {\r\n Message msg_to_deliver;\r\n while((msg_to_deliver=queue.remove()) != null) { // inner loop\r\n try {\r\n up_prot.up(new Event(Event.MSG, msg_to_deliver));\r\n }\r\n catch(Throwable t) {\r\n log.error(\"couldn't deliver message \" + msg_to_deliver, t);\r\n }\r\n }\r\n }\r\n finally {\r\n queue.release();\r\n }\r\n\r\n // although ConcurrentLinkedQueue.size() iterates through the list, this is not costly,\r\n // as at this point, the queue is almost always empty, or has only a few elements\r\n if(queue.size() == 0) // prevents a concurrent add() (which returned) to leave a dangling message in the queue\r\n break;\r\n }\r\n }", "public static void start() {\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\tDate dtnow = new Date();\r\n\t\t\t//Verify email queue\r\n\t\t\tIterator<Mailtogo> it = new MailtogoDAO().getQueue().iterator();\r\n\t\t\twhile(it.hasNext())\r\n\t\t\t{\r\n\t\t\t\tMailtogo mtg = (Mailtogo)it.next();\r\n\t\t\t\tmtg.setMtg_status(\"P\");\r\n\t\t\t\tmtg.save();\r\n\t\t\t\tdtnow = new Date();\r\n\t\t\t\tSystem.out.println(format.format(dtnow) + \" -> Sending message \" + mtg.getMtg_id());\r\n\t\t\t\tsend(mtg);\r\n\t\t\t}\r\n\t\t} catch (Exception e)\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n void enqueuePiece(ByteBuffer buffer, int index, int position, int length, Object params)\n {\n// if (DEBUG) System.out.println(\"[stdpc] enqueuePiece:\" + index + \",\" + position + \",\" + length + \" buf:\" + buffer.remaining());\n// sendQueue.forEach(pm ->\n// System.out.println(\" -s> \" + System.identityHashCode(pm) + \" \" +pm.type + \" ,\" + pm.index +\",\" + pm.begin + \",\" + pm.length)\n// );\n// peerBlockRequests.forEach(pm -> {\n// System.out.println(\" -p> \" + pm.type + \" ,\" + pm.index +\",\" + pm.begin + \",\" + pm.length);\n// });\n\n\n boolean found = false;\n\n // check for the active linked peer request and remove it\n for (int i = 0; i < peerBlockRequests.size(); i++) {\n StdPeerMessage pm = peerBlockRequests.get(i);\n if ((pm.index == index)\n && (pm.begin == position)\n && (pm.length == length))\n {\n peerBlockRequests.remove(i);\n pmCache.release(pm);\n found = true;\n break;\n }\n }\n if (!found && DEBUG) {\n if (DEBUG) System.out.println(\"[stdpc] pBR not found\");\n }\n\n enqueue(pmCache.piece(index, position, length, buffer, params));\n }", "@Override\n\tpublic void run() {\n\t\tlong starttime = System.currentTimeMillis();\n\n\t\tboolean started = statusMap.get(type);\n\t\tif (!started) {\n\n\t\t\tstatusMap.put(type, true);\n\t\t\tlogger.info(\n\t\t\t\t\t\"task of id add to queue of busType : {} started,current milestone : {}\",\n\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), milestone);\n\t\t\ttry {\n\t\t\t\tIdGeneratorQueue queue = QueueUtil\n\t\t\t\t\t\t.getIdGeneratorQueue(AptConstants.BUS_NAME_MAP.get(type));\n\n\t\t\t\tif (null == queue) {\n\t\t\t\t\tlogger.error(\n\t\t\t\t\t\t\t\"task of add id to queue faile , no queue of name: {} finded\",\n\t\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlogger.info(\"queue : {} has {} id not uesed.\", queue.getSize());\n\t\t\t\tlong nextMilestone = generatorService.nextMilestone(type);\n\t\t\t\tlogger.info(\"task of add id to queue,nextMilestone is {}\", nextMilestone);\n\n\t\t\t\tif (nextMilestone <= milestone) {\n\t\t\t\t\tlogger.error(\n\t\t\t\t\t\t\t\"task of get next milestone error,nextMileStone is smaller, busType: {},miletone : {}\",\n\t\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), milestone);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlong start = milestone + 1;\n\t\t\t\tlong end = nextMilestone + 1;\n\n\t\t\t\tlogger.info(\"start add id to queue : {},start : {},end : {}\",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), start, end);\n\t\t\t\tqueue.setMileStone(nextMilestone);\n\t\t\t\t//填充数据 满等待\n\t\t\t\tfor (long i = start; i <= end; i++) {\n\t\t\t\t\tqueue.putId(i);\n\t\t\t\t}\n\t\t\t\tlogger.info(\"success add id to queue! busType : {}\",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\tstatusMap.put(type, false);\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(\"task of id add to queue of busType : {} failed \",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\tlogger.error(\"\", e);\n\t\t\t}\n\t\t}\n\t\tlong endtime = System.currentTimeMillis();\n\n\t\tlogger.info(\"task off add to queue ended,busType : {},usetime : {}\",\n\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), endtime - starttime);\n\t}", "public void run() {\n JabberPacket packet=null;\n\n do {\n try {\n packet=queue.pull();\n\n if (packet!=null) {\n PacketHandler h=null;\n if (((JabberSkypeSettings) Main.Settings()).getDebug()) {\n \tSystem.out.println(\"Client: \" + packet.generateXML());\n }\n String e=packet.getElement();\n if (e!=null) {\n String key=null;\n\n if (e.equals(\"iq\")) {\n JabberPacket pQuery=packet.getFirstChild(\"query\");\n\n if (pQuery!=null) {\n key=pQuery.getAttribute(\"xmlns\");\n } else {\n \tJabberPacket pVcard=packet.getFirstChild(\"vcard\");\n \tif (pVcard!= null) {\n \t\tkey=pVcard.getAttribute(\"xmlns\");\n \t\t//need to do difference between setting vcard, and getting it for a user\n \t}\n }\n } else\n key=e;\n\n if (key!=null) {\n h=(PacketHandler)mHandlers.get(key);\n\n if (h==null)\n h=getDefaultHandler();\n\n h.processPacket(packet);\n } //key!=null\n } //e!=null\n } //packet!=null\n } //try\n catch (Exception e) {\n server.getLogger().severe(\"Caught exception: \"+e.getMessage());\n }\n } while (packet!=null && server.getRunning());\n }", "public void afterReceive() {\n\t}", "@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n\n //ipaddress\n String ipAdr = \"\";\n try{\n\n //Print IPAdress\n ipAdr = channel.getRemoteAddress().toString();\n System.out.println(ipAdr);\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //if client is close ,return\n buf.flip();\n if (buf.limit() == 0) return;\n\n //Print Message\n String msg = getString(buf);\n\n //time\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Taipei\"));\n System.out.println(sdf.format(new Date()) + \" \" + buf.limit() + \" client: \"+ ipAdr + \" \" + msg);\n\n //\n order ord = null;\n try{\n ord = ParseOrder(sdf.format(new Date()), msg, ipAdr);\n }catch(Exception ex){\n startRead( channel );\n return;\n }\n //2021/05/23 15:55:14.763,TXF,B,10000.0,1,127.0.0.1\n //2021/05/23 15:55:14.763,TXF,S,10000.0,1,127.0.0.1\n\n if (ord.BS.equals(\"B\")) {\n limit(ord, bid);\n }\n if (ord.BS.equals(\"S\")) {\n limit(ord, ask);\n }\n if (trade(bid, ask, match) == true){\n startWrite(clientChannel, \"Mat:\" + match.get(match.size()-1).sysTime + \",\" + match.get(match.size()-1).stockNo+\",\"+\n match.get(match.size()-1).BS+\",\"+match.get(match.size()-1).qty+\",\"+match.get(match.size()-1).price+\"\\n\");\n }\n\n //send to all \n startWrite(clientChannel, \"Ord:\" + getAllOrder(bid, ask)+\"\\n\");\n \n //bid size and ask size\n System.out.println(\"Blist:\" + bid.size() + \" Alist:\" + ask.size());\n\n // echo the message\n//------------------> //startWrite( channel, buf );\n \n //start to read next message again\n startRead( channel );\n }", "@Override\n public void run() {\n while (this.isAlive()) {\n try {\n this.semaphoreHashMap.get(\"lock\").acquire();\n this.guestNo = -1;\n this.bellhopGuestHashMap = null;\n this.semaphoreHashMap.get(\"bellhops\").release();\n this.helper.addToBellhopQueue(this);\n this.semaphoreHashMap.get(\"lock\").release();\n\n printStringToConsole(toStringId, \"is ready to help a guest\");\n\n this.mutex.acquire();\n\n printStringToConsole(toStringId, \"has obtained the bags of [Guest \", guestNo + \"\", \"]\");\n this.bellhopGuestHashMap.get(\"hasBags\").release();\n\n this.bellhopGuestHashMap.get(\"guestNeedsBags\").acquire();\n\n this.bellhopGuestHashMap.get(\"inRoom\").acquire();\n printStringToConsole(toStringId, \"has entered the room of [Guest \", guestNo + \"\", \"]\");\n\n printStringToConsole(toStringId, \"has given the bags to [Guest \", guestNo + \"\", \"]\");\n this.bellhopGuestHashMap.get(\"giveBags\").release();\n\n this.bellhopGuestHashMap.get(\"giveTip\").acquire();\n printStringToConsole(toStringId, \"has gotten their tip and leaves from [Guest \", guestNo + \"\", \"]\");\n\n this.bellhopGuestHashMap.get(\"gotTip\").release();\n\n printStringToConsole(toStringId, \"is ready to help a guest\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "private void CheckNumberPacketsEnoughEndMessageAndSend0(String topic) {\n\t\t\t// TODO Auto-generated method stub\n\n\t\t\tif(TopicMap.get(topic)>LogicController.NumberFlowsPerPeriod){\n\t\t\t\t//AsyncPushOneFlow(topic, new byte[](new Key(new byte[]{0,0,0}),Sub4SketchingKVStream.endSignal));\n\t\t\t\t//reset\n\t\t\t\tTopicMap.replace(topic,0L);\n\t\t\t}\n\t\t}", "public void flush() {\n mMessages.postToServer();\n }", "@Override\n public int getResponseQueueLength() {\n return 0;\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tStaticString.information = null;// 判断回复信息之间清空之前信息\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\t\tSocketConnet.getInstance().communication(888,new String[]{mLogsIndexNumber});\r\n\t\t\t\tif (ReplyParser.waitReply()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public void handle(PBFTBag bag){\n\n JDSUtility.debug(\"[PBFTServer:handle(bag)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", received \" + bag);\n\n if(isValid(bag)){\n int f = getServiceBFTResilience();\n JDSUtility.debug(\"[PBFTServer:handle(bag)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", is going to processing \" + bag);\n for(IMessage m: bag.getMessages()){\n\n if(m instanceof PBFTRequest){\n\n PBFTRequest r = (PBFTRequest) m;\n \n if(!getRequestInfo().hasRequest(r)){\n handle(r);\n }\n\n }\n\n if(m instanceof PBFTPrePrepare){\n PBFTPrePrepare pp = (PBFTPrePrepare) m;\n if(!getPrePrepareInfo().contains(pp)) {\n handle(pp);\n }\n }\n\n if(m instanceof PBFTPrepare){\n PBFTPrepare p = (PBFTPrepare) m;\n if(!getPrepareInfo().contains(p)){\n handle(p);\n }\n }\n\n if(m instanceof PBFTCommit){\n PBFTCommit c = (PBFTCommit) m;\n if(!getCommitInfo().contains(c)){\n handle(c);\n }\n }\n \n if(m instanceof PBFTCheckpoint){\n handle((PBFTCheckpoint)m);\n }\n\n if(m instanceof PBFTNewView){\n handle((PBFTNewView)m);\n }\n\n if(m instanceof PBFTChangeView){\n handle((PBFTChangeView)m);\n }\n\n if(m instanceof PBFTChangeViewACK){\n handle((PBFTChangeViewACK)m);\n }\n }\n }\n }", "@Override\n public void run() {\n graphIn = new Handler(Looper.getMainLooper()) {\n\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case handlerState2:\n received = Boolean.parseBoolean((String) msg.obj);\n break;\n case handlerState4:\n sampleTime = Integer.parseInt((String) msg.obj);\n break;\n case handlerState1:\n ppgWaveBuffer.addAll((ArrayList) msg.obj);\n bluetoothIn.obtainMessage(handlerState5, \"ACK\").sendToTarget();\n break;\n\n }\n }\n };\n\n for (; ; ) {\n\n if (!VerifyActivity.isActivityVisible()) {\n ppgWaveBuffer.clear();\n break;\n }\n if (received == true && ppgWaveBuffer.size() != 0) {\n\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (ppgWaveBuffer.size() != 0) {\n graph.update(ppgWaveBuffer);\n }\n }\n });\n try {\n Thread.sleep(sampleTime + compensatoryTime);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }" ]
[ "0.6459321", "0.6443775", "0.6402734", "0.639069", "0.63262844", "0.6283115", "0.61285436", "0.6127755", "0.6110515", "0.60827893", "0.59894013", "0.5907161", "0.5884178", "0.58804065", "0.5839489", "0.5802453", "0.5795554", "0.5791643", "0.579158", "0.578937", "0.57810724", "0.5779656", "0.5771981", "0.5771607", "0.5752827", "0.57450175", "0.5734247", "0.5730633", "0.5726613", "0.57207596", "0.5716991", "0.5703918", "0.5702626", "0.5684681", "0.5678028", "0.56776977", "0.56649494", "0.5662912", "0.5655626", "0.5648686", "0.56475466", "0.5646966", "0.56378865", "0.56279284", "0.561051", "0.5599102", "0.5588492", "0.5588186", "0.5577089", "0.55515337", "0.5548321", "0.55411744", "0.5534277", "0.5530783", "0.553048", "0.5530172", "0.5522471", "0.5521152", "0.55143625", "0.5512773", "0.5508907", "0.5502898", "0.5500852", "0.5500277", "0.54954684", "0.54905117", "0.548729", "0.5487145", "0.547629", "0.54675275", "0.5464576", "0.5463742", "0.54625785", "0.5460346", "0.544501", "0.54442006", "0.5442121", "0.5441776", "0.5440816", "0.5439724", "0.5438334", "0.543625", "0.5428063", "0.5427162", "0.5423982", "0.5410285", "0.5405145", "0.54041445", "0.54033744", "0.53985214", "0.5391923", "0.538517", "0.5385099", "0.5384171", "0.5381409", "0.537929", "0.5377522", "0.5376268", "0.53677475" ]
0.6587414
0
Performs the write action on sc The convention is that both buffers are in writemode before the call to doWrite and after the call
public void doWrite() throws IOException { bbout.flip(); sc.write(bbout); bbout.compact(); processOut(); updateInterestOps(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doWrite() throws IOException {\n\t\tbbout.flip();\n\t\tsc.write(bbout);\n\t\tbbout.compact();\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "private void doWrite() throws IOException {\n\t\t\tbb.flip();\n\t\t\tsc.write(bb);\n\t\t\tbb.compact();\n\n\t\t\tupdateInterestOps();\n\t\t}", "void writeCurrentBuffer();", "public void writeSysCall() {\n clientChannel.write(writeBuffer, this, writeCompletionHandler);\n }", "private void flushWrite() throws IOException, BadDescriptorException {\n if (reading || !modes.isWritable() || buffer.position() == 0) return; // Don't bother\n \n int len = buffer.position();\n buffer.flip();\n int n = descriptor.write(buffer);\n \n if(n != len) {\n // TODO: check the return value here\n }\n buffer.clear();\n }", "void write();", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "public void flush(){\n\t\ttry{\n\t\t\tse.write(buffer, 0, bufferPos);\n\t\t\tbufferPos = 0;\n\t\t\tse.flush();\n\t\t}catch(IOException ioex){\n\t\t\tfailures = true;\n\t\t}\n\t}", "@Override\n public void onWrite() {\n onChannelPreWrite();\n }", "public synchronized void beginWrite() {\n\t\tSystem.out.println(\"WRITER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint writeTurn = currentTurn;\n\t\tcurrentTurn++;\n\n\t\twhile(writeTurn != nextTurn || numReaders > 0 || numWriters > 0 ){ \n\t\t\t/********WAIT CALL*********/\n\t\t\ttry {\n//\t\t\tSystem.out.println(\"WRITER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\tthis.wait();\n//\t\t\tSystem.out.println(\"WRITER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t/**************************/\n\t\t}\n\t\t\n\t\t//Only increment when the writer is not blocked\n\t\t// (it is at front of queue)\n\t\tnumWriters++;\n\n\t}", "@Override\n public void write() {\n\n }", "@Override\n protected void doWriteTo(StreamOutput out) throws IOException {\n }", "public void write(byte[] buffer) {\n try {\n String bufferstring=\"a5550100a2\";\n // byte [] buffer03=new byte[]{(byte) 0xa5, Byte.parseByte(\"ffaa\"),0x01,0x00, (byte) 0xa2};\n byte buffer01[]=bufferstring.getBytes();\n byte [] buffer02=new byte[]{(byte) 0xa5,0x55,0x01,0x00, (byte) 0xa2};\n\n\n //for(int i=0;i<100000;i++) {\n mmOutStream.write(buffer);\n // Thread.sleep(1000);\n //}\n //\n //Share the sent message back to the UI Activity\n// mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)\n// .sendToTarget();\n } catch (Exception e) {\n Log.e(TAG, \"Exception during write\", e);\n }\n }", "@Override\n\t\tpublic CompletableFuture<Void> write(byte[] buffer, long offset) {\n\t\t\t\n\t\t\tsynchronized(roleSwitcherThread) {\n\t\t\t\tif (!RockyController.role.equals(RockyControllerRoleType.Owner)) {\n\t\t\t\t\tSystem.err.println(\"ASSERT: write can be served only by the Owner\");\n\t\t\t\t\tSystem.err.println(\"currently, my role=\" + RockyController.role);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (debugPrintoutFlag) {\n\t\t\t\tSystem.out.println(\"write entered. buffer size=\" + buffer.length);\n\t\t\t\tSystem.out.println(\"offset=\" + offset);\n\t\t\t}\n\t\t\t\n\t\t\tlong firstBlock = offset / blockSize;\n\t\t\tint length = buffer.length;\n\t\t long lastBlock = 0;\n\t\t if (length % blockSize == 0) {\n\t\t \tlastBlock = (offset + length) / blockSize - 1;\n\t\t } else {\n\t\t \tlastBlock = (offset + length) / blockSize;\n\t\t }\n\t\t //long lastBlock = (offset + length) / blockSize;\n\t\t \n\t\t if (debugPrintoutFlag) {\n\t\t \tSystem.out.println(\"firstBlock=\" + firstBlock + \" lastBlock=\" + lastBlock + \" length=\" + length);\n\t\t }\n\t\t \t\n\t\t if (mutationSnapEvalFlag) {\n\t\t \tnumBlockWrites += (int) (lastBlock - firstBlock + 1);\n\t\t }\n\t\t \n//\t\t // we assume that buffer size to be blockSize when it is used\n//\t\t // as a block device properly. O.W. it can be smaller than that.\n//\t\t // To make it compatible with the original intention, when \n//\t\t // we get buffer smaller than blockSize, we increment the loastBlock\n//\t\t // by one.\n//\t\t if (firstBlock == lastBlock) {\n//\t\t \tlastBlock++; \n//\t\t }\n//\t\t for (int i = (int) firstBlock; i < (int) lastBlock; i++) {\n\t \tfor (int i = (int) firstBlock; i <= (int) lastBlock; i++) {\n\t \t\tif (debugPrintoutFlag) {\n\t \t\t\tSystem.out.println(\"setting dirtyBitmap for blockID=\" + i);\n\t \t\t}\n\t \t\tsynchronized(dirtyBitmap) {\n\t\t \t\tdirtyBitmap.set(i);\n\t\t \t}\n\t\t \tWriteRequest wr = new WriteRequest();\n\t\t \tint copySize = 0;\n\t\t \tif (i == lastBlock) {\n\t\t \t\tif (debugPrintoutFlag) {\n\t\t \t\t\tSystem.out.println(\"copySize first\");\n\t\t \t\t}\n\t\t \t\tint residual = buffer.length % blockSize;\n\t\t \t\tif (residual == 0) {\n\t\t \t\t\tcopySize = blockSize;\n\t\t \t\t} else {\n\t\t \t\t\tcopySize = residual;\n\t\t \t\t}\n\t\t \t} else {\n\t\t \t\tif (debugPrintoutFlag) {\n\t\t \t\t\tSystem.out.println(\"copySize second\");\n\t\t \t\t}\n\t\t \t\tcopySize = blockSize;\n\t\t \t}\n\t\t \tbyte[] copyBuf = new byte[copySize];\n\t\t \tif (debugPrintoutFlag) {\n\t\t \t\tSystem.out.println(\"copySize=\" + copySize);\n\t\t \t}\n\t\t \tint bufferStartOffset = (int) ((i - firstBlock) * blockSize);\n\t\t \tif (debugPrintoutFlag) {\n\t\t \t\tSystem.out.println(\"bufferStartOffset=\" + bufferStartOffset + \" i=\" + i + \" firstBlock=\" + firstBlock + \" blockSize=\" + blockSize);\n\t\t \t}\n\t\t \tSystem.arraycopy(buffer, (int) ((i - firstBlock) * blockSize), copyBuf, 0, copySize);\n\t\t \twr.buf = copyBuf;\n\t\t \t//wr.offset = offset;\n\t\t\t wr.offset = i * blockSize;\n\t\t\t try {\n\t\t\t \t//System.out.println(\"[RockyStorage] enqueuing WriteRequest for blockID=\" \n\t\t\t \t//\t\t+ ((int) wr.offset / blockSize));\n\t\t\t\t\tqueue.put(wr);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t\treturn super.write(buffer, offset);\n\t\t}", "private static void flushInternalBuffer() {\n\n //Strongly set the last byte to \"0A\"(new line)\n if (mPos < LOG_BUFFER_SIZE_MAX) {\n buffer[LOG_BUFFER_SIZE_MAX - 1] = 10;\n }\n\n long t1, t2;\n\n //Save buffer to SD card.\n t1 = System.currentTimeMillis();\n writeToSDCard();\n //calculate write file cost\n t2 = System.currentTimeMillis();\n Log.i(LOG_TAG, \"internalLog():Cost of write file to SD card is \" + (t2 - t1) + \" ms!\");\n\n //flush buffer.\n Arrays.fill(buffer, (byte) 0);\n mPos = 0;\n }", "@ServerHandler(type = CorfuMsgType.WRITE, opTimer = metricsPrefix + \"write\")\n public void write(CorfuPayloadMsg<WriteRequest> msg, ChannelHandlerContext ctx, IServerRouter r,\n boolean isMetricsEnabled) {\n log.debug(\"log write: global: {}, streams: {}, backpointers: {}\", msg\n .getPayload().getGlobalAddress(), msg.getPayload().getData().getBackpointerMap());\n\n try {\n dataCache.put(msg.getPayload().getGlobalAddress(), msg.getPayload().getData());\n r.sendResponse(ctx, msg, CorfuMsgType.WRITE_OK.msg());\n\n } catch (OverwriteException ex) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_OVERWRITE.msg());\n } catch (DataOutrankedException e) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_DATA_OUTRANKED.msg());\n } catch (ValueAdoptedException e) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_VALUE_ADOPTED.payloadMsg(e.getReadResponse()));\n }\n }", "protected abstract void _write(DataOutput output) throws IOException;", "public abstract void flush();", "public synchronized void write(int update) throws InterruptedException\n {\n while (!bufferEmpty(\"Producer\"))\n // while (!bufferEmpty)\n {\n //Console.println(\"Producer Waiting on Buffer\");\n\n this.wait();\n\n // bufferEmpty = bufferEmpty(\"Producer\");\n }\n\n // Console.println(\"Producer writing\" + update + \" to Buffer\");\n theBuffer = update;\n this.notify();\n }", "public void write() {\n/* 1062 */ this.cbSize = size();\n/* 1063 */ super.write();\n/* */ }", "@Override\r\n public void write(char[] cbuf, int off, int len) throws IOException {\r\n\r\n IOException ioException = null;\r\n for (WriterInfo writerInfo : mWriters) {\r\n try {\r\n writerInfo.getWriter().write(cbuf, off, len);\r\n } catch(IOException ioex) {\r\n ioException = ioex;\r\n }\r\n }\r\n if (ioException != null) {\r\n throw ioException;\r\n }\r\n\r\n }", "@Override\r\n public void write(byte[] buffer) throws IOException {\r\n inWrite1 = true;\r\n try {\r\n super.write(buffer);\r\n if (!inWrite3) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, buffer.length);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, buffer.length, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite1 = false;\r\n } catch (IOException e) {\r\n inWrite1 = false;\r\n throw e;\r\n }\r\n }", "public synchronized void write(String data){\n\t\tlog.debug(\"[SC] Writing \"+data, 4);\n\t\twriteBuffer.add(data.getBytes());\n\t}", "private void handleWrite(SelectionKey key, String message, SSLClientSession session) throws IOException {\n\t\t\tSSLSocketChannel ssl_socket_channel = session.getSSLSocketChannel();\n\t\t\t\n\t\t\tByteBuffer out_message = ssl_socket_channel.getAppSendBuffer();\n\t\t\t\n\t\t\tif(message != null) \n\t\t\t\tout_message.put(message.getBytes());\n\t\t\t\n//\t\t\tOutputHandler.println(\"Server: writing \"+new String(out_message.array(), 0, out_message.position()));\n\t\t\tint count = 0;\n\t\t\t\n\t\t\twhile (out_message.position() > 0) {\n\t\t\t\tcount = ssl_socket_channel.write();\n\t\t\t\tif (count == 0) {\n//\t\t\t\t\tOutputHandler.println(\"Count was 0.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n//\t\t\t\telse {\n//\t\t\t\t\tOutputHandler.println(\"Count was \"+count);\n//\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (out_message.position() > 0) {\n\t\t\t\t// short write:\n\t\t\t\t// Register for OP_WRITE and come back here when ready\n\t\t\t\tkey.interestOps(key.interestOps() | SelectionKey.OP_WRITE);\n\t\t\t\t\n\t\t\t\tsession.rewrite = true;\n\t\t\t} else {\n\t\t\t\tif(session.out_messages.isEmpty()) { \n\t\t\t\t\t// Write succeeded, don�t need OP_WRITE any more\n\t\t\t\t\tkey.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tsession.rewrite = false;\n\t\t\t}\n\t\t}", "private void writeStream(OutputStream os, String out) {\n try {\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, \"utf-8\"));\n writer.write(out);\n writer.flush();\n writer.close();\n os.close();\n } catch (IOException e) {\n }\n }", "public abstract void writeToStream(java.io.DataOutputStream output) throws java.io.IOException;", "void flushBuffer();", "public void write(byte[] buffer) { //이건 보내주는거\n try {\n mmOutStream.write(buffer);\n\n // Disabled: Share the sent message back to the main thread\n mHandler.obtainMessage(MESSAGE_WRITE, -1, -1, buffer).sendToTarget(); //MH주석풀엇음 //what arg1, arg2 obj\n\n } catch (IOException e) {\n Log.e(TAG, \"Exception during write\");\n }\n }", "public void startFileWrite() {\r\n this.setStatus(false);\r\n this.isFileOutStarted = true;\r\n if (!this.is_alg_started || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))) {\r\n this.startALG(true);\r\n } else {\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.writeIntoFiles.setVisible(true);\r\n Controller.this.isFileWriteInUse = true;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(true, true, false);\r\n }// run()\r\n });// Thread\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n this.isFileOutStarted = false;\r\n }\r\n }", "void flush();", "void flush();", "void flush();", "void flush();", "void flush();", "void flush();", "void flush();", "void flush();", "public void flush();", "public void flush();", "public void flush();", "public void flush();", "public void write(byte[] buffer);", "@Override\r\n public void write(byte[] buffer, int off, int len) throws IOException {\r\n inWrite3 = true;\r\n try {\r\n super.write(buffer, off, len);\r\n if (!inWrite1) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, len);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, len, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite3 = false;\r\n } catch (IOException e) {\r\n inWrite3 = false;\r\n throw e;\r\n }\r\n }", "@Override\n\tpublic void flushBuffer() throws IOException {\n\t}", "@Override\r\n public synchronized void flush() throws IOException {\r\n\t\tif ( count != 0 ) {\r\n\t\t writeBuffer(buf, 0, count );\r\n\t\t count = 0;\r\n\t\t}\r\n\t}", "private void byteOut(){\n if(nrOfWrittenBytes >= 0){\n if(b==0xFF){\n // Delay 0xFF byte\n delFF = true;\n b=c>>>20;\n c &= 0xFFFFF;\n cT=7;\n }\n else if(c < 0x8000000){\n // Write delayed 0xFF bytes\n if (delFF) {\n out.write(0xFF);\n delFF = false;\n nrOfWrittenBytes++;\n }\n out.write(b);\n nrOfWrittenBytes++;\n b=c>>>19;\n c &= 0x7FFFF;\n cT=8;\n }\n else{\n b++;\n if(b==0xFF){\n // Delay 0xFF byte\n delFF = true;\n c &= 0x7FFFFFF;\n b=c>>>20;\n c &= 0xFFFFF;\n cT=7;\n }\n else{\n // Write delayed 0xFF bytes\n if (delFF) {\n out.write(0xFF);\n delFF = false;\n nrOfWrittenBytes++;\n }\n out.write(b);\n nrOfWrittenBytes++;\n b=((c>>>19)&0xFF);\n c &= 0x7FFFF;\n cT=8;\n }\n }\n }\n else {\n // NOTE: carry bit can never be set if the byte buffer was empty\n b= (c>>>19);\n c &= 0x7FFFF;\n cT=8;\n nrOfWrittenBytes++;\n }\n }", "public void commitPendingDataToDisk() {\n /*\n r5 = this;\n monitor-enter(r5);\n r1 = r5.mPendingWrite;\t Catch:{ all -> 0x0039 }\n r3 = 0;\n r5.mPendingWrite = r3;\t Catch:{ all -> 0x0039 }\n if (r1 != 0) goto L_0x000a;\n L_0x0008:\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n L_0x0009:\n return;\n L_0x000a:\n r3 = r5.mWriteLock;\t Catch:{ all -> 0x0039 }\n r3.lock();\t Catch:{ all -> 0x0039 }\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n r2 = new java.io.FileOutputStream;\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3 = r3.chooseForWrite();\t Catch:{ IOException -> 0x003c }\n r2.<init>(r3);\t Catch:{ IOException -> 0x003c }\n r3 = r1.marshall();\t Catch:{ IOException -> 0x003c }\n r2.write(r3);\t Catch:{ IOException -> 0x003c }\n r2.flush();\t Catch:{ IOException -> 0x003c }\n android.os.FileUtils.sync(r2);\t Catch:{ IOException -> 0x003c }\n r2.close();\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3.commit();\t Catch:{ IOException -> 0x003c }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0039:\n r3 = move-exception;\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n throw r3;\n L_0x003c:\n r0 = move-exception;\n r3 = \"BatteryStats\";\n r4 = \"Error writing battery statistics\";\n android.util.Slog.w(r3, r4, r0);\t Catch:{ all -> 0x0052 }\n r3 = r5.mFile;\t Catch:{ all -> 0x0052 }\n r3.rollback();\t Catch:{ all -> 0x0052 }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0052:\n r3 = move-exception;\n r1.recycle();\n r4 = r5.mWriteLock;\n r4.unlock();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.internal.os.BatteryStatsImpl.commitPendingDataToDisk():void\");\n }", "public void flush() {\n\t\t\n\t}", "private boolean flushWrite(final boolean block) throws IOException, BadDescriptorException {\n if (reading || !modes.isWritable() || buffer.position() == 0) return false; // Don't bother\n int len = buffer.position();\n int nWritten = 0;\n buffer.flip();\n \n // For Sockets, only write as much as will fit.\n if (descriptor.getChannel() instanceof SelectableChannel) {\n SelectableChannel selectableChannel = (SelectableChannel)descriptor.getChannel();\n synchronized (selectableChannel.blockingLock()) {\n boolean oldBlocking = selectableChannel.isBlocking();\n try {\n if (oldBlocking != block) {\n selectableChannel.configureBlocking(block);\n }\n nWritten = descriptor.write(buffer);\n } finally {\n if (oldBlocking != block) {\n selectableChannel.configureBlocking(oldBlocking);\n }\n }\n }\n } else {\n nWritten = descriptor.write(buffer);\n }\n if (nWritten != len) {\n buffer.compact();\n return false;\n }\n buffer.clear();\n return true;\n }", "Write createWrite();", "void notifyWrite();", "protected int doWriteSingle(ChannelOutboundBuffer in) throws Exception {\n/* 481 */ Object msg = in.current();\n/* 482 */ if (msg instanceof ByteBuf)\n/* 483 */ return writeBytes(in, (ByteBuf)msg); \n/* 484 */ if (msg instanceof DefaultFileRegion)\n/* 485 */ return writeDefaultFileRegion(in, (DefaultFileRegion)msg); \n/* 486 */ if (msg instanceof FileRegion)\n/* 487 */ return writeFileRegion(in, (FileRegion)msg); \n/* 488 */ if (msg instanceof SpliceOutTask) {\n/* 489 */ if (!((SpliceOutTask)msg).spliceOut()) {\n/* 490 */ return Integer.MAX_VALUE;\n/* */ }\n/* 492 */ in.remove();\n/* 493 */ return 1;\n/* */ } \n/* */ \n/* 496 */ throw new Error();\n/* */ }", "@Override\n\tpublic void flush() {\n\t\t\n\t}", "@Override\n\tpublic void flush() {\n\t\t\n\t}", "@Override\n\tpublic void flush() {\n\t\t\n\t}", "@Override\n\tpublic void flush() {\n\t\t\n\t}", "public int internalWrite(ByteBuffer buffer) throws IOException, BadDescriptorException {\n checkOpen();\n \n // TODO: It would be nice to throw a better error for this\n if (!(channel instanceof WritableByteChannel)) {\n throw new BadDescriptorException();\n }\n \n WritableByteChannel writeChannel = (WritableByteChannel)channel;\n \n if (isSeekable() && originalModes.isAppendable()) {\n FileChannel fileChannel = (FileChannel)channel;\n fileChannel.position(fileChannel.size());\n }\n \n return writeChannel.write(buffer);\n }", "public synchronized void flush() {\n\t\ttry {\n\t\t\tcloseWriter();\n\t\t} catch(IOException ioe ) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\topenWriter(true);\n\t\t} catch(IOException ioe ) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "private void writeProc() throws Exception {\n\t\tWriter writer = new Writer(this.procPath,this.procDataList);\n\t\twriter.running();\n\t}", "protected void write(byte[] bytes, int offset, int length) {\n/* 114 */ if (this.socket == null) {\n/* 115 */ if (this.connector != null && !this.immediateFail) {\n/* 116 */ this.connector.latch();\n/* */ }\n/* 118 */ if (this.socket == null) {\n/* 119 */ String msg = \"Error writing to \" + getName() + \" socket not available\";\n/* 120 */ throw new AppenderLoggingException(msg);\n/* */ } \n/* */ } \n/* 123 */ synchronized (this) {\n/* */ try {\n/* 125 */ getOutputStream().write(bytes, offset, length);\n/* 126 */ } catch (IOException ex) {\n/* 127 */ if (this.retry && this.connector == null) {\n/* 128 */ this.connector = new Reconnector(this);\n/* 129 */ this.connector.setDaemon(true);\n/* 130 */ this.connector.setPriority(1);\n/* 131 */ this.connector.start();\n/* */ } \n/* 133 */ String msg = \"Error writing to \" + getName();\n/* 134 */ throw new AppenderLoggingException(msg, ex);\n/* */ } \n/* */ } \n/* */ }", "public abstract void Write(WriteOptions options, WriteBatch updates) throws IOException, BadFormatException, DecodeFailedException;", "@Override\r\n public void flush ()\r\n {\r\n }", "public abstract void write(DataOutput out) throws IOException;", "@DSSink({DSSinkKind.IO})\n @DSSpec(DSCat.IO)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-03 14:59:52.266 -0400\", hash_original_method = \"6659C26B9D2F6D845755120D9E3C542C\", hash_generated_method = \"1D85046399E8D016E013E1B1E96055F2\")\n \n@Override\r\n public void write(byte[] bts, int st, int end) throws IOException {\r\n try {\r\n beforeWrite(end);\r\n out.write(bts, st, end);\r\n afterWrite(end);\r\n } catch (IOException e) {\r\n handleIOException(e);\r\n }\r\n }", "public abstract void writeToStream(DataOutputStream dataOutputStream);", "public void startWrite() throws ThingsException;", "@Override\n public void flushBuffer() throws IOException {\n\n }", "private void doClipWrite(byte b[], int off, int len) {\n\t\tif (count + len <= maxOutputSize) { // won't overflow\n\t\t\tthis.writeDirectly(b, off, len);\n\t\t} else {\n\t\t\tint discardBytes = len + count - maxOutputSize;\n\t\t\tif (len >= maxOutputSize) {\n\t\t\t\treset();\n\t\t\t\tthis.writeDirectly(b, off + len - maxOutputSize, maxOutputSize);\n\t\t\t} else {\n\t\t\t\tint shiftStart = count - maxOutputSize + len;\n\t\t\t\tint remaining = maxOutputSize - len;\n\t\t\t\tSystem.arraycopy(buf, shiftStart, buf, 0, remaining);\n\t\t\t\tcount = remaining;\n\t\t\t\tthis.writeDirectly(b, off, len);\n\t\t\t}\n\t\t\tclipNum ++;\n\t\t\tSystem.out.println(String.format(\"Overflow count: %d, discarded bytes number: %d\", clipNum,\n\t\t\t\t\tdiscardBytes));\n\t\t\t\n\t\t}\n\n\t}", "public void run() {\n\t\twhile(running){\n\t\t\t\n\t\t\tif (!thingsToWrite.isEmpty()){\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tString s = (String) thingsToWrite.get(0);\n\t\t\t\t\tif(s.equals(\"file\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//write \"files\"\n\t\t\t\t\t\toos.writeObject(thingsToWrite.getNRemoveFirst());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//need to wait for synchro //HARDCODED, ideal : 1 command\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//write the dataObject\n\t\t\t\t\t\toos.writeObject(thingsToWrite.getNRemoveFirst());\n\n\t\t\t\t\t\t//need to wait for synchro //HARDCODED, ideal : 1 command\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//write the file\n\t\t\t\t\t\tbyte[] content = ( byte[] )thingsToWrite.getNRemoveFirst();\n\t\t\t\t\t\toos.writeObject(content);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"file Sent\");\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(s.startsWith(\"addRepo\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\toos.writeObject(s);\n\t\t\t\t\t\tthingsToWrite.remove(0);\n\t\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t\toos.writeObject(s);\n\t\t\t\t\t\tthingsToWrite.remove(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch (IOException | InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void onEncodeSerialData(StreamWriter streamWriter) {\n }", "@Override\r\n\tpublic void flush() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void write(Writable key, SolrInputDocument doc)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\ttry {\n\t\t\t\tdocs.add(doc);\n\t\t\t\tif (docs.size() >= batch) {\n\t\t\t\t\tserver.add(docs);\n\t\t\t\t\tdocs.clear();\n\t\t\t\t}\n\t\t\t} catch (SolrServerException e) {\n\t\t\t\tRuntimeException exc = new RuntimeException(e.toString(), e);\n\t\t\t\texc.setStackTrace(e.getStackTrace());\n\t\t\t\tthrow exc;\n\t\t\t}\n\t\t}", "@Override\n public void flush()\n {\n }", "@Override // com.facebook.p447b.p449b.DiskStorage.AbstractC3936b\n /* renamed from: a */\n public void mo27428a(WriterCallback jVar, Object obj) throws IOException {\n try {\n FileOutputStream fileOutputStream = new FileOutputStream(this.f17429a);\n try {\n CountingOutputStream cVar = new CountingOutputStream(fileOutputStream);\n jVar.write(cVar);\n cVar.flush();\n long a = cVar.mo27531a();\n fileOutputStream.close();\n if (this.f17429a.length() != a) {\n throw new C3928d(a, this.f17429a.length());\n }\n } catch (Throwable th) {\n fileOutputStream.close();\n throw th;\n }\n } catch (FileNotFoundException e) {\n DefaultDiskStorage.this.f17417f.mo27388a(CacheErrorLogger.EnumC3922a.WRITE_UPDATE_FILE_NOT_FOUND, DefaultDiskStorage.f17413b, \"updateResource\", e);\n throw e;\n }\n }", "public void flush() {\n writer.flush();\n }", "public void flush()\n/* */ throws IOException\n/* */ {\n/* 833 */ _flushBuffer();\n/* 834 */ if ((this._writer != null) && \n/* 835 */ (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM))) {\n/* 836 */ this._writer.flush();\n/* */ }\n/* */ }", "public void streamWrite(byte[] buffer,int bufferOffset,int nrOfBytes) throws VlException\n {\n if (this instanceof VStreamWritable)\n {\n VStreamWritable wfile = (VStreamWritable) (this);\n OutputStream ostr = wfile.getOutputStream(); // do not append\n\n try\n {\n ostr.write(buffer, bufferOffset, nrOfBytes);\n ostr.flush(); \n ostr.close(); // Close between actions !\n }\n catch (IOException e)\n {\n throw new VlIOException(\"Failed to write to file:\" + this, e);\n }\n }\n else\n {\n throw new nl.uva.vlet.exception.NotImplementedException(\"File type does not support (remote) write access\");\n }\n }", "public void writeTo(OutputStream arg0) throws IOException {\n\t\t\r\n\t}", "public StreamWriter write(byte[] buffer)\r\n {\r\n \t_stream.write(buffer,0,buffer.length);\r\n\t\treturn this;\r\n }", "@Override\n public void write() {\n for(MDCWriter writer : this.writers) {\n writer.write();\n }\n }", "public void write(IORequest request) throws MemoryFault {\n setBaseLimit();\n //sets what we need for the read and write\n // System.out.println(\"[Debug] Base & Limit set\");\n int deviceNumber = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc);\n int platter = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 1);\n int platStart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n int datasize = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 3);\n int memLoc = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 4) + Process_Table[request.prognum].base;\n Process_Table[currentProcess].status = ProcessState.waiting;\n //System.out.println(\"ACC:\" + Process_Table[currentProcess].acc);\n machine.devices[deviceNumber].controlRegister.register[0] = DeviceControllerOperations.WRITE;\n machine.devices[deviceNumber].controlRegister.register[1] = platter;\n machine.devices[deviceNumber].controlRegister.register[2] = platStart;\n machine.devices[deviceNumber].controlRegister.register[3] = datasize;\n // System.out.println(\"[Debug] Registers set\");\n for (int i = 0; i < datasize; i++) {\n machine.devices[deviceNumber].buffer[i] = machine.memory.load(memLoc + i);\n\n\n }\n\n machine.devices[deviceNumber].controlRegister.latch(); // initiate the latch\n }", "protected abstract void sendInternal(ByteBuffer outputBuffer) throws IOException;", "@Override\r\n\tpublic int write() throws Exception {\n\t\treturn 0;\r\n\t}", "public void write( byte[] wBuf, int wOffset, int numToWrite ) throws IOException {\n\t\tif ( (this.currBytes + numToWrite) > this.currSize ) // Yazilmak istenen veri boyutu asiyorsa\n\t\t\tthrow new IOException( \"request to write '\" + numToWrite + \"' bytes exceeds size in header of '\"\n + this.currSize + \"' bytes\" );\n\t\tif ( this.assemLen > 0 ) { // Ikincil tampon\n\t\t\tif ( (this.assemLen + numToWrite ) >= this.recordBuf.length ) {\n\t\t\t\tint aLen = this.recordBuf.length - this.assemLen;\n\t\t\t\tSystem.arraycopy( this.assemBuf, 0, this.recordBuf, 0, this.assemLen ); // Once ikincil tampondan \n\t\t\t\tSystem.arraycopy( wBuf, wOffset, this.recordBuf, this.assemLen, aLen ); // Sonra verilen bytelar yazilir\n\t\t\t\tthis.buffer.writeRecord( this.recordBuf );\n\t\t\t\tthis.currBytes += this.recordBuf.length;\n\t\t\t\twOffset += aLen;\n\t\t\t\tnumToWrite -= aLen;\n\t\t\t\tthis.assemLen = 0;\n\t\t\t\t}\n\t\t\telse // ( (this.assemLen + numToWrite ) < this.recordBuf.length )\n\t\t\t\t{\n\t\t\t\tSystem.arraycopy( wBuf, wOffset, this.assemBuf,\tthis.assemLen, numToWrite );\n\t\t\t\twOffset += numToWrite; // Verilen byte tamamen yazilir\n\t\t\t\tthis.assemLen += numToWrite; \n\t\t\t\tnumToWrite -= numToWrite;\n\t\t\t\t}\n\t\t\t}\n\t\tfor ( ; numToWrite > 0 ; ) { // Simdi ya ikincil tampon bosaldi ya da tum veriler yazildi.\n\t\t\tif ( numToWrite < this.recordBuf.length ) { // Veriler ikincil tampona atilir\n\t\t\t\tSystem.arraycopy( wBuf, wOffset, this.assemBuf, this.assemLen, numToWrite );\n\t\t\t\tthis.assemLen += numToWrite;\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tthis.buffer.writeRecord( wBuf, wOffset ); // Yazilmak istenen veriler kayiti dolduruyorsa tampona yazilir\n\t\t\tlong num = this.recordBuf.length;\n\t\t\tthis.currBytes += num;\n\t\t\tnumToWrite -= num;\n\t\t\twOffset += num;\n\t\t\t}\n\t\t}", "@Override\n public void flush() {\n }", "@Override\n public void flush() {\n }", "@Override\n public void flush() {\n }", "private void concurrencyWrites2() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites2\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans---put[v2]---------------------------commit\");\n\t\t\tlog.info(\"t2-------------------------------------beginTrans---put[v3]----------abort\");\n\t\t\tlog.info(\"main---get[v2]\");\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx11 t1 = new P0Trx11();\n\t\t\tfinal P0Trx12 t2 = new P0Trx12();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl2.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl2.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl2.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites2\");\n\n\t\t\tif (result.length == 1 && result[0] == 2) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void flush() throws SolrServerException, IOException {\n if (adds > 0) {\n Map<Integer, Map<String, SolrInputDocument>> maps = writeBuffers.asMap();\n for (Map.Entry<Integer, Map<String, SolrInputDocument>> entry : maps.entrySet()) {\n if (entry.getValue().size() > 0) {\n delegateWriter.add(entry.getKey(), ImmutableMap.copyOf(entry.getValue()));\n }\n }\n docOutputCounter.increment(adds);\n docBatchCounter.increment(1L);\n adds = 0;\n writeBuffers.invalidateAll();\n }\n }", "public void writeFile(ByteBuffer buf, int len, int pos, long offset,\n\t\t\tboolean propigate) throws java.io.IOException, DataArchivedException {\n\n\t\tif (SDFSLogger.isDebug()) {\n\t\t\tSDFSLogger.getLog().debug(\n\t\t\t\t\t\"fc writing \" + df.getMetaFile().getPath() + \" at \"\n\t\t\t\t\t\t\t+ offset + \" \" + buf.capacity() + \" bytes len=\"\n\t\t\t\t\t\t\t+ len + \" pos=\" + pos);\n\t\t\tif (df.getMetaFile().getPath().endsWith(\".vmx\")\n\t\t\t\t\t|| df.getMetaFile().getPath().endsWith(\".vmx~\")) {\n\t\t\t\tbyte[] _zb = new byte[len];\n\t\t\t\tbuf.get(_zb);\n\n\t\t\t\tSDFSLogger.getLog().debug(\n\t\t\t\t\t\t\"###### In fc Text of VMX=\"\n\t\t\t\t\t\t\t\t+ df.getMetaFile().getPath() + \"=\"\n\t\t\t\t\t\t\t\t+ new String(_zb, \"UTF-8\"));\n\t\t\t}\n\t\t}\n\t\tLock l = df.getReadLock();\n\t\tl.lock();\n\t\ttry {\n\t\t\tbuf.position(pos);\n\t\t\tthis.writtenTo = true;\n\t\t\tlong _cp = offset;\n\t\t\t// ByteBuffer buf = ByteBuffer.wrap(bbuf, pos, len);\n\t\t\tint bytesLeft = len;\n\t\t\tint write = 0;\n\t\t\twhile (bytesLeft > 0) {\n\t\t\t\t// Check to see if we need a new Write buffer\n\t\t\t\t// WritableCacheBuffer writeBuffer = df.getWriteBuffer(_cp);\n\t\t\t\t// Find out where to write to in the buffer\n\t\t\t\tDedupChunkInterface writeBuffer = null;\n\t\t\t\tlong filePos = df.getChuckPosition(_cp);\n\t\t\t\tint startPos = (int) (_cp - filePos);\n\t\t\t\tif (startPos < 0)\n\t\t\t\t\tSDFSLogger.getLog().fatal(\"Error \" + _cp + \" \" + filePos);\n\t\t\t\t// Find out how many total bytes there are left to write in\n\t\t\t\t// this\n\t\t\t\t// loop\n\n\t\t\t\tint _len = Main.CHUNK_LENGTH - startPos;\n\t\t\t\tif (bytesLeft < _len)\n\t\t\t\t\t_len = bytesLeft;\n\t\t\t\t/*\n\t\t\t\t * if (_len == Main.CHUNK_LENGTH) newBuf = true;\n\t\t\t\t */\n\n\t\t\t\tbyte[] b = new byte[_len];\n\t\t\t\ttry {\n\t\t\t\t\tbuf.get(b);\n\t\t\t\t} catch (java.nio.BufferUnderflowException e) {\n\t\t\t\t\tbuf.get(b, 0, buf.capacity() - buf.position());\n\t\t\t\t\tSDFSLogger.getLog().error(\n\t\t\t\t\t\t\t\"buffer underflow getting \"\n\t\t\t\t\t\t\t\t\t+ (buf.capacity() - buf.position())\n\t\t\t\t\t\t\t\t\t+ \" instead of \" + _len);\n\t\t\t\t}\n\t\t\t\twhile (writeBuffer == null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\twriteBuffer = df.getWriteBuffer(filePos);\n\t\t\t\t\t\t\twriteBuffer.write(b, startPos);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (_len != Main.CHUNK_LENGTH && propigate\n\t\t\t\t\t\t\t\t&& df.getMetaFile().getDev() != null) {\n\t\t\t\t\t\t\teventBus.post(new BlockDeviceSmallWriteEvent(df\n\t\t\t\t\t\t\t\t\t.getMetaFile().getDev(),\n\t\t\t\t\t\t\t\t\tByteBuffer.wrap(b), filePos + startPos,\n\t\t\t\t\t\t\t\t\t_len));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (Main.volume.isClustered())\n\t\t\t\t\t\t\twriteBuffer.flush();\n\t\t\t\t\t} catch (BufferClosedException e) {\n\t\t\t\t\t\tif (SDFSLogger.isDebug())\n\t\t\t\t\t\t\tSDFSLogger.getLog().debug(\"trying to write again\");\n\t\t\t\t\t\twriteBuffer = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_cp = _cp + _len;\n\t\t\t\tbytesLeft = bytesLeft - _len;\n\t\t\t\twrite = write + _len;\n\t\t\t\tthis.currentPosition = _cp;\n\t\t\t\tif (_cp > df.getMetaFile().length()) {\n\t\t\t\t\tdf.getMetaFile().setLength(_cp, false);\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch(DataArchivedException e) {\n\t\t\tif(Main.checkArchiveOnRead) {\n\t\t\t\tSDFSLogger.getLog().warn(\"Archived data found in \"+ df.getMetaFile().getPath()+ \" at \" + pos + \". Recovering data from archive. This may take up to 4 hours\");\n\t\t\t\tthis.recoverArchives();\n\t\t\t\tthis.writeFile(buf, len, pos, offset, propigate);\n\t\t\t}\n\t\t\telse throw e;\n\t\t}catch (FileClosedException e) {\n\t\t\tSDFSLogger.getLog()\n\t\t\t\t\t.warn(df.getMetaFile().getPath()\n\t\t\t\t\t\t\t+ \" is closed but still writing\");\n\t\t\tthis.closeLock.lock();\n\t\t\ttry {\n\t\t\t\tdf.registerChannel(this);\n\t\t\t\tthis.closed = false;\n\t\t\t\tthis.writeFile(buf, len, pos, offset, propigate);\n\t\t\t} finally {\n\t\t\t\tthis.closeLock.unlock();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSDFSLogger.getLog().fatal(\n\t\t\t\t\t\"error while writing to \" + this.df.getMetaFile().getPath()\n\t\t\t\t\t\t\t+ \" \" + e.toString(), e);\n\t\t\tMain.volume.addWriteError();\n\t\t\tthrow new IOException(\"error while writing to \"\n\t\t\t\t\t+ this.df.getMetaFile().getPath() + \" \" + e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdf.getMetaFile().setLastModified(System.currentTimeMillis());\n\t\t\t} catch (Exception e) {\n\t\t\t}\n\t\t\tl.unlock();\n\t\t}\n\t}", "@Override\r\n\tpublic void flush() {\n\t}", "@Override\n\tpublic void flush() {\n\t}", "public void writeTo(OutputStream os) throws IOException, MessagingException {\n/* 96 */ LineOutputStream los = null;\n/* 97 */ if (os instanceof LineOutputStream) {\n/* 98 */ los = (LineOutputStream)os;\n/* */ } else {\n/* 100 */ los = new LineOutputStream(os);\n/* */ } \n/* */ \n/* */ \n/* 104 */ Enumeration hdrLines = getAllHeaderLines();\n/* 105 */ while (hdrLines.hasMoreElements()) {\n/* 106 */ los.writeln(hdrLines.nextElement());\n/* */ }\n/* */ \n/* 109 */ los.writeln();\n/* */ \n/* */ \n/* 112 */ getDataHandler().writeTo(os);\n/* 113 */ os.flush();\n/* */ }", "void flush() throws IOException;", "void flush() throws IOException;", "void flush() throws IOException;", "@Override\n protected void sendBuffer(byte[] buffer) {\n final UsbSerialDriver serialDriver = serialDriverRef.get();\n if (serialDriver != null) {\n try {\n serialDriver.write(buffer, 500);\n } catch (IOException e) {\n Log.e(TAG, \"Error Sending: \" + e.getMessage(), e);\n }\n }\n }", "public void setOutputStream(DataOutputStream dos) {\n this.careuOutputStream= dos;\n }", "public void write(OutputStream arg0) throws IOException {\n\n\t}" ]
[ "0.650586", "0.6498174", "0.6319882", "0.6145904", "0.57974154", "0.57644093", "0.57384896", "0.5661174", "0.5630341", "0.5612029", "0.5589465", "0.5579456", "0.55554384", "0.5536003", "0.55268085", "0.55194825", "0.546318", "0.5413329", "0.5374954", "0.53609014", "0.5349518", "0.534703", "0.5337729", "0.53250194", "0.53244364", "0.53121823", "0.53076714", "0.53025407", "0.5286895", "0.5280637", "0.5280637", "0.5280637", "0.5280637", "0.5280637", "0.5280637", "0.5280637", "0.5280637", "0.5265259", "0.5265259", "0.5265259", "0.5265259", "0.52627206", "0.5254604", "0.5243074", "0.52419144", "0.523964", "0.523791", "0.5235149", "0.52182996", "0.5202364", "0.52009344", "0.5190632", "0.51851255", "0.51851255", "0.51851255", "0.51851255", "0.51828164", "0.5180837", "0.51710063", "0.5153883", "0.51499206", "0.51494914", "0.51451427", "0.51394534", "0.5134098", "0.51340216", "0.5127009", "0.5123997", "0.5120244", "0.511508", "0.5103997", "0.5103846", "0.50989044", "0.5098417", "0.50940126", "0.5089675", "0.50863165", "0.50852346", "0.5083667", "0.5081441", "0.50798595", "0.5078481", "0.50682694", "0.506738", "0.50603694", "0.50603694", "0.50603694", "0.505816", "0.50475156", "0.5036446", "0.5035219", "0.50316715", "0.501832", "0.50182295", "0.50182295", "0.50182295", "0.50150967", "0.5014677", "0.5013278" ]
0.648368
3
Performs the read action on sc The convention is that both buffers are in writemode before the call to doRead and after the call
public void doRead() throws IOException { if (sc.read(bbin) == -1) { closed = true; } processIn(); updateInterestOps(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readSysCall() {\n read = false;\n clientChannel.read(readBuffer, this, readCompletionHandler);\n }", "public void doReads(Reader reader) throws IOException;", "private void doRead() throws IOException {\n\t\t\tvar res = sc.read(bb);\n\n\t\t\tif ( res == -1 ) {\n\t\t\t\tlogger.info(\"Connection closed with the client.\");\n\t\t\t\tclosed = true;\n\t\t\t}\n\n\t\t\tupdateInterestOps();\n\t\t}", "void read(Buffer buffer);", "public void read() {\n\t\tthis.isRead = true;\n\t}", "protected void doBeginRead() throws Exception {}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "@Override\n public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n state = State.CLOSED;\n }\n processIn();\n updateInterestOps();\n }", "int doReadChars(TclObject obj, int toRead)\n throws IOException {\n final boolean debug = false;\n ChannelBuffer buf;\n int copied, copiedNow, result;\n IntPtr offset = new IntPtr();\n\n if (encoding == null) {\n TclByteArray.setLength(null, obj, 0);\n } else {\n TclString.empty(obj);\n }\n offset.i = 0;\n\n // if toRead is negative, read until EOF\n if (toRead < 0) {\n toRead = Integer.MAX_VALUE;\n }\n\n done: {\n for (copied = 0; toRead > 0; ) {\n copiedNow = -1;\n if (inQueueHead != null) {\n if (encoding == null) {\n if (debug) { System.out.println(\"calling readBytes \" + toRead); }\n copiedNow = readBytes(obj, toRead, offset);\n } else {\n if (debug) { System.out.println(\"calling readChars \" + toRead); }\n copiedNow = readChars(obj, toRead);\n }\n\n // If the current buffer is empty recycle it.\n\n buf = inQueueHead;\n if (debug) {\n System.out.println(\"after read* buf.nextRemoved is \" + buf.nextRemoved);\n System.out.println(\"after read* buf.nextAdded is \" + buf.nextAdded);\n }\n if (buf.nextRemoved == buf.nextAdded) {\n if (debug) { System.out.println(\"recycling empty buffer\"); }\n ChannelBuffer next;\n\n next = buf.next;\n recycleBuffer(buf, false);\n inQueueHead = next;\n if (next == null) {\n if (debug) { System.out.println(\"inQueueTail set to null\"); }\n inQueueTail = null;\n } else {\n if (debug) { System.out.println(\"inQueueTail is not null\"); }\n }\n }\n }\n if (copiedNow < 0) {\n\t\t if (debug) { System.out.println(\"copiedNow < 0\"); }\n if (eofCond) {\n if (debug) { System.out.println(\"eofCond\"); }\n break;\n }\n if (blocked) {\n if (debug) { System.out.println(\"blocked\"); }\n if (!blocking) {\n break;\n }\n blocked = false;\n }\n result = getInput();\n if (result != 0) {\n if (debug) { System.out.println(\"non-zero result\"); }\n if (result == TclPosixException.EAGAIN) {\n break;\n }\n copied = -1;\n break done; //goto done\n }\n } else {\n copied += copiedNow;\n if (debug) { System.out.println(\"copied incremented to \" + copied); }\n toRead -= copiedNow;\n if (debug) { System.out.println(\"toRead decremented to \" + toRead); }\n }\n }\n\n blocked = false;\n\n if (encoding == null) {\n TclByteArray.setLength(null, obj, offset.i);\n if (debug) {\n System.out.println(\"set byte array length to \" + offset.i);\n }\n }\n } // end done: block\n\n //done:\n updateInterest();\n\n obj.invalidateStringRep();\n String srep = obj.toString();\n\n if (debug) {\n System.out.println(\"returning copied = \" + copied);\n System.out.println(\"returning string \\\"\" + srep + \"\\\"\");\n }\n\n if (copied > 0) {\n int len = srep.length();\n if (len != copied) {\n throw new TclRuntimeError(\"copied \" + copied +\n \" != \" + len);\n }\n } else {\n if (! srep.equals(\"\")) {\n throw new TclRuntimeError(\"expected empty TclObject result\" +\n \" since copied is \" + copied);\n }\n }\n\n return copied;\n }", "public void readSampless(){\n\t\tif (loop) {\n\t\t\treadBytesLoop();\n\t\t} else {\n\t\t\treadBytes();\n\t\t}\n\t\t// convert them to floating point\n\t\t// hand those arrays to our effect\n\t\t// and convert back to bytes\n\t\tprocess();\n\t\t\n\t\t// write to the line.\n\t\twriteBytes();\n\t\t// send samples to the listener\n\t\t// these will be what we just put into the line\n\t\t// which means they should be pretty well sync'd\n\t\t// with the audible result\n\t\tbroadcast();\n\t}", "public void read() {\n\t\tthis.jtfSoundReaderServ = new JtfSoundReaderServ(this.audioFormat, this.targetDataLine);\n\t\tthis.readerThread = new Thread(this.jtfSoundReaderServ);\n\t\tthis.readerThread.start();\n\t}", "abstract void read();", "private void readSerial() {\r\n\t\twhile(myPort.available() > 0) {\r\n\t\t\tbyte[] newBuffer = new byte[512];\r\n\t\t\tint n = myPort.readBytes(newBuffer);\r\n\t\t\tnewBuffer = PApplet.subset(newBuffer,0,n);\r\n\t\t\tif(debug) System.out.println(\"readSerial() reads in \"+n+\" bytes\");\r\n\t\t\tif(newBuffer != null) {\r\n\t\t\t\tinBuffer = PApplet.concat(inBuffer, newBuffer);\r\n\t\t\t\tif(inBuffer.length > 0) checkBuffer();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void read ();", "Read createRead();", "@Override\r\n\tpublic void read() {\n\r\n\t}", "@Override\n\tpublic void read() {\n\n\t}", "public static void testBuffer() throws Exception {\n\t\tStopwatch.start();\n\t\t// readWithoutBuffer(new FileInputStream(\"bigdata\"));\n\t\tStopwatch.stop();\n\n\t\t/*\n\t\t * When read a single byte(or small piece of data), BufferedInputStream\n\t\t * improve performance significantly\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\t\t\n\t\t/*\n\t\t * When read a single byte(or small piece of data), BufferedInputStream\n\t\t * improve performance significantly\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBufferEnhanced(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\n\t\t/*\n\t\t * When read a chunk at a time, BufferedInputStream won't help\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer2(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\t\t\n\t\t/*\n\t\t * NIO way, same as chunk read \n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer3(new RandomAccessFile(\"bigdata.data\", \"r\").getChannel());\n\t\tStopwatch.stop();\n\t}", "@Override\n public int read(byte[] outBuf, int bufferBytePos, int len) throws EhcacheStreamException {\n checkIfOpen();\n\n // activeStreamMaster could be null here if there was no entry in cache in the first place...\n if(null == activeStreamMaster) {\n return -1;\n }\n\n //because we didn't increment the reader count, we need to check the cache to see if anything has changed since being open\n //And since we're not really atomic anyway (since we didn't lock anything in the open()), a simple get and compare would do i think...\n //overall, let's compare if the cache entry has not been written since we opened (the lastWritten bit would have changed)\n EhcacheStreamMaster currentStreamMaster = getEhcacheStreamUtils().getStreamMasterFromCache(getPublicCacheKey());\n boolean isWeaklyConsistent =\n currentStreamMaster != null &&\n currentStreamMaster.getChunkCount() == activeStreamMaster.getChunkCount() &&\n currentStreamMaster.getLastWrittenTime() == activeStreamMaster.getLastWrittenTime();\n\n if(!isWeaklyConsistent)\n throw new EhcacheStreamIllegalStateException(\"Concurrent modification exception: EhcacheStreamMaster has changed since opening: a concurrent write must have happened. Consider retrying in a bit.\");\n\n try {\n // copy the cache chunks into the buffer based on the internal index tracker\n return read1(outBuf, bufferBytePos, len);\n } catch (EhcacheStreamIllegalStateException exc){\n throw new EhcacheStreamIllegalStateException(String.format(\"Could not read the cache chunk. Current StreamMaster[=%s]\", EhcacheStreamUtilsInternal.toStringSafe(activeStreamMaster)), exc);\n }\n }", "public void ownRead();", "private static void read(SelectionKey key) throws IOException {\r\n\t\t// socket def. has something to say (not 0). But may be -1\r\n\t\t\r\n\t\tSocketChannel sc = (SocketChannel) key.channel();\r\n\t\tByteBuffer buf = ByteBuffer.allocateDirect(1024);\r\n\t\t\r\n\t\t// READ data fom channel into buf\r\n\t\t// CHANNEL--read--> --write-->BUF\r\n\t\tint read = sc.read(buf);\r\n\t\tif(read == -1) {\r\n\t\t\tpendingData.remove(sc);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// Note: We do not need to check for read == 0, since this would not have been called if\r\n\t\t// there was no data to read (or the socket had closed)\r\n\r\n\t\t// PREPARE FOR READING from BUF into CHANNEL\r\n\t\t\r\n\t\t// set BUF into WRITE mode\r\n\t\t// e.g.: sets the limit to 'max read position' and set position to 0\r\n\t\tbuf.flip();\r\n\t\t\r\n\t\t// BUF--read--> <PROCESS-DATA> --write-->BUF\r\n\t\tfor(int i = 0; i < buf.limit(); ++i)\r\n\t\t\tbuf.put(i, (byte) Util.switchCase(buf.get(i)));\r\n\t\t\r\n\t\t// note: We only want to write once socket is ready for writing\r\n\t\t// therefore instead make a queue of data to written onto\r\n\t\t// this socket\r\n\t\t//socket.write(buf);\r\n\t\t\t\t\r\n\t\t// save processed data until selector says channel is ready for WRITING\r\n\t\tpendingData.get(sc).add(buf);\r\n\t\t\r\n\t\t// Let selector know we want to know when socket is ready to \r\n\t\t// have pending data written\r\n\t\tsc.register(key.selector(), SelectionKey.OP_WRITE);\r\n\t\t\r\n\t\t// NOTE: For the SocketChannel sc, multiple calls to \r\n\t\t// IOServerTest6.read() may have been before it is ready to be\r\n\t\t// written to. Therefore, this is why we use an ordered Collection\r\n\t\t// (like a FIFO Queue or LinkedList) to store pending writes, so\r\n\t\t// that they are written back to SocketChannel in the correct order.\t\t\r\n\t}", "public synchronized void beginRead() {\n\t\tSystem.out.println(\"READER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint readTurn = currentTurn;\n\t\tcurrentTurn++;\n\t\t\n\t\twhile(readTurn!=nextTurn || numWriters > 0 ){\n\t\t\ttry {\n//\t\t\t\tSystem.out.println(\"READER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\twait();\n//\t\t\t\tSystem.out.println(\"READER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//number of readers at front of the queue\n\t\t//(unblocked reader)\n\t\tnumReaders ++;\n\n\t}", "@Override public int read(char[] cbuf, int off, int len) throws IOException {\r\n\t\tif (off < 0 || len < 0 || off + len > cbuf.length) throw new IndexOutOfBoundsException();\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tint r = -1;\r\n\t\twhile (r == -1){\r\n\t\t\tReader in = getCurrentReader();\r\n\t\t\tif (in == null){\r\n\t\t\t\tif (doneAddingReaders) return -1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (InterruptedException iox){\r\n\t\t\t\t\tthrow new IOException(\"Interrupted\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr = in.read(cbuf, off, len);\r\n\t\t\t\tif (r == -1) advanceToNextReader();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "private void ensureRead() throws IOException, BadDescriptorException {\n if (reading) return;\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }", "public void read(IORequest request) throws MemoryFault {\n setBaseLimit();\n // sets what we need to be able to read\n int deviceNumber = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc);\n int platter = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 1);\n int platStart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n int datasize = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 3);\n int memLoc = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 4) + Process_Table[request.prognum].base;\n// System.out.println(deviceNumber+\"device\");\n// System.out.println(platter+\"plat\");\n// System.out.println(platStart+\"Start\");\n// System.out.println(datasize+\"data\");\n// System.out.println(memLoc+\"mem\");\n\n Process_Table[currentProcess].status = ProcessState.waiting;\n\n machine.devices[deviceNumber].controlRegister.register[0] = DeviceControllerOperations.READ;\n machine.devices[deviceNumber].controlRegister.register[1] = platter;\n machine.devices[deviceNumber].controlRegister.register[2] = platStart;\n machine.devices[deviceNumber].controlRegister.register[3] = datasize;\n machine.devices[deviceNumber].controlRegister.latch();\n for (int i = 0; i < datasize; i++) {\n machine.memory.store(i + memLoc, machine.devices[deviceNumber].buffer[i]);\n\n }\n //System.out.println(waitQ[Machine.DISK1].size() + \" READ\");\n // initiate the latch\n\n }", "abstract void onReadable();", "private void read(){\n try {\n if (c != -1) c = r.read();\n } catch (IOException e){\n throw new IOError(e);\n }\n }", "@Override\r\n\tpublic void reading() {\n\t\tSystem.out.println(\"reading\");\r\n\t}", "@Override\r\n\tpublic void read(IByteBuffer source, long offset) {\n\r\n\t}", "public synchronized int read() throws InterruptedException\n {\n while (bufferEmpty(\"Consumer\"))\n {\n // Console.println(\"Consumer\" + \" Waiting on Buffer\");\n\n this.wait();\n\n // bufferEmpty = bufferEmpty(\"Consumer\");\n }\n\n int out = theBuffer;\n // Console.println(\"Consumer reading \" + out + \" from Buffer\");\n theBuffer = 0;\n this.notify();\n\n return out;\n }", "@Override\n public void run() {\n try {\n\n byte[] data = new byte[TcpClient.BUFFER_SIZE * 2];\n\n while(!Rebroadcaster.INSTANCE.isHalted()) {\n int len = is.read(data, 0, data.length);\n os.write(data, 0, len);\n os.flush();\n }\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "public void readSerial() {\r\n rightShoe.getSerialReader().stopRead();\r\n leftShoe.getSerialReader().stopRead();\r\n rightShoe.getSerialReader().closePort();\r\n leftShoe.getSerialReader().closePort();\r\n timeController.initializeSerial();\r\n }", "public int read(byte[] r10, int r11, int r12) throws java.io.IOException {\n /*\n r9 = this;\n r8 = 1;\n r3 = 0;\n r4 = r11 + r12;\n r5 = r10.length;\n com.google.common.base.Preconditions.checkPositionIndexes(r11, r4, r5);\n if (r12 != 0) goto L_0x000c;\n L_0x000a:\n r2 = r3;\n L_0x000b:\n return r2;\n L_0x000c:\n r2 = 0;\n r0 = r9.endOfInput;\n L_0x000f:\n r4 = r9.draining;\n if (r4 == 0) goto L_0x002d;\n L_0x0013:\n r4 = r11 + r2;\n r5 = r12 - r2;\n r4 = r9.drain(r10, r4, r5);\n r2 = r2 + r4;\n if (r2 == r12) goto L_0x0022;\n L_0x001e:\n r4 = r9.doneFlushing;\n if (r4 == 0) goto L_0x0026;\n L_0x0022:\n if (r2 > 0) goto L_0x000b;\n L_0x0024:\n r2 = -1;\n goto L_0x000b;\n L_0x0026:\n r9.draining = r3;\n r4 = r9.byteBuffer;\n r4.clear();\n L_0x002d:\n r4 = r9.doneFlushing;\n if (r4 == 0) goto L_0x003d;\n L_0x0031:\n r1 = java.nio.charset.CoderResult.UNDERFLOW;\n L_0x0033:\n r4 = r1.isOverflow();\n if (r4 == 0) goto L_0x0055;\n L_0x0039:\n r9.startDraining(r8);\n goto L_0x000f;\n L_0x003d:\n if (r0 == 0) goto L_0x0048;\n L_0x003f:\n r4 = r9.encoder;\n r5 = r9.byteBuffer;\n r1 = r4.flush(r5);\n goto L_0x0033;\n L_0x0048:\n r4 = r9.encoder;\n r5 = r9.charBuffer;\n r6 = r9.byteBuffer;\n r7 = r9.endOfInput;\n r1 = r4.encode(r5, r6, r7);\n goto L_0x0033;\n L_0x0055:\n r4 = r1.isUnderflow();\n if (r4 == 0) goto L_0x006d;\n L_0x005b:\n if (r0 == 0) goto L_0x0063;\n L_0x005d:\n r9.doneFlushing = r8;\n r9.startDraining(r3);\n goto L_0x000f;\n L_0x0063:\n r4 = r9.endOfInput;\n if (r4 == 0) goto L_0x0069;\n L_0x0067:\n r0 = 1;\n goto L_0x002d;\n L_0x0069:\n r9.readMoreChars();\n goto L_0x002d;\n L_0x006d:\n r4 = r1.isError();\n if (r4 == 0) goto L_0x002d;\n L_0x0073:\n r1.throwException();\n r2 = r3;\n goto L_0x000b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.common.io.ReaderInputStream.read(byte[], int, int):int\");\n }", "public void setRead(){\n \tthis.isRead = true;\n }", "public void releaseReadIOBuffer(byte[] buf)\n/* */ {\n/* 207 */ if (buf != null)\n/* */ {\n/* */ \n/* */ \n/* 211 */ _verifyRelease(buf, this._readIOBuffer);\n/* 212 */ this._readIOBuffer = null;\n/* 213 */ this._bufferRecycler.releaseByteBuffer(0, buf);\n/* */ }\n/* */ }", "public synchronized void mProcessSerial(){ //170927 Returns array of data received from serial RX they are also put on receive buffer\n for (int loop=0;loop<oTXFIFO.nBytesAvail;loop++){\n if (oTXFIFO.mCanPop(1)==false) break; //Send FIFO data to serial output stream\n int byB=oTXFIFO.mFIFOpop();\n mWriteByte(oOutput, (byte) byB);\n }\n byte[] aBytes = mReadBytes(oInput);\n if (aBytes==null) return ;\n for (int i=0;i<aBytes.length;i++){ //Loop through buffer and transfer from input stream to FIFO buffer //+170601 revised from while loop to avoid endless loop\n if (oRXFIFO.mCanPush()){\n oRXFIFO.mFIFOpush(aBytes[i]); //Put the data on the fifo\n }\n else\n {\n mStateSet(cKonst.eSerial.kOverflow);\n nDataRcvd=-1;\n }\n }\n }", "boolean getRead();", "private void ensureReadNonBuffered() throws IOException, BadDescriptorException {\n if (reading) {\n if (buffer.hasRemaining()) {\n Ruby localRuntime = getRuntime();\n if (localRuntime != null) {\n throw localRuntime.newIOError(\"sysread for buffered IO\");\n } else {\n throw new IOException(\"sysread for buffered IO\");\n }\n }\n } else {\n // libc flushes writes on any read from the actual file, so we flush here\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }\n }", "public void setBuffering() {\n try {\n doc = StaxUtils.read(stream);\n stream = null;\n } catch (XMLStreamException e) {\n throw new Fault(e); \n }\n }", "@VisibleForTesting\n static int drainBuffer(BufferedReader br, StringBuffer storageBuf, int maxLength, int bytesRead, boolean readAll)\n throws IOException {\n int bReadSession = 0;\n int chunkSize = 1024;\n if (br.ready()) {\n char[] buf = new char[1024];\n int bReadCurrent;\n boolean wantsToReadFurther;\n do {\n bReadCurrent = br.read(buf, 0, chunkSize);\n if (storageBuf != null && bytesRead < maxLength && bReadCurrent != -1) {\n storageBuf.append(buf, 0, bReadCurrent);\n }\n if (bReadCurrent != -1) {\n bReadSession += bReadCurrent;\n }\n wantsToReadFurther = bReadCurrent != -1 && (readAll || bReadCurrent == chunkSize);\n } while (br.ready() && wantsToReadFurther);\n }\n return bReadSession;\n }", "public synchronized List getBufferForReading() {\n// if some writer is writing, wait until no writer is writing \n while (readerNumber < 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber >= 0 \n readerNumber++;\n return buffer;\n }", "@Override public void run()\n\t\t{\n\t\t\twhile (mutex)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\");\n\t\t\t}\n\t\t\tmutex = true; \n\t\t\treadCount++;\n\t\t\tif (readCount == 1)\n\t\t\t{\n\t\t\twrt = true; // Locking writer when reader is active\n\t\t\t}\n\t\t\tmutex = false;\n\t\t\t// Critical Section \n\t\t\ttry {\n\t\t\t\t\tFile myObj = new File(\"shared.txt\"); \n\t\t\t\t\tScanner myReader = new Scanner(myObj); \n\t\t\t\t\tString data = myReader.nextLine(); \n\t\t\t\t\tSystem.out.println(\"Reading: \" + data); \n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e){}\n\n\t\t\t// Leave Critical section\n\t\t\twhile (mutex) { System.out.print(\"\"); } mutex = true;\n\t\t\treadCount--;\n\t\t\tif (readCount == 0) \n\t\t\t{\n\t\t\t\twrt = false; // Unlocking writer if all reading process is done.\n\t\t\t}\n\t\t\tmutex = false;\n\t\t}", "void read(StreamOption streamOpt);", "@Override\n\tpublic void readBourse(Bourse brs) {\n\t\t\n\t}", "private DFEVar[][] createBuffer(DFEVector<DFEVar> reference,\n\t\t\t DFEVar writeEnable,\n\t\t\t DFEVar[] writeAddress,\n\t\t\t DFEVar[] readAddress1,\n\t\t\t DFEVar[] readAddress2,\n\t\t\t DFEVar whichBuffer,\n\t\t\t int cyclesToReadAhead)\n\t{\n\t\tDFEVar[][] bufferOutput = new DFEVar[m_scalars.blockSize][m_scalars.blockSize + m_scalars.numPipes - 1];\n\t\tfor (int i = 0; i < m_scalars.blockSize; i++) {\n\t\t\tRamPortParams<DFEVector<DFEVar>> writePort = mem.makeRamPortParams(RamPortMode.WRITE_ONLY, writeAddress[0], reference.getType())\n\t\t\t .withDataIn(reference)\n .withWriteEnable((writeAddress[1] === i) & writeEnable);\n\n\t\t\tRamPortParams<DFEVector<DFEVar>> readPort1 = mem.makeRamPortParams(RamPortMode.READ_ONLY, readAddress1[i], reference.getType());\n\t\t\tRamPortParams<DFEVector<DFEVar>> readPort2 = mem.makeRamPortParams(RamPortMode.READ_ONLY, readAddress2[i], reference.getType());\n\n\t\t\tDFEVector<DFEVar> ram1 = mem.ramDualPort(m_scalars.bufferDepth, RamWriteMode.READ_FIRST, writePort, readPort1).getOutputB();\n\t\t\tDFEVector<DFEVar> ram2 = mem.ramDualPort(m_scalars.bufferDepth, RamWriteMode.READ_FIRST, writePort, readPort2).getOutputB();\n\n\t\t\tfor (int j = 0; j < cyclesToReadAhead; j++) {\n\t\t\t\tDFEVector<DFEVar> temp = whichBuffer ? stream.offset(ram2, j - cyclesToReadAhead + 1) : stream.offset(ram1, j - cyclesToReadAhead + 1);\n\t\t\t\tfor (int k = 0; k < m_scalars.numPipes; k++) {\n\t\t\t\t\tif (j * m_scalars.numPipes + k < bufferOutput[0].length) {\n\t\t\t\t\t\tbufferOutput[i][j * m_scalars.numPipes + k] = temp[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn bufferOutput;\n\t}", "boolean isUsedForReading();", "private void readData()\n {\n while(System.currentTimeMillis() - start <= durationMillis)\n {\n counters.numRequested.incrementAndGet();\n readRate.acquire();\n\n if (state.get() == SimulationState.TEARING_DOWN)\n break;\n }\n }", "private void readIt() throws IOException, InterruptedException\n {\n //resets the buffer and reads from it\n outVideo.println(\"==>\");\n outVideo.flush();\n if(!initializationMode)\n while (!inKeyboard.ready())\n {\n Thread.sleep(50);\n }\n msgIN = inKeyboard.readLine();\n }", "protected BiFunction<SelectionKey, Integer, Runnable> onReading() {\n return readable;\n }", "@Override\n\t\tpublic void readyToRead(Vector<byte[]> outQ) {\n\t\t\t\n\t\t}", "protected void readImpl(@NotNull final ByteBuffer buffer) {\n }", "@Override\n\tpublic void readCB(CB cb) {\n\t\t\n\t}", "public abstract void read0(int aPosition, PageIOStream aStream);", "public void sensorReader() {\n try {\n Log.i(TAG, \"wants to read from Arduino\");\n this.inputStream = socket.getInputStream();\n this.inputStreamReader = new InputStreamReader(inputStream);\n Log.i(TAG, \"inputstream ready\");\n this.bufferedReader = new BufferedReader(inputStreamReader);\n Log.i(TAG, \"buffered reader ready\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void read( int readIndex, byte[] array, int firstIndex,\n\t\t\tint count );", "public abstract void read(DataInput input) throws IOException;", "public void doRead(ClientChatos client, SelectionKey key) throws IOException {\n\t\tif (sc.read(bbin) == -1) {\n\t\t\tlogger.info(\"read raté\");\n\t\t\tclosed = true;\n\t\t}\n\t\tprocessIn(client, key);\n\t\tupdateInterestOps();\n\t}", "public void processStreamInput() {\n }", "public void returnBuffer(byte[] current, boolean cdrStr)\n {\n if (current != null)\n {\n int log_curr = calcLog(current.length);\n \n if( log_curr >= MIN_CACHE)\n {\n if( log_curr > maxManagedBufferSize )\n {\n synchronized(this)\n {\n // Only cache if CDROutputStream is called, cache is enabled &\n // the new value is > than the cached value.\n if (cdrStr &&\n (time >= 0 &&\n (bufferMax == null || bufferMax.length < current.length)))\n {\n bufferMax = current;\n }\n return;\n }\n }\n \n int expected = (1 << log_curr + 1) - 1;\n if (current.length != expected)\n {\n if (logger.isWarnEnabled())\n {\n logger.warn (\"BufferManager.returnBuffer, log = \" + log_curr +\n \" got length \" +\n Integer.toHexString (current.length) +\n \" expected length \" +\n Integer.toHexString (expected));\n }\n }\n else\n {\n final Collection s = bufferPool[ log_curr-MIN_CACHE ];\n doReturnBuffer(s, current, threshold);\n }\n }\n }\n }", "public abstract void endRead(boolean restart);", "@Override\n\tpublic synchronized int read(char[] cbuf, int off, int len)\n\t\t\tthrows IOException {\n\t\tint read = 0;\n\t\tint rightChunkLength = Math.min(m_queue.length - m_queuePosition,\n\t\t\t\tm_queueLength);\n\t\tint charsToRead = Math.min(rightChunkLength, len);\n\t\tif (charsToRead > 0) {\n\t\t\tSystem.arraycopy(m_queue, m_queuePosition, cbuf, off, charsToRead);\n\t\t\tread += charsToRead;\n\t\t\tlen -= charsToRead;\n\n\t\t\tm_queuePosition = (m_queuePosition + charsToRead) % m_queue.length;\n\t\t\tm_queueLength -= charsToRead;\n\t\t}\n\n\t\t// feel free to try the left chunk too:\n\t\tif (len > 0 && m_queueLength > 0) {\n\t\t\tint leftChunkLength = m_queueLength;\n\t\t\tcharsToRead = Math.min(leftChunkLength, len);\n\t\t\tif (charsToRead > 0) {\n\t\t\t\tSystem.arraycopy(m_queue, 0, cbuf, off + read, charsToRead);\n\t\t\t\tread += charsToRead;\n\t\t\t\tlen -= charsToRead;\n\t\t\t\tm_queuePosition = (m_queuePosition + charsToRead)\n\t\t\t\t\t\t% m_queue.length;\n\t\t\t\tm_queueLength -= charsToRead;\n\t\t\t}\n\t\t}\n\n\t\tpopulateQueue();\n\t\treturn read;\n\t}", "void waitToRead();", "public synchronized List getBufferForWriting() {\n// if some writer is writing or some reader is reading, wait until no one is writing or reading \n while (readerNumber != 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber == 0 \n readerNumber--; // now readderNumber == -1. \n return buffer;\n }", "public void execHandlerRead( Message msg ) {\n\t \t// create valid data bytes\n\t\tbyte[] buffer = (byte[]) msg.obj;\n\t\tint length = (int) msg.arg1;\n\t\tbyte[] bytes = new byte[ length ];\n\t\tfor ( int i=0; i < length; i++ ) {\n\t\t\tbytes[ i ] = buffer[ i ];\n\t\t}\n\t\t// debug\n\t\tString read = buildMsgBytes( \"r \", bytes );\n\t\tlog_d( read );\n\t\taddAndShowTextViewDebug( read );\n\t\tnotifyRead( bytes );\n\t}", "public synchronized void readInput() throws InterruptedException, IOException \n\t{\n\t\twhile (getDataSourceEOFlag())\n\t\t{\n\t\t\tcontent.set(incomingPipe.take());\n\t\t\t\n\t\t\t// Ensure thread-timing uniformity (a speed-limiter)\n\t\t\t//Thread.sleep(100);\n\t\t\t\n\t\t\tprocess();\n\t\t\t// Discard the text to free up memory.\n\t\t\tcontent.set(null);\n\t\t}\n\t}", "@Test\n public void testWriteThenRead() {\n PipelineResult writeResult = runWrite();\n writeResult.waitUntilFinish();\n PipelineResult readResult = runRead();\n readResult.waitUntilFinish();\n gatherAndPublishMetrics(writeResult, readResult);\n }", "private void t1() {\n // read and write to the same region: just want the write effect\n writeProtected();\n readProtected();\n }", "private int read()\n\t{\n\t\ttry{\n\t\t\twhile(dev_in.available()==0);\n\t\t\treturn dev_in.read();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t\treturn -1;\n\t}", "int filterBytes(GetsState gs) {\n ChannelBuffer buf;\n byte[] raw;\n int rawStart, rawEnd;\n char[] dst;\n int offset, toRead, /*dstNeeded,*/ spaceLeft, result, rawLen, length;\n TclObject obj;\n final int ENCODING_LINESIZE = 20; // Lower bound on how many bytes\n // to convert at a time. Since we\n // don't know a priori how many\n // bytes of storage this many\n // source bytes will use, we\n // actually need at least\n // ENCODING_LINESIZE bytes of room.\n\n boolean goto_read = false; // Set to true when jumping to the read\n // label, used to simulate a goto.\n\n final boolean debug = false;\n\n obj = gs.obj;\n\n // Subtract the number of bytes that were removed from channel buffer\n // during last call.\n\n buf = gs.buf;\n if (buf != null) {\n buf.nextRemoved += gs.rawRead.i;\n if (buf.nextRemoved >= buf.nextAdded) {\n buf = buf.next;\n }\n }\n gs.totalChars += gs.charsWrote.i;\n\n read: while (true) {\n if (goto_read || (buf == null) || (buf.nextAdded == buf.BUFFER_PADDING)) {\n // All channel buffers were exhausted and the caller still hasn't\n // seen EOL. Need to read more bytes from the channel device.\n // Side effect is to allocate another channel buffer.\n\n //read:\n if (blocked) {\n if (!blocking) {\n gs.charsWrote.i = 0;\n gs.rawRead.i = 0;\n return -1;\n }\n blocked = false;\n }\n if (getInput() != 0) {\n gs.charsWrote.i = 0;\n gs.rawRead.i = 0;\n return -1;\n }\n buf = inQueueTail;\n gs.buf = buf;\n }\n\n // Convert some of the bytes from the channel buffer to characters.\n // Space in obj's string rep is used to hold the characters.\n\n rawStart = buf.nextRemoved;\n raw = buf.buf;\n rawEnd = buf.nextAdded;\n rawLen = rawEnd - rawStart;\n\n toRead = ENCODING_LINESIZE;\n if (toRead > rawLen) {\n toRead = rawLen;\n }\n dst = new char[toRead];\n result = externalToUnicode(raw, rawStart, rawLen,\n dst, 0, toRead,\n gs.rawRead, /*gs.bytesWrote*/ null, gs.charsWrote,\n gs.charToBytes);\n TclString.append(gs.obj, dst, 0, gs.charsWrote.i);\n\n if (debug) {\n System.out.println(\"filterBytes chars\");\n\n String srep = gs.obj.toString();\n int len = srep.length();\n\n for (int i=0; i < len; i++) {\n char c = srep.charAt(i);\n String prep;\n if (c == '\\r') {\n prep = \"\\\\r\";\n } else if (c == '\\n') {\n prep = \"\\\\n\";\n } else {\n prep = \"\" + c;\n }\n\n System.out.println(\"filtered[\" + i + \"] = '\" +\n prep +\n \"' (int) \" + ((int) srep.charAt(i)) +\n \" 0x\" + Integer.toHexString((int) srep.charAt(i)));\n }\n }\n\n // Make sure that if we go through 'gets', that we reset the\n // TCL_ENCODING_START flag still. [Bug #523988]\n\n encodingStart = false;\n\n if (result == TCL_CONVERT_MULTIBYTE) {\n // The last few bytes in this channel buffer were the start of a\n // multibyte sequence. If this buffer was full, then move them to\n // the next buffer so the bytes will be contiguous. \n\n if (debug) {\n System.out.println(\"TCL_CONVERT_MULTIBYTE decode result found\");\n }\n\n ChannelBuffer next;\n int extra;\n\n next = buf.next;\n if (buf.nextAdded < buf.bufLength) {\n if (gs.rawRead.i > 0) {\n // Some raw bytes were converted to UTF-8. Fall through,\n // returning those UTF-8 characters because a EOL might be\n // present in them.\n } else if (eofCond) {\n // There was a partial character followed by EOF on the\n // device. Fall through, returning that nothing was found.\n\n buf.nextRemoved = buf.nextAdded;\n } else {\n // There are no more cached raw bytes left. See if we can\n // get some more.\n\n goto_read = true;\n continue read; //goto read;\n }\n } else {\n if (next == null) {\n next = new ChannelBuffer(bufSize);\n buf.next = next;\n inQueueTail = next;\n }\n extra = rawLen - gs.rawRead.i;\n System.arraycopy(raw, rawStart + gs.rawRead.i,\n next.buf, buf.BUFFER_PADDING - extra, extra);\n next.nextRemoved -= extra;\n buf.nextAdded -= extra;\n\n if (debug) {\n System.out.println(\"copied \" + extra + \" bytes to \" +\n \"next ChannelBuffer\");\n }\n }\n }\n\n break read; // End loop in the normal case\n } // End read labeled while loop\n\n gs.buf = buf;\n return 0;\n }", "public boolean read() {\n return so;\n }", "boolean getForRead();", "public void run() {\n try {\n DataInputStream in = new DataInputStream(new BufferedInputStream(s.getInputStream()));\n try {\n byte op = (byte) in.read();\n if (op == OP_WRITE_BLOCK) {\n writeBlock(in);\n } else if (op == OP_READ_BLOCK || op == OP_READSKIP_BLOCK ||\n op == OP_READ_RANGE_BLOCK) {\n readBlock(in, op);\n } else {\n while (op >= 0) {\n System.out.println(\"Faulty op: \" + op);\n op = (byte) in.read();\n }\n throw new IOException(\"Unknown opcode for incoming data stream\");\n }\n } finally {\n in.close();\n }\n } catch (IOException ie) {\n LOG.warn(\"DataXCeiver\", ie);\n } finally {\n try {\n xceiverCount.decr();\n LOG.debug(\"Number of active connections is: \"+xceiverCount);\n s.close();\n } catch (IOException ie2) {\n }\n }\n }", "void drain() {\n if (stdOutReader != null) {\n stdOutReader.drain();\n }\n if (stdErrReader != null) {\n stdErrReader.drain();\n }\n }", "public void internalRead() {\r\n\t\tbusInt.put(data);\r\n\t}", "@Override\n public int read() throws IOException\n {\n if (_tmpBuffer == null) {\n _tmpBuffer = new char[1];\n }\n if (read(_tmpBuffer, 0, 1) < 1) {\n return -1;\n }\n return _tmpBuffer[0];\n }", "public int read(long offset, byte buffer[],int bufferOffset,int nrOfBytes)\n throws VlException\n {\n boolean forceUseStreamRead=false; //true; // default value \n\n// // when reading the first bytes, streamread is faster \n// if (offset==0) \n// forceUseStreamRead=true; \n\n // Try Random Accessable Interface ! \n if ((this instanceof VRandomReadable) && (forceUseStreamRead==false))\n {\n // use Sync Read ! \n return StreamUtil.syncReadBytes((VRandomReadable)this,offset,buffer,bufferOffset,nrOfBytes);\n }\n // else try StreamReadable interface \n else if (this instanceof VStreamReadable)\n {\n //sync stream Read ! \n return streamRead(offset,buffer,bufferOffset,nrOfBytes);\n }\n else\n {\n throw new nl.uva.vlet.exception.ResourceTypeMismatchException(\n \"File type does not support (remote) read access\");\n }\n }", "boolean hasRead();", "protected int populateBuffer()\n {\n interlock.beginReading();\n // System.out.println(\"populateBuffer: 2\");\n return byteBuffer.limit();\n }", "@Override\n\tpublic void readClient(Client clt) {\n\t\t\n\t}", "public void readSector(TransID tid, int sectorNum, byte buffer[])\n throws IOException, IllegalArgumentException, \n IndexOutOfBoundsException{\t\t\t\t\t\t\t\t// Not quite done yet\n\t try{\n\t\t ADisk_lock.lock();\n\n\t\t readTid = tid.getTidfromTransID();\n readSector = sectorNum;\n d.startRequest(Disk.READ, tid.getTidfromTransID(), sectorNum, buffer);\n readWait();\n \n wblist.checkRead(sectorNum, buffer);\n Transaction temp = atranslist.get(tid);\n if(temp != null)\n \t temp.checkRead(sectorNum, buffer);\n\t }\n\t finally{\n\t\t ADisk_lock.unlock();\n\t }\n }", "public ConsumptionStatus consumeBuffer() {\n\t\tif (status == ConsumptionStatus.BUFFERED){\n\t\t\tString buffered = newBuffer;\n\t\t\tnewBuffer = null;\n\t\t\tstatus = ConsumptionStatus.EMPTY;\n\t\t\tconsumeLine(buffered);\n\t\t\treturn status;\n\t\t}else {\n\t\t\tthrow new IllegalStateException(\"There is no buffer to consume.\");\n\t\t}\n\t}", "public void test_readXXXAndWriteXXX_basic_BB_FC_io() {\n tezt_readXXXAndWriteXXX_basic_BB_FC_io_impl();\n }", "abstract protected boolean read();", "public void run() {\n readFromClient();\n }", "@Override\n\tpublic int read(CCMultiChannelBuffer outBuffer) {\n\t\tif (buffer.getSampleCount() != outBuffer.getBufferSize()) {\n\t\t\tbuffer.changeSampleCount(outBuffer.getBufferSize(), true);\n\t\t\trawBytes = new byte[buffer.getByteArrayBufferSize(format)];\n\t\t}\n\t\tint framesRead = 0;\n\t\tif (play) {\n\t\t\tframesRead = mRead();\n\t\t} else {\n\t\t\tbuffer.makeSilence();\n\t\t}\n\t\tfor (int i = 0; i < buffer.getChannelCount(); i++) {\n\t\t\toutBuffer.setChannel(i, buffer.getChannel(i));\n\t\t}\n\n\t\treturn framesRead;\n\t}", "public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\"+this.lockState);\n lock.lock();\n logger.log(Level.INFO,\"lock_read : taking mutex : \"+this.lockState);\n \t\tswitch(this.lockState){\n \t\t\tcase RLC :\n \t\t\t\tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"reading in cache\");\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t\tthis.lockState=State.RLT_WLC;\n \t\t\t\tlogger.log(Level.INFO,\"reading in cache as previous writer\");\n \t\t\tbreak;\n \t\t\tdefault:\n update = true;\n \t\t\tbreak;\t\t\t\t\t\n \t\t}\n lock.unlock();\n logger.log(Level.FINE,\"lock_read : release the lock with :\"+lockState+\".\");\n if(update){\n logger.log(Level.INFO,\"Updating lockState to RLT\");\n \tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"Lockstate was updated to \"+lockState);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n this.obj = client.lock_read(this.id);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n logger.log(Level.INFO,\"lock_read(): end with \"+lockState);\n }\n \t}", "@Override public int read() throws IOException {\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tint r = -1;\r\n\t\twhile (r == -1){\r\n\t\t\tReader in = getCurrentReader();\r\n\t\t\tif (in == null){\r\n\t\t\t\tif (doneAddingReaders) return -1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (InterruptedException iox){\r\n\t\t\t\t\tthrow new IOException(\"Interrupted\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr = in.read();\r\n\t\t\t\tif (r == -1) advanceToNextReader();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "private void doWrite() throws IOException {\n\t\t\tbb.flip();\n\t\t\tsc.write(bb);\n\t\t\tbb.compact();\n\n\t\t\tupdateInterestOps();\n\t\t}", "private int castingRead(byte[] outputBuf, int off, int len)\n throws IOException {\n if (charBuffer == null) {\n charBuffer = new char[DEFAULT_BUFFER_CAPACITY];\n }\n if (len > DEFAULT_BUFFER_CAPACITY) {\n len = DEFAULT_BUFFER_CAPACITY;\n }\n int numRead = in.read(charBuffer, 0, len);\n for (int ix=0; ix<numRead; ix++) {\n outputBuf[off+ix] = (byte)charBuffer[ix];\n }\n return numRead;\n }", "@Override\n public void consume(ParsableByteArray data) {\n checkStateNotNull(sampleReader);\n checkStateNotNull(output);\n int offset = data.getPosition();\n int limit = data.limit();\n byte[] dataArray = data.getData();\n\n // Append the data to the buffer.\n totalBytesWritten += data.bytesLeft();\n output.sampleData(data, data.bytesLeft());\n\n while (true) {\n int startCodeOffset = NalUnitUtil.findNalUnit(dataArray, offset, limit, prefixFlags);\n\n if (startCodeOffset == limit) {\n // We've scanned to the end of the data without finding another start code.\n if (!hasOutputFormat) {\n csdBuffer.onData(dataArray, offset, limit);\n }\n sampleReader.onData(dataArray, offset, limit);\n if (userData != null) {\n userData.appendToNalUnit(dataArray, offset, limit);\n }\n return;\n }\n\n // We've found a start code with the following value.\n int startCodeValue = data.getData()[startCodeOffset + 3] & 0xFF;\n // This is the number of bytes from the current offset to the start of the next start\n // code. It may be negative if the start code started in the previously consumed data.\n int lengthToStartCode = startCodeOffset - offset;\n\n if (!hasOutputFormat) {\n if (lengthToStartCode > 0) {\n csdBuffer.onData(dataArray, offset, /* limit= */ startCodeOffset);\n }\n // This is the number of bytes belonging to the next start code that have already been\n // passed to csdBuffer.\n int bytesAlreadyPassed = lengthToStartCode < 0 ? -lengthToStartCode : 0;\n if (csdBuffer.onStartCode(startCodeValue, bytesAlreadyPassed)) {\n // The csd data is complete, so we can decode and output the media format.\n output.format(\n parseCsdBuffer(csdBuffer, csdBuffer.volStartPosition, checkNotNull(formatId)));\n hasOutputFormat = true;\n }\n }\n\n sampleReader.onData(dataArray, offset, /* limit= */ startCodeOffset);\n\n if (userData != null) {\n int bytesAlreadyPassed = 0;\n if (lengthToStartCode > 0) {\n userData.appendToNalUnit(dataArray, offset, /* limit= */ startCodeOffset);\n } else {\n bytesAlreadyPassed = -lengthToStartCode;\n }\n\n if (userData.endNalUnit(bytesAlreadyPassed)) {\n int unescapedLength = NalUnitUtil.unescapeStream(userData.nalData, userData.nalLength);\n castNonNull(userDataParsable).reset(userData.nalData, unescapedLength);\n castNonNull(userDataReader).consume(pesTimeUs, userDataParsable);\n }\n\n if (startCodeValue == START_CODE_VALUE_USER_DATA\n && data.getData()[startCodeOffset + 2] == 0x1) {\n userData.startNalUnit(startCodeValue);\n }\n }\n\n int bytesWrittenPastPosition = limit - startCodeOffset;\n long absolutePosition = totalBytesWritten - bytesWrittenPastPosition;\n sampleReader.onDataEnd(absolutePosition, bytesWrittenPastPosition, hasOutputFormat);\n // Indicate the start of the next chunk.\n sampleReader.onStartCode(startCodeValue, pesTimeUs);\n // Continue scanning the data.\n offset = startCodeOffset + 3;\n }\n }", "public abstract int process(Buffer input, Buffer output);", "public void setRead(boolean read)\n\t{\n\t\tthis.read = read;\n\t}", "public void receiveData() throws IOException;", "private static void read(int r, int c) throws IOException {\n\t\tinit(r, c);\r\n\t\tfor (int i = 0; i < r; ++ i) {\r\n\t\t\tmapData[ i ] = next();\r\n\t\t}\r\n\t\tint si = nextInt();\r\n\t\tint sj = nextInt();\r\n\t\tint ti = nextInt();\r\n\t\tint tj = nextInt();\r\n\t\t\r\n\t\tastar(r, c, si, sj, ti, tj);\r\n\t\t\r\n//\t\tcin.close();\r\n\t}", "protected void writeRead ()\n {\n stream.println (\" public void _read (org.omg.CORBA.portable.InputStream i)\");\n stream.println (\" {\");\n if (entry instanceof ValueBoxEntry)\n {\n TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;\n SymtabEntry mType = member.type ();\n if (mType instanceof StringEntry)\n stream.println (\" value = i.read_string ();\");\n\n else if (mType instanceof PrimitiveEntry)\n stream.println (\" value = \" + helperClass + \".read (i).value;\");\n\n else\n stream.println (\" value = \" + helperClass + \".read (i);\");\n }\n else\n stream.println (\" value = \" + helperClass + \".read (i);\");\n stream.println (\" }\");\n stream.println ();\n }", "int read(long pos, byte[] buf)throws IOException;", "private final byte[] readBuffer( int size ) throws IOException {\n byte[] buffer = new byte[ size ];\n\n int read = 0;\n while ( read < size ) {\n int next = dataSource.read( buffer, read, size - read );\n if ( next < 0 ) throw new IOException( \"End of Stream\" );\n read += next;\n\t}\n return buffer;\n }", "public void run() {\n\n do {\n\n ByteBuffer byteBuffer = (ByteBuffer) slist[0];\n slist = (Object[]) slist[1];\n if (0 == bufsize) {\n if (null == slist) {\n buffer = byteBuffer;\n break;//optimization\n }\n linkedList = new LinkedList<ByteBuffer>();\n }\n bufsize += byteBuffer.limit();\n linkedList.addFirst(byteBuffer);\n\n } while (null != slist);\n\n if (null == buffer) {\n buffer = ByteBuffer.allocateDirect(bufsize);\n\n for (ByteBuffer netBuffer : linkedList) {\n buffer.put(netBuffer);\n }\n }\n\n buffer.rewind();\n System.err.println(\"MsgSize: \" + buffer.limit());\n int i = ENDL.length - 1;\n byte b1 = ENDL[i];\n do {\n ByteBuffer b = buffer.slice();\n while (b.hasRemaining() && b.get() != b1);\n b.flip();\n Integer integer = Integer.valueOf(UTF8.decode(b).toString().trim(), 0x10);\n System.err.println(\"RecordSize: \" + integer);\n buffer = ((ByteBuffer) buffer.position(b.limit())).slice();\n ByteBuffer handoff = (ByteBuffer) buffer.slice().limit(integer);\n final String trim = UTF8.decode(handoff).toString().trim();\n // System.err.println(\"RecordId: \" + trim);\n final LinkedHashMap couchChange = CouchDriver.GSON.fromJson(trim, LinkedHashMap.class);\n\n EXECUTOR_SERVICE.submit(getDocUpdateHandler(couchChange));\n buffer.position(handoff.limit() + ENDL.length);\n buffer = buffer.slice();\n } while (buffer.hasRemaining());\n }", "public synchronized static void readFlash(Context context, ByteBuffer buffer, int addr, int len) {\n byte[] flashData = null;\n\n File dir = context.getFilesDir();\n File targetFile = new File(dir.getAbsolutePath() + File.separator + FILE_NAME);\n\n try {\n if (!targetFile.exists()) {\n flashData = new byte[DATA_LEN];\n for (int i = 0; i < flashData.length; i++) {\n flashData[i] = (byte) 0xFF;\n }\n targetFile.createNewFile();\n FileOutputStream fos = new FileOutputStream(targetFile);\n fos.write(flashData);\n fos.flush();\n fos.close();\n } else {\n InputStream stream = new FileInputStream(targetFile);\n int length = stream.available();\n flashData = new byte[length];\n stream.read(flashData);\n stream.close();\n }\n } catch (IOException e) {\n }\n// TelinkLog.e(\"readFlash -- flashData capacity:\" + flashData.length + \" -- addr:\" + addr + \" -- len:\" + len);\n byte[] result = new byte[len];\n System.arraycopy(flashData, addr, result, 0, len);\n buffer.position(0);\n// buffer.\n buffer.put(result);\n// TelinkLog.e(\"########## buffer.capacity: \" + buffer.capacity());\n byte data0 = buffer.get(0);\n// TelinkLog.e(\"########## buffer.get(0): \" + buffer.get(0));\n\n// return flashData;\n }" ]
[ "0.5994988", "0.5957818", "0.59555745", "0.5912023", "0.58858943", "0.58541816", "0.5734352", "0.56549865", "0.5615362", "0.55972785", "0.5514348", "0.5467161", "0.543353", "0.5384785", "0.5367747", "0.53485215", "0.53477055", "0.53119415", "0.53041303", "0.5275601", "0.5261174", "0.5257973", "0.52557385", "0.5227484", "0.5214442", "0.5213693", "0.5205042", "0.51880294", "0.51722777", "0.51712584", "0.51671547", "0.5154228", "0.5151472", "0.51458853", "0.514238", "0.51411295", "0.51138353", "0.5094263", "0.50798535", "0.50756234", "0.5066007", "0.50634366", "0.5063099", "0.50613546", "0.50421786", "0.503726", "0.5029281", "0.5025765", "0.5020615", "0.502054", "0.5013133", "0.50022006", "0.4991957", "0.49867693", "0.4984304", "0.49683163", "0.49615943", "0.49606913", "0.49484658", "0.49471298", "0.4936311", "0.49332651", "0.49169227", "0.49156642", "0.49130544", "0.49102497", "0.49085584", "0.4904973", "0.49028277", "0.49012792", "0.48970962", "0.488027", "0.48784903", "0.48712632", "0.48664296", "0.48628652", "0.486277", "0.48587364", "0.48538074", "0.48460984", "0.48444283", "0.4842315", "0.48389605", "0.4837687", "0.48372346", "0.48302454", "0.4824555", "0.4821035", "0.48206237", "0.48203132", "0.48195305", "0.48157975", "0.48093978", "0.48074704", "0.48067915", "0.48055497", "0.47887668", "0.47869068", "0.47869027", "0.4785777" ]
0.59029657
4
Process the content of bbin The convention is that bbin is in writemode before the call to process and after the call
private void processIn() throws IOException { for (; ; ) { var status = fr.process(bbin); switch (status) { case ERROR: silentlyClose(); return; case REFILL: return; case DONE: Frame frame = fr.get(); fr.reset(); treatFrame(frame); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void process() {\n\t\tSystem.out.println(\"this is singleBOx \" + this.toString());\r\n\t}", "public void transformBinary(PENDataElement penElement) throws Exception {\n SourceDataElement srcDataElement = this.lookupSourceDataElement(getCurrentItem());\n TxDataElement txDataElement = this.lookupTxDataElement(getCurrentItem());\n Collection binaries = srcDataElement.getBinaryCollection();\n if(null== binaries || binaries.size() <1) return;\n txDataElement.getBinaryFiles().addAll(binaries);\n }", "public void setBin(final ByteArray bin) {\n this.bin = bin;\n }", "public void setBin(java.lang.String bin) {\r\n this.bin = bin;\r\n }", "@Override\n protected int processBins(final ProcessContext context, final ProcessSessionFactory sessionFactory) {\n final Queue<Bin> readyBins = getReadyBins();\n if (readyBins.size() <= 1) {\n return super.processBins(context, sessionFactory);\n }\n\n final ComponentLog logger = getLogger();\n int binsProcessed = 0;\n long bytesProcessed = 0L;\n\n final ProcessSession batchSession = sessionFactory.createSession();\n\n Bin bin;\n while (isScheduled() && (bin = readyBins.poll()) != null) {\n long binBytes = 0L;\n for (final FlowFile flowFile : bin.getContents()) {\n binBytes += flowFile.getSize();\n }\n\n BinProcessingResult binProcessingResult;\n try {\n binProcessingResult = this.processBin(bin, context);\n } catch (final ProcessException e) {\n logger.error(\"Failed to process bundle of {} files due to {}\", new Object[] {bin.getContents().size(), e});\n\n final ProcessSession binSession = bin.getSession();\n for (final FlowFile flowFile : bin.getContents()) {\n binSession.transfer(flowFile, REL_FAILURE);\n }\n binSession.commitAsync();\n continue;\n } catch (final Exception e) {\n logger.error(\"Failed to process bundle of {} files due to {}; rolling back sessions\", new Object[] {bin.getContents().size(), e});\n\n bin.getSession().rollback();\n continue;\n }\n\n // If this bin's session has been committed, move on.\n if (!binProcessingResult.isCommitted()) {\n final ProcessSession binSession = bin.getSession();\n bin.getContents().forEach(ff -> binSession.putAllAttributes(ff, binProcessingResult.getAttributes()));\n binSession.transfer(bin.getContents(), REL_ORIGINAL);\n\n // Migrate FlowFiles to our batch session. Then commit the bin session to free up any resources\n binSession.migrate(batchSession);\n binSession.commitAsync();\n }\n\n binsProcessed++;\n bytesProcessed += binBytes;\n\n // Every 100 bins or 5 MB of input, commit the session\n if (binsProcessed % 100 == 0 || bytesProcessed > 5_000_000L) {\n batchSession.commitAsync();\n break;\n }\n }\n\n batchSession.commitAsync();\n return binsProcessed;\n }", "void flushBf()\n {\n if (components.contains(Component.FILTER))\n {\n File path = descriptor.fileFor(Component.FILTER);\n try (SeekableByteChannel fos = Files.newByteChannel(path.toPath(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE);\n DataOutputStreamPlus stream = new BufferedDataOutputStreamPlus(fos))\n {\n // bloom filter\n BloomFilter.serializer.serialize((BloomFilter) bf, stream);\n stream.flush();\n SyncUtil.sync((FileChannel) fos);\n }\n catch (IOException e)\n {\n throw new FSWriteError(e, path);\n }\n }\n }", "public void decodeBX() throws Exception {\r\n\t\tLog.p(tag, \"Decode Binary XML...\");\r\n\t\tLog.d(tag, \"Number of Binary XML files: \"+ xmlFiles.size());\r\n\t\tLog.d(tag, \"-> \"+ xmlFiles);\r\n\t\t\r\n\t\t\r\n\t\t// Convert WBXML to XML\r\n\t\t/*\r\n\t\t * aapt (Android Assents Packaging Tool) converts XML files to Android Binary XML. It is not same as\r\n\t\t * WBXML format.\r\n\t\t */\r\n\t\tfor(int i=0; i<xmlFiles.size(); i++)\r\n\t\t{\r\n\t\t\tLog.p(tag, \"XML File: \"+ xmlFiles.get(i));\r\n\t\t\t\r\n\t\t\t// 23rd March, 2012. Prasanta. \r\n\t\t\t// Skip exception while parsing any file and complete the complete parsing cycle.\r\n\t\t\tAndroid_BX2 abx2;\r\n\t\t\ttry{\r\n\t\t\t\tabx2 = new Android_BX2(new GenXML());\r\n\t\t\t\tabx2.parse(xmlFiles.get(i));\r\n\t\t\t\t\r\n\t\t\t}catch(Exception ex){\r\n\t\t\t\tLog.e(tag, \"Fail to parse - \"+ xmlFiles.get(i), ex);\r\n\t\t\t}\r\n\t\t\tfinally{\r\n\t\t\t\tabx2 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract void outputBmp(FastStringBuffer buf);", "private void processIn() {\n if (state != State.ESTABLISHED) {\n bbin.flip();\n if (bbin.get() != 10) {\n silentlyClose();\n return;\n } else {\n state = State.ESTABLISHED;\n }\n bbin.compact();\n } else {\n switch (intReader.process(bbin)) {\n case ERROR:\n return;\n case REFILL:\n return;\n case DONE:\n var size = intReader.get();\n bbin.flip();\n var bb = ByteBuffer.allocate(size);\n for (var i = 0; i < size; i++) {\n bb.put(bbin.get());\n }\n System.out.println(UTF.decode(bb.flip()).toString());\n bbin.compact();\n intReader.reset();\n break;\n }\n }\n }", "public int process(Buffer in, Buffer out) {\n\t\t\taccessFrame(in);\r\n\r\n\t\t\t// Swap the data between the input & output.\r\n\t\t\tObject data = in.getData();\r\n\t\t\tin.setData(out.getData());\r\n\t\t\tout.setData(data);\r\n\r\n\t\t\t// Copy the input attributes to the output\r\n\t\t\tout.setFormat(in.getFormat());\r\n\t\t\tout.setLength(in.getLength());\r\n\t\t\tout.setOffset(in.getOffset());\r\n\r\n\t\t\treturn BUFFER_PROCESSED_OK;\r\n\t\t}", "@Override\r\n\tpublic void process() {\n\t\tSystem.out.println(\"this is CompositeBOx \" + this.toString());\r\n\t\tfinal Iterator it = mBoxList.iterator();\r\n\t\twhile(it.hasNext())\r\n\t\t{\r\n\t\t\tIBox box = (IBox)it.next();\r\n\t\t\tbox.process();\r\n\t\t}\r\n\t}", "public ByteArray getBin() {\n return bin;\n }", "public void process() {\n cycleID.incrementAndGet();\r\n List<ChunkBB> chunkbbs;\r\n synchronized (loadedChunks) {\r\n chunkbbs = new LinkedList<>(loadedChunks);\r\n }\r\n\r\n Condition cond = chunkbbs.stream().map(\r\n b -> GAIA_STATES.WORLD_UUID.eq(b.getWorld())\r\n .and(GAIA_STATES.X.gt(b.getX() * 16))\r\n .and(GAIA_STATES.Z.gt(b.getZ() * 16))\r\n .and(GAIA_STATES.X.le(b.getX() * 16 + 16))\r\n .and(GAIA_STATES.Z.le(b.getZ() * 16 + 16))\r\n ).reduce(DSL.falseCondition(), (a, b) -> a.or(b));\r\n\r\n Gaia.DBI().submit((conf) -> {\r\n DSLContext ctx = DSL.using(conf);\r\n ctxref.set(ctx);\r\n ReturnContainer rec;\r\n\r\n while ((rec = input.poll()) != null) {\r\n switch (rec.getState()) {\r\n case DELETE:\r\n LOG.fine(\"[\" + cycleID + \"]Deleting:\\n\" + rec);\r\n ctx.executeDelete(rec.getRec());\r\n break;\r\n case UPDATE:\r\n try {\r\n LOG.fine(\"[\" + cycleID + \"]Updating:\\n\" + rec);\r\n ctx.executeUpdate(rec.getRec());\r\n } catch (Exception e) {\r\n LOG.log(Level.SEVERE, \"[\" + cycleID + \"]Failed to update record.\\n\" + rec.getRec(), e);\r\n }\r\n break;\r\n default:\r\n LOG.severe(\"[\" + cycleID + \"]Failed to process record.\\n\" + rec.getRec() + \"\\nUnknown state: \" + rec.getState());\r\n }\r\n }\r\n if (output.isEmpty()) {\r\n List<GaiaStatesRecord> recs = ctx\r\n .selectFrom(GAIA_STATES)\r\n .where(GAIA_STATES.TRANSITION_TIME.lt(new Timestamp(System.currentTimeMillis())))\r\n .and(cond)\r\n .fetch();\r\n if (!recs.isEmpty()) {\r\n LOG.fine(\"Adding \" + recs.size() + \" records to output queue.\");\r\n output.addAll(recs);\r\n }\r\n }\r\n ctxref.set(null);\r\n });\r\n }", "@ReflectiveMethod(name = \"b\", types = {NMSNBTTagCompound.class})\n public void b(NMSNBTTagCompound nBTTagCompound){\n NMSWrapper.getInstance().exec(nmsObject, nBTTagCompound);\n }", "public abstract int process(Buffer input, Buffer output);", "@Override\n\tpublic void processData() {\n\t\t\n\t}", "public abstract void inClassOutputBmp(FastStringBuffer buf);", "private void processBuffer(boolean flushBuffer, boolean endOfInput) throws IOException {\n decodeBuffer(flushBuffer || endOfInput);\n if (!endOfInput && !flushBuffer && cb.position() < PROCESS_THRESHOLD) {\n return;\n }\n cb.flip();\n found = SubstituteUtil.processSubstitute(cb, substitute, endOfInput, outputCharset, stream);\n // Write the tail bytes in the byte buffer if required\n if (bb.position() > 0 && (found || endOfInput)) {\n bb.flip();\n while (bb.hasRemaining()) {\n stream.write(bb.get());\n }\n bb.clear();\n }\n }", "public int processBlock(byte[] in, int inOff, byte[] out, int outOff) {\n\t}", "public void process(Bitmap bitmap) {\n this.bitmap = getCompressedBitmap(bitmap);\n execute();\n }", "public abstract void outputComplementBmp(FastStringBuffer buf);", "@Override\n public void run () {\n try {\n int i = 0;\n String tupleString = this.inReadEnds[i].getNextString();\n while (tupleString != null && i < this.inReadEnds.length - 1){\n BMap tempStore = BMap.makeBMap(tupleString);\n mapStore = BMap.or(mapStore, tempStore);\n i++;\n tupleString = this.inReadEnds[i].getNextString();\n }\n \n BMap tempStore = BMap.makeBMap(tupleString);\n this.mapStore = BMap.or(mapStore, tempStore);\n \n this.outWriteEnd.putNextString(mapStore.getBloomFilter());\n this.outWriteEnd.close();\n } \n catch (Exception e) {\n ReportError.msg(this.getClass().getName() + \" \" + e);\n }\n }", "protected void drawBin (Graphics g, int binNo, int ct) {\n int height = parent.getHistHeight (ct);\n if (height == 0) height = 1;\n if (height > (_yPix - 3 * parent.lineSize)) height = _yPix - 3 * parent.lineSize;\n \n int d = (int)Math.rint ((binNo * _xPix) / ((double)parent.numBins));\n \n if (d >= _xPix) d = _xPix - 1;\n int x1 = d;\n \n int e = (int)Math.rint (((binNo + 1) * _xPix) / ((double)parent.numBins));\n\n int x2 = e;\n \n int width = x2 - x1;\n if (width == 0) width = 1;\n \n int y = _yPix - 3 * parent.lineSize - height;\n \n g.setColor (parent.stateDef.color);\n g.fillRect (x1, y, width, height);\n }", "@Override\r\n\tpublic String process(HttpServletRequest request, HttpServletResponse response) {\n\t\t\r\n\t\tBDao bdao = new BDao();\r\n\t\t\r\n\t\tint ridx = Integer.parseInt(request.getParameter(\"ridx\"));\r\n\t\tint bidx = Integer.parseInt(request.getParameter(\"bidx\"));\r\n\t\t\r\n\t\tbdao.delReply(ridx);\r\n\t\t\r\n\t\treturn \"board?cmd=bread&idx=\"+bidx;\r\n\t}", "protected abstract void splitBAMs();", "@Override\n protected void onBinaryMessage(ByteBuffer byteBuffer) throws IOException {\n System.out.println(\"Binary\");\n throw new UnsupportedOperationException(\"not supported binary messages\");\n }", "@Override\n\tpublic void visit(BitField bf) {\n\t\tSystem.out.println(\"process bitfield\");\n\t\tpieces = new ArrayList<Integer>();\n\t\tbyte[] body = bf.getBody();\n\t\t// boucle afficher body\n\t\t/*\n\t\t * byte b, mask2 = 0x01; for (int i = 0; i < body.length; i++) { b =\n\t\t * body[i]; for (int j = 0; j < 8; j++) { if ((b & mask2) == 0) {\n\t\t * System.out.println(0); } else { System.out.println(1); } } }\n\t\t */\n\t\t// boucle afficher body\n\t\tint mask;\n\t\tfor (int i = 0; i < body.length; i++) {\n\t\t\tmask = body[i];\n\t\t\tfor (int j = 0; j < 8; j++) {\n\t\t\t\tif ((mask & 0x80) != 0) {\n\t\t\t\t\tpieces.add(j + (i * 8));\n\t\t\t\t}\n\t\t\t\tmask = mask << 1;\n\t\t\t}\n\t\t}\n\t\tph.setPeerPieces(pieces);\n\t\tSystem.out.println(pieces.size());\n\t\t// for(Integer i : pieces) {\n\t\t// System.out.println(\"bitfield : \" + i);\n\t\t// }\n\t\tSystem.out.println(\"taille bitfield : \" + pieces.size());\n\t}", "private void processInput(byte b) throws IOException {\n\t\ttry {\n\t\t\tProtocol protocol = Protocol.fromValue(b);\n\t\t\tprocessInput(protocol);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tlogger.catching(e);\n\t\t}\n\t}", "public abstract byte[] renderBinary(VirtualDocument document)\n\t\t\tthrows RenderingException;", "protected void DoGibbsSampling(){\n\t\twhile (gibbs_sample_num <= num_gibbs_total_iterations){\t\t\t\n\t\t\tDoOneGibbsSample();\n\t\t\t//now flush the previous previous gibbs sample to not leak memory\n\t\t\tFlushDataForSample(gibbs_samples_of_bart_trees[gibbs_sample_num - 1]);\n\t\t\t//keep one previous for interaction constraints\n//\t\t\tif (gibbs_sample_num > 1) {\n//\t\t\t\tFlushDataForSample(gibbs_samples_of_bart_trees[gibbs_sample_num - 2]);\n//\t\t\t}\t\t\t\n\t\t\tDeleteBurnInsOnPreviousSamples();\n\t\t\tgibbs_sample_num++;\n\t\t}\n\t}", "public java.lang.String getBin() {\r\n return bin;\r\n }", "void addGeneralBloomFilter(BloomFilterWriter bfw);", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void feed(byte[] bArr) {\n synchronized (this) {\n if (this.b != null) {\n this.b.a(bArr);\n }\n }\n }", "@Override\n public synchronized void flushBin(Empty request, StreamObserver<OperationStatusResponse> responseObserver) {\n bin.flush();\n notifyObservers();\n responseObserver.onNext(OperationStatusResponse.newBuilder()\n .setResult(OperationStatusResponse.OperationStatus.SUCCESS).build());\n responseObserver.onCompleted();\n }", "private void addBinaryData(Document doc, OutputStream out, String tempDir) throws TransformerException {\n InputStream xsl = Thread.currentThread().getContextClassLoader()\n .getResourceAsStream(\"data/xslt/bytestreams.xsl\");\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n Transformer transformer = transformerFactory.newTransformer(new StreamSource(xsl));\n transformer.setParameter(\"tempDir\", tempDir);\n\n Source xmlSource = new DocumentSource(doc);\n\n Result outputTarget = new StreamResult(out); // new\n // FileWriter(outFile));\n\n log.debug(\"starting bytestream transformation ...\");\n transformer.transform(xmlSource, outputTarget);\n log.debug(\"FINISHED bytestream transformation!\");\n }", "public void barrBMaker(int rowNum, int columnNum){\n \tfor (int i=0;i<rowNum;i++){\n \t\tfor (int j=0;j<columnNum;j++){\n \t\t\tBarrierBlock barrblock= new BarrierBlock(barrx+i*(barrw/rowNum),barry+j*(barrh/rowNum),barrw/rowNum,barrh/columnNum);\n \t\t\tbarrBList.add (barrblock);\n \t\t}\n \t}\n }", "public void binMasses()\n\t{\n\t\t//Create arrays\n\t\tcreateBins(calcArraySize(massBinSize,minMass, maxMass));\n\n\t\t//Check if any spectra from each polarity has been created\n\t\tif (librarySpectra.size()>0)\n\t\t{\n\t\t\t//Populate count array to correctly initialize array size for positive library spectra\n\t\t\tfor (int i=0; i<librarySpectra.size(); i++)\n\t\t\t{\n\t\t\t\tcountBin[findBinIndex(librarySpectra.get(i).precursor,massBinSize,minMass)] ++;\n\t\t\t}\n\t\t\tupdateProgress(17,\"% - Creating Composite Library\",true);\n\n\t\t\t//Use count bin to initialize new arrays to place positive spectra into hash table\n\t\t\tfor (int i=0; i<countBin.length; i++)\n\t\t\t{\n\t\t\t\tmassBin[i] = new LibrarySpectrum[countBin[i]];\n\t\t\t}\n\t\t\tupdateProgress(33,\"% - Creating Composite Library\",true);\n\n\n\t\t\t//Populate spectrum arrays for positive spectra\n\t\t\tfor (int i=0; i<librarySpectra.size(); i++)\n\t\t\t{\n\t\t\t\tmassBin[findBinIndex(librarySpectra.get(i).precursor,massBinSize,minMass)]\n\t\t\t\t\t\t[addedBin[findBinIndex(librarySpectra.get(i).precursor,massBinSize,minMass)]] = librarySpectra.get(i);\n\t\t\t\taddedBin[findBinIndex(librarySpectra.get(i).precursor,massBinSize,minMass)]++;\n\t\t\t}\n\t\t\tupdateProgress(50,\"% - Creating Composite Library\",true);\n\t\t}\n\t}", "public abstract void onBinaryReceived(byte[] data);", "private void processNode(BranchNode bn, Grid[][] map) {\n\t\tif (bn.leaf_alive) {\r\n\t\t\tfor (int i = 0; i < leaf_size; i++) {\r\n\t\t\t\tint l = bn.x + i - leaf_size / 2;\r\n\t\t\t\tif (l >= 0 && l < World.WORLD_WIDTH) {\r\n\t\t\t\t\thealth += map[l][bn.y].sunlight;\r\n\t\t\t\t\tmap[l][bn.y].sunlight -= World.LEAF_BLOCK;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Kill Leaf if the leaf is too old\r\n\t\t\tbn.leaf_age += 1;\r\n\t\t\tif (bn.leaf_age >= LEAF_LIFETIME) {\r\n\t\t\t\tbn.killLeaf(this, map);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// If I really want to be safe, I should put a check for if bn.children.size() > 0\r\n\t\t// But the for loop here checks it for me already.\r\n\t\tfor (int i = 0; i < bn.children.size(); i++) {\r\n\t\t\tprocessNode(bn.children.get(i), map);\r\n\t\t}\t\t\r\n\t}", "public int onBytes(byte[] b) {\n synchronized (this) {//ensure block is not interleaved with new input on other threads.\n int accum = 0;\n for (byte item : b) {//#PRESERVE order!\n accum = onByte(item & 255);//lookahead is of bytes alone, no codes will be mebedded\n }\n return accum;\n }\n }", "public void binToDec(){\n\t\tthis.inputBin();\n\t\tif(checkValue()==true){\n\t\t\tthis.toDec();\n\t\t\tthis.outDec();\n\t\t}\n\t}", "public RealBuffer process( RealBuffer buffer )\n\t{\n\t\tfloat[] samples = buffer.getSamples();\n\n\t\tfor( int x = 0; x < samples.length; x++ )\n\t\t{\n\t\t\tsamples[ x ] = process( samples[ x ] );\n\t\t}\n\t\t\n\t\treturn new RealBuffer( samples );\n\t}", "public void process() {\n\t}", "BOp createBOp();", "protected void update(byte[] b) {\n/* 49 */ update(b, 0, b.length);\n/* */ }", "public void setBinmode() {\n }", "public void openBoB() {\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t\tif (summonedFamiliar.familiarType == FamiliarType.BOB) {\n\t\t\t\tshift();\n\t\t\t\tif (c.getOutStream() != null && c != null) {\n\t\t\t\t\tc.getItems().resetItems(24002, burdenedItems);\n\t\t\t\t\tc.flushOutStream();\n\t\t\t\t}\n\t\t\t\tc.getItems().resetItems(24006);\n\t\t\t\tc.getOutStream().createFrame(248);\n\t\t\t\tc.getOutStream().writeWordA(24000);\n\t\t\t\tc.getOutStream().writeWord(24005);\n\t\t\t\tc.flushOutStream();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void write(byte[] b_array) throws IOException {\n int i;\n int flag = 1;\n int my_decimal1=0;\n for (i = 0; i < 12; i++) {\n out.write(b_array[i]);\n }\n //write to output stream the rest of the bytearray's size - division 8\n int rest = (b_array.length - 12) % 8;\n out.write((byte) rest);\n\n\n while (i < b_array.length) {\n //start to count the number of 0\n if (i < b_array.length - rest) {\n for (int j = 0; j < 8; j++) {\n //check if we not in the rest part of the byte array\n if (i < b_array.length - rest) {\n //my_str = String.valueOf((int)b_array[i]);\n my_decimal1 += (int)b_array[i]*(Math.pow(2, j));\n i++;\n }\n else {\n flag = 0;\n break;\n }\n }\n }\n else{\n flag=0;\n }\n //if the for loop finish without break;\n if (flag == 1) {\n out.write((byte) my_decimal1);\n my_decimal1 = 0;\n }\n else {\n out.write(b_array[i]);\n i++;\n }\n }\n\n //>>\n\n\n }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public final void mB() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:528:11: ( ( 'b' | 'B' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:528:13: ( 'b' | 'B' )\n {\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public BbsOperation () {\r\n\t\tsuper();\r\n\t}", "static void readWrites(FileInputStream raf,BufferedOutputStream bw, int numBytes,int indice) throws IOException {\n\n // System.out.println(\"frag num \"+ indice +\" Envoyé\");\n int nbsousfrag = numBytes/taillesousfrag; \n System.out.println(\"nombre des sous fragements : \" + nbsousfrag);\n int sousfragrest = numBytes % taillesousfrag;\n System.out.println(sousfragrest);\n for (int i=0; i < nbsousfrag; i++) { \n\t readWrite(raf,bw, taillesousfrag);\n \t System.out.println(\"sous frag num \"+ i +\" Envoyé\");\n\t}\n if (sousfragrest != 0) {\n\t\treadWrite(raf,bw, sousfragrest);\t\n\t}\n\n}", "public void bufferingState(){\n\t\twhile ( buffer.isBufferUnderRun() ){\n\t\t\t/** Do not leave the while loop with nothing, it will increase the CPU usage 25% */\n\t\t\ttry {Thread.sleep(1);\n\t\t\t} catch (InterruptedException ex) {}\n\t\t} \n\t}", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public void process() {\r\n String marbleClone = INTL_NODE.get1stOutMarble();\r\n TMNL_NODE.addInMarble(marbleClone);\r\n }", "public void run() {\n\t\t\ttry {\n\t\t\t\tfinal List<BusItem> items;\n\t\t\t\titems = LocationParser.parse(BlueBus.this);\n\t\t\t\tmapItemOverlay.updateBuses(items);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t\n\t\t\t}\n\t\t}", "@Override\n\tpublic void visit(SendBlock sb) {\n\t\tSystem.out.println(\"SendBlock reću\");\n\t\tbyte[] body = sb.getBody();\n\t\tbyte[] indexB = new byte[4], beginB = new byte[4];\n\t\tTorrent torrent = ph.getTorrent();\n\t\tint index = 0, begin = 0;\n\t\tbyte[] block = new byte[sb.length - 9];\n\n\t\tindexB = Arrays.copyOfRange(body, 0, 4);\n\t\tindex = byteArrayToInt(indexB);\n\n\t\tbeginB = Arrays.copyOfRange(body, 4, 8);\n\t\tbegin = byteArrayToInt(beginB);\n\n\t\tblock = Arrays.copyOfRange(body, 8, body.length);\n\n\t\tPiece piece = torrent.getPieces().get(index);\n\t\tpiece.feed(begin, block);\n\t\tSystem.out.println(\"piece fed\");\n\t\tif (piece.getChecked()) {\n\t\t\tHave h = new Have(indexB);\n\t\t\tthis.ph.addMessageQueue(h);\n\t\t\tSystem.out.println(\"have envoye, block bien reću\");\n\t\t}\n\t}", "public void handle(PBFTBag bag){\n\n JDSUtility.debug(\"[PBFTServer:handle(bag)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", received \" + bag);\n\n if(isValid(bag)){\n int f = getServiceBFTResilience();\n JDSUtility.debug(\"[PBFTServer:handle(bag)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", is going to processing \" + bag);\n for(IMessage m: bag.getMessages()){\n\n if(m instanceof PBFTRequest){\n\n PBFTRequest r = (PBFTRequest) m;\n \n if(!getRequestInfo().hasRequest(r)){\n handle(r);\n }\n\n }\n\n if(m instanceof PBFTPrePrepare){\n PBFTPrePrepare pp = (PBFTPrePrepare) m;\n if(!getPrePrepareInfo().contains(pp)) {\n handle(pp);\n }\n }\n\n if(m instanceof PBFTPrepare){\n PBFTPrepare p = (PBFTPrepare) m;\n if(!getPrepareInfo().contains(p)){\n handle(p);\n }\n }\n\n if(m instanceof PBFTCommit){\n PBFTCommit c = (PBFTCommit) m;\n if(!getCommitInfo().contains(c)){\n handle(c);\n }\n }\n \n if(m instanceof PBFTCheckpoint){\n handle((PBFTCheckpoint)m);\n }\n\n if(m instanceof PBFTNewView){\n handle((PBFTNewView)m);\n }\n\n if(m instanceof PBFTChangeView){\n handle((PBFTChangeView)m);\n }\n\n if(m instanceof PBFTChangeViewACK){\n handle((PBFTChangeViewACK)m);\n }\n }\n }\n }", "public void baocun() {\n\t\t\n\t}", "BElementStructure createBElementStructure();", "public void setBh(Integer bh) {\r\n this.bh = bh;\r\n }", "public Binary(PrintWriter pw){\n\t\tthis.pw = pw;\n\t\tbinary = null;\n\t}", "public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n closed = true;\n }\n processIn();\n updateInterestOps();\n }", "@Override\n\tpublic String setBinContents(ByteBuffer fileBytes, byte[] container) {\n\t\tfileBytes.get(container);\n\t\treturn Arrays.toString(container);\n\t}", "private void processSuperHighValue(Bid bid) {\n\t}", "public final void entryRuleBSOperation() throws RecognitionException {\n try {\n // InternalBSQL2Java.g:204:1: ( ruleBSOperation EOF )\n // InternalBSQL2Java.g:205:1: ruleBSOperation EOF\n {\n before(grammarAccess.getBSOperationRule()); \n pushFollow(FOLLOW_1);\n ruleBSOperation();\n\n state._fsp--;\n\n after(grammarAccess.getBSOperationRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }", "private void enableBtmon() {\n System.out.println(\"Starting Btmon Service...\");\n try {\n btmonProcess = new ProcessBuilder(\"/usr/bin/btmon\").start();\n InputStreamReader inputStream = new InputStreamReader(btmonProcess.getInputStream());\n int size;\n char buffer[] = new char[1024];\n while ((size = inputStream.read(buffer, 0, 1024)) != -1) {\n // System.out.println(\" --- Read ----\");\n String data = String.valueOf(buffer, 0, size);\n processBeaconMessage(data);\n // Thread.sleep(1000);\n }\n } catch (IOException ex ) {\n ex.printStackTrace();\n } catch (Exception ex ) {\n ex.printStackTrace();\n } finally {\n if (btmonProcess != null)\n btmonProcess.destroy();\n }\n }", "public abstract boolean process(byte[] input, int offset, int len, boolean finish);", "void run(int size, byte b);", "private interface BinVisitor {\n /** @return true if something has been removed from the bin. */\n abstract boolean visit(TIntList bin, long mapKey);\n }", "private void notifyOnBinaryReceived(byte[] data) {\n synchronized (globalLock) {\n if (isRunning) {\n onBinaryReceived(data);\n }\n }\n }", "public synchronized void b() {\n if (!this.c && n.isFinished() && l.isFinished() && m.isFinished() && k.isFinished() && j.isFinished() && i.isFinished() && h.isFinished()) {\n this.c = true;\n }\n if (this.c && this.b) {\n LocalBroadcastManager.getInstance(AppApplication.getInstance()).sendBroadcast(new Intent().setAction(WxNotifyRefrshReceiver.b).putExtra(CleanSwitch.CLEAN_DATA, WxNotifyRefrshReceiver.c));\n }\n }", "public int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws IllegalStateException;", "public FeedBinServiceImpl(Bin bin) {\n this.bin = bin;\n this.observers = ConcurrentHashMap.newKeySet();\n }", "private void passB() {\n // PROGRAM 1: Student must complete this method\n //place inputB data into output\n for (int i = 0; i < output.length; i++) {\n output[i] = inputB[i];\n }\n }", "@Override\r\n\tpublic void visit(ParkB parkB) {\n\t\t\r\n\t}", "@Override\n public synchronized void inspectBin(Empty request, StreamObserver<BinStatusUpdate> responseObserver) {\n responseObserver.onNext(buildNewStatus());\n responseObserver.onCompleted();\n }", "public static ArrayList < ArrayList < Double >> binPack(double weight[], int n, double bin_cap) { \r\n int binCount = 0;\r\n int k = 0;\r\n double[] bin_space = new double[n];\r\n\r\n ArrayList < Integer > bin = new ArrayList < Integer > ();\r\n ArrayList < Double > val = new ArrayList < Double > ();\r\n ArrayList < ArrayList < Double >> binVal = new ArrayList < ArrayList < Double >> ();\r\n binVal.add(k, new ArrayList < Double > ());\r\n System.out.println(\".......Commencing Calculation...........\\n\");\r\n startTime = System.nanoTime();\r\n for (int i = 0; i < n; i++) {\r\n int j;\r\n for (j = 0; j < binCount; j++) {\r\n \r\n if (bin_space[j] >= weight[i]) {\r\n bin_space[j] = bin_space[j] - weight[i];\r\n //val.add(weight[i]);\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + j + \" took in weight \" + weight[i]);\r\n break;\r\n }\r\n \r\n }\r\n System.out.println(\"*Bad fit for next weight size \"+ weight[i]+ \r\n \"\\n\\n ***NEW BIN CREATED***\\n\");\r\n if (j == binCount) {\r\n \r\n bin_space[binCount] = bin_cap - weight[i];\r\n //val.add(weight[i]);\r\n binCount++;\r\n //k++;\r\n bin.add(j);\r\n binVal.add(j, new ArrayList < Double > ());\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + k + \" took in weight **\" + weight[i]);\r\n }\r\n } \r\n endTime = System.nanoTime();\r\n elapsedTime = (endTime- startTime);\r\n System.out.println(\"\\nBIN PACKING ALGORITHM COMPLETE\\n\");\r\n \r\n return binVal;\r\n }", "private void processToXML(StringBuffer buffer) {\n\n buffer.append(getStartElement(PROCESS));\n\n\n respValue = this.getMashupResponse().toUpperCase();\n\n buffer.append(getStartElementWithAtrribute(MASHUP, RESPONSETYPE, respValue));\n buffer.append(getStartElement(MASHUP_SQL));\n //buffer.append(XmlUtil.escapeXML(this.mashupQuery.toXMLString()));\n buffer.append(this.mashupQuery.toXMLString());\n buffer.append(getEndElement(MASHUP_SQL));\n buffer.append(getEndElement(MASHUP));\n buffer.append(getEndElement(PROCESS));\n }", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public void generateB(){\n\t\t\tfor(int i = 0;i < w.length;i++){\n\t\t\t\tb[i] = w[i].multiply(r).mod(q);\n\t\t\t}\n\t}", "@Override\n protected void onBinaryData(InputStream is) throws IOException {\n }", "@Override // c.d.a.m.w.n\n public /* bridge */ /* synthetic */ boolean b(byte[] bArr) {\n return true;\n }", "public boolean isBinary()\n {\n return false;\n }", "private void handleImage(byte[] b) throws IOException {\n Log.i(\"ScrencapHandler\",\"handleImage\");\n long utime = System.currentTimeMillis();\n byte[] unixTime = toByteArray(utime);\n int start = b.length - unixTime.length - 1; //-1 for the seqnum\n for (int i = 0; i < unixTime.length; i++) {\n b[start + i] = unixTime[i];\n }\n\n if (jitterControl.channelIsFree()) {\n int seq = jitterControl.sendt(utime, b.length);\n\n // Add seq number.\n b[b.length - 1] = (byte) seq;\n\n // Send out the data to the network.\n Log.i(\"ScrencapHandler\",\"Send out the data to the network\");\n mWebkeyVisitor.send(b);\n }\n }", "public final void mB() throws RecognitionException {\n try {\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:395:11: ( ( 'b' | 'B' ) )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:395:12: ( 'b' | 'B' )\n {\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "private synchronized void parsebm() throws MessagingException {\n/* 777 */ if (this.parsed) {\n/* */ return;\n/* */ }\n/* 780 */ InputStream in = null;\n/* 781 */ SharedInputStream sin = null;\n/* 782 */ long start = 0L, end = 0L;\n/* */ \n/* */ try {\n/* 785 */ in = this.ds.getInputStream();\n/* 786 */ if (!(in instanceof java.io.ByteArrayInputStream) && !(in instanceof BufferedInputStream) && !(in instanceof SharedInputStream))\n/* */ {\n/* */ \n/* 789 */ in = new BufferedInputStream(in); } \n/* 790 */ } catch (Exception ex) {\n/* 791 */ throw new MessagingException(\"No inputstream from datasource\", ex);\n/* */ } \n/* 793 */ if (in instanceof SharedInputStream) {\n/* 794 */ sin = (SharedInputStream)in;\n/* */ }\n/* 796 */ ContentType cType = new ContentType(this.contentType);\n/* 797 */ String boundary = null;\n/* 798 */ if (!this.ignoreExistingBoundaryParameter) {\n/* 799 */ String bp = cType.getParameter(\"boundary\");\n/* 800 */ if (bp != null)\n/* 801 */ boundary = \"--\" + bp; \n/* */ } \n/* 803 */ if (boundary == null && !this.ignoreMissingBoundaryParameter && !this.ignoreExistingBoundaryParameter)\n/* */ {\n/* 805 */ throw new MessagingException(\"Missing boundary parameter\");\n/* */ }\n/* */ \n/* */ try {\n/* 809 */ LineInputStream lin = new LineInputStream(in);\n/* 810 */ StringBuffer preamblesb = null;\n/* */ \n/* 812 */ String lineSeparator = null; String line;\n/* 813 */ while ((line = lin.readLine()) != null) {\n/* */ int k;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 821 */ for (k = line.length() - 1; k >= 0; k--) {\n/* 822 */ char c = line.charAt(k);\n/* 823 */ if (c != ' ' && c != '\\t')\n/* */ break; \n/* */ } \n/* 826 */ line = line.substring(0, k + 1);\n/* 827 */ if (boundary != null) {\n/* 828 */ if (line.equals(boundary))\n/* */ break; \n/* 830 */ if (line.length() == boundary.length() + 2 && line.startsWith(boundary) && line.endsWith(\"--\")) {\n/* */ \n/* 832 */ line = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* 841 */ } else if (line.length() > 2 && line.startsWith(\"--\") && (\n/* 842 */ line.length() <= 4 || !allDashes(line))) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 850 */ boundary = line;\n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* 857 */ if (line.length() > 0) {\n/* */ \n/* */ \n/* 860 */ if (lineSeparator == null) {\n/* */ try {\n/* 862 */ lineSeparator = System.getProperty(\"line.separator\", \"\\n\");\n/* */ }\n/* 864 */ catch (SecurityException ex) {\n/* 865 */ lineSeparator = \"\\n\";\n/* */ } \n/* */ }\n/* */ \n/* 869 */ if (preamblesb == null)\n/* 870 */ preamblesb = new StringBuffer(line.length() + 2); \n/* 871 */ preamblesb.append(line).append(lineSeparator);\n/* */ } \n/* */ } \n/* */ \n/* 875 */ if (preamblesb != null) {\n/* 876 */ this.preamble = preamblesb.toString();\n/* */ }\n/* 878 */ if (line == null) {\n/* 879 */ if (this.allowEmpty) {\n/* */ return;\n/* */ }\n/* 882 */ throw new MessagingException(\"Missing start boundary\");\n/* */ } \n/* */ \n/* */ \n/* 886 */ byte[] bndbytes = ASCIIUtility.getBytes(boundary);\n/* 887 */ int bl = bndbytes.length;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 894 */ int[] bcs = new int[256];\n/* 895 */ for (int i = 0; i < bl; i++) {\n/* 896 */ bcs[bndbytes[i] & 0xFF] = i + 1;\n/* */ }\n/* */ \n/* 899 */ int[] gss = new int[bl];\n/* */ \n/* 901 */ for (int j = bl; j > 0; j--) {\n/* */ \n/* 903 */ int k = bl - 1; while (true) { if (k >= j) {\n/* */ \n/* 905 */ if (bndbytes[k] == bndbytes[k - j]) {\n/* */ \n/* 907 */ gss[k - 1] = j;\n/* */ \n/* */ k--;\n/* */ } \n/* */ \n/* */ break;\n/* */ } \n/* 914 */ while (k > 0)\n/* 915 */ gss[--k] = j; break; }\n/* */ \n/* 917 */ } gss[bl - 1] = 1;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 923 */ boolean done = false;\n/* */ \n/* 925 */ while (!done) {\n/* 926 */ int eolLen; MimeBodyPart part; InternetHeaders headers = null;\n/* 927 */ if (sin != null) {\n/* 928 */ start = sin.getPosition();\n/* */ \n/* 930 */ while ((line = lin.readLine()) != null && line.length() > 0);\n/* */ \n/* 932 */ if (line == null) {\n/* 933 */ if (!this.ignoreMissingEndBoundary) {\n/* 934 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* */ \n/* 937 */ this.complete = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } else {\n/* 942 */ headers = createInternetHeaders(in);\n/* */ } \n/* */ \n/* 945 */ if (!in.markSupported()) {\n/* 946 */ throw new MessagingException(\"Stream doesn't support mark\");\n/* */ }\n/* 948 */ ByteArrayOutputStream buf = null;\n/* */ \n/* 950 */ if (sin == null) {\n/* 951 */ buf = new ByteArrayOutputStream();\n/* */ } else {\n/* 953 */ end = sin.getPosition();\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 965 */ byte[] inbuf = new byte[bl];\n/* 966 */ byte[] previnbuf = new byte[bl];\n/* 967 */ int inSize = 0;\n/* 968 */ int prevSize = 0;\n/* */ \n/* 970 */ boolean first = true;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ while (true) {\n/* 976 */ in.mark(bl + 4 + 1000);\n/* 977 */ eolLen = 0;\n/* 978 */ inSize = readFully(in, inbuf, 0, bl);\n/* 979 */ if (inSize < bl) {\n/* */ \n/* 981 */ if (!this.ignoreMissingEndBoundary) {\n/* 982 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* 984 */ if (sin != null)\n/* 985 */ end = sin.getPosition(); \n/* 986 */ this.complete = false;\n/* 987 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ int k;\n/* 992 */ for (k = bl - 1; k >= 0 && \n/* 993 */ inbuf[k] == bndbytes[k]; k--);\n/* */ \n/* */ \n/* 996 */ if (k < 0) {\n/* 997 */ eolLen = 0;\n/* 998 */ if (!first) {\n/* */ \n/* */ \n/* 1001 */ int b = previnbuf[prevSize - 1];\n/* 1002 */ if (b == 13 || b == 10) {\n/* 1003 */ eolLen = 1;\n/* 1004 */ if (b == 10 && prevSize >= 2) {\n/* 1005 */ b = previnbuf[prevSize - 2];\n/* 1006 */ if (b == 13)\n/* 1007 */ eolLen = 2; \n/* */ } \n/* */ } \n/* */ } \n/* 1011 */ if (first || eolLen > 0) {\n/* 1012 */ if (sin != null)\n/* */ {\n/* */ \n/* 1015 */ end = sin.getPosition() - bl - eolLen;\n/* */ }\n/* */ \n/* 1018 */ int b2 = in.read();\n/* 1019 */ if (b2 == 45 && \n/* 1020 */ in.read() == 45) {\n/* 1021 */ this.complete = true;\n/* 1022 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 1027 */ while (b2 == 32 || b2 == 9) {\n/* 1028 */ b2 = in.read();\n/* */ }\n/* 1030 */ if (b2 == 10)\n/* */ break; \n/* 1032 */ if (b2 == 13) {\n/* 1033 */ in.mark(1);\n/* 1034 */ if (in.read() != 10)\n/* 1035 */ in.reset(); \n/* */ break;\n/* */ } \n/* */ } \n/* 1039 */ k = 0;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1049 */ int skip = Math.max(k + 1 - bcs[inbuf[k] & Byte.MAX_VALUE], gss[k]);\n/* */ \n/* 1051 */ if (skip < 2) {\n/* */ \n/* */ \n/* */ \n/* 1055 */ if (sin == null && prevSize > 1)\n/* 1056 */ buf.write(previnbuf, 0, prevSize - 1); \n/* 1057 */ in.reset();\n/* 1058 */ skipFully(in, 1L);\n/* 1059 */ if (prevSize >= 1) {\n/* */ \n/* 1061 */ previnbuf[0] = previnbuf[prevSize - 1];\n/* 1062 */ previnbuf[1] = inbuf[0];\n/* 1063 */ prevSize = 2;\n/* */ } else {\n/* */ \n/* 1066 */ previnbuf[0] = inbuf[0];\n/* 1067 */ prevSize = 1;\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1072 */ if (prevSize > 0 && sin == null) {\n/* 1073 */ buf.write(previnbuf, 0, prevSize);\n/* */ }\n/* 1075 */ prevSize = skip;\n/* 1076 */ in.reset();\n/* 1077 */ skipFully(in, prevSize);\n/* */ \n/* 1079 */ byte[] tmp = inbuf;\n/* 1080 */ inbuf = previnbuf;\n/* 1081 */ previnbuf = tmp;\n/* */ } \n/* 1083 */ first = false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1090 */ if (sin != null) {\n/* 1091 */ part = createMimeBodyPartIs(sin.newStream(start, end));\n/* */ } else {\n/* */ \n/* 1094 */ if (prevSize - eolLen > 0) {\n/* 1095 */ buf.write(previnbuf, 0, prevSize - eolLen);\n/* */ }\n/* */ \n/* 1098 */ if (!this.complete && inSize > 0)\n/* 1099 */ buf.write(inbuf, 0, inSize); \n/* 1100 */ part = createMimeBodyPart(headers, buf.toByteArray());\n/* */ } \n/* 1102 */ super.addBodyPart(part);\n/* */ } \n/* 1104 */ } catch (IOException ioex) {\n/* 1105 */ throw new MessagingException(\"IO Error\", ioex);\n/* */ } finally {\n/* */ try {\n/* 1108 */ in.close();\n/* 1109 */ } catch (IOException cex) {}\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1114 */ this.parsed = true;\n/* */ }", "private void processMediumValue(Bid bid) {\n\t}", "public BinNumber(int currentBinNum) {\n this.currentBinNum = currentBinNum;\n }", "public /*byte[]*/String BinaryCaster(Object item){\n String Sitem = Integer.toBinaryString((int)item);\n //byte[] b = new byte[Sitem.length()];\n //for(int i=0;i<Sitem.length();i++){\n // b[i] = (byte)Sitem.charAt(i);\n //}\n //return b;\n return Sitem;\n }", "@Override\n\tpublic void interpretBytes() {\n\t\t\n\t}", "boolean supportsBinaryInProc();", "public void doRender(EntityBat p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)\n {\n int var10 = ((ModelBat)this.mainModel).getBatSize();\n\n if (var10 != this.renderedBatSize)\n {\n this.renderedBatSize = var10;\n this.mainModel = new ModelBat();\n }\n\n super.doRender((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);\n }", "protected void renderDocument(BufferedDocOp document, final StringBuilder blipsText, final String BlipsID) {\n\t\tif (document==null){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tdocument.apply(new InitializationCursorAdapter(\r\n\t\t new DocInitializationCursor() {\r\n\r\n\t\t\t\t\tpublic void annotationBoundary(AnnotationBoundaryMap arg0) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void characters(String arg0) {\r\n\t\t\t\t\t\t//blipsText.append(arg0);\r\n\t\t\t\t\t\tBlip newblip = new Blip();\r\n\t\t\t\t\t\tnewblip.Content = arg0;\r\n\t\t\t\t\t\tnewblip.BlipID = BlipsID;\r\n\t\t\t\t\t\tnewblip.BlipsParentWaveID = CurrentWaveletID;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tblips.add(newblip);\r\n\t\t\t\t\t\tLog.i(\"wave\",\"blips text=\"+arg0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void elementEnd() {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tblipsText.append(\"\\n\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void elementStart(String type, Attributes attr) {\r\n\t\t\t\t\t\tif( type.equals(DocumentConstants.LINE)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//\tLog.i(\"wave\",\" \"+DocumentConstants.BLIP_ID);\r\n\t\t\t\t\t//\tLog.i(\"wave\",\" \"+DocumentConstants.MANIFEST_DOCUMENT_ID);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t })\r\n\t\t);\r\n\t\t\r\n\t\t//mainWindow.addMessage(blipsText.toString());\r\n\t\t//blips = blipsText.toString();\r\n\t}", "void postProcess();", "void postProcess();", "public void setBNumber(int B_numberIn){\n\t\tB_number = B_numberIn;\n\t}", "private void storeSerializedBlog(Stack recordBin) {\r\n Stack recordSet = new Stack();\r\n\r\n // stack order: (bottom)[thumb, full](top)\r\n while (!recordBin.isEmpty() && this.blogType == this.BLOG_PM) {\r\n recordSet.push(recordBin.pop());\r\n }\r\n if (this.blogType == this.BLOG_M) {\r\n recordSet.push(recordBin.pop());\r\n }\r\n\r\n // store serialized blog in rms\r\n if (this.recordManager.setBlog(this.STORED_BLOGS, this.blogType, recordSet)) {\r\n ////#debug\r\n System.out.println(\"blog stored!\");\r\n\r\n if (this.isJourneyBlog) {\r\n this.journeyBlogCounter++;\r\n if (this.location != null) {\r\n this.waypointCounter++;\r\n // track blog as new journey waypoint\r\n this.traceManager.trackWaypoint(this.timestamp, this.location);\r\n }\r\n } else if (this.location != null) {\r\n this.waypointCounter++;\r\n }\r\n this.cleanUp();\r\n this.controller.loadStoredBlogs();\r\n// Displayable screen = this.controller.getScreen(this.controller.MAIN_SCR);\r\n// this.controller.show(screen);\r\n } else {\r\n //#debug error\r\n System.out.println(\"FATAL: blog not stored!\");\r\n this.cleanUp();\r\n Displayable next = controller.getScreen(controller.BLOG_SCR);\r\n controller.show(controller.ERROR_ASCR, Locale.get(\"blogManager.alert.storageFailed\")+Locale.get(\"photoManager.alert.memoryProblem\"), null, next);\r\n }\r\n }" ]
[ "0.58158064", "0.5706525", "0.5573226", "0.55460525", "0.5520034", "0.54996693", "0.53382266", "0.53002113", "0.5278664", "0.52244973", "0.5219786", "0.51865107", "0.51719576", "0.51340634", "0.5092822", "0.50671107", "0.5036896", "0.502821", "0.502257", "0.50187063", "0.50053334", "0.49736023", "0.4955587", "0.49423322", "0.49376848", "0.49358004", "0.4908804", "0.48935685", "0.4886701", "0.48809335", "0.4877667", "0.48710236", "0.48689815", "0.48490644", "0.48365965", "0.48361588", "0.48001525", "0.47835624", "0.47778237", "0.47646606", "0.4753912", "0.4741324", "0.47337317", "0.4729107", "0.4723969", "0.4715738", "0.47128528", "0.47109577", "0.47079352", "0.47059873", "0.47044584", "0.4695312", "0.4694317", "0.46928284", "0.468728", "0.46849245", "0.46810663", "0.46738693", "0.46712115", "0.46654803", "0.46520683", "0.46424106", "0.46389621", "0.46341267", "0.46336198", "0.4631506", "0.46296316", "0.4627121", "0.46248457", "0.46189678", "0.46176013", "0.46121374", "0.46108758", "0.4608794", "0.46084324", "0.46075642", "0.46052533", "0.46044886", "0.4601584", "0.45949295", "0.45926037", "0.45889634", "0.45880347", "0.458768", "0.4581851", "0.45817137", "0.45807764", "0.45751736", "0.45737985", "0.4572601", "0.45647725", "0.45643285", "0.45599657", "0.4559947", "0.45597008", "0.45501044", "0.4543122", "0.4543122", "0.45397407", "0.4529528" ]
0.62009
0
Treat frames depending of the type of frame
private void treatFrame(Frame frame) throws IOException { if (frame instanceof PublicMessage) { var pm = (PublicMessage) frame; System.out.println(pm.getPseudo() + ": " + pm.getMsg()); } else if (frame instanceof PrivateMessage) { var pm = (PrivateMessage) frame; System.out.println("Private message from " + pm.getPseudo() + ": " + pm.getMsg()); } else if (frame instanceof ErrorFrame) { var ef = (ErrorFrame) frame; var efCode = ef.getCode(); if (efCode == 1) { System.out.println("Login already used by another client"); silentlyClose(); closed = true; return; } else if (efCode == 2) { System.out.println("Receiver does not exist"); return; } else if (efCode == 0) { silentlyClose(); return; } } else if (frame instanceof PrivateConnexionRequest) { var pcr = (PrivateConnexionRequest) frame; System.out.println("Private connexion request from: " + pcr.getRequester() + " (/accept " + pcr.getRequester() + " or /decline " + pcr.getRequester() + ")"); clientChatOs.privateContextMap.put(pcr.getRequester(), new PrivateContext(State.PENDING_TARGET, clientChatOs)); } else if (frame instanceof PrivateConnexionDecline) { var pcd = (PrivateConnexionDecline) frame; System.out.println("Private connexion request with: " + pcd.getReceiver() + " declined"); clientChatOs.privateContextMap.remove(pcd.getReceiver()); } else if (frame instanceof IdPrivateFrame) { var ipd = (IdPrivateFrame) frame; if (ipd.getRequester().equals(pseudo)) { clientChatOs.privateContextMap.get(ipd.getReceiver()) .initializePrivateConnexion(ipd.getConnectId()); } else { clientChatOs.privateContextMap.get(ipd.getRequester()) .initializePrivateConnexion(ipd.getConnectId()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getFrameType(Frame frame)\r\n/* 64: */ {\r\n/* 65:84 */ return getFrameType(frame.getThing());\r\n/* 66: */ }", "void matchFrame();", "public static void changeFrame() {\r\n\t\t\r\n\t}", "@Override\n\tpublic void visitFrame(int type, int nLocal, Object[] local, int nStack,\n\t\t\tObject[] stack) {\n\t}", "@Override public void visitFrame(\n int type,\n int nLocal,\n Object[] local,\n int nStack,\n Object[] stack) {}", "Frame getFrame();", "protected void createFrames() {\n createStandingRight();\n createStandingLeft();\n createWalkingRight();\n createWalkingLeft();\n createJumpingRight();\n createJumpingLeft();\n createDying();\n }", "private boolean isFrame() {\n\t\treturn Frame==60;\n\t}", "public interface IFrameProcessor\n{\n /**\n * @param rawFrame Das Rohdatenframe\n * @return Das verarbeitete Frame\n */\n Bitmap processFrame(Bitmap rawFrame);\n}", "FRAMESET createFRAMESET();", "private void videoFrameReceived(long uid, int type, VideoFrame frame, int rotation) {\r\n\t\tfor (RecordingEventHandler oberserver : recordingEventHandlers) {\r\n\t\t\toberserver.videoFrameReceived(uid, type, frame, rotation);\r\n\t\t}\r\n\t}", "private void audioFrameReceived(long uid, int type, AudioFrame frame) {\r\n\t\tfor (RecordingEventHandler oberserver : recordingEventHandlers) {\r\n\t\t\toberserver.audioFrameReceived(uid, type, frame);\r\n\t\t}\r\n\t}", "FRAME createFRAME();", "public void setFrame(int value) {\r\n this.frame = value;\r\n }", "@Override\n public boolean isGoodForFrame()\n {\n return false;\n }", "public void onFramePickup(ym iba) {}", "private void calculateFrames() {\r\n \tif (imageWidth % frameWidth == 0 && imageHeight % frameHeight == 0) {\r\n maxFrames = imageWidth / frameWidth;\r\n maxFrames = maxFrames * imageHeight / frameHeight;\r\n } else {\r\n throw new InvalidFrameException(\"Image width/height divided with frame \" +\r\n \"width/height must result in an Integer value.\");\r\n }\r\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.visitSource(\"JSR/RET are not supported with computeFrames option\", (String) null);\n Class<ObjectInputStream> class0 = ObjectInputStream.class;\n Type type0 = Type.getType(class0);\n Type.getType(\")UBbE;._%G\");\n Type type1 = Type.BYTE_TYPE;\n Type type2 = Type.INT_TYPE;\n type0.getElementType();\n Type.getDescriptor(class0);\n Type type3 = Type.INT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n type0.getElementType();\n Type type5 = Type.INT_TYPE;\n Item item0 = classWriter0.newInteger(6);\n frame0.execute(7, 2, classWriter0, item0);\n assertEquals(2, ClassWriter.COMPUTE_FRAMES);\n }", "public boolean handlesType(CFrame type) {\n\n\t\treturn coreMatcher.handlesType(type);\n\t}", "public void SwitchToFrame(String handle)\n\t{\n\t}", "public static String getFrameType(Entity frameThing)\r\n/* 59: */ {\r\n/* 60:74 */ return (String)EntityUtils.getRepType(frameThing);\r\n/* 61: */ }", "private void handleFrameShiftCase() {\n\t\t\tif (handleInsertionAtEndInCaseOfNoStopCodon())\n\t\t\t\treturn;\n\t\t\tfinal boolean isInsertionAtEnd = (varAAInsertPos == wtAASeq.length());\n\t\t\tif (!isInsertionAtEnd && wtAASeq.charAt(varAAInsertPos) == '*')\n\t\t\t\thandleFrameShiftCaseWTStartWithStopCodon();\n\t\t\telse\n\t\t\t\thandleFrameShiftCaseWTStartsWithNoStopCodon();\n\n\t\t\t// Check for being a splice site variant. The splice donor, acceptor, and region intervals are disjoint.\n\t\t\tfinal GenomePosition pos = change.getGenomePos();\n\t\t\tfinal GenomePosition lPos = change.getGenomePos().shifted(-1);\n\t\t\tif ((so.liesInSpliceDonorSite(lPos) && so.liesInSpliceDonorSite(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_DONOR_VARIANT);\n\t\t\telse if ((so.liesInSpliceAcceptorSite(lPos) && so.liesInSpliceAcceptorSite(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_ACCEPTOR_VARIANT);\n\t\t\telse if ((so.liesInSpliceRegion(lPos) && so.liesInSpliceRegion(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_REGION_VARIANT);\n\t\t}", "void doFrame() throws PlayerDebugException\n\t{\n\t\tint num = 0; // frame 0 by default \n\t\ttry\n\t\t{\n\t\t\tif (hasMoreTokens())\n\t\t\t\tnum = nextIntToken();\n\n\t\t\tpropertyPut(DISPLAY_FRAME_NUMBER, num);\n\n\t\t\tdumpFrame(num);\n\t\t\tsetListingToFrame(num);\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"notANumber\", args)); //$NON-NLS-1$\n\t\t}\n catch(ArrayIndexOutOfBoundsException aie)\n {\n \tMap<String, Object> args = new HashMap<String, Object>();\n \targs.put(\"frameNumber\", Integer.toString(num)); //$NON-NLS-1$\n err(getLocalizationManager().getLocalizedTextString(\"frameDoesNotExist\", args)); //$NON-NLS-1$\n }\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noActiveSession\")); //$NON-NLS-1$\n\t\t}\n\t}", "void currentFrame(List<IShape> shapes);", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n Type type4 = Type.BOOLEAN_TYPE;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[2] = type5;\n Type type6 = Type.SHORT_TYPE;\n typeArray0[7] = type6;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Frame frame1 = new Frame();\n type5.toString();\n Item item0 = new Item();\n Class<Object> class1 = Object.class;\n Type.getDescriptor(class1);\n // Undeclared exception!\n try { \n frame1.execute(168, (-1845), (ClassWriter) null, item0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSR/RET are not supported with computeFrames option\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Override\n protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {\n in.markReaderIndex();\n\n boolean frameDecoded = false;\n\n try {\n if (!in.isReadable(FRAME_HEADER_LENGTH)) {\n return;\n }\n\n byte frameVersion = in.readByte();\n\n // make sure we get the right version\n verifyVersion(frameVersion);\n\n int frameType = in.readUnsignedByte();\n LOG.debug(\"Received a lumberjack frame of type {}\", (char) frameType);\n\n switch (frameType) {\n case TYPE_JSON:\n frameDecoded = handleJsonFrame(in, out);\n break;\n case TYPE_DATA:\n frameDecoded = handleDataFrame(in, out);\n break;\n case TYPE_WINDOW:\n frameDecoded = handleWindowFrame(in, frameVersion, out);\n break;\n case TYPE_COMPRESS:\n frameDecoded = handleCompressedFrame(ctx, in, out);\n break;\n default:\n throw new RuntimeCamelException(\"Unsupported frame type=\" + frameType);\n }\n } finally {\n if (!frameDecoded) {\n LOG.debug(\"Not enough data to decode a complete frame, retry when more data is available. Reader index was {}\",\n in.readerIndex());\n in.resetReaderIndex();\n }\n }\n }", "public void setFrameByFrameClock()\n {\n\tframeByFrameClock = true;\n }", "private void addFrame() {\n String name = selectString(\"What is the name of this frame?\");\n ReferenceFrame frame = selectFrame(\"What frame are you defining this frame relative to?\");\n double v = selectDouble(\"How fast is this frame moving (as a fraction of c)?\", -1, 1);\n try {\n frame.boost(name, v);\n System.out.println(\"Frame added!\");\n } catch (NameInUseException e) {\n System.out.println(\"A frame with that name already exists!\");\n } catch (FasterThanLightException e) {\n System.out.println(\"Nothing can move as quickly as light!\");\n }\n }", "@Override\r\n\tpublic Object visitFrameOpChain(FrameOpChain frameOpChain, Object arg) throws Exception {\n\t\tKind kind = frameOpChain.getFirstToken().kind;\r\n\r\n\t\tframeOpChain.getArg().visit(this, arg);\r\n\r\n\t\tif (kind.equals(Kind.KW_SHOW)) {\r\n\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"cop5556sp17/PLPRuntimeFrame\", \"showImage\",\r\n\t\t\t\t\t\"()Lcop5556sp17/PLPRuntimeFrame;\", false);\r\n\t\t} else if (kind.equals(Kind.KW_HIDE)) {\r\n\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"cop5556sp17/PLPRuntimeFrame\", \"hideImage\",\r\n\t\t\t\t\t\"()Lcop5556sp17/PLPRuntimeFrame;\", false);\r\n\t\t} else if (kind.equals(Kind.KW_MOVE)) {\r\n\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"cop5556sp17/PLPRuntimeFrame\", \"moveFrame\",\r\n\t\t\t\t\t\"(II)Lcop5556sp17/PLPRuntimeFrame;\", false);\r\n\t\t} else if (kind.equals(Kind.KW_XLOC)) {\r\n\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"cop5556sp17/PLPRuntimeFrame\", \"getXVal\", \"()I\", false);\r\n\t\t} else if (kind.equals(Kind.KW_YLOC)) {\r\n\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"cop5556sp17/PLPRuntimeFrame\", \"getYVal\", \"()I\", false);\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public void setFrame(Frame f){\n\t\tthis.frame = f;\n\t\t//if (singleInstance.mg == null || singleInstance.cpg == null) throw new AssertionViolatedException(\"Forgot to set important values first.\");\n\t}", "public boolean acceptFrame(EvDecimal frame);", "private void referenceFrameExtractor(Object obj) throws IllegalAccessException, InvocationTargetException\n {\n Class clazz = obj.getClass();\n Method[] declaredMethods = clazz.getMethods();\n for (Method method : declaredMethods)\n {\n if (ReferenceFrame.class.isAssignableFrom(method.getReturnType()))\n {\n if (method.getParameterCount() == 0)\n {\n ReferenceFrame referenceFrame = (ReferenceFrame) method.invoke(obj);\n if(referenceFrame != null)\n {\n checkAndAddReferenceFrame(referenceFrame);\n }\n }\n else if (method.getParameterCount() == 1 && method.getParameterTypes()[0] == RobotSide.class)\n {\n for (RobotSide robotSide : RobotSide.values)\n {\n ReferenceFrame referenceFrame = (ReferenceFrame) method.invoke(obj, robotSide);\n if(referenceFrame != null)\n {\n checkAndAddReferenceFrame(referenceFrame);\n }\n }\n }\n else if (method.getParameterCount() == 1 && method.getParameterTypes()[0] == RobotQuadrant.class)\n {\n for (RobotQuadrant robotQuadrant : RobotQuadrant.values)\n {\n ReferenceFrame referenceFrame = (ReferenceFrame) method.invoke(obj, robotQuadrant);\n if(referenceFrame != null)\n {\n checkAndAddReferenceFrame(referenceFrame);\n }\n }\n }\n else if (method.getParameterCount() == 1 && method.getParameterTypes()[0] == RobotSextant.class)\n {\n for (RobotSextant robotSextant : RobotSextant.values)\n {\n ReferenceFrame referenceFrame = (ReferenceFrame) method.invoke(obj, robotSextant);\n if(referenceFrame != null)\n {\n checkAndAddReferenceFrame(referenceFrame);\n }\n }\n }\n }\n }\n }", "public void onFrame(Controller controller) {\n\r\n\t}", "private void selectFrame()\n\t{\n\t\t// Increment the animation frame\n\t\tif ((long) Game.getTimeMilli() - frameStart >= interval)\n\t\t{\n\t\t\tsetFrame(currFrame+1);\n\t\t}\n\t\t// Get the path to the current frame's image\n\t\tsetFramePath();\n\t\t// If the image frame doesn't exist...\n\t\tif (!GraphicsManager.getResManager().resExists(currFramePath))\n\t\t{\n\t\t\tif (isLooping())\n\t\t\t{\n\t\t\t\tsetFrame(1);\n\t\t\t\tsetFramePath();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tisFinished = true;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void setFramesInfo(FramesInfo info) {\n if (info.setFrames && info.setIndex) {\n // Verify that this is valid\n String error = null;\n DataTime[] times = info.frameTimes;\n int idx = info.frameIndex;\n if ((times == null) && (idx >= 0)) {\n error = \"Index should be less than zero when there are no frame times.\";\n } else if ((times != null) && (idx >= times.length)) {\n error = \"Index must be less than the number of frames.\";\n } else if ((idx < 0) && (times != null) && (times.length > 0)) {\n error = \"Index must be positive when frames are provided\";\n }\n if (times != null) {\n for (DataTime time : times) {\n if (time == null) {\n error = \"Descriptor should not contain null times\";\n break;\n }\n }\n }\n\n if (error != null) {\n statusHandler.handle(Priority.SIGNIFICANT, \"Error: \" + error,\n new VizException(\"Error setting FrameInfo\"));\n return;\n }\n }\n DataTime oldTime, currTime;\n boolean frameChanged = false;\n synchronized (timeManager) {\n DataTime[] oldTimes = timeManager.frames;\n int oldIdx = this.frameIndex;\n if (info.setFrames) {\n if (info.frameTimes != null) {\n DataTime[] newTimes = Arrays.copyOf(info.frameTimes,\n info.frameTimes.length);\n setFrameTimesInternal(newTimes);\n } else {\n timeManager.frames = null;\n }\n if (!info.setIndex) {\n setFrameInternal(frameCoordinator.determineFrameIndex(\n oldTimes, oldIdx, timeManager.frames));\n }\n }\n if (info.setIndex) {\n setFrameInternal(info.frameIndex);\n }\n if (info.setMap) {\n timeMatchingMap = new ConcurrentHashMap<>(info.timeMap);\n }\n FramesInfo currInfo = getFramesInfo();\n FramesInfo oldInfo = new FramesInfo(oldTimes, oldIdx);\n oldTime = oldInfo.getCurrentFrame();\n currTime = currInfo.getCurrentFrame();\n if (((oldTime != null) && (!oldTime.equals(currTime)))\n || ((currTime != null) && (!currTime.equals(oldTime)))) {\n frameChanged = true;\n }\n }\n if (frameChanged) {\n notifyFrameChanged(oldTime, currTime);\n }\n\n }", "public void buildFrame();", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n Frame frame0 = new Frame();\n Type type0 = Type.CHAR_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte)31;\n byteArray0[1] = (byte)31;\n byteArray0[2] = (byte) (-65);\n byteArray0[3] = (byte) (-94);\n byteArray0[4] = (byte) (-57);\n byteArray0[5] = (byte) (-65);\n byteArray0[6] = (byte)60;\n byteArray0[7] = (byte) (-73);\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<InputStream> class0 = InputStream.class;\n Type.getDescriptor(class0);\n Type.getType(class0);\n Frame frame1 = new Frame();\n Item item0 = new Item(7);\n // Undeclared exception!\n try { \n frame1.execute(181, 3695, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private void loadFrames(int level)\n {\n //Clear out any past frames, reset iFrame counter\n frames.clear();\n iFrame = 0;\n //Switch statement not possible due to redeclaration\n // Refactor needed if no. of levels exceeds 10\n if(level==0)\n {\n //Level zero does not allow user control, just a splashscreen\n }\n else if(level == 1)\n {\n LevelOne userCode = new LevelOne();\n userCode.main();\n }\n else if(level == 2)\n {\n LevelTwo userCode = new LevelTwo();\n userCode.main();\n }\n else if(level == 3)\n {\n LevelThree userCode = new LevelThree();\n userCode.main();\n }\n else if(level == 4)\n {\n LevelFour userCode = new LevelFour();\n userCode.main();\n }\n else if(level == 5)\n {\n LevelFive userCode = new LevelFive();\n userCode.main();\n }\n else\n {\n System.out.println(\"Invalid level\");\n }\n }", "public void processFrame(float[] frame)\n\t{\n\t\tif (frameCursor == -1)\n\t\t{\n\t\t\tframeCursor = frameSize;\n\t\t\tinput.read(nextFrame);\n\n\t\t\t// Pre-preprocess frame\n deoffset.processFrame(nextFrame);\n vad.processFrame(nextFrame);\n\t\t\tamplifier.processFrame(nextFrame);\n\t\t}\n\t\t// Handle frame cursor\n\t\telse if (frameCursor >= frameSize)\n\t\t{\n\t\t\t// Reset frame cursor\n\t\t\tframeCursor -= frameSize;\n\n\t\t\t// Prepare frame buffers\n\t\t\tSystem.arraycopy(nextFrame, 0, prevFrame, 0, frameSize);\n\n\t\t\t// Read next frame\n\t\t\tinput.read(nextFrame);\n\n // Pre-preprocess frame\n deoffset.processFrame(nextFrame);\n vad.processFrame(nextFrame);\n amplifier.processFrame(nextFrame);\n\t\t}\n\n\t\t// Prepare left frame part\n\t\tanalyzeFrame(\n\t\t\tprevFrame, frameCursor,\n\t\t\tframe, 0,\n\t\t\tframeSize - frameCursor,\n\t\t\twindow);\n\n\t\t// Prepare right frame part\n\t\tanalyzeFrame(\n\t\t\tnextFrame, 0,\n\t\t\tframe, frameSize - frameCursor,\n\t\t\tframeCursor,\n\t\t\twindow);\n\n\t\tif (doForwardFFT)\n {\n fft.fft(frame);\n denoiser.processFrame(frame);\n }\n\n\t\t// Increment frame cursor\n\t\tframeCursor += hopSize;\n\t}", "Frame createFrame();", "private void addSubframes(org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto value) {\n value.getClass();\n ensureSubframesIsMutable();\n subframes_.add(value);\n }", "protected abstract String[] getFrameNames();", "@Test\n\tpublic void testGetFrame() {\n\t}", "public void onFrameDrop() {}", "private void handleAnimations() {\n pendingLoop:\n for (Animation pending : new ArrayList<>(pendingAnimations)) {\n for (Animation a : new ArrayList<>(animations)) {\n if (a.getClass().equals(pending.getClass())) {\n continue pendingLoop;\n }\n }\n pendingAnimations.remove(pending);\n addAnimation(pending);\n }\n\n for (Animation animation : new ArrayList<>(animations)) {\n animation.doAnimation(this);\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.visitSource(\"JSR/RET are not supported with computeFrames option\", (String) null);\n ClassWriter classWriter1 = new ClassWriter(966);\n Item item0 = classWriter1.newLong(2);\n Item item1 = new Item((-3501), item0);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"LineNumberTable\");\n // Undeclared exception!\n try { \n frame0.execute(169, (-2746), classWriter1, item1);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSR/RET are not supported with computeFrames option\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "boolean hasFrame();", "private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) {\n if (frame instanceof CloseWebSocketFrame) {\n //removeLocation(ctx.channel().id().asShortText());\n handshaker.close(ctx.channel(), (CloseWebSocketFrame) frame.retain());\n return;\n }\n if (frame instanceof PingWebSocketFrame) {\n ctx.channel().write(new PongWebSocketFrame(frame.content().retain()));\n return;\n }\n if (frame instanceof PongWebSocketFrame) {\n touchLocation(ctx.channel().id().asShortText());\n return;\n }\n if (!(frame instanceof TextWebSocketFrame)) {\n throw new UnsupportedOperationException(String.format(\"%s frame types not supported\", frame.getClass()\n .getName()));\n }\n\n handleJsonEvent(ctx, ((TextWebSocketFrame) frame).text());\n }", "@BeforeEach\n void setup() {\n String contentType = getContentType();\n preload(contentType, \"frame2\", false);\n }", "private void nexttest(){\n\t\tif (TestListPanel.ktea2yn = true){\n\t\tnextframe = new Ktea2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\t/*else if (wiscyn = true){\n\t\tnextframe = new Wiscframe();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse if (basc2yn = true){\n\t\tnextframe = new Basc2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\n\t\t}*/\n\t\t\n\t}", "private void setSubframes(\n int index, org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto value) {\n value.getClass();\n ensureSubframesIsMutable();\n subframes_.set(index, value);\n }", "public Collection getChildFrames();", "@Test\n\tpublic void setFrameTest2() throws Exception {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\n\t\t\t\t\tstart();\n\t\t\tgui.setFrame();\n\t\t}\n\n\t}", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n ClassWriter classWriter0 = new ClassWriter(3002);\n frame0.owner = label1;\n classWriter0.visitSource(\"JSR/RET are not supported with computeFrames option\", (String) null);\n Item item0 = classWriter0.key2;\n classWriter0.toByteArray();\n frame0.execute(162, 630, classWriter0, item0);\n // Undeclared exception!\n try { \n frame0.execute(3786, 630, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private void restoreFrames() {\n\n\t\tJInternalFrame[] frames = MainFrame.getInstance().getDesktop()\n\t\t\t\t\t\t\t.getAllFrames();\n\n\t\tfor (int i = 0; i < frames.length; i++)\n\t\t\ttry {\n\t\t\t\tframes[i].setMaximum(false);\n\t\t\t\tframes[i].setIcon(false);\n\t\t\t} catch (PropertyVetoException e) {\n\t\t\t\tErrorMsg.addErrorMessage(e);\n\t\t\t}\n\t}", "private Frame getCurrentFrame() {\n\t\treturn null;\r\n\t}", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.INT_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n type0.getDescriptor();\n Type.getType(class0);\n Type[] typeArray0 = new Type[2];\n typeArray0[0] = type4;\n typeArray0[1] = type0;\n frame0.initInputFrame(classWriter1, 10, typeArray0, 8);\n Type.getInternalName(class0);\n Frame frame1 = new Frame();\n Item item0 = new Item(6);\n // Undeclared exception!\n try { \n frame0.execute(115, (-1587), classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private Frame3() {\n\t}", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "public void processFrame(float deltaTime);", "private boolean isLastFrame() {\n\t\treturn false;\r\n\t}", "public void showInternalFrameObject(InternalFrameName internalFrameNameObject){\n \n switch (internalFrameNameObject) {\n \n case STARTMENUINTERNAL:\n this.startMenuInternalFrameObject.show();\n this.championshipsInternalFrameObject.hide();\n this.competitorsInternalFrameObject.hide();\n this.teamsParticipationsInternalFrameObject.hide();\n this.solistsParticipationsInternalFrameObject.hide();\n this.reportInternalFrameObject.hide();\n this.aboutInternalFrameObject.hide();\n break;\n \n case CHAMPIONSHIPINTERNAL:\n this.startMenuInternalFrameObject.hide();\n this.championshipsInternalFrameObject.show();\n this.competitorsInternalFrameObject.hide();\n this.teamsParticipationsInternalFrameObject.hide();\n this.solistsParticipationsInternalFrameObject.hide();\n this.reportInternalFrameObject.hide();\n this.aboutInternalFrameObject.hide();\n break;\n \n case COMPETITORSINTERNAL:\n this.startMenuInternalFrameObject.hide();\n this.championshipsInternalFrameObject.hide();\n this.competitorsInternalFrameObject.show();\n this.teamsParticipationsInternalFrameObject.hide();\n this.solistsParticipationsInternalFrameObject.hide();\n this.reportInternalFrameObject.hide();\n this.aboutInternalFrameObject.hide();\n break;\n \n case TEAMSPARTICIPATIONSINTERNAL:\n this.startMenuInternalFrameObject.hide();\n this.championshipsInternalFrameObject.hide();\n this.competitorsInternalFrameObject.hide();\n this.teamsParticipationsInternalFrameObject.show();\n this.solistsParticipationsInternalFrameObject.hide();\n this.reportInternalFrameObject.hide();\n this.aboutInternalFrameObject.hide();\n break;\n \n case SOLISTSPARTICIPATIONSINTERNAL:\n this.startMenuInternalFrameObject.hide();\n this.championshipsInternalFrameObject.hide();\n this.competitorsInternalFrameObject.hide();\n this.teamsParticipationsInternalFrameObject.hide();\n this.solistsParticipationsInternalFrameObject.show();\n this.reportInternalFrameObject.hide();\n this.aboutInternalFrameObject.hide();\n break;\n \n case REPORTINTERNAL:\n this.startMenuInternalFrameObject.hide();\n this.championshipsInternalFrameObject.hide();\n this.competitorsInternalFrameObject.hide();\n this.teamsParticipationsInternalFrameObject.hide();\n this.solistsParticipationsInternalFrameObject.hide();\n this.reportInternalFrameObject.show();\n this.aboutInternalFrameObject.hide();\n break;\n \n case ABOUTINTERNAL:\n this.startMenuInternalFrameObject.hide();\n this.championshipsInternalFrameObject.hide();\n this.competitorsInternalFrameObject.hide();\n this.teamsParticipationsInternalFrameObject.hide();\n this.solistsParticipationsInternalFrameObject.hide();\n this.reportInternalFrameObject.hide();\n this.aboutInternalFrameObject.show();\n break;\n \n default:\n break;\n }\n }", "public void setFrame(ChessFrame f)\n {\n frame = f;\n }", "private void addSubframes(\n int index, org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto value) {\n value.getClass();\n ensureSubframesIsMutable();\n subframes_.add(index, value);\n }", "public synchronized Bitmap getNextFrame() {\n if (this.header.frameCount <= 0 || this.framePointer < 0) {\n if (Log.isLoggable(TAG, 3)) {\n String str = TAG;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Unable to decode frame, frameCount=\");\n sb.append(this.header.frameCount);\n sb.append(\", framePointer=\");\n sb.append(this.framePointer);\n Log.d(str, sb.toString());\n }\n this.status = 1;\n }\n if (this.status != 1) {\n if (this.status != 2) {\n this.status = 0;\n if (this.block == null) {\n this.block = this.bitmapProvider.obtainByteArray(255);\n }\n GifFrame gifFrame = (GifFrame) this.header.frames.get(this.framePointer);\n int i = this.framePointer - 1;\n GifFrame gifFrame2 = i >= 0 ? (GifFrame) this.header.frames.get(i) : null;\n this.act = gifFrame.lct != null ? gifFrame.lct : this.header.gct;\n if (this.act == null) {\n if (Log.isLoggable(TAG, 3)) {\n String str2 = TAG;\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"No valid color table found for frame #\");\n sb2.append(this.framePointer);\n Log.d(str2, sb2.toString());\n }\n this.status = 1;\n return null;\n }\n if (gifFrame.transparency) {\n System.arraycopy(this.act, 0, this.pct, 0, this.act.length);\n this.act = this.pct;\n this.act[gifFrame.transIndex] = 0;\n }\n return setPixels(gifFrame, gifFrame2);\n }\n }\n if (Log.isLoggable(TAG, 3)) {\n String str3 = TAG;\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"Unable to decode frame, status=\");\n sb3.append(this.status);\n Log.d(str3, sb3.toString());\n }\n }", "public void setFrame(double anX, double aY, double aWidth, double aHeight)\n{\n setFrameXY(anX, aY);\n setFrameSize(aWidth, aHeight);\n}", "private void checkFrames() {\n\t\tif(tradeDetail == null){\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void addFrame(Frame frame) throws BowlingException\r\n\t{\r\n\t\tif(frames.size()==10)\r\n\t\t\tthrow new BowlingException();\r\n\t\telse\r\n\t\t\tframes.add(frame);\r\n\t\t\t\r\n\t\t//to be implemented\r\n\t\t\r\n\t\t\r\n\t}", "public static void processFrameII( int frameIdx, String referringWindow ) {\n if ( selena.getLocation().trim().equals(\"\") || selena.getLocation().trim().equals(\"about:blank\") ) {\n \t return;\n }\n \n System.out.println( \"Processing the frame\" );\n \n //Do clicks on images and embeds within the frame.\n int frameImgCount = 0;\n try { \n frameImgCount = Integer.parseInt( selena.getEval( \"var imgList = window.document.getElementsByTagName('img'); for ( var i=0; i<imgList.length; i++ ) { imgList.item(i).setAttribute('id','img'+i); } imgList.length;\" ).trim() );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n //System.out.println ( \"frame image count = \" + frameImgCount );\n \n int frameEmbedCount = 0;\n try {\n frameEmbedCount = Integer.parseInt( selena.getEval( \"var embedList = window.document.getElementsByTagName('embed'); for ( var i=0; i<embedList.length; i++ ) { embedList.item(i).setAttribute('id','embed'+i); } embedList.length;\").trim() );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n //System.out.println( \"frame embed count = \" + frameEmbedCount );\n \n \tint frameIframeCount = 0;\n try { \n frameIframeCount = Integer.parseInt( selena.getEval( \"var iframeList = window.document.getElementsByTagName('iframe'); for ( var i=0; i<iframeList.length; i++ ) { iframeList.item(i).setAttribute('id','iframe'+i); } iframeList.length;\" ).trim() );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n //System.out.println( \"frame iframe count = \" + frameIframeCount );\n \n //Process Images in the frame.\n // System.out.println( \"Processing frame images.\" );\n for ( int i=0; i<frameImgCount; i++ ) {\n \t String imgId = \"img\"+Integer.toString(i);\n String imgSrc = \"\";\n \t try { \n imgSrc = selena.getEval(\"window.document.getElementById('\"+imgId+\"').getAttribute('src');\");\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n String[] imgPieces = imgSrc.trim().split(\"/\");\n String imgLastPiece = imgPieces[imgPieces.length-1];\n for ( int j=0; j<contentTypes.size(); j++ ) {\n \t try {\n if ( contentTypes.get(j).startsWith(\"image/png\") || contentTypes.get(j).startsWith(\"image/jpeg\") || contentTypes.get(j).startsWith(\"image/gif\") ) {\n String[] pieces = adUrls.get(j).trim().split(\"/\");\n if ( pieces[pieces.length-1].equals( imgLastPiece ) ) {\n \t\t\t// System.out.println( pieces[pieces.length-1] + \", \" + imgLastPiece );\n try {\n \t\t\t selena.getEval(\"window.document.getElementById('\"+imgId+\"').parentNode.setAttribute('target','blank'); window.document.getElementById('\"+imgId+\"').parentNode.parentNode.setAttribute('target','blank'); window.document.getElementById('\"+imgId+\"').click();\");\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n try {\n Thread.sleep( 3000 );\n } catch ( InterruptedException ie ) { ie.printStackTrace(); } \n \n Iterator iter2 = null;\n try { \n iter2 = selena.getWrappedDriver().getWindowHandles().iterator();\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n while ( iter2.hasNext()) {\n String windowName = (String)iter2.next();\n \t\t\t if ( !windowName.equals( winName ) ) {\n try {\n \t\t\t\t selena.selectWindow( windowName );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n try {\n String landingPageUrl = selena.getLocation().trim();\n System.out.println(\"INSERT INTO landing_page_urls ( ad_url, file_name, content_type, landing_page_url ) VALUES ( '\" + ((String)adUrls.get(j)).trim() + \"', '\" + ((String)fileNames.get(j)).trim() + \"', '\" + ((String)contentTypes.get(j)).trim() + \"', '\" + landingPageUrl + \"' )\");\n \n stmt.executeUpdate(\"INSERT INTO landing_page_urls ( ad_url, file_name, content_type, landing_page_url ) VALUES ( '\" + ((String)adUrls.get(j)).trim() + \"', '\" + ((String)fileNames.get(j)).trim() + \"', '\" + ((String)contentTypes.get(j)).trim() + \"', '\" + landingPageUrl + \"' )\");\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n catch ( SQLException sqle ) { sqle.printStackTrace(); }\n \n try {\n Thread.sleep( 3000 );\n } catch ( InterruptedException ie ) { ie.printStackTrace(); } \n try {\n selena.goBack();\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n try {\n selena.selectWindow( referringWindow );\n selena.getWrappedDriver().switchTo().frame( frameIdx );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n break;\n }\n }\n break;\n }\n \t\t }\n \t\t} catch ( SeleniumException se ) { se.printStackTrace(); }\n \t }\n \t}\n \n //Process embeds to get and resolve clicktag urls.\n System.out.println( \"Processing frame embeds.\" );\n ArrayList<String> clickTagUrls = new ArrayList<String>();\n ArrayList<Integer> clickTagEmbedIdx = new ArrayList<Integer>();\n \n for ( int i=0; i<frameEmbedCount; i++ ) {\n String embedId = \"embed\"+Integer.toString(i);\n String embedSrc = \"\";\n \t try { \n embedSrc = selena.getEval(\"window.document.getElementById('\"+embedId+\"').getAttribute('src');\");\n \t } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n String[] embedPieces = embedSrc.trim().split(\"/\");\n String embedLastPiece = embedPieces[embedPieces.length-1];\n \t // System.out.println( \"embed last piece = \" + embedLastPiece );\n for ( int j=0; j<contentTypes.size(); j++ ) {\n \t if ( contentTypes.get(j).startsWith(\"application/x-shockwave-flash\") ) {\n \t try {\n String[] pieces = adUrls.get(j).trim().split(\"/\");\n if ( pieces[pieces.length-1].equals( embedLastPiece ) ) {\n \t\t System.out.println( \"frame embed found: \" + pieces[pieces.length-1] + \", \" + embedLastPiece );\n String flashVarsAttribute = \"\";\n try {\n flashVarsAttribute = selena.getEval(\"window.document.getElementById('\"+embedId+\"').getAttribute('flashvars');\").trim();\n \t\t } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n String vars = embedSrc + \";\" + flashVarsAttribute;\n vars = vars.replaceAll(\"clickTag\",\"clicktag\");\n vars = vars.replaceAll(\"CLICKTAG\",\"clicktag\");\n vars = vars.replaceAll(\"ClickTag\",\"clicktag\");\n vars = vars.replaceAll(\"clickTAG\",\"clicktag\");\n vars = vars.replaceAll(\"ClickTAG\",\"clicktag\");\n vars = vars.replaceAll(\"Clicktag\",\"clicktag\");\n String[] varsArray = vars.split(Pattern.quote(\"clicktag\"));\n \n if ( varsArray.length > 1 ) {\n for ( int k=1; k<varsArray.length; k++ ) {\n \t\t\t String[] varPieces = varsArray[k].split(Pattern.quote(\"=\"));\n String clickTagUrl = varPieces[1].trim();\n \t\t\t clickTagUrl = clickTagUrl.replace(\"http%3a//\",\"http://\");\n clickTagUrl = clickTagUrl.replace(\"http%3A//\",\"http://\");\n clickTagUrl = clickTagUrl.replace(\"HTTP%3A//\",\"http://\");\n clickTagUrl = clickTagUrl.replace(\"HTTP%3a//\",\"http://\");\n clickTagUrl = rtrim(clickTagUrl);\n \t\t\t clickTagUrls.add( clickTagUrl ); \n clickTagEmbedIdx.add( new Integer(j) );\n clickTagUrl = clickTagUrl.replaceAll(\"http%3a//\",\"http://\");\n clickTagUrl = clickTagUrl.replaceAll(\"http%3A//\",\"http://\");\n clickTagUrl = clickTagUrl.replaceAll(\"HTTP%3A//\",\"http://\");\n clickTagUrl = clickTagUrl.replaceAll(\"HTTP%3a//\",\"http://\");\n \n System.out.println( \"clickTagUrl = \" + clickTagUrl );\n String[] httpPieces = clickTagUrl.split(\"http://\");\n break;\n \t\t\t }\n \t\t\t}\n break;\n }\n \t } catch ( SeleniumException se ) { se.printStackTrace(); } \n }\n }\n \t }\n \n for ( int i=0; i<clickTagUrls.size(); i++ ) {\n // System.out.println( \"opening frame landing page, \" + clickTagUrls.get(i) );\n int idx = clickTagEmbedIdx.get(i).intValue();\n \n try {\n \t selena.getEval( \"var link = window.document.createElement('a'); link.setAttribute('href','\"+clickTagUrls.get(i)+\"'); link.setAttribute('target','blank'); var bodyItems = window.document.getElementsByTagName('body'); var body = bodyItems.item(0); body.appendChild(link); link.click();\" );\n \t } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n try {\n Thread.sleep( 4000 );\n } catch ( InterruptedException ie ) { ie.printStackTrace(); } \n \t Iterator iter2 = null;\n try {\n iter2 = selena.getWrappedDriver().getWindowHandles().iterator();\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n while ( iter2.hasNext()) {\n String windowName = (String)iter2.next();\n \t\t if ( !windowName.equals( winName ) ) {\n \t\t\t try {\n \t\t\t selena.selectWindow( windowName );\n \t\t\t } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n try {\n String landingPageUrl = selena.getLocation().trim();\n System.out.println(\"INSERT INTO landing_page_urls ( ad_url, file_name, content_type, landing_page_url ) VALUES ( '\" + ((String)adUrls.get(idx)).trim() + \"', '\" + ((String)fileNames.get(idx)).trim() + \"', '\" + ((String)contentTypes.get(idx)).trim() + \"', '\" + landingPageUrl + \"' )\");\n stmt.executeUpdate(\"INSERT INTO landing_page_urls ( ad_url, file_name, content_type, landing_page_url ) VALUES ( '\" + ((String)adUrls.get(idx)).trim() + \"', '\" + ((String)fileNames.get(idx)).trim() + \"', '\" + ((String)contentTypes.get(idx)).trim() + \"', '\" + landingPageUrl + \"' )\");\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n \t\t\t catch ( SQLException sqle ) { sqle.printStackTrace(); }\n \t\t\t try {\n selena.goBack();\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n try {\n \t\t\t selena.selectWindow( referringWindow );\n selena.getWrappedDriver().switchTo().frame( frameIdx );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n break;\n }\n \t\t }\n break; \n \t }\n \n //here with select frames\n int iFrameCount = 0;\n try {\n \t iFrameCount = Integer.parseInt( selena.getEval(\"window.frames.length\") );\n System.out.println( \"FRAME IFRAME COUNT = \" + iFrameCount );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n try {\n selena.selectWindow( referringWindow );\n \t } catch ( SeleniumException se ) { se.printStackTrace(); }\n \n for ( int i=0; i<iFrameCount; i++ ) {\n \t try {\n \t\tselena.getWrappedDriver().switchTo().frame(frameIdx).switchTo().frame( i );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n try {\n System.out.println( \"Got frame\"+Integer.toString(i) + \" = \" + selena.getLocation() );\n } catch ( SeleniumException se ) { se.printStackTrace(); }\n processFrameII( i, referringWindow );\n try {\n selena.selectFrame( \"relative=top\" );\n } catch ( SeleniumException se ) { se.printStackTrace(); } \n }\n \n System.out.println( \"----------------------------------------\" );\n }", "public void handleFramePacket(byte[] ba)\r\n/* 212: */ throws IOException\r\n/* 213: */ {\r\n/* 214:172 */ Packet211TileDesc pkt = new Packet211TileDesc(ba);\r\n/* 215:173 */ pkt.subId = pkt.getByte();\r\n/* 216:174 */ readFromPacket(pkt);\r\n/* 217: */ }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n int int0 = Frame.INTEGER;\n Item item0 = classWriter0.newInteger((-1786));\n int int1 = 187;\n // Undeclared exception!\n try { \n frame0.execute(187, 49, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void setFrame(com.walgreens.rxit.ch.cda.StrucDocTable.Frame.Enum frame)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(FRAME$24);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(FRAME$24);\n }\n target.setEnumValue(frame);\n }\n }", "public int getFrame() {\r\n return frame;\r\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n Frame frame0 = new Frame();\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n frame0.owner = label1;\n ClassWriter classWriter0 = new ClassWriter(3002);\n classWriter0.visitSource(\"JSR/RET are not supported with computeFrames option\", (String) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n Item item0 = classWriter0.newClassItem(\"uzihbCBH\");\n classWriter0.newLong(966);\n frame0.execute(2656, 33554432, classWriter0, item0);\n assertEquals(2, ClassWriter.COMPUTE_FRAMES);\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.VOID_TYPE;\n Type type5 = Type.BOOLEAN_TYPE;\n int[] intArray0 = new int[5];\n intArray0[0] = 7;\n intArray0[1] = 8;\n intArray0[2] = 4;\n intArray0[3] = 4;\n intArray0[4] = 6;\n frame0.inputStack = intArray0;\n Type type6 = Type.FLOAT_TYPE;\n Type type7 = Type.SHORT_TYPE;\n ClassWriter classWriter0 = new ClassWriter(3);\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(84, (-990), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "org.apache.calcite.avatica.proto.Common.Frame getFrame();", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "final void parse_frame() {\n // Convert Bytes read to int\n for (k = 0,b=0; k < framesize; k += 4) {\n b0 = frame_bytes[k];\n if (k + 3 < framesize) {\n b3 = frame_bytes[k + 3];\n b2 = frame_bytes[k + 2];\n b1 = frame_bytes[k + 1];\n } else if (k + 2 < framesize) {\n b3 = 0;\n b2 = frame_bytes[k + 2];\n b1 = frame_bytes[k + 1];\n } else if (k + 1 < framesize) {\n b2 = b3 = 0;\n b1 = frame_bytes[k + 1];\n }\n // 4 bytes are stored in a int array\n framebuffer[b++] = ((b0 << 24) & 0xFF000000) | ((b1 << 16) & 0x00FF0000) | ((b2 << 8) & 0x0000FF00) | (b3 & 0x000000FF);\n }\n \n wordpointer = bitindex = 0;\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n byte[] byteArray0 = new byte[0];\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n Item item0 = classWriter0.newClassItem(\"java/lang/String\");\n classWriter0.newLong((byte) (-51));\n // Undeclared exception!\n try { \n frame0.execute((byte) (-99), (byte) (-51), classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private AnimFrame getFrame(final int index) {\n\t\treturn (AnimFrame)frames.get(index);\n\t}", "protected abstract void animationLogicTemplate();", "@Override\n\tpublic void onNewFrame(HeadTransform headTransform) {\n\t}", "public boolean isLastFrame(){\r\n\t\t//to be implemented\r\n\t\treturn false;\r\n\t}", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n Frame frame0 = new Frame();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n ClassWriter classWriter0 = new ClassWriter(1048575);\n classWriter0.visitSource(\"JSR/RET are not suppPrtej with computeFrames option\", (String) null);\n Item item0 = classWriter0.newClassItem(\"*6@#GSZr~Dvz\");\n item0.longVal = (long) 1048575;\n Item item1 = new Item(91, item0);\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(86, 2, classWriter0, (Item) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test125() throws Throwable {\n Frame frame0 = new Frame();\n byte[] byteArray0 = new byte[5];\n byteArray0[1] = (byte)3;\n byteArray0[2] = (byte)91;\n byteArray0[3] = (byte) (-1);\n byteArray0[4] = (byte)0;\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n BufferedInputStream bufferedInputStream0 = new BufferedInputStream(byteArrayInputStream0);\n ClassWriter classWriter0 = new ClassWriter((byte)3);\n frame0.execute((byte)0, 1, classWriter0, (Item) null);\n assertEquals(2, ClassWriter.COMPUTE_FRAMES);\n }", "void setCurrentFrame(int frameNum) {\n this.currFrame = frameNum;\n }", "public void setFrame(String frame){\r\n\t\taddAttribute(new PointingElement(\"frame\",frame));\r\n\t}", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n Item item0 = classWriter0.newFieldItem(\"The FileFilter must not be null\", \"\", \"Insensitive\");\n ClassWriter classWriter1 = new ClassWriter(182);\n classWriter1.toByteArray();\n Type type0 = Type.VOID_TYPE;\n Type type1 = Type.BOOLEAN_TYPE;\n Type type2 = Type.FLOAT_TYPE;\n Type type3 = Type.SHORT_TYPE;\n ClassWriter classWriter2 = new ClassWriter(3034);\n ClassWriter classWriter3 = new ClassWriter(2);\n Item item1 = classWriter3.key2;\n Item item2 = new Item(6);\n Frame frame1 = new Frame();\n // Undeclared exception!\n try { \n frame1.execute(173, 6, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private void handleNonFrameShiftCase() {\n\t\t\tfinal boolean isInsertionAtEnd = (varAAInsertPos == wtAASeq.length());\n\t\t\tif (!isInsertionAtEnd && wtAASeq.charAt(varAAInsertPos) == '*')\n\t\t\t\thandleNonFrameShiftCaseStartsWithStopCodon();\n\t\t\telse\n\t\t\t\thandleNonFrameShiftCaseStartsWithNoStopCodon();\n\n\t\t\t// Check for being a splice site variant. The splice donor, acceptor, and region intervals are disjoint.\n\t\t\tfinal GenomePosition pos = change.getGenomePos();\n\t\t\tfinal GenomePosition lPos = change.getGenomePos().shifted(-1);\n\t\t\tif ((so.liesInSpliceDonorSite(lPos) && so.liesInSpliceDonorSite(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_DONOR_VARIANT);\n\t\t\telse if ((so.liesInSpliceAcceptorSite(lPos) && so.liesInSpliceAcceptorSite(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_ACCEPTOR_VARIANT);\n\t\t\telse if ((so.liesInSpliceRegion(lPos) && so.liesInSpliceRegion(pos)))\n\t\t\t\tvarTypes.add(VariantEffect.SPLICE_REGION_VARIANT);\n\t\t}", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[8];\n Type type0 = Type.DOUBLE_TYPE;\n typeArray0[1] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[2] = type1;\n Type type2 = Type.INT_TYPE;\n typeArray0[3] = type2;\n Type type3 = Type.VOID_TYPE;\n typeArray0[4] = type3;\n Type type4 = Type.BOOLEAN_TYPE;\n typeArray0[4] = type0;\n Type type5 = Type.FLOAT_TYPE;\n typeArray0[2] = type5;\n Type type6 = Type.SHORT_TYPE;\n typeArray0[7] = type6;\n Class<Integer> class0 = Integer.class;\n Type.getType(class0);\n Frame frame1 = new Frame();\n type5.toString();\n Type.getObjectType(\"F\");\n Item item0 = new Item();\n // Undeclared exception!\n try { \n frame1.execute(46, 0, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "boolean hasFirstFrame();", "void renderFrame(){\n if(getPlayer().isChoosingFile()) return; // don't render while filechooser is active\n \n if(canvasFileWriter.writingMovieEnabled) chipCanvas.grabNextImage();\n chipCanvas.paintFrame(); // actively paint frame now, either with OpenGL or Java2D, depending on switch\n \n if(canvasFileWriter.writingMovieEnabled){\n canvasFileWriter.writeMovieFrame();\n }\n }", "public List<Frame> getAllFrames(){\n\t\treturn Collections.unmodifiableList(frames);\n\t}", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n Type type0 = Type.INT_TYPE;\n Type type1 = Type.VOID_TYPE;\n Type type2 = Type.BOOLEAN_TYPE;\n Type type3 = Type.FLOAT_TYPE;\n Type type4 = Type.SHORT_TYPE;\n Class<Object> class0 = Object.class;\n type0.getDescriptor();\n Type.getType(class0);\n Type[] typeArray0 = new Type[2];\n typeArray0[0] = type4;\n typeArray0[1] = type0;\n frame0.initInputFrame(classWriter1, 10, typeArray0, 1431);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, true, true);\n frame0.initInputFrame(classWriter0, 9, typeArray0, 4091);\n Item item0 = new Item();\n item0.set(0.0F);\n item0.set(0.0);\n ClassWriter classWriter2 = new ClassWriter(69);\n Frame frame1 = new Frame();\n frame0.merge(classWriter2, frame1, 989);\n // Undeclared exception!\n frame0.merge(classWriter0, frame1, 158);\n }", "public void dump(final DataOutputStream file) throws IOException {\n file.write(frameType);\n if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME && frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {\n typesOfStackItems[0].dump(file);\n } else if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {\n file.writeShort(byteCodeOffset);\n typesOfStackItems[0].dump(file);\n } else if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX) {\n file.writeShort(byteCodeOffset);\n } else if (frameType == Const.SAME_FRAME_EXTENDED) {\n file.writeShort(byteCodeOffset);\n } else if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) {\n file.writeShort(byteCodeOffset);\n for (final StackMapType type : typesOfLocals) {\n type.dump(file);\n }\n } else if (frameType == Const.FULL_FRAME) {\n file.writeShort(byteCodeOffset);\n file.writeShort(typesOfLocals.length);\n for (final StackMapType type : typesOfLocals) {\n type.dump(file);\n }\n file.writeShort(typesOfStackItems.length);\n for (final StackMapType type : typesOfStackItems) {\n type.dump(file);\n }\n } else if (!(frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX)) {\n /* Can't happen */\n throw new ClassFormatException(\"Invalid Stack map table tag: \" + frameType);\n }\n }", "public void setFrame(int newFrame) {\r\n if (newFrame < maxFrames) {\r\n frame = newFrame;\r\n }\r\n }", "public interface FramesListener {\n void onRefresh(float number);\n}", "public void processFrame(Mat in, Mat out)\r\n\t{\r\n\t\t// multiple regions of interest\r\n\t\t\r\n\t\tint playSquares = 32; // number of playable game board squares\r\n\t\t\r\n\t\t// keep track of starting row square\r\n\t\tint parity = 0; // 0 is even, 1 is odd, tied to row number\r\n\t\tint count = 0; // row square\r\n\t\tint rowNum = 0; // row number, starting at 0\r\n\t\t\r\n\t\tint vsegment = in.rows() / 8; // only accounts 8 playable\r\n\t\tint hsegment = in.cols() / 10; // 8 playable, 2 capture\r\n\t\tint hOffset = hsegment * 2; // offset for playable board\r\n\t\tint vOffset = vsegment + 40;\r\n\t\t\r\n\t\t// For angle of camera\r\n\t\tint dx = 80;\r\n\t\tint ddx = 0;\r\n\t\thsegment -= 16;\r\n\t\t\r\n\t\tint dy = 20;\r\n\t\tvsegment -= 24;\r\n\t\t\r\n\t\t// Go through all playable squares\r\n\t\tfor (int i = 0; i < playSquares; i++)\r\n\t\t{\r\n\t\t\t// change offset depending on the row\r\n\t\t\tif (parity == 0) // playable squares start on 2nd square from left\r\n\t\t\t{\r\n\t\t\t\tif (rowNum >= 5)\r\n\t\t\t\t\tdx -= 3;\r\n\t\t\t\thOffset = hsegment * 2 + dx;\r\n\t\t\t}\r\n\t\t\telse // playable squares start on immediate left\r\n\t\t\t{\r\n\t\t\t\tif (rowNum >= 5)\r\n\t\t\t\t\tdx -= 3;\r\n\t\t\t\thOffset = hsegment + dx;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (rowNum == 4)\r\n\t\t\t\tif (count == 6)\r\n\t\t\t\t\tddx = 10;\r\n\t\t\tif (rowNum == 5)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = -6;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 6;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 12;\r\n\t\t\t\telse if (count == 6)\r\n\t\t\t\t\tddx = 20;\r\n\t\t\t}\r\n\t\t\tif (rowNum == 6)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = 0;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 16;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 32;\r\n\t\t\t\telse if (count == 6)\r\n\t\t\t\t\tddx = 40;\r\n\t\t\t}\r\n\t\t\tif (rowNum == 7)\r\n\t\t\t{\r\n\t\t\t\tif (count == 0)\r\n\t\t\t\t\tddx = 0;\r\n\t\t\t\telse if (count == 2)\r\n\t\t\t\t\tddx = 24;\r\n\t\t\t\telse if (count == 4)\r\n\t\t\t\t\tddx = 40;\r\n\t\t\t\telse\r\n\t\t\t\t\tddx = 52;\r\n\t\t\t}\r\n\r\n\t\t\t// find where roi should be\r\n\t\t\t//System.out.println(\"\" + vOffset);\r\n\t\t\tPoint p1 = new Point(hOffset + count * hsegment + ddx, vOffset + rowNum * vsegment - dy); // top left point of rectangle (x,y)\r\n\t\t\tPoint p2 = new Point(hOffset + (count + 1) * hsegment + ddx, vOffset + (rowNum + 1) * vsegment - dy); // bottom right point of rectangle (x,y)\r\n\t\t\t\r\n\t\t\t// create rectangle that is board square\r\n\t\t\tRect bound = new Rect(p1, p2);\r\n\t\t\t\r\n\t\t\tchar color;\r\n\t\t\tif (i == 0)\r\n\t\t\t{\r\n\t\t\t\t// frame only includes rectangle\r\n\t\t\t\tMat roi = new Mat(in, bound);\r\n\t\t\t\t\r\n\t\t\t\t// get the color\r\n\t\t\t\tcolor = identifyColor(roi);\r\n\t\t\t\t\r\n\t\t\t\t// copy input image to output image\r\n\t\t\t\tin.copyTo(out);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// frame only includes rectangle\r\n\t\t\t\tMat roi = new Mat(out, bound);\r\n\t\t\t\t\r\n\t\t\t\t// get the color\r\n\t\t\t\tcolor = identifyColor(roi);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// annotate the output image\r\n\t\t\t// scalar values as (blue, green, red)\r\n\t\t\tswitch(color)\r\n\t\t\t{\r\n\t\t\t\tcase COLOR_BLUE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(255, 0, 0), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(255, 0, 0), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.BLACK; // end user's piece\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_ORANGE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(0, 128, 255), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(0, 128, 255), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.WHITE; // system's piece\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_WHITE:\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(255, 255, 255), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(255, 255, 255), 2);\r\n\t\t\t\t\tboard[i] = CheckersBoard.EMPTY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase COLOR_BLACK: // this is black\r\n\t\t\t\t\t//Imgproc.rectangle(out, p1, p2, new Scalar(0, 0, 0), 2);\r\n\t\t\t\t\tCore.rectangle(out, p1, p2, new Scalar(0, 0, 0), 2); // maybe add 8, 0 as line type and fractional bits\r\n\t\t\t\t\tboard[i] = CheckersBoard.EMPTY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcount += 2;\r\n\t\t\tif (count == 8)\r\n\t\t\t{\r\n\t\t\t\tparity = ++parity % 2; // change odd or even\r\n\t\t\t\tcount = 0;\r\n\t\t\t\trowNum++;\r\n\t\t\t\thsegment += 2;\r\n\t\t\t\tdx -= 10;\r\n\t\t\t\tdy += 10;\r\n\t\t\t\tvsegment += 3;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public CyFrame captureCurrentFrame() throws IOException{\n\t//\tCyNetwork currentNetwork = Cytoscape.getCurrentNetwork();\n\t\tCyFrame frame = new CyFrame(bundleContext);\n\n\t/*\tCyApplicationManager appManager = (CyApplicationManager) getService(CyApplicationManager.class);\n\t\tCyNetworkView networkView = appManager.getCurrentNetworkView(); */\n\t\n\t\t//extract view data to make the frame\n\t\tframe.populate(); \n\t\n\t\t//set the interpolation count, or number of frames between this frame and the next to be interpolated\n\t\tframe.setInterCount(fps);\n\t\n\t\t//frame.setID(networkView.getIdentifier()+\"_\"+frameid);\n\t\t//System.out.println(\"Frame ID: \"+frameid);\n\t\n\t\t//capture an image of the frame\n\t\tframe.captureImage();\n\t\n\t\t//frameid++;\n\t\n\t\treturn frame;\n\t\n\t}", "private Mat processFrame(Mat frame) {\n Imgproc.cvtColor(frame, frame, Imgproc.COLOR_RGBA2RGB);\n // Forward image through network.\n Mat blob = Dnn.blobFromImage(frame, IN_SCALE_FACTOR,\n new Size(IN_WIDTH, IN_HEIGHT),\n new Scalar(MEAN_VAL, MEAN_VAL, MEAN_VAL), false, false);\n net.setInput(blob);\n Mat detections = net.forward();\n int cols = frame.cols();\n int rows = frame.rows();\n Size cropSize;\n if ((float)cols / rows > WH_RATIO) {\n cropSize = new Size(rows * WH_RATIO, rows);\n } else {\n cropSize = new Size(cols, cols / WH_RATIO);\n }\n int y1 = (int)(rows - cropSize.height) / 2;\n int y2 = (int)(y1 + cropSize.height);\n int x1 = (int)(cols - cropSize.width) / 2;\n int x2 = (int)(x1 + cropSize.width);\n Mat subFrame = frame.submat(y1, y2, x1, x2);\n cols = subFrame.cols();\n rows = subFrame.rows();\n detections = detections.reshape(1, (int)detections.total() / 7);\n for (int i = 0; i < detections.rows(); ++i) {\n double confidence = detections.get(i, 2)[0];\n if (confidence > THRESHOLD) {\n int classId = (int)detections.get(i, 1)[0];\n int xLeftBottom = (int)(detections.get(i, 3)[0] * cols);\n int yLeftBottom = (int)(detections.get(i, 4)[0] * rows);\n int xRightTop = (int)(detections.get(i, 5)[0] * cols);\n int yRightTop = (int)(detections.get(i, 6)[0] * rows);\n // Draw rectangle around detected object.\n Imgproc.rectangle(subFrame, new Point(xLeftBottom, yLeftBottom),\n new Point(xRightTop, yRightTop),\n new Scalar(0, 255, 0));\n String label = classNames[classId] + \": \" + confidence;\n int[] baseLine = new int[1];\n Size labelSize = Imgproc.getTextSize(label, Core.FONT_HERSHEY_SIMPLEX, 0.5, 1, baseLine);\n // Draw background for label.\n Imgproc.rectangle(subFrame, new Point(xLeftBottom, yLeftBottom - labelSize.height),\n new Point(xLeftBottom + labelSize.width, yLeftBottom + baseLine[0]),\n new Scalar(255, 255, 255), Core.FILLED);\n // Write class name and confidence.\n Imgproc.putText(subFrame, label, new Point(xLeftBottom, yLeftBottom),\n Core.FONT_HERSHEY_SIMPLEX, 0.5, new Scalar(0, 0, 0));\n }\n }\n\n return frame;\n }" ]
[ "0.63590205", "0.63208824", "0.59147036", "0.587887", "0.5876105", "0.58321893", "0.5810608", "0.57898706", "0.575055", "0.57469946", "0.57260835", "0.57091945", "0.56570154", "0.56551856", "0.5612646", "0.55743974", "0.5569422", "0.55529237", "0.55431086", "0.5500344", "0.54561484", "0.54544485", "0.54432535", "0.5436298", "0.5431994", "0.537749", "0.53446436", "0.53321576", "0.53180146", "0.53089046", "0.5304506", "0.530424", "0.5296774", "0.5289746", "0.52798706", "0.52664435", "0.52593285", "0.5236647", "0.523495", "0.52255106", "0.52144253", "0.5208539", "0.5206228", "0.5188669", "0.5176251", "0.5160935", "0.5158132", "0.51578957", "0.5134859", "0.5125997", "0.511573", "0.5115149", "0.5107508", "0.51026464", "0.5099025", "0.50880146", "0.5076905", "0.50740904", "0.5053991", "0.50467956", "0.5030816", "0.50206906", "0.5018892", "0.5008638", "0.4998218", "0.49950075", "0.49763682", "0.49688455", "0.49657997", "0.49580473", "0.4955279", "0.4953295", "0.49532315", "0.49511835", "0.4949355", "0.49467528", "0.49362975", "0.49277672", "0.49219063", "0.49114877", "0.49097988", "0.4908341", "0.49017233", "0.48933786", "0.488835", "0.48801014", "0.4874165", "0.48719612", "0.48633394", "0.48531735", "0.48446122", "0.48353893", "0.4833069", "0.48328072", "0.48309466", "0.48284036", "0.48266146", "0.48264965", "0.48255354", "0.48246273" ]
0.54661745
20
Instantiates a new Private context.
public PrivateContext(State state, ClientChatOs clientChatOs) { this.state = state; this.clientChatOs = clientChatOs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Context createContext();", "Context createContext();", "public Context() {\n }", "private static Context prepareContext() {\r\n\r\n Context context = new Context();\r\n\r\n ContextProperties properties = new ContextProperties();\r\n\r\n // Context requires a name\r\n properties.setName(\"Example_Package_Context\");\r\n\r\n // description is nice\r\n properties.setDescription(\"Example package Context.\");\r\n\r\n // define the type\r\n properties.setType(\"ExampleType\");\r\n\r\n /*\r\n * Organizational Unit(s) is/are required\r\n */\r\n OrganizationalUnitRefs ous = new OrganizationalUnitRefs();\r\n\r\n // add the Organizational Unit with objid escidoc:ex3 (the ou of the\r\n // example eSciDoc representation package) to the list of\r\n // organizational Units\r\n ous.add(new OrganizationalUnitRef(\"escidoc:ex3\"));\r\n properties.setOrganizationalUnitRefs(ous);\r\n\r\n context.setProperties(properties);\r\n\r\n return context;\r\n }", "public PContext() {\r\n\t\tthis(new PDirective(), null, null);\r\n\t}", "private ApplicationContext()\n\t{\n\t}", "private static Context createContext(final Context context)\r\n throws EscidocException, InternalClientException, TransportException, MalformedURLException {\r\n \t\r\n \t// prepare client object\r\n \tAuthentication auth = new Authentication(new URL(Constants.DEFAULT_SERVICE_URL), Constants.USER_NAME_SYSADMIN, Constants.USER_PASSWORD_SYSADMIN);\r\n \tContextHandlerClient chc = new ContextHandlerClient(auth.getServiceAddress());\r\n \tchc.setHandle(auth.getHandle());\r\n\r\n Context createdContext = chc.create(context);\r\n\r\n return createdContext;\r\n }", "private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }", "public T instantiatePrivate() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n Constructor<T> constructor = clazz.getDeclaredConstructor();\n constructor.setAccessible(true);\n return constructor.newInstance();\n }", "protected SSLContext() {}", "public abstract void makeContext();", "private WebContext() {\n }", "public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }", "public DataCaptureContextProvider() {\n /*\n * Create DataCaptureContext using your license key.\n */\n dataCaptureContext = DataCaptureContext.forLicenseKey(SCANDIT_LICENSE_KEY);\n }", "private UserCourseCourse() {\n\t}", "public Context() {\n\t\tstates = new ObjectStack<>();\n\t}", "private AppContext()\n {\n }", "public PortletContext() {\n }", "protected AbstractContext() {\n this(new FastHashtable<>());\n }", "private TenantContextDataHolder() {\n super();\n }", "public static ShadowolfContext createNewContext(String configFile) {\r\n\t\tShadowolfContext context = new ShadowolfContext();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tcontext.configuration = new PropertiesConfiguration(configFile);\r\n\t\t} catch (ConfigurationException e) {\r\n\t\t\tExceptions.log(e);\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\t\r\n\t\t//initialize ServerContext\r\n\t\ttry {\r\n\t\t\tServerContext serverContext = new ServerContext();\r\n\t\t\tInetAddress address = InetAddress.getByName(context.configuration.getString(\"server.listen.address\", \"127.0.0.1\"));\r\n\t\t\tint port = context.configuration.getInt(\"server.listen.port\", 80);\r\n\t\t\tserverContext.setJettyServer(new JettyServer(address, port));\r\n\t\t\t\r\n\t\t\tint corePoolSize = context.configuration.getInt(\"server.workers.min\", 4);\r\n\t\t\tint maximumPoolSize = context.configuration.getInt(\"server.workers.max\", 16);\r\n\t\t\tint keepAliveTime = context.configuration.getInt(\"server.workers.idle\", 300);\r\n\t\t\tint queueLength = context.configuration.getInt(\"server.workers.queueSize\", 25_000);\r\n\t\t\tBlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<>(queueLength);\r\n\t\t\tTimeUnit unit = TimeUnit.SECONDS;\r\n\r\n\t\t\tExecutorService es = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue);\r\n\t\t\tserverContext.setHttpWorkerPool(es);\r\n\t\t\tserverContext.getJettyServer().setExecutor(es);\r\n\t\t\t\r\n\t\t\tString conf = \"conf/serverAccess.xml\";\r\n\t\t\tJAXBContext jaxb = JAXBContext.newInstance(AccessList.class);\r\n\t\t\tUnmarshaller um = jaxb.createUnmarshaller();\r\n\t\t\tserverContext.setServerAccessList((AccessList) um.unmarshal(new File(conf)));\r\n\t\t\t\r\n\t\t\tcontext.serverContext = serverContext;\r\n\t\t} catch (UnknownHostException | ServletException | JAXBException e) {\r\n\t\t\tExceptions.log(e);\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\t\r\n\t\t//initialize PluginContext \r\n\t\t{\r\n\t\t\tPluginContext pluginContext = new PluginContext();\r\n\t\t\t\r\n\t\t\tint corePoolSize = context.configuration.getInt(\"plugins.async.workers.min\", 4);\r\n\t\t\tint maximumPoolSize = context.configuration.getInt(\"plugins.async.workers.max\", 16);\r\n\t\t\tint keepAliveTime = context.configuration.getInt(\"plugins.async.workers.idle\", 300);\r\n\t\t\tint queueLength = context.configuration.getInt(\"plugins.async.workers.queueSize\", 25_000);\r\n\t\t\tBlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<>(queueLength);\r\n\t\t\tTimeUnit unit = TimeUnit.SECONDS;\r\n\t\t\t\r\n\t\t\tExecutorService es = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue);\r\n\r\n\t\t\tPluginLoader loader = new PluginLoader();\r\n\t\t\tloader.setContext(context);\r\n\t\t\tloader.loadAllPluginsInDir();\r\n\t\t\t\r\n\t\t\tPluginEngine engine = new PluginEngine(es);\r\n\t\t\tfor(Plugin p : loader.getPlugins().values()) {\r\n\t\t\t\tengine.addPlugin(p);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpluginContext.setAsyncPluginWorkerPool(es);\r\n\t\t\tpluginContext.setPluginEngine(engine);\r\n\t\t\tpluginContext.setPluginLoader(loader);\r\n\t\t\tcontext.pluginContext = pluginContext;\r\n\t\t}\r\n\t\t\r\n\t\t//initialize BittorrentContext\r\n\t\t{\r\n\t\t\tBittorrentContext bittorrentContext = new BittorrentContext();\r\n\t\t\r\n\t\t\tint peerExpiry = context.getConfiguration().getInt(\"protocol.Peerlist.peerExpiry\", 2400);\r\n\t\t\tint httpWorkers = context.getConfiguration().getInt(\"server.workers.max\", 16);\r\n\t\t\t// 1/8th of all workers accessing the same peerlist seems unlikely\r\n\t\t\t// and a concurrency level of six seems sane... these values might need to be tuned later\r\n\t\t\tint concurrencyLevel = (httpWorkers/8) > 6 ? 6 : httpWorkers/8; \r\n\t\t\t\r\n\t\t\t//the largest majority of torrents that will ever be tracked will have\r\n\t\t\t//less than 2 peers, so reducing the default size means that we'll have\r\n\t\t\t//slightly less memory overhead - in exchange for a bunch of resize ops\r\n\t\t\tbittorrentContext.setPeerlistMapMaker(\r\n\t\t\t\tnew MapMaker().\r\n\t\t\t\texpireAfterWrite(peerExpiry, TimeUnit.SECONDS).\r\n\t\t\t\tconcurrencyLevel(concurrencyLevel).\r\n\t\t\t\tinitialCapacity(2)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\tConcurrentMap<Infohash, Peerlist> plists = \r\n\t\t\t\t\tnew MapMaker().\r\n\t\t\t\t\texpireAfterAccess(peerExpiry, TimeUnit.SECONDS).\r\n\t\t\t\t\tconcurrencyLevel(concurrencyLevel).\r\n\t\t\t\t\tmakeMap();\r\n\t\t\tbittorrentContext.setPeerlists(plists);\r\n\t\t\t\r\n\t\t\tcontext.bittorrentContext = bittorrentContext;\r\n\t\t}\r\n\t\t\r\n\t\treturn context;\r\n\t}", "private ReservationsContextHelper() {\r\n }", "public static MyFileContext create() {\n\t\treturn new MyContextImpl();\n\t}", "private PerksFactory() {\n\n\t}", "public TAppAccess() {\n\t}", "private Instantiation(){}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.442 -0500\", hash_original_method = \"00A9769D3FCB2BCA752959A2156960BA\", hash_generated_method = \"123FF23E2FD831FD5E2A58B0E9D2D78B\")\n \n private int _eglCreateContext(EGLDisplay display, EGLConfig config, EGLContext share_context, int[] attrib_list){\n \taddTaint(display.getTaint());\n \taddTaint(config.getTaint());\n \taddTaint(share_context.getTaint());\n \taddTaint(attrib_list[0]);\n \treturn getTaintInt();\n }", "protected Provider() {}", "Context context();", "Context context();", "public static NamespaceContext create() {\n return new NamespaceContext();\n }", "public static Security_I create()\r\n\t\t{\r\n\t\treturn new Security();\r\n\t\t}", "public AccessPoint() {\n }", "public Contexte() {\n FactoryRegistry registry = FactoryRegistry.getRegistry();\n registry.register(\"module\", new ModuleFactory());\n registry.register(\"if\", new ConditionFactory());\n registry.register(\"template\", new TemplateFactory());\n registry.register(\"dump\", new DumpFactory());\n }", "private PrivatePerson(String name, int age) {\n super(name, age);\n }", "PlatformContext createPlatformContext()\n {\n return new PlatformContextImpl();\n }", "public static Context getInstance(){\n\t\treturn (Context) t.get();\n\t}", "private Security() { }", "public abstract Context context();", "private static SSLContext createSSLContext() {\n\t try {\n\t SSLContext context = SSLContext.getInstance(\"SSL\");\n\t if (devMode) {\n\t \t context.init( null, new TrustManager[] {new RESTX509TrustManager(null)}, null); \n\t } else {\n\t TrustManager[] trustManagers = tmf.getTrustManagers();\n\t if ( kmf!=null) {\n\t KeyManager[] keyManagers = kmf.getKeyManagers();\n\t \n\t // key manager and trust manager\n\t context.init(keyManagers,trustManagers,null);\n\t }\n\t else\n\t \t// no key managers\n\t \tcontext.init(null,trustManagers,null);\n\t }\n\t return context;\n\t } \n\t catch (Exception e) {\n\t \t logger.error(e.toString());\n\t throw new HttpClientError(e.toString());\n\t \t }\n }", "public Context(Global global)\n {\n _level=0;\n _listId=0;\n _global=global;\n _textStyle=new TextStyle();\n setParagraphStyle(new ParagraphStyle());\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.466 -0500\", hash_original_method = \"37AAAAC75A3E4652292E435C97659047\", hash_generated_method = \"DF49315663E2606797D4BA6FB493CF14\")\n \n private int _eglGetCurrentContext(){\n \treturn getTaintInt();\n }", "private CredentialManager(Context context) {\n appDb = AppDB.getInstance(context);\n mContext = context;\n }", "public ThreadLocal() {}", "private ThreadLocalTransaction() {\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private LayerHelper(Context context) {\n super(context);\n\n\t\ttry {\n layerDao = daoStore.getLayerDao();\n } catch (SQLException sqle) {\n Log.e(LOG_NAME, \"Unable to communicate with Layers database.\", sqle);\n\n throw new IllegalStateException(\"Unable to communicate with Layers database.\", sqle);\n }\n\n }", "private Context getContext() throws Exception {\n\t\tif (ctx != null)\n\t\t\treturn ctx;\n\n\t\tProperties props = new Properties();\n\t\tprops.put(Context.PROVIDER_URL, \"jnp://\" + endpoint);\n\t\tprops.put(Context.INITIAL_CONTEXT_FACTORY,\n\t\t\t\t\"org.jnp.interfaces.NamingContextFactory\");\n\t\tprops.put(Context.URL_PKG_PREFIXES,\n\t\t\t\t\"org.jboss.naming:org.jnp.interfaces\");\n\t\tctx = new InitialContext(props);\n\n\t\treturn ctx;\n\t}", "protected SecurityObject() {\n\t\t// Used by JPA provider.\n\n\t\tLOGGER.debug(\"SecurityObject#co\");\n\t}", "public PContext(PDirective directive) {\r\n\t\tthis(directive, null, null);\r\n\t}", "public FailureContext() {\n }", "private PtTlsReaderFactory() {\n throw new AssertionError();\n }", "public Scoped() {\n }", "RegistrationContextImpl(RegistrationContext ctx) {\n this.messageLayer = ctx.getMessageLayer();\n this.appContext = ctx.getAppContext();\n this.description = ctx.getDescription();\n this.isPersistent = ctx.isPersistent();\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:41.996 -0500\", hash_original_method = \"CB9D9CAF93B6F7C6AC078700B30D5B3A\", hash_generated_method = \"6EEF3712392D06942F0E7086316BBAB4\")\n \n private void nativeConstructor(){\n }", "void init(@NotNull ExecutionContext context);", "private Server()\n\t{\n\t}", "private StubPrivateConstructorPair(Object firstObject, Object secondObject) {\r\n super(firstObject, secondObject);\r\n }", "private Foo() {\n\t\tSystem.out.println(\"Private Constructor.\");\n\t}", "private AuthenticationData() {\n\n }", "public static MethodHandles.Lookup createPrivateLookup(Class<?> clazz)\n {\n return constructor.invokeWith(clazz, MethodHandles.Lookup.PRIVATE);\n }", "public static Context getContext() {\n\t\treturn instance;\n\t}", "@Test\n public void testPrivateCtor() throws Exception {\n Constructor<?> privateCtor = Helper.class.getDeclaredConstructors()[0];\n assertTrue(Modifier.isPrivate(privateCtor.getModifiers()));\n privateCtor.setAccessible(true);\n privateCtor.newInstance(new Object[] {});\n }", "protected GraphicsContext() {\n\t}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "public Secure() {\n\t\tsuper();\n\t}", "protected IOContext _createContext(Object srcRef, boolean resourceManaged)\n/* */ {\n/* 1513 */ return new IOContext(_getBufferRecycler(), srcRef, resourceManaged);\n/* */ }", "private GeneralServicesImpl() {\r\n\t}", "public Factory() {\n this(getInternalClient());\n }", "public SecurityContext(World world) {\n\t\tsuper();\n\t\tthis.whitelist = world.getWhitelist();\n\t\tthis.securityLevel = SecurityLevel.AUTHOR;\n\t\tthis.world = world;\n\t\tthis.entity = null;\n\t\tthis.team = TeamFlavor.AUTHOR;\n\t}", "private TMDBContract() {\n }", "Reproducible newInstance();", "private ObjectFactory() { }", "private MemberIdServer() {\n }", "private ChainingMethods() {\n // private constructor\n\n }", "CTX_Context getContext();", "private Builder() {\n }", "private Builder() {\n }", "public MyServiceDataSingleton(Context context) {\r\n myContext = context;\r\n }", "private TemplateService() {\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "public MockPageContext() {\n super();\n MockPageContext.init();\n }", "private Builder()\n {\n }", "public RuntimeContext(RuntimeManagerImpl rtMgr)\n {\n super(rtMgr.getJNIEasy()); \n \n this.rtMgr = rtMgr;\n }", "public PrivateKey makePrivateKey() {\n return new PrivateKey(decryptingBigInt, primesMultiplied);\n }", "public Token<T> privateClone(Text newService) {\n return new PrivateToken<>(this, newService);\n }", "private ObjectRepository() {\n\t}", "public IPrivateTestCompView.IContextElement createAndAddContextElement() {\r\n return (IPrivateTestCompView.IContextElement)createAndAddElement();\r\n }", "private HardCodedCitations() {\n }", "private DatabaseAccess(Context context) {\n this.openHelper = new MyDatabase(context);\n }", "public abstract void createAccessPoints(IApplicationContext context);", "@O2Client(permitPublic = false)\n @POST\n @Path(\"/client/private\")\n public Response authorizedPrivatePOST(@Context final SecurityContext c) {\n return Response.ok().build();\n }", "private CloudEndpointBuilderHelper() {\n }", "private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}", "private ArticleMgr() {\r\n\r\n\t}", "public ContextDaoImpl() {\n Set<Commissioner> commissionerSet = new HashSet<>();\n List<String> logins = new ArrayList<>();\n commissionerSet.add(new Commissioner(\"victor.net\", \"25345Qw&&\", true));\n commissionerSet.add(new Commissioner(\"egor.net\", \"3456eR&21\", false));\n commissionerSet.add(new Commissioner(\"igor.net\", \"77??SDSw23\", false));\n logins.add(\"victor@khoroshev.net\");\n logins.add(\"egor@khoroshev.net\");\n logins.add(\"igor@khoroshev.net\");\n Database.setCandidateSet(new HashSet<>());\n Database.setVoterSet(new HashSet<>());\n Database.setLogins(logins);\n Database.setCommissionerSet(commissionerSet);\n }", "private void createSSLContext() throws Exception {\n\n char[] passphrase = \"passphrase\".toCharArray();\n\n KeyStore ks = KeyStore.getInstance(\"JKS\");\n ks.load(new FileInputStream(\"testkeys\"), passphrase);\n\n KeyManagerFactory kmf = KeyManagerFactory.getInstance(\"SunX509\");\n kmf.init(ks, passphrase);\n\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(\"SunX509\");\n tmf.init(ks);\n\n sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);\n }", "private PasskeyContract() {}", "private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "public ProyectFactoryImpl() {\r\n\t\tsuper();\r\n\t}" ]
[ "0.6753069", "0.6753069", "0.6539938", "0.639749", "0.63918", "0.6363756", "0.62867206", "0.61795175", "0.6098779", "0.60979086", "0.6080903", "0.602315", "0.6013242", "0.5987267", "0.5984852", "0.59611213", "0.5943371", "0.5913346", "0.5886406", "0.5835194", "0.58350414", "0.58204716", "0.5818012", "0.5773833", "0.57137305", "0.56748563", "0.56559783", "0.5650918", "0.56507957", "0.56507957", "0.5647138", "0.5630773", "0.5618505", "0.56131977", "0.56069213", "0.56016666", "0.55967283", "0.55850923", "0.5583156", "0.55624956", "0.55622995", "0.55542886", "0.55276525", "0.55216324", "0.5510808", "0.5502378", "0.54954064", "0.5483544", "0.5480115", "0.54790574", "0.5461477", "0.5451947", "0.5449657", "0.54455507", "0.5431761", "0.54268974", "0.54251343", "0.5410327", "0.5409345", "0.5403798", "0.53919154", "0.5391891", "0.53783184", "0.5375777", "0.537072", "0.5369589", "0.5365781", "0.53656393", "0.53642106", "0.5362438", "0.5359114", "0.5358552", "0.53577775", "0.535714", "0.5353808", "0.5351761", "0.53337187", "0.53337187", "0.5331093", "0.53267616", "0.53135145", "0.53119236", "0.5309268", "0.529399", "0.52822113", "0.527918", "0.52778095", "0.5274543", "0.5268049", "0.526065", "0.5255896", "0.5253772", "0.5250986", "0.5245389", "0.5244985", "0.52444863", "0.5241838", "0.52361095", "0.5234133", "0.5233593" ]
0.612185
8
Checking connexion to the server and sending the connectId
@Override public void doConnect() throws IOException { if (!sc.finishConnect()) { return; // the selector gave a bad hint } // Sending login private var bb = ByteBuffer.allocate(1 + Long.BYTES); bb.put((byte) 9).putLong(connectId); queueMessage(bb.flip()); updateInterestOps(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void requestServerId() {\n connection.startClient(lbInfo.getIp(), lbInfo.getPort());\n System.out.println(\"Connected!\");\n connection.sendMessage(connectionInfo);\n }", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "private synchronized int srvConnect() {\n \n\t\ttry {\n\t\t\t// The address to connect to\n\t\t\tSystem.out.println(TAG + \":Address:\" + getAddress());\n\t\t\tSystem.out.println(TAG + \":Port:\" + String.valueOf(getPort()));\n\t\t\taddr = InetAddress.getByName(getAddress());\n\t\t\t// The address plus the port\n\t\t\tservAddress = new InetSocketAddress(addr, getPort());\n\n\t\t\t// Try to connect\n\t\t\tmysock = new Socket();\n\t\t\t// This socket will block/ try connect for 5s\n\t\t\tmysock.connect(servAddress, 5000);\n\t\t\t// Show me if i was connected successfully\n\t\t\tif (mysock.isConnected()) {\n\t\t\t\tif(out == null){\n\t\t\t\t\tout = new PrintWriter(mysock.getOutputStream(),true);\n\t\t\t\t\tSystem.out.println(TAG + \":New socket and new streamer was created.\");\n\t\t\t\t}\n\t\t\t}\n \n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(TAG + \":Null Pointer occured.\");\n\t\t\treturn -1;\n\t\t} catch (UnknownHostException e) {\n\t\t\tSystem.out.println(TAG + \":Server does not exist.\");\n\t\t\treturn -1;\n\t\t} catch (IOException e) {\n\t\t\tif (e instanceof SocketException && e.getMessage().contains(\"Permission denied\")) {\n\t\t\t\tSystem.out.println(TAG + \":You don't have internet permission:\" + e);\n\t\t\t} else if(e instanceof ConnectException && e.getMessage().contains(\"Connection refused\")){\n\t\t\t\tSystem.out.println(TAG + \":Connection is refused, the service on the server is probably down:\" + e);\n\t\t\t} else {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(TAG + \":Could not connect\");\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n \n\t\treturn 0;\n\t}", "private static boolean AttemptConnect() {\n try {\n if (Connect()) {\n Log.Confirmation(\"Connected to server on: \" + socket);\n // send connection type\n dos.writeUTF(\"viewer\");\n return true;\n } else {\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }", "private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }", "public void connect() throws IOException {\n //Loggen \"connecting\"\n addEntry(\"connecting\");\n\n //Den Input und Output Stream zum Kommunizieren über das Socket\n //initzialisieren\n out = new PrintWriter(primeServer.getOutputStream(), true);\n in = new BufferedReader(new InputStreamReader(primeServer.getInputStream()));\n\n //Kommunikation mit dem Server initzialisieren\n out.println(MessageType.HALLO);\n //Die vom Server an diesen Client vergebene ID auslesen\n id = Integer.parseInt(in.readLine());\n\n //Loggen \"connected,id\"\n addEntry(\"connected,\" + id);\n }", "public void OnConnectSuccess();", "private boolean connectServer() {\n\t\tclNetwork networkInfo = new clNetwork();\n\t\ttry {\n\t\t\tSocket _socket = new Socket(dstAddress, networkInfo.NTP_PORT);\n\t\t\t_socket.setSoTimeout(1000);\n\t\t\t_socket.setTcpNoDelay(true);\n\t\t\topenedSocket = _socket;\n\t\t\tinStream = openedSocket.getInputStream();\n\t\t\toutStream = openedSocket.getOutputStream();\n\t\t\treturn true;\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "@Override\n public boolean connect() {\n\n if (!isConnected) {\n try {\n\n Socket socket = new Socket(hostName, portNumber);\n out = new PrintWriter(socket.getOutputStream(), true);\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n isConnected = true;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return isConnected;\n }", "@Override\n\tprotected void onConnect() {\n\t\tLogUtil.debug(\"server connect\");\n\n\t}", "public void clientConnected(ServerConnection conn){\r\n System.out.println(\"Client Connected: \"+ conn.getIP());\r\n }", "@Override\r\n public Object connect() {\n if(status()){\r\n //creates thread that checks messages in the network\r\n System.out.println(\"notifying network that connection is good\");\r\n notifyObservers(this);\r\n }\r\n return socket;\r\n }", "public void connectionCheck(Long sessionId);", "private void connectToServer() {\n\n try {\n this.socket = new Socket(InetAddress.getByName(serverIP), this.port);\n\n oos = new ObjectOutputStream(socket.getOutputStream());\n oos.flush();\n ois = new ObjectInputStream(socket.getInputStream());\n\n Message connectMessage = new Message(Message.CLIENT_CONNECT);\n connectMessage.setMessage(userName);\n sendToServer(connectMessage);\n\n Message message;\n while (true){// wait for welcome message\n message = (Message) ois.readObject();\n if(message != null && message.getType() == Message.WELCOME){\n handleMessage(message);\n break;\n }\n }\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public boolean connect(){\r\n\r\n\t\t// Connect to server via TCP socket\r\n\t\ttry {\r\n\r\n\t\t\tclient = new Socket(host, port);\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"[EXCEPTION] connecting to server\");\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Connection to server could not be made. Try again later.\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\r\n\t\t// Get input and output Streams\r\n\t\ttry {\r\n\r\n\t\t\tpw = new PrintWriter(client.getOutputStream());\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(client.getInputStream()));\r\n\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"[EXCEPTION] creating streams\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Connection to server SUCESSFULL\");\r\n\t\treturn true;\r\n\t}", "public int connect() {\n if (this.mIsConnected) {\n HiLog.info(LOG_LABEL, \"Already connected, ignoring request.\", new Object[0]);\n return 1;\n }\n CallAppAbilityInfo callAppAbilityInfo = this.mInfo;\n if (callAppAbilityInfo == null || callAppAbilityInfo.getComponentName() == null) {\n HiLog.error(LOG_LABEL, \"no component to connect.\", new Object[0]);\n return 2;\n }\n HiLog.info(LOG_LABEL, \"Attempting to connect %{public}s.\", new Object[]{this.mInfo});\n this.mIsConnected = true;\n if (connectCallAppAbility(this.mInfo.getComponentName())) {\n return 1;\n }\n HiLog.error(LOG_LABEL, \"Failed to connect.\", new Object[0]);\n this.mIsConnected = false;\n return 2;\n }", "synchronized private final void connectToServer() throws IOException {\n if(this.provider.useSSH()){\n if(this.userinfo == null) this.userinfo = new SSHSocket.SshUserInfo();\n this.sock = MdsIp.newSSHSocket(this.userinfo, this.provider);\n }else this.sock = new Socket(this.provider.host, this.provider.port);\n if(DEBUG.D) System.out.println(this.sock.toString());\n this.sock.setTcpNoDelay(true);\n this.dis = this.sock.getInputStream();\n this.dos = this.sock.getOutputStream();\n /* connect to mdsip */\n final Message message = new Message(this.provider.user, this.getMsgId());\n message.useCompression(this.use_compression);\n this.sock.setSoTimeout(3000);\n long tick = -System.nanoTime();\n message.send(this.dos);\n final Message msg = Message.receive(this.dis, null);\n tick += System.nanoTime();\n if(DEBUG.N) System.out.println(tick);\n this.isLowLatency = tick < 50000000;// if response is faster than 50ms\n this.sock.setSoTimeout(0);\n if(msg.header.get(4) == 0){\n this.close();\n return;\n }\n this.receiveThread = new MRT();\n this.receiveThread.start();\n this.connected = true;\n MdsIp.this.dispatchMdsEvent(new MdsEvent(this, MdsEvent.HAVE_CONTEXT, \"Connected to \" + this.provider.toString()));\n }", "protected abstract boolean isConnected();", "public void doConnect() {\n Debug.logInfo(\"Connecting to \" + client.getServerURI() + \" with device name[\" + client.getClientId() + \"]\", MODULE);\n\n IMqttActionListener conListener = new IMqttActionListener() {\n\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Connected.\", MODULE);\n state = CONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"connect failed\" + exception.getMessage(), MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n // Connect using a non-blocking connect\n client.connect(conOpt, \"Connect sample context\", conListener);\n } catch (MqttException e) {\n // If though it is a non-blocking connect an exception can be\n // thrown if validation of parms fails or other checks such\n // as already connected fail.\n state = ERROR;\n donext = true;\n ex = e;\n }\n }", "public boolean testConnection() {\r\n boolean toReturn = true;\r\n\r\n String[] paramFields = {};\r\n SocketMessage request = new SocketMessage(\"admin\", \"ping\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\", paramFields);\r\n SocketMessage response = handleMessage(request);\r\n if (isSuccessful(response)) {\r\n toReturn = true;\r\n } else {\r\n toReturn = false;\r\n }\r\n\r\n return toReturn;\r\n }", "public void notificar()\n\t{\n\n\t\tSocket socket;\n\t\tDataOutputStream out;\n\n\t\ttry\n\t\t{\n\t\t\tsocket = new Socket(host, port);\n\n\t\t\tout = new DataOutputStream(socket.getOutputStream());\n\n\t\t\tout.writeUTF(id);\n\n\t\t\tsocket.close();\n\n\t\t} catch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean connectServer(User user){\n echange = context.socket(ZMQ.REQ);\n echange.connect(adresse);\n \n //on envoi la demande de connexion\n String message = encode(user.getNick())+encode(\"CONNECT\")+encode(user.getPgpKey())+encode(user.getSignature());\n echange.send(message.getBytes(),0);\n \n //on attend la réponse du server\n byte[] reply = echange.recv(0);\n String repServer = new String(reply);\n String[] tmp = repServer.split(this.msgDelimiter);\n System.out.print(\"Received : \");\n for(int i=0;i<tmp.length;i++){\n tmp[i]=new String (DatatypeConverter.parseBase64Binary(tmp[i]));\n System.out.print(tmp[i]+\" \");\n }\n System.out.println(\"\");\n \n if(tmp[0].equals(\"CONNECT\")){\n cleUID=tmp[1];\n System.out.println(\"Connexion au server OK, cleUID = \" +cleUID);\n return true;\n }\n else{\n System.out.println(\"Connexion au server echoué\");\n return false;\n }\n }", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "static void getConnection(String idName,String serverName) {\r\n\t\tString serverResponce; //a string to save server answer \r\n\t\ttry {\r\n\t\t\tSocket sock = new Socket(serverName, 4545); //connection with server and port 4545\r\n\t\t\t//The BufferedReader and PrintStream are used to send and receive messages from sockets\r\n\t\t\tBufferedReader\treceiveFromServer = new BufferedReader(new InputStreamReader(sock.getInputStream())); //read\r\n\t\t\tPrintStream sendToServer = new PrintStream(sock.getOutputStream()); //write\r\n\t\t\t//The server is waiting for client to ask for a joke or proverb\r\n\t\t\tsendToServer.println(idName); //send a request to the server with the user name\r\n\t\t\tsendToServer.flush(); //clean the memory\r\n\t\t\tsendToServer.println(cookie); //send cookie\r\n\t\t\tsendToServer.flush(); //clean the memory\r\n\t //server response should be a joke or proverb\r\n\t\t\t\tserverResponce = receiveFromServer.readLine(); //the client reads the server message \r\n\t\t\t\tif (serverResponce != null)//if the server answer is not empty\r\n\t\t\t\t\tSystem.out.println(serverResponce);//print server message\r\n\t\t\tsock.close(); //we call the close method of Java.net.Socket class to terminate the connection\r\n\t\t} catch (IOException x) {\r\n\t\t\tSystem.out.println(\"Socket error.\"); //the try catch is used to identify connection errors \r\n\t\t\tx.printStackTrace();\r\n\t\t}\r\n\t}", "public static boolean sendCredentials() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.requestLoginVerification());\n ClientService.receiveMessageFromServer(connectionToServer);\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return !ClientService.getLastMessageFromServer().contains(XML_Manager.XML_NODES.Error.toString());\n }", "boolean hasDisconnect();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "private boolean isConnected() {\n\t\treturn (this.serverConnection!=null); \n }", "@Override\n public void Connected() {\n if (strClientSerial != null) {\n LoginInfo_Req();\n }\n }", "public boolean connect() throws RemoteException {\n\t\ttry {\n\t\t\t// Get remote object reference\n\t\t\tthis.registry = LocateRegistry.getRegistry(host, port);\n\t\t\tthis.server = (ServerInterface) registry.lookup(\"Server\");\n\t\t\tid = this.server.getNewClientId();\n\t\t\tClientInterface c_strub = (ClientInterface) UnicastRemoteObject.exportObject(this, 0);\n\t\t\tregistry.bind(id, c_strub);\n\t\t\treturn this.server.addClient(username, password, id);\n\t\t}\n\t\tcatch (AlreadyBoundException | NotBoundException e) {\n\t\t\tSystem.err.println(\"Error on client :\" + e);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public void connexionServeur() {\r\n\r\n\t\tString serverIp = JOptionPane\r\n\t\t\t\t.showInputDialog(\"Entrez le nom du serveur.\");\r\n\t\ttry {\r\n\t\t\tsocket = new Socket(serverIp, 4456);\r\n\t\t\tlogger.info(\"Connexion au socket serveur.\");\r\n\r\n\t\t\tThread t = new Thread(new EnvoiPresence(socket));\r\n\t\t\tt.start();\r\n\r\n\t\t\tThread t2 = new Thread(new ReceptionListUser(socket, mainView));\r\n\t\t\tt2.start();\r\n\r\n\t\t} catch (ConnectException e) {\r\n\t\t\tJOptionPane.showMessageDialog(new Frame(),\r\n\t\t\t\t\t\"Le serveur Draw Me An Idea n'est pas lancé\", \"Erreur\", 1);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (UnknownHostException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public String getConnectId() {\n return connectId;\n }", "public boolean initAndConnectToServer() {\n try {\n mTCPSocket.connect(new InetSocketAddress(mIpAdress, port), 1000);\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "public void waitClient() {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"wait connect\");\n\t\t\t\tsocket = server.accept();\n\t\t\t\tSystem.out.println(\"Server connect successed\");\n\t\t\t\tSystem.out.println(\"gethost : InetAddress = \" + socket.getInetAddress());\n\t\t\t\tserver.close();\n\t\t\t} catch (java.io.IOException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}", "public void connect() {\n\t\ttry {\n\t\t\tconnection = new Socket(ip, serverPort); // 128.39.83.87 // 127.0.0.1\n\t\t\t\n\t\t\toutput = new BufferedWriter(new OutputStreamWriter(\n connection.getOutputStream()));\n\t\t\tinput = new BufferedReader(new InputStreamReader(\n connection.getInputStream()));\n\t\t\t\n\t\t\tif (hostName.equals(Constants.IDGK + Main.userName))\n\t\t\t\tsendText(\"1\" + Main.userName);\n\t\t\telse\n\t\t\t\tsendText(\"2\" + Main.userName);\n\t\t\t\n\t\t} catch (UnknownHostException e) {\n\t\t\tMain.LOGGER.log(Level.SEVERE, \"Error connecting server\", e);\n\t\t} catch (IOException e) {\n\t\t\tMain.LOGGER.log(Level.WARNING, \"Error making output/input\", e);\n\t\t}\n\t}", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "public void getConnection() throws Exception {\n\t\ttry {\n\t\t\tSystem.out.println(\"Waiting for new client!\");\n\n\n\n\t\t\tclient = serverSocket.accept();\n\t\t\tis = client.getInputStream();\n\t\t\tisr = new InputStreamReader(is);\n\t\t\tbr = new BufferedReader(isr);\n\t\t\tos = client.getOutputStream();\n\t\t\tosw = new OutputStreamWriter(os);\n\t\t\tpw = new PrintWriter(osw, true);\n\t\t\tsleep(500);\n\t\t\t//clientkey = getClientKey();\n\t\t\tSystem.out.println(\"Client has connected!\");\n\t\t\t\n\t\t\tGetTimestamp(\"Client Publickey is being stored: \" ) ;\n\t\t\t\n\t\t\tpublicKey = getClientPublicKey();\n\t\t\t\n\t\t\tGetTimestamp(\"Client Publickey is stored: \" ) ;\n\t\t\t\n\t\t\tString tosend = encrypt1(getSharedKey(), getClientPublicKey());\n\t\t\t\n\t\t\tGetTimestamp(\"Client sharedkey is being encrypted: \") ;\n\t\t\t\n\t\t\tGetTimestamp(\"Waiting for Authorization Request from Client: \");\n\t\t\t\n\t\t\t//getclientpublickey();\n\t\t\tgetAUTH_REQUEST();\n\t\t\t//getMessage();\n\n\t\t} catch (IOException | InterruptedException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t}", "private void sendUpdateConnectionInfo() {\n\n }", "private void verifyAuthWithServer() {\n mResetModel.connect(\n myBinding.editResetEmail.getText().toString());\n //This is an Asynchronous call. No statements after should rely on the\n //result of connect().\n }", "public void conectServer() {\n\n\t}", "public static boolean connect2Server() {\n\t\ttry {\n\t\t\tinetAdd = InetAddress.getByName(null);\n\t\t\ts = new Socket(inetAdd, PORT);\n\t\t\toos = new ObjectOutputStream(s.getOutputStream());\n\t\t\tois = new ObjectInputStream(s.getInputStream());\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore connessione al server\");\n\t\t}\n\t\treturn false;\n\t}", "private boolean Conectividad(){\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n if (networkInfo != null && networkInfo.isConnected()) {\n return true;\n } else {\n return false;\n }\n }", "private static void checkConn() {\n try {\n if (conns.isClosed()) conns = Connect.getConnect();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void connect() throws Exception\n {\n if(connected)\n return;\n connectionSocket = new Socket(address, CommonRegister.DEFAULT_PORT);\n localPeerID = ++localPeerIDCount;\n initListener();\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n writer = new PrintWriter(connectionSocket.getOutputStream(),true);\n connected = true;\n }", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "private void obtainId(String serverIp, int serverPort) {\n connectionInfo = new ConnectionInfo(serverIp, serverPort, 2);\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tLog.v(TAG,\"connect to server...\");\n\t\t\t\tsocket=new Socket(\"140.116.246.200\",4000+id);\n\t\t\t\tout=socket.getOutputStream();\n\t\t\t\tin=socket.getInputStream();\n\t\t\t\tLog.v(TAG,\"connect!!\");\n\t\t\t\n\t\t\t\tsendData(\"ask#\");\n\t\t\t\tUIHr.post(refreshUI); \t\n\t\t\t\tresult=new Integer(readData());\n\t\t\t\tUIHr.post(refreshUI); \t\t\n\t\t\t\tsendData(\"over#\");\n\t\t\t\tsocket.close();\n\t\t\t} catch (UnknownHostException e) {e.printStackTrace();} \n\t\t\tcatch (IOException e) {e.printStackTrace();}\n\t\t}", "void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella.infoSocket.getLocalAddress().getHostAddress();\n\tif((host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getHostAddress())||host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getCanonicalHostName()))&&(simpella.serverPortNo==port || simpella.downloadPortNo==port)){\n\t\tproceedFlag=0;\n\t\tSystem.out.println(\"Client: Self Connect not allowed\");\n\t\t}\n\twhile(iterator.hasNext() && proceedFlag==1)\n\t{\n\t\tSocket sock=(Socket)iterator.next();\n\t\t\n\t\tif((host.equalsIgnoreCase(sock.getInetAddress().getHostAddress()) || host.equalsIgnoreCase(sock.getInetAddress().getCanonicalHostName())) && port==sock.getPort()){\n\t\t\tproceedFlag=0; \n\t\t\tSystem.out.println(\"Client: Duplicate connection to same IP/port not allowed\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\tif(proceedFlag==1)\n\t\t{\n\t\n\t\n\tbyte type=04;\n\tMessage msg=new Message(type);\n\ttry {\n\t\tConnection.outgoingConnPackRecv[noOfConn]=0;\n\t\tConnection.outgoingConnPackSent[noOfConn]=0;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]=0;\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]=0;\n\t\t\n\t\tclientSideSocket[noOfConn]=new Socket(host,port);\n\t\tSystem.out.println(\"Client:TCP Connection established...Begin handshake\");\n\t\toutToServer[noOfConn]=new ObjectOutputStream(clientSideSocket[noOfConn].getOutputStream());\n\t\tinFromServer[noOfConn]=new ObjectInputStream(clientSideSocket[noOfConn].getInputStream());\n\t\tString strToServer=\"SIMPELLA CONNECT/0.6\\r\\n\";\n\t\tbyte[] byteArray= strToServer.getBytes(\"UTF-16LE\");\n\t\tmsg.setPayload(byteArray);\n \t\n\t\tSystem.out.println(\"Client:\"+new String(byteArray));\n\t\t//outToServer.writeUTF(\"SIMPELLA CONNECT/0.6\\r\\n\");\n\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray.length+23;\n\t\toutToServer[noOfConn].writeObject((Object)msg);\n\t\tConnection.outgoingConnPackRecv[noOfConn]++;\n\t\t\n\t\tMessage msg1=(Message) inFromServer[noOfConn].readObject();\n\t\tbyte[] fromServer=msg1.getPayload();\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]+=fromServer.length+23;\n\t\tString strFromServer=new String(fromServer);\n\t\tSystem.out.println(\"Server:\"+strFromServer);\n\t\tif(msg1.getMessage_type()==05)\n\t\t\t{\n\t\t\tstrToServer=\"SIMPELLA/0.6 200 thank you for accepting me\\r\\n\";\n\t\t\tbyte[] byteArray1= strToServer.getBytes(\"UTF-16LE\");\n\t\t\tMessage m=new Message((byte)05);\n\t\t\tm.setPayload(byteArray1);\n\t\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray1.length+23;\n\t\t\toutToServer[noOfConn].writeObject((Object)m);\n\t\t\t\n\t\t\tConnection.connections.add(clientSideSocket[client.noOfConn]);\n\t\t\tConnection.outgoingConnection[client.noOfConn]=clientSideSocket[client.noOfConn];\n\t\t\tConnection.clientOutStream[client.noOfConn]=outToServer[client.noOfConn];\n\t\t\tnew clientSocketListen(clientSideSocket[noOfConn],outToServer[noOfConn],inFromServer[noOfConn]);\n\t\t\tupdate();\n\t\t\tnoOfConn++;\n\t\t\t//System.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"<open>:Cannot open connection to \"+host+\" at this time\");\n\t\t\t\tclientSideSocket[noOfConn].close();\n\t\t\t\tinFromServer[noOfConn].close();\n\t\t\t\toutToServer[noOfConn].close();\n//\t\t\t\tSystem.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\t\n\t\t\n\t} catch (UnknownHostException e) {\n\t\tSystem.out.println(\"Unknown Host: Destination host unreachable\");\n\t\t//e.printStackTrace();\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Connection Refused/Destination host unreachable\");\n\t}\n\t\t}\n\t}", "public boolean login() {\r\n try {\r\n if (socket == null) {\r\n SocketFactory socketFactory = SSLSocketFactory.getDefault();\r\n socket = socketFactory.createSocket(host, port);\r\n // System.err.println(\"Socket created\");\r\n if (Preferences.debugLevel(Preferences.DEBUG_COMMS)) {\r\n if (socket instanceof SSLSocket) { // of course it is!\r\n SSLSession session = ((SSLSocket) socket).getSession();\r\n try {\r\n javax.security.cert.X509Certificate[] x509 = session.getPeerCertificateChain();\r\n for (int i = 0; i < x509.length; i++ )\r\n System.out.println(\"Certs: \" + x509[i].toString());\r\n } catch (SSLPeerUnverifiedException ex) {\r\n System.err.println(ex.toString());\r\n return false;\r\n }\r\n }\r\n }\r\n if (socket.isConnected()) {\r\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n out = new PrintWriter(socket.getOutputStream(), true);\r\n out.println(clientName);\r\n out.println(clientIP);\r\n start();\r\n } else {\r\n println(\"Unable to make connection with server\");\r\n return false;\r\n }\r\n }\r\n } catch (ConnectException e) {\r\n println(\"Unable to connect. Server is most likely down.\");\r\n return false;\r\n } catch (UnknownHostException e) {\r\n println(\"Unknown host, please notify admin.\");\r\n return false;\r\n } catch (IOException e) {\r\n println(\"I/O socket error.\");\r\n e.printStackTrace();\r\n return false;\r\n } catch (Exception e) {\r\n println(\"Cannot log in, please try again later.\");\r\n return false;\r\n }\r\n return true;\r\n }", "protected abstract void onConnect();", "public void connecting() {\n\n }", "private void checkConnection(){\n NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();\n\n // if activeNetwork is not null, and a network connection is detected,\n // isConnected is true\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n\n // prepare output to indicate connection status\n String message = isConnected ? \"Connection Detected!\" : \"No Connection Detected!\";\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "void connectFailed();", "public boolean setConnection(int timeoutInMs){\n\t\tSystem.out.println(\"Starts to set Connection\");\n\t\ttry{\n\t\t\tconn = new Socket(HOST, PORT);\n\n\t\t\tbos = new BufferedOutputStream(conn.getOutputStream());\n\t\t\tosw = new OutputStreamWriter(bos);\n\t\t\tpw = new PrintWriter(bos, true);\n\t\t\tbw = new BufferedWriter(osw);\n\t\t\tbr = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n\n\t\t\tSystem.out.println(\"setConnection() -->\"+\" Connection established successfully!\");\n\n\t\t\treturn true;\n\t\t} catch (UnknownHostException e){\n\t\t\tSystem.out.println(\"setConnection --> UnknownHostException\");\n\t\t} catch (IOException e){\n\t\t\tSystem.out.println(\"setConnection --> IO Exception\");\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"setConnection --> Exception\");\n\t\t}\n\n\t\tSystem.out.println(\"Failed to establish connection!\");\n\t\treturn false;\n\t}", "private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }", "private void doConnect() throws Exception {\n try {\n Registry reg = LocateRegistry.getRegistry(conf.getNameServiceHost(), conf.getNameServicePort());\n server = (IChatServer) reg.lookup(conf.getServerName());\n } catch (RemoteException e) {\n throw new Exception(\"rmiregistry not found at '\" + conf.getNameServiceHost() + \":\" +\n conf.getNameServicePort() + \"'\");\n } catch (NotBoundException e) {\n throw new Exception(\"Server '\" + conf.getServerName() + \"' not found.\");\n }\n\n //Unir al bot al canal com a usuari\n //el Hashcode li afig un valor unic al nom, per a que ningu\n //li copie el nom com a usuari\n user = new ChatUser(\"bot \" + this.hashCode(), this);\n if (!server.connectUser(user))\n throw new Exception(\"Nick already in use\");\n\n //Comprovar si hi ha canals en el servidor.\n IChatChannel[] channels = server.listChannels();\n if (channels == null || channels.length == 0)\n throw new Exception(\"Server has no channels\");\n \n //Unir el bot a cadascun dels canals\n for (IChatChannel channel : channels) {\n channel.join(user);\n }\n\n System.out.println(\"Bot unit als canals i preparat.\");\n }", "public void autoConnect() {\n Log.i(TAG, \"HERE AUTOCONNECT\");\n connect(staticIp, staticPort);\n }", "@Override\n\t\tpublic void asyncSendSuccess(long id) throws ConnectorException {\n\t\t\t\n\t\t}", "@Override\n public void onFailure(int i) {\n System.out.println(\"pca connect: Failed to connect = \" + i);\n }", "@Override\n\tpublic void run(){\n\t\tInetAddress IPAddress = serverTcpSocket.getInetAddress();\n\t\tfor (ClientObj c: clients)\n\t\t\tif (c.getId() == client.getId()){\n\t\t\t\tSystem.out.print(IPAddress + \" Client already connected!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\ttry{\n\t\t\t// Check handshake received for correctness\n\t\t\t//(connect c->s) [herader | \"JUSTIN\\0\" | connection port] (udp)\n\t\t\t//(connect response s->c) [header | client id | port] (udp)\n\t \n\t // open the connection\n\t\t clientSocket = null;\n\t\t Socket clientListener = null;\n\t\t // wait for client connection on tcp port\n\t\t //serverTcpSocket.setSoTimeout(5000);\n\t \tSystem.out.println (\" Waiting for tcp connection.....\");\n\t \tclientSocket = serverTcpSocket.accept();\n\t \tclientListener = serverTcpSocket.accept();\n\t \tclient.setListenerSocket(clientListener);\n\t\t\tIPAddress = clientSocket.getInetAddress();\n\t\t\tint recv_port = clientSocket.getPort();\n\t\t\tSystem.out.println(IPAddress + \": Client connected @ port \" + recv_port);\n\n\t\t // handle tcp connection\n\t\t\tclientSocket.setSoTimeout(Constants.ACK_TIMEOUT);\n\t\t out = new BufferedOutputStream(clientSocket.getOutputStream());\n\t\t\tin = new BufferedInputStream(clientSocket.getInputStream());\n\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\tclient.setPort(clientSocket.getPort());\n\t\t clients.add(client);\n\t\t\t\n\t\t // handle requests\n\t\t\twhile (!shutdown_normally) {\n\t\t\t\t// read just the header, then handle the req based on the info in the header\n\t\t\t\tif ((buf = Utility.readIn(in, Constants.HEADER_LEN)) == null)\n\t\t\t\t\tbreak;\n\t\t\t\tint flag = buf.getInt(0);\n\t\t\t\tint len2 = buf.getInt(4);\n\t\t\t\tint id = buf.getInt(8);\n\t\t\t\t\n\t\t\t\t// check for correctness of header\n\t\t\t\t\n\t\t\t\tif (flag < Constants.OPEN_CONNECTION || \n\t\t\t\t\t\tflag > Constants.NUM_FLAGS || \n\t\t\t\t\t\tid != client.getId() || \n\t\t\t\t\t\tlen2 < 0){\n\t\t\t\t\tout.close(); \n\t\t\t\t\tin.close(); \n\t\t\t\t\tclientSocket.close(); \n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t\t\tclients.remove(client);\n\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\"Connection - FAILURE! (malformed header)\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// read payload\n\t\t\t\tif ((buf = Utility.readIn(in, Utility.getPaddedLength(len2))) == null)\n\t\t\t\t\tthrow new IOException(\"read failed.\");\n\t\t\t\t// update address (necessary?)\n\t\t\t\tclients.get(clients.indexOf(client)).setAddress(clientSocket.getInetAddress());\n\t\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\t\tswitch (flag){\n\t\t\t\t\tcase Constants.ACK:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.VIEW_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing view request...\");\n\t\t\t\t\t\tViewFiles(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download request...\");\n\t\t\t\t\t\tDownload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.UPLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing upload request...\");\n\t\t\t\t\t\tUpload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_ACK:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download acknowledgment...\");\n\t\t\t\t\t\tDownloadCompleted(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.CLOSE_CONNECTION:\n\t\t\t\t\t\tshutdown_normally = true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// close all open sockets\n\t\t out.close(); \n\t\t in.close(); \n\t\t clientSocket.close(); \n\t\t serverTcpSocket.close();\n\t\t} catch (SocketTimeoutException e) {\n\t\t\tSystem.err.println(IPAddress + \": Timeout waiting for response.\");\n\t\t} catch (UnknownHostException e) {\n\t\t\t// IPAdress unknown\n\t\t\tSystem.err.println(\"Don't know about host \" + IPAddress);\n\t\t} catch (IOException e) {\n\t\t\t// Error in communication\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection to \" +\n\t\t\t\t\tIPAddress);\n\t\t} catch (RuntimeException e){\n\t\t\t// Malformed Header or payload most likely\n\t\t\tSystem.err.println(IPAddress + \": Connection - FAILURE! (\" + e.getMessage() + \")\");\n\t\t} finally {\n\t\t\t// remove this client from active lists, close all (possibly) open sockets\n\t\t\tSystem.out.println(IPAddress + \": Connection - Closing!\");\n\t\t\tclients.remove(client);\n\t\t\ttry {\n\t\t\t\tSocket clientConnection = client.getListenerSocket();\n\t\t\t\tOutputStream out_c = new BufferedOutputStream(clientConnection.getOutputStream());\n\t\t\t\tbuf = Utility.addHeader(Constants.CLOSE_CONNECTION, 0, client.getId());\n\t\t\t\tout_c.write(buf.array());\n\t\t\t\tout_c.flush();\n\t\t\t\tout_c.close();\n\t\t\t\tclientConnection.close();\n\n\t\t\t\tif (out != null)\n\t\t\t\t\tout.close();\n\t\t\t\tif (in != null)\n\t\t\t\t\tin.close();\n\t\t\t\tif (!clientSocket.isClosed())\n\t\t\t\t\tclientSocket.close();\n\t\t\t\tif (!serverTcpSocket.isClosed())\n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t} catch (IOException e){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n }", "@FXML\n\tpublic void xButtonConnectar(ActionEvent event) {\n\t\ttry {\n\t\t\tsocket = new Socket(\"localhost\", PORT);\n\t\t\txButtonConnectar.setDisable(true);\n\t\t\txButtonCalcular.setDisable(false);\n\t\t\txLabelInfo.setVisible(true);\n\t\t\t\n\t\t\t//recibir id\n\t\t\tobjetInputStream = new ObjectInputStream(socket.getInputStream());\n\t\t\tthis.idClient = (Integer) objetInputStream.readObject();\n\t\t\tSystem.out.println(\"(CLIENTE) cliente conectado [ID asignada: \"+idClient+\"]\");\n\t\t\tthis.xLabelID.setText(idClient+\"\");\n\t\t\t\n\t\t\t//enviar confirmacion\n\t\t\tobjetOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjetOutputStream.writeObject(new Boolean(true));\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"(CLIENTE) No se ha podido conectar\");\n\t\t}\n\t}", "private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }", "private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }", "public String connect(String ip, int port, String nick) throws IOException {\r\n\t\t\r\n\t\tString message = \"101&\"+nick;\r\n\t\tString returnMessage =\"\";\r\n\t\t//ENTER YOUR CODE TO CONNECT\r\n\t\tthis.serverIP = ip;\r\n\t\tthis.serverPort = port;\r\n\t\ttry {\r\n\t\t\tthis.udpSocket= new DatagramSocket();\r\n\t\t\tsendDatagramPacket(message);\r\n\t\t\tSystem.out.println(\"A la espera\");\r\n\t\t\tDatagramPacket receivedPacket= receiveDatagramPacket();\r\n\t\t\treturnMessage=new String(receivedPacket.getData());\r\n\t\t\treturnMessage=returnMessage.trim();\r\n\t\t\tSystem.out.println(\"returnmessage= \"+returnMessage);\r\n\t\t\t\r\n\t\t\t//If the message starts with 201 the user can connect to the server and receive the list of users\r\n\t\t\tif (returnMessage.split(\"&\")[0].equals(\"201\")){\r\n\t\t\t\tthis.connectedUser = new User();\r\n\t\t\t\tthis.connectedUser.setNick(nick);\r\n\t\t\t\t//If the message ends with & means that the message is not complete yet\r\n\t\t\t\tif (returnMessage.charAt(returnMessage.length()-1)=='&'){\r\n\t\t\t\t\tincompletedListUsers = returnMessage.substring(4);\r\n\t\t\t\t\tSystem.out.println(\"acaba en &\");\r\n\t\t\t\t\tMessageProcesorClient messageProcesor = new MessageProcesorClient(this);\r\n\t\t\t\t\tmessageProcesor.start();\r\n\t\t\t\t\treturn \"\";\r\n\t\t\t\t}\r\n\t\t\t\t//The message is complete\r\n\t\t\t\telse{\t\t\t\t\t\r\n\t\t\t\t\tMessageProcesorClient messageProcesor = new MessageProcesorClient(this);\r\n\t\t\t\t\tmessageProcesor.start();\r\n\t\t\t\t\treturn returnMessage.substring(4);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.udpSocket.close();\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t} catch (SocketException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\t\r\n\t}", "@Override\n\tprotected boolean isRegisterServerConnect()\n\t{\n\t\treturn false;\n\t}", "protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }", "protected synchronized boolean checkConnectivity() {\n return this.connect();\n }", "public void connectToServerComp() {\n\n\t\ttry \n\t\t{\n\t\t\tSocket socket = new Socket(host, 8001);\n\t\t\tfromServer = new DataInputStream(socket.getInputStream());\n\t\t\ttoServer = new DataOutputStream(socket.getOutputStream());\n\n\t\t\ttoServer.writeInt(vsCOMPUTER);\n\n\t\t} catch (IOException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\tThread thread = new Thread(new clientHandlingComputer(fromServer, toServer));\n\t\tthread.start();\n\n\t}", "public static void getId() {\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tString info = \"\";\n\t\t\t\ttry {\n\n\t\t\t\t\tserverSocket3 = new ServerSocket(51000);\n\t\t\t\t\twhile (yes) {\n\t\t\t\t\t\tSocket client = serverSocket3.accept();\n\t\t\t\t\t\tBufferedReader input = new BufferedReader(\n\t\t\t\t\t\t\t\tnew InputStreamReader(client.getInputStream()));\n\t\t\t\t\t\tinfo = input.readLine();\n\t\t\t\t\t\tSystem.out.println(info);\n\t\t\t\t\t\tString name[] = info.split(\"::\");\n\n\t\t\t\t\t\tSystem.out.print(client.getInetAddress());\n\t\t\t\t\t\tbu = Integer.parseInt(name[0]);\n\t\t\t\t\t\tb[bu].setText(name[1]);\n\t\t\t\t\t\tclientIP[bu] = client.getInetAddress();\n\t\t\t\t\t\tb[bu].setFont(new Font(\"sansserif\", Font.BOLD, 12));\n\t\t\t\t\t\tb[bu].setHorizontalAlignment(JButton.LEFT);\n\t\t\t\t\t\tb[bu].setBackground(Color.blue);\n\t\t\t\t\t\tseatTableSpace.repaint();\n\t\t\t\t\t\tfor (int i = 0; i < count; i++)\n\t\t\t\t\t\t\tb[i].setLocation(arrX[i], arrY[i]);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}.start();\n\t}", "private void startClientConnection() {\r\n\t\t\t\r\n\t//\tStringBuilder sbreq = new StringBuilder();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*making connection request*/\r\n\t\t\tclientsoc = new Socket(ip,port);\r\n\t\t\t\r\n\t\t\t/*Input and output streams for data sending and receiving through client and server sockets.*/\r\n\t\t\tdis = new DataInputStream(clientsoc.getInputStream());\t\r\n\t\t\tdos = new DataOutputStream(clientsoc.getOutputStream());\r\n\t\t\t\r\n\t\t\tStringBuilder sbconnreq = new StringBuilder();\r\n\r\n\t\t\t/*Building the Http Connection Request and passing Client name as body. Thus the Http Header\r\n\t\t\tare encoded around the client name data.*/\r\n\t\t\tsbconnreq.append(\"POST /\").append(\"{\"+clientname+\"}\").append(\"/ HTTP/1.1\\r\\n\").append(host).append(\"\\r\\n\").\r\n\t\t\tappend(userAgent).append(\"\\r\\n\").append(contentType).append(\"\\r\\n\").append(contentlength).append(clientname.length()).append(\"\\r\\n\").\r\n\t\t\tappend(date).append(new Date()).append(\"\\r\\n\");\r\n\t\t\t\r\n\t\t\tdos.writeUTF(sbconnreq.toString());\r\n\r\n\t\t\totherusers = new ArrayList<>(10);\r\n\t\t\tusertimestamp = new HashMap<>(10);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You have logged in. You can start Chatting: \" + clientname);\r\n\t\t\tconnected = true;\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean isConnected()\n {\n return connectionId != GatewayProcess.NO_CONNECTION_ID;\n }", "public boolean checkid(String NetId) {\n\t\n\t\ttry{ \n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\"); \t\n\t\t\tConnection conn = DriverManager.getConnection(url, username, password);//connection string \n\t\t\tPreparedStatement ps=conn.prepareStatement(\"select idNetId from registration\"); \n\t\t\trs = ps.executeQuery();\n\t\t\tif(rs.getString(1).equals(NetId)){\n\t\t\t\tstatus = true;\n\t\t\t}\n\t\t\t \n\t\t\t}catch(Exception e){System.out.println(e);}\n\t\treturn status;\n\t}", "private synchronized void doConnect() {\n try {\n String host = agent.getHost();\n int port = agent.getPort();\n log.fine(\"Connecting to server \" + host + ':' + port);\n socket = new Socket(host, port);\n input = socket.getInputStream();\n output = new OutputStreamWriter(socket.getOutputStream());\n disconnected = false;\n new Thread(this).start();\n\n // Automatically login! -> give an auth to the agent...\n TACMessage msg = new TACMessage(\"auth\");\n msg.setParameter(\"userName\", agent.getUser());\n msg.setParameter(\"userPW\", agent.getPassword());\n msg.setMessageReceiver(agent);\n sendMessage(msg);\n\n } catch (Exception e) {\n disconnected = true;\n log.log(Level.SEVERE, \"connection to server failed:\", e);\n socket = null;\n }\n }", "private boolean connectToSubscriberNumber(String id) throws ExecutionException, InterruptedException {\n tmp_nsp.setUrl(main_host + \"/accounts/\" + id);\n\n tmp_nsp.addHeader(\"X-CSRF-Token\", getToken());\n tmp_nsp.addHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n\n tmp_nsp.removeBodyParam(\"utf8\");\n tmp_nsp.removeBodyParam(\"username\");\n tmp_nsp.removeBodyParam(\"password\");\n tmp_nsp.removeBodyParam(\"authenticity_token\");\n\n NetworkServiceParameters response = sendRequest();\n\n if (response.getContent() != null) {\n Pattern pattern = Pattern.compile(\"window.location.href = 'https://www.mega-billing.ru/ru/summary';\");\n Matcher matcher = pattern.matcher(response.getContent());\n\n if (matcher.find())\n return true;\n }\n\n return false;\n }", "public void login() {\n String line = null;\n String ID = null;\n String Password = null;\n \n try {\n client_PW.println(\"--------------Welcom to chat-------------\");\n client_PW.println(\"Sign in or Sign up? : <i/u>\");\n client_PW.flush();\n\n line = client_BR.readLine();\n if(line.equals(\"i\")) {\n // sign in\n clearScreen(client_PW);\n client_PW.println(\"Enter ID : \");\n client_PW.flush();\n ID = client_BR.readLine();\n client_PW.println(\"Enter PassWord : \");\n client_PW.flush();\n Password = client_BR.readLine();\n\n if(!mem_id.containsKey(ID)) {\n clearScreen(client_PW);\n client_PW.println(\"Can't find such ID\");\n client_PW.flush();\n login();\n } else {\n if(!mem_id.get(ID).equals(Password)) {\n clearScreen(client_PW);\n client_PW.println(\"Incorrect password!\");\n client_PW.flush();\n login();\n } else {\n this.client_ID = ID;\n // 다른 member들에게 현재 client가 접속했다고 공지\n broadcast(client_ID + \"님이 접속했습니다.\",client_ID);\n // 서버의 콘솔창에 현재 client의 ID와 접속한 ip주소 표시\n System.out.println(client_ID+\" 회원이 접속했습니다.\");\n System.out.println(\"IP : \" + client_IP.getHostAddress());\n client_PW.flush();\n help_menu();\n }\n }\n\n \n } else if(line.equals(\"u\")) {\n // sign up\n clearScreen(client_PW);\n client_PW.println(\"Enter ID : \");\n client_PW.flush();\n ID = client_BR.readLine();\n client_PW.println(\"Enter PassWord : \");\n client_PW.flush();\n Password = client_BR.readLine();\n\n mem_id.put(ID, Password);\n\n this.client_ID = ID;\n // 다른 member들에게 현재 client가 접속했다고 공지\n broadcast(client_ID + \"님이 접속했습니다.\",client_ID);\n // 서버의 콘솔창에 현재 client의 ID와 접속한 ip주소 표시\n System.out.println(client_ID+\" 회원이 접속했습니다.\");\n System.out.println(\"IP : \" + client_IP.getHostAddress());\n client_PW.flush();\n help_menu();\n \n\n } else {\n clearScreen(client_PW);\n client_PW.println(\"invalid command\");\n login();\n }\n } catch (Exception e) {\n System.out.print(e);\n }\n }", "private static void esperarCliente() {\n try {\n socket = serverSocket.accept();\n System.out.println(\"Cliente conectado...\");\n } catch (IOException ex) {\n Logger.getLogger(ServidorUnicauca.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@EventHandler\n public void onServerConnect(ServerConnectEvent event) {\n ProxiedPlayer player = event.getPlayer();\n\n // check if its a \"fresh\" connection\n if (player.getServer() != null)\n return;\n\n // Direct connect to main server\n if (playersQueue.size() == 0 && event.getTarget().equals(ProxyServer.getInstance().getServerInfo(Config.queue))) {\n // Get status of target server\n ServerInfoGetter mainServerInfo = ServerInfoGetter.awaitServerInfo(Config.target);\n\n // main server is online and player count is lower then max\n if (mainServerInfo.isOnline && mainServerInfo.playerCount < Config.maxPlayers) {\n ServerInfo targetServer = ProxyServer.getInstance().getServerInfo(Config.target);\n\n if (isNotConnected(player, targetServer)) {\n // direct connection\n event.setTarget(targetServer);\n Main.log(\"onServerConnect\", \"§3§b\" + event.getPlayer() + \"§3 was directly connected to §b\" + Config.target + \"§3. Main count is \" + (mainServerInfo.playerCount + 1) + \" of \" + Config.maxPlayers + \".\");\n } else {\n player.disconnect(TextComponent.fromLegacyText(\"§cYou are already connected to \" + Config.serverName + \"!\"));\n Main.log(\"onServerConnect\", \"§c§b\" + player.toString() + \"§c was disconnected because there was already a connection for this account to the server.\");\n }\n } else {\n // Send full message\n event.getPlayer().sendMessage(TextComponent.fromLegacyText(\"§6\" + Config.serverName + \" is full or offline§r\"));\n }\n }\n }", "@Override\r\n public void connectSuccess() {\n super.connectSuccess();\r\n }", "public static boolean register() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.requestRegistration());\n ClientService.receiveMessageFromServer(connectionToServer);\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return !ClientService.getLastMessageFromServer().contains(XML_Manager.XML_NODES.Error.toString());\n }", "private boolean connect(String host, int port){\n\t\t/* Connect to server */\n\t\tDebug.log(\"Player\", \"Connecting on host ...\");\n\n\t\t/* Get the Registry! */\n\t\ttry{\n\t\t\tRegistry reg = LocateRegistry.getRegistry(host, port);\n\t\t\tserver = (ServerInterface)reg.lookup(\"Server\");\n\n\t\t\t/* Reflect in GUI */\n\t\t\tgui.showConnectionProgress();\n\n\t\t\tDebug.log(\"Player\", \"Connected!\");\n\n\t\t\treturn true;\n\t\t}catch(AccessException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not access server registry \" + e.toString());\n\t\t}catch(RemoteException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not find the RMI register on the server\" + e.toString());\n\t\t}catch(NotBoundException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not bind to the provided RMI address \" + e.toString());\n\t\t}\n\n\t\treturn false;\n\t}", "ClientConnection connection();", "public NegotiationReturn workAsServer() {\n this.isClient = false;\n\n peer_mac_address = null;\n ServerSocket serverSocket = null;\n Socket socket = null;\n int code = 0;\n NegotiationReturn negReturn;\n boolean restartAfterwards = false;\n\n try {\n // use the port to start\n serverSocket = new ServerSocket(PORT);\n serverSocket.setSoTimeout(serverTimeoutMillis);\n Log.d(TAG, \"doInBackground: Server is waiting for connection\");\n\n // accept one connection\n socket = serverSocket.accept();\n socket.setSoTimeout(serverTimeoutMillis);\n\n // wrap the socket\n socketWrapper = new SocketWrapper(socket);\n\n // WAIT FOR CLIENT\n String hello = socketWrapper.getLine();\n\n if (hello == null || hello.contains(\"java.net.SocketException\")) {\n return error(R.string.no_hello_received, true);\n }\n\n // Check: Is the peer in the same role as we are\n // server and server or client and client MAKES NO SENSE\n if (hello.contains(\"SERVER\") && !isClient || hello.contains(\"CLIENT\") && isClient){\n return error(R.string.err_pairing_roles_broken, true);\n }\n\n // Whether we want to provide a hotspot or use one\n if (isConsumer) {\n negReturn = runConsumerProtocol(socketWrapper.getClientAddress().getHostAddress());\n } else {\n negReturn = runHotspotProtocol(socketWrapper.getClientAddress().getHostAddress());\n }\n peer_mac_address = negReturn.mac;\n code = negReturn.code;\n restartAfterwards = negReturn.restartAfterwards;\n\n } catch (SocketTimeoutException ste) {\n Log.d(TAG, \"workAsServer: ### Timed out\");\n code = R.string.err_timeout;\n peer_mac_address = null;\n restartAfterwards = true;\n } catch (IOException e) {\n Log.d(TAG, e.getMessage());\n code = R.string.err_io_exception;\n peer_mac_address = null;\n restartAfterwards = true;\n } finally {\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (serverSocket != null) {\n try {\n serverSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return new NegotiationReturn(code, peer_mac_address, restartAfterwards);\n }", "void clientConnected(Client client);", "private void attemptToConnect() {\n LOG.warn(\"Attempting to connect....\");\n \n if (// No connection configuration\n getConnectionConfiguration() == null &&\n (getServerHostname() == null || getServerPort() == 0 ||\n getServiceName() == null || getFromAddress() == null ||\n getPassword() == null || getResource() == null)\n \n ||\n \n // Already logged in.\n getConnection() != null && getConnection().isAuthenticated()) {\n \n return;\n }\n \n try {\n if (getConnectionConfiguration() == null) {\n setConnectionConfiguration(new ConnectionConfiguration(\n getServerHostname(), getServerPort(), getServiceName()));\n }\n\n connect();\n }\n catch (Throwable t) {\n LOG.error(t);\n }\n }", "private void connectToServer() {\n\t\ttry {\n\n\t\t\tSystem.out.println(\"Attempting connection to server at port: 5555\");\n\t\t\tsocket = new Socket(\"localhost\", 5554);\n\t\t\tSystem.out.println(\"Connected to server at port: 5555\");\n\n\t\t\tobjectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\t\t\n\t\t\t// sending client object to server\n\t\t\tobjectOutputStream.writeInt(Main.getUser().getUserId());\n\t\t\tobjectOutputStream.flush();\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "protected void onConnect() {}", "public abstract void onConnect();", "private void manageConnectedSocket(BluetoothSocket acceptSocket) {\n\n }" ]
[ "0.70529413", "0.6746384", "0.64385235", "0.6329728", "0.6318293", "0.62557745", "0.6255433", "0.61881715", "0.6150711", "0.6144081", "0.6139839", "0.61009264", "0.6097746", "0.6093235", "0.6080743", "0.6052649", "0.60487276", "0.6028183", "0.6028039", "0.60119504", "0.600189", "0.59932363", "0.5991329", "0.59849536", "0.59849536", "0.59849536", "0.59849536", "0.59849536", "0.59849536", "0.59849536", "0.59849536", "0.5971465", "0.5962082", "0.5947899", "0.59427154", "0.59427154", "0.59427154", "0.59427154", "0.59427154", "0.59416354", "0.59337145", "0.5933509", "0.59116924", "0.5910799", "0.59079266", "0.59068865", "0.58885616", "0.58575433", "0.58541167", "0.5850773", "0.58356863", "0.582694", "0.5825626", "0.5817879", "0.5799577", "0.5788861", "0.57821137", "0.5766604", "0.57655984", "0.57652617", "0.5757367", "0.57472867", "0.57362145", "0.57220656", "0.57133174", "0.57056767", "0.570489", "0.5702091", "0.5701069", "0.5698609", "0.5698609", "0.56970686", "0.56917894", "0.5675856", "0.5675856", "0.5672151", "0.5665355", "0.5664517", "0.56628233", "0.5642385", "0.56366175", "0.5633723", "0.5633661", "0.56201905", "0.5615023", "0.5606883", "0.56056035", "0.55946416", "0.5594498", "0.5587384", "0.55834603", "0.55816823", "0.55814797", "0.5573654", "0.557064", "0.55662644", "0.5564777", "0.5564588", "0.55629134", "0.55623454" ]
0.6171284
8
Performs the write action on sc The convention is that both buffers are in writemode before the call to doWrite and after the call
public void doWrite() throws IOException { bbout.flip(); sc.write(bbout); bbout.compact(); processOut(); updateInterestOps(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doWrite() throws IOException {\n\t\tbbout.flip();\n\t\tsc.write(bbout);\n\t\tbbout.compact();\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "private void doWrite() throws IOException {\n\t\t\tbb.flip();\n\t\t\tsc.write(bb);\n\t\t\tbb.compact();\n\n\t\t\tupdateInterestOps();\n\t\t}", "void writeCurrentBuffer();", "public void writeSysCall() {\n clientChannel.write(writeBuffer, this, writeCompletionHandler);\n }", "private void flushWrite() throws IOException, BadDescriptorException {\n if (reading || !modes.isWritable() || buffer.position() == 0) return; // Don't bother\n \n int len = buffer.position();\n buffer.flip();\n int n = descriptor.write(buffer);\n \n if(n != len) {\n // TODO: check the return value here\n }\n buffer.clear();\n }", "void write();", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "public void flush(){\n\t\ttry{\n\t\t\tse.write(buffer, 0, bufferPos);\n\t\t\tbufferPos = 0;\n\t\t\tse.flush();\n\t\t}catch(IOException ioex){\n\t\t\tfailures = true;\n\t\t}\n\t}", "@Override\n public void onWrite() {\n onChannelPreWrite();\n }", "public synchronized void beginWrite() {\n\t\tSystem.out.println(\"WRITER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint writeTurn = currentTurn;\n\t\tcurrentTurn++;\n\n\t\twhile(writeTurn != nextTurn || numReaders > 0 || numWriters > 0 ){ \n\t\t\t/********WAIT CALL*********/\n\t\t\ttry {\n//\t\t\tSystem.out.println(\"WRITER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\tthis.wait();\n//\t\t\tSystem.out.println(\"WRITER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t/**************************/\n\t\t}\n\t\t\n\t\t//Only increment when the writer is not blocked\n\t\t// (it is at front of queue)\n\t\tnumWriters++;\n\n\t}", "@Override\n public void write() {\n\n }", "@Override\n protected void doWriteTo(StreamOutput out) throws IOException {\n }", "public void write(byte[] buffer) {\n try {\n String bufferstring=\"a5550100a2\";\n // byte [] buffer03=new byte[]{(byte) 0xa5, Byte.parseByte(\"ffaa\"),0x01,0x00, (byte) 0xa2};\n byte buffer01[]=bufferstring.getBytes();\n byte [] buffer02=new byte[]{(byte) 0xa5,0x55,0x01,0x00, (byte) 0xa2};\n\n\n //for(int i=0;i<100000;i++) {\n mmOutStream.write(buffer);\n // Thread.sleep(1000);\n //}\n //\n //Share the sent message back to the UI Activity\n// mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)\n// .sendToTarget();\n } catch (Exception e) {\n Log.e(TAG, \"Exception during write\", e);\n }\n }", "@Override\n\t\tpublic CompletableFuture<Void> write(byte[] buffer, long offset) {\n\t\t\t\n\t\t\tsynchronized(roleSwitcherThread) {\n\t\t\t\tif (!RockyController.role.equals(RockyControllerRoleType.Owner)) {\n\t\t\t\t\tSystem.err.println(\"ASSERT: write can be served only by the Owner\");\n\t\t\t\t\tSystem.err.println(\"currently, my role=\" + RockyController.role);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (debugPrintoutFlag) {\n\t\t\t\tSystem.out.println(\"write entered. buffer size=\" + buffer.length);\n\t\t\t\tSystem.out.println(\"offset=\" + offset);\n\t\t\t}\n\t\t\t\n\t\t\tlong firstBlock = offset / blockSize;\n\t\t\tint length = buffer.length;\n\t\t long lastBlock = 0;\n\t\t if (length % blockSize == 0) {\n\t\t \tlastBlock = (offset + length) / blockSize - 1;\n\t\t } else {\n\t\t \tlastBlock = (offset + length) / blockSize;\n\t\t }\n\t\t //long lastBlock = (offset + length) / blockSize;\n\t\t \n\t\t if (debugPrintoutFlag) {\n\t\t \tSystem.out.println(\"firstBlock=\" + firstBlock + \" lastBlock=\" + lastBlock + \" length=\" + length);\n\t\t }\n\t\t \t\n\t\t if (mutationSnapEvalFlag) {\n\t\t \tnumBlockWrites += (int) (lastBlock - firstBlock + 1);\n\t\t }\n\t\t \n//\t\t // we assume that buffer size to be blockSize when it is used\n//\t\t // as a block device properly. O.W. it can be smaller than that.\n//\t\t // To make it compatible with the original intention, when \n//\t\t // we get buffer smaller than blockSize, we increment the loastBlock\n//\t\t // by one.\n//\t\t if (firstBlock == lastBlock) {\n//\t\t \tlastBlock++; \n//\t\t }\n//\t\t for (int i = (int) firstBlock; i < (int) lastBlock; i++) {\n\t \tfor (int i = (int) firstBlock; i <= (int) lastBlock; i++) {\n\t \t\tif (debugPrintoutFlag) {\n\t \t\t\tSystem.out.println(\"setting dirtyBitmap for blockID=\" + i);\n\t \t\t}\n\t \t\tsynchronized(dirtyBitmap) {\n\t\t \t\tdirtyBitmap.set(i);\n\t\t \t}\n\t\t \tWriteRequest wr = new WriteRequest();\n\t\t \tint copySize = 0;\n\t\t \tif (i == lastBlock) {\n\t\t \t\tif (debugPrintoutFlag) {\n\t\t \t\t\tSystem.out.println(\"copySize first\");\n\t\t \t\t}\n\t\t \t\tint residual = buffer.length % blockSize;\n\t\t \t\tif (residual == 0) {\n\t\t \t\t\tcopySize = blockSize;\n\t\t \t\t} else {\n\t\t \t\t\tcopySize = residual;\n\t\t \t\t}\n\t\t \t} else {\n\t\t \t\tif (debugPrintoutFlag) {\n\t\t \t\t\tSystem.out.println(\"copySize second\");\n\t\t \t\t}\n\t\t \t\tcopySize = blockSize;\n\t\t \t}\n\t\t \tbyte[] copyBuf = new byte[copySize];\n\t\t \tif (debugPrintoutFlag) {\n\t\t \t\tSystem.out.println(\"copySize=\" + copySize);\n\t\t \t}\n\t\t \tint bufferStartOffset = (int) ((i - firstBlock) * blockSize);\n\t\t \tif (debugPrintoutFlag) {\n\t\t \t\tSystem.out.println(\"bufferStartOffset=\" + bufferStartOffset + \" i=\" + i + \" firstBlock=\" + firstBlock + \" blockSize=\" + blockSize);\n\t\t \t}\n\t\t \tSystem.arraycopy(buffer, (int) ((i - firstBlock) * blockSize), copyBuf, 0, copySize);\n\t\t \twr.buf = copyBuf;\n\t\t \t//wr.offset = offset;\n\t\t\t wr.offset = i * blockSize;\n\t\t\t try {\n\t\t\t \t//System.out.println(\"[RockyStorage] enqueuing WriteRequest for blockID=\" \n\t\t\t \t//\t\t+ ((int) wr.offset / blockSize));\n\t\t\t\t\tqueue.put(wr);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t\treturn super.write(buffer, offset);\n\t\t}", "private static void flushInternalBuffer() {\n\n //Strongly set the last byte to \"0A\"(new line)\n if (mPos < LOG_BUFFER_SIZE_MAX) {\n buffer[LOG_BUFFER_SIZE_MAX - 1] = 10;\n }\n\n long t1, t2;\n\n //Save buffer to SD card.\n t1 = System.currentTimeMillis();\n writeToSDCard();\n //calculate write file cost\n t2 = System.currentTimeMillis();\n Log.i(LOG_TAG, \"internalLog():Cost of write file to SD card is \" + (t2 - t1) + \" ms!\");\n\n //flush buffer.\n Arrays.fill(buffer, (byte) 0);\n mPos = 0;\n }", "@ServerHandler(type = CorfuMsgType.WRITE, opTimer = metricsPrefix + \"write\")\n public void write(CorfuPayloadMsg<WriteRequest> msg, ChannelHandlerContext ctx, IServerRouter r,\n boolean isMetricsEnabled) {\n log.debug(\"log write: global: {}, streams: {}, backpointers: {}\", msg\n .getPayload().getGlobalAddress(), msg.getPayload().getData().getBackpointerMap());\n\n try {\n dataCache.put(msg.getPayload().getGlobalAddress(), msg.getPayload().getData());\n r.sendResponse(ctx, msg, CorfuMsgType.WRITE_OK.msg());\n\n } catch (OverwriteException ex) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_OVERWRITE.msg());\n } catch (DataOutrankedException e) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_DATA_OUTRANKED.msg());\n } catch (ValueAdoptedException e) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_VALUE_ADOPTED.payloadMsg(e.getReadResponse()));\n }\n }", "protected abstract void _write(DataOutput output) throws IOException;", "public abstract void flush();", "public synchronized void write(int update) throws InterruptedException\n {\n while (!bufferEmpty(\"Producer\"))\n // while (!bufferEmpty)\n {\n //Console.println(\"Producer Waiting on Buffer\");\n\n this.wait();\n\n // bufferEmpty = bufferEmpty(\"Producer\");\n }\n\n // Console.println(\"Producer writing\" + update + \" to Buffer\");\n theBuffer = update;\n this.notify();\n }", "public void write() {\n/* 1062 */ this.cbSize = size();\n/* 1063 */ super.write();\n/* */ }", "@Override\r\n public void write(char[] cbuf, int off, int len) throws IOException {\r\n\r\n IOException ioException = null;\r\n for (WriterInfo writerInfo : mWriters) {\r\n try {\r\n writerInfo.getWriter().write(cbuf, off, len);\r\n } catch(IOException ioex) {\r\n ioException = ioex;\r\n }\r\n }\r\n if (ioException != null) {\r\n throw ioException;\r\n }\r\n\r\n }", "@Override\r\n public void write(byte[] buffer) throws IOException {\r\n inWrite1 = true;\r\n try {\r\n super.write(buffer);\r\n if (!inWrite3) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, buffer.length);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, buffer.length, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite1 = false;\r\n } catch (IOException e) {\r\n inWrite1 = false;\r\n throw e;\r\n }\r\n }", "public synchronized void write(String data){\n\t\tlog.debug(\"[SC] Writing \"+data, 4);\n\t\twriteBuffer.add(data.getBytes());\n\t}", "private void handleWrite(SelectionKey key, String message, SSLClientSession session) throws IOException {\n\t\t\tSSLSocketChannel ssl_socket_channel = session.getSSLSocketChannel();\n\t\t\t\n\t\t\tByteBuffer out_message = ssl_socket_channel.getAppSendBuffer();\n\t\t\t\n\t\t\tif(message != null) \n\t\t\t\tout_message.put(message.getBytes());\n\t\t\t\n//\t\t\tOutputHandler.println(\"Server: writing \"+new String(out_message.array(), 0, out_message.position()));\n\t\t\tint count = 0;\n\t\t\t\n\t\t\twhile (out_message.position() > 0) {\n\t\t\t\tcount = ssl_socket_channel.write();\n\t\t\t\tif (count == 0) {\n//\t\t\t\t\tOutputHandler.println(\"Count was 0.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n//\t\t\t\telse {\n//\t\t\t\t\tOutputHandler.println(\"Count was \"+count);\n//\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (out_message.position() > 0) {\n\t\t\t\t// short write:\n\t\t\t\t// Register for OP_WRITE and come back here when ready\n\t\t\t\tkey.interestOps(key.interestOps() | SelectionKey.OP_WRITE);\n\t\t\t\t\n\t\t\t\tsession.rewrite = true;\n\t\t\t} else {\n\t\t\t\tif(session.out_messages.isEmpty()) { \n\t\t\t\t\t// Write succeeded, don�t need OP_WRITE any more\n\t\t\t\t\tkey.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tsession.rewrite = false;\n\t\t\t}\n\t\t}", "private void writeStream(OutputStream os, String out) {\n try {\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, \"utf-8\"));\n writer.write(out);\n writer.flush();\n writer.close();\n os.close();\n } catch (IOException e) {\n }\n }", "public abstract void writeToStream(java.io.DataOutputStream output) throws java.io.IOException;", "void flushBuffer();", "public void write(byte[] buffer) { //이건 보내주는거\n try {\n mmOutStream.write(buffer);\n\n // Disabled: Share the sent message back to the main thread\n mHandler.obtainMessage(MESSAGE_WRITE, -1, -1, buffer).sendToTarget(); //MH주석풀엇음 //what arg1, arg2 obj\n\n } catch (IOException e) {\n Log.e(TAG, \"Exception during write\");\n }\n }", "public void startFileWrite() {\r\n this.setStatus(false);\r\n this.isFileOutStarted = true;\r\n if (!this.is_alg_started || (this.is_alg_started && ((this.is_already_read_from_DB && this.UseFile.isSelected())\r\n || (!this.is_already_read_from_DB && this.UseDB.isSelected())))) {\r\n this.startALG(true);\r\n } else {\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Controller.this.writeIntoFiles.setVisible(true);\r\n Controller.this.isFileWriteInUse = true;\r\n Controller.this.cw.setWritesOnlyFiles(true);\r\n Controller.this.cw.writeFile(true, true, false);\r\n }// run()\r\n });// Thread\r\n t.start();\r\n Timer timer = new Timer();\r\n timer.schedule(new ObserveProgress(timer, t), 200, 2000);\r\n this.isFileOutStarted = false;\r\n }\r\n }", "void flush();", "void flush();", "void flush();", "void flush();", "void flush();", "void flush();", "void flush();", "void flush();", "public void flush();", "public void flush();", "public void flush();", "public void flush();", "public void write(byte[] buffer);", "@Override\r\n public void write(byte[] buffer, int off, int len) throws IOException {\r\n inWrite3 = true;\r\n try {\r\n super.write(buffer, off, len);\r\n if (!inWrite1) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, len);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, len, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite3 = false;\r\n } catch (IOException e) {\r\n inWrite3 = false;\r\n throw e;\r\n }\r\n }", "@Override\n\tpublic void flushBuffer() throws IOException {\n\t}", "@Override\r\n public synchronized void flush() throws IOException {\r\n\t\tif ( count != 0 ) {\r\n\t\t writeBuffer(buf, 0, count );\r\n\t\t count = 0;\r\n\t\t}\r\n\t}", "private void byteOut(){\n if(nrOfWrittenBytes >= 0){\n if(b==0xFF){\n // Delay 0xFF byte\n delFF = true;\n b=c>>>20;\n c &= 0xFFFFF;\n cT=7;\n }\n else if(c < 0x8000000){\n // Write delayed 0xFF bytes\n if (delFF) {\n out.write(0xFF);\n delFF = false;\n nrOfWrittenBytes++;\n }\n out.write(b);\n nrOfWrittenBytes++;\n b=c>>>19;\n c &= 0x7FFFF;\n cT=8;\n }\n else{\n b++;\n if(b==0xFF){\n // Delay 0xFF byte\n delFF = true;\n c &= 0x7FFFFFF;\n b=c>>>20;\n c &= 0xFFFFF;\n cT=7;\n }\n else{\n // Write delayed 0xFF bytes\n if (delFF) {\n out.write(0xFF);\n delFF = false;\n nrOfWrittenBytes++;\n }\n out.write(b);\n nrOfWrittenBytes++;\n b=((c>>>19)&0xFF);\n c &= 0x7FFFF;\n cT=8;\n }\n }\n }\n else {\n // NOTE: carry bit can never be set if the byte buffer was empty\n b= (c>>>19);\n c &= 0x7FFFF;\n cT=8;\n nrOfWrittenBytes++;\n }\n }", "public void commitPendingDataToDisk() {\n /*\n r5 = this;\n monitor-enter(r5);\n r1 = r5.mPendingWrite;\t Catch:{ all -> 0x0039 }\n r3 = 0;\n r5.mPendingWrite = r3;\t Catch:{ all -> 0x0039 }\n if (r1 != 0) goto L_0x000a;\n L_0x0008:\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n L_0x0009:\n return;\n L_0x000a:\n r3 = r5.mWriteLock;\t Catch:{ all -> 0x0039 }\n r3.lock();\t Catch:{ all -> 0x0039 }\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n r2 = new java.io.FileOutputStream;\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3 = r3.chooseForWrite();\t Catch:{ IOException -> 0x003c }\n r2.<init>(r3);\t Catch:{ IOException -> 0x003c }\n r3 = r1.marshall();\t Catch:{ IOException -> 0x003c }\n r2.write(r3);\t Catch:{ IOException -> 0x003c }\n r2.flush();\t Catch:{ IOException -> 0x003c }\n android.os.FileUtils.sync(r2);\t Catch:{ IOException -> 0x003c }\n r2.close();\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3.commit();\t Catch:{ IOException -> 0x003c }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0039:\n r3 = move-exception;\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n throw r3;\n L_0x003c:\n r0 = move-exception;\n r3 = \"BatteryStats\";\n r4 = \"Error writing battery statistics\";\n android.util.Slog.w(r3, r4, r0);\t Catch:{ all -> 0x0052 }\n r3 = r5.mFile;\t Catch:{ all -> 0x0052 }\n r3.rollback();\t Catch:{ all -> 0x0052 }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0052:\n r3 = move-exception;\n r1.recycle();\n r4 = r5.mWriteLock;\n r4.unlock();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.internal.os.BatteryStatsImpl.commitPendingDataToDisk():void\");\n }", "public void flush() {\n\t\t\n\t}", "private boolean flushWrite(final boolean block) throws IOException, BadDescriptorException {\n if (reading || !modes.isWritable() || buffer.position() == 0) return false; // Don't bother\n int len = buffer.position();\n int nWritten = 0;\n buffer.flip();\n \n // For Sockets, only write as much as will fit.\n if (descriptor.getChannel() instanceof SelectableChannel) {\n SelectableChannel selectableChannel = (SelectableChannel)descriptor.getChannel();\n synchronized (selectableChannel.blockingLock()) {\n boolean oldBlocking = selectableChannel.isBlocking();\n try {\n if (oldBlocking != block) {\n selectableChannel.configureBlocking(block);\n }\n nWritten = descriptor.write(buffer);\n } finally {\n if (oldBlocking != block) {\n selectableChannel.configureBlocking(oldBlocking);\n }\n }\n }\n } else {\n nWritten = descriptor.write(buffer);\n }\n if (nWritten != len) {\n buffer.compact();\n return false;\n }\n buffer.clear();\n return true;\n }", "Write createWrite();", "void notifyWrite();", "protected int doWriteSingle(ChannelOutboundBuffer in) throws Exception {\n/* 481 */ Object msg = in.current();\n/* 482 */ if (msg instanceof ByteBuf)\n/* 483 */ return writeBytes(in, (ByteBuf)msg); \n/* 484 */ if (msg instanceof DefaultFileRegion)\n/* 485 */ return writeDefaultFileRegion(in, (DefaultFileRegion)msg); \n/* 486 */ if (msg instanceof FileRegion)\n/* 487 */ return writeFileRegion(in, (FileRegion)msg); \n/* 488 */ if (msg instanceof SpliceOutTask) {\n/* 489 */ if (!((SpliceOutTask)msg).spliceOut()) {\n/* 490 */ return Integer.MAX_VALUE;\n/* */ }\n/* 492 */ in.remove();\n/* 493 */ return 1;\n/* */ } \n/* */ \n/* 496 */ throw new Error();\n/* */ }", "@Override\n\tpublic void flush() {\n\t\t\n\t}", "@Override\n\tpublic void flush() {\n\t\t\n\t}", "@Override\n\tpublic void flush() {\n\t\t\n\t}", "@Override\n\tpublic void flush() {\n\t\t\n\t}", "public int internalWrite(ByteBuffer buffer) throws IOException, BadDescriptorException {\n checkOpen();\n \n // TODO: It would be nice to throw a better error for this\n if (!(channel instanceof WritableByteChannel)) {\n throw new BadDescriptorException();\n }\n \n WritableByteChannel writeChannel = (WritableByteChannel)channel;\n \n if (isSeekable() && originalModes.isAppendable()) {\n FileChannel fileChannel = (FileChannel)channel;\n fileChannel.position(fileChannel.size());\n }\n \n return writeChannel.write(buffer);\n }", "public synchronized void flush() {\n\t\ttry {\n\t\t\tcloseWriter();\n\t\t} catch(IOException ioe ) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\topenWriter(true);\n\t\t} catch(IOException ioe ) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "private void writeProc() throws Exception {\n\t\tWriter writer = new Writer(this.procPath,this.procDataList);\n\t\twriter.running();\n\t}", "protected void write(byte[] bytes, int offset, int length) {\n/* 114 */ if (this.socket == null) {\n/* 115 */ if (this.connector != null && !this.immediateFail) {\n/* 116 */ this.connector.latch();\n/* */ }\n/* 118 */ if (this.socket == null) {\n/* 119 */ String msg = \"Error writing to \" + getName() + \" socket not available\";\n/* 120 */ throw new AppenderLoggingException(msg);\n/* */ } \n/* */ } \n/* 123 */ synchronized (this) {\n/* */ try {\n/* 125 */ getOutputStream().write(bytes, offset, length);\n/* 126 */ } catch (IOException ex) {\n/* 127 */ if (this.retry && this.connector == null) {\n/* 128 */ this.connector = new Reconnector(this);\n/* 129 */ this.connector.setDaemon(true);\n/* 130 */ this.connector.setPriority(1);\n/* 131 */ this.connector.start();\n/* */ } \n/* 133 */ String msg = \"Error writing to \" + getName();\n/* 134 */ throw new AppenderLoggingException(msg, ex);\n/* */ } \n/* */ } \n/* */ }", "@Override\r\n public void flush ()\r\n {\r\n }", "public abstract void Write(WriteOptions options, WriteBatch updates) throws IOException, BadFormatException, DecodeFailedException;", "public abstract void write(DataOutput out) throws IOException;", "@DSSink({DSSinkKind.IO})\n @DSSpec(DSCat.IO)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-03 14:59:52.266 -0400\", hash_original_method = \"6659C26B9D2F6D845755120D9E3C542C\", hash_generated_method = \"1D85046399E8D016E013E1B1E96055F2\")\n \n@Override\r\n public void write(byte[] bts, int st, int end) throws IOException {\r\n try {\r\n beforeWrite(end);\r\n out.write(bts, st, end);\r\n afterWrite(end);\r\n } catch (IOException e) {\r\n handleIOException(e);\r\n }\r\n }", "public void startWrite() throws ThingsException;", "public abstract void writeToStream(DataOutputStream dataOutputStream);", "@Override\n public void flushBuffer() throws IOException {\n\n }", "private void doClipWrite(byte b[], int off, int len) {\n\t\tif (count + len <= maxOutputSize) { // won't overflow\n\t\t\tthis.writeDirectly(b, off, len);\n\t\t} else {\n\t\t\tint discardBytes = len + count - maxOutputSize;\n\t\t\tif (len >= maxOutputSize) {\n\t\t\t\treset();\n\t\t\t\tthis.writeDirectly(b, off + len - maxOutputSize, maxOutputSize);\n\t\t\t} else {\n\t\t\t\tint shiftStart = count - maxOutputSize + len;\n\t\t\t\tint remaining = maxOutputSize - len;\n\t\t\t\tSystem.arraycopy(buf, shiftStart, buf, 0, remaining);\n\t\t\t\tcount = remaining;\n\t\t\t\tthis.writeDirectly(b, off, len);\n\t\t\t}\n\t\t\tclipNum ++;\n\t\t\tSystem.out.println(String.format(\"Overflow count: %d, discarded bytes number: %d\", clipNum,\n\t\t\t\t\tdiscardBytes));\n\t\t\t\n\t\t}\n\n\t}", "public void run() {\n\t\twhile(running){\n\t\t\t\n\t\t\tif (!thingsToWrite.isEmpty()){\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tString s = (String) thingsToWrite.get(0);\n\t\t\t\t\tif(s.equals(\"file\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//write \"files\"\n\t\t\t\t\t\toos.writeObject(thingsToWrite.getNRemoveFirst());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//need to wait for synchro //HARDCODED, ideal : 1 command\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//write the dataObject\n\t\t\t\t\t\toos.writeObject(thingsToWrite.getNRemoveFirst());\n\n\t\t\t\t\t\t//need to wait for synchro //HARDCODED, ideal : 1 command\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//write the file\n\t\t\t\t\t\tbyte[] content = ( byte[] )thingsToWrite.getNRemoveFirst();\n\t\t\t\t\t\toos.writeObject(content);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"file Sent\");\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(s.startsWith(\"addRepo\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\toos.writeObject(s);\n\t\t\t\t\t\tthingsToWrite.remove(0);\n\t\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t\toos.writeObject(s);\n\t\t\t\t\t\tthingsToWrite.remove(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch (IOException | InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void onEncodeSerialData(StreamWriter streamWriter) {\n }", "@Override\r\n\tpublic void flush() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void write(Writable key, SolrInputDocument doc)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\ttry {\n\t\t\t\tdocs.add(doc);\n\t\t\t\tif (docs.size() >= batch) {\n\t\t\t\t\tserver.add(docs);\n\t\t\t\t\tdocs.clear();\n\t\t\t\t}\n\t\t\t} catch (SolrServerException e) {\n\t\t\t\tRuntimeException exc = new RuntimeException(e.toString(), e);\n\t\t\t\texc.setStackTrace(e.getStackTrace());\n\t\t\t\tthrow exc;\n\t\t\t}\n\t\t}", "@Override\n public void flush()\n {\n }", "@Override // com.facebook.p447b.p449b.DiskStorage.AbstractC3936b\n /* renamed from: a */\n public void mo27428a(WriterCallback jVar, Object obj) throws IOException {\n try {\n FileOutputStream fileOutputStream = new FileOutputStream(this.f17429a);\n try {\n CountingOutputStream cVar = new CountingOutputStream(fileOutputStream);\n jVar.write(cVar);\n cVar.flush();\n long a = cVar.mo27531a();\n fileOutputStream.close();\n if (this.f17429a.length() != a) {\n throw new C3928d(a, this.f17429a.length());\n }\n } catch (Throwable th) {\n fileOutputStream.close();\n throw th;\n }\n } catch (FileNotFoundException e) {\n DefaultDiskStorage.this.f17417f.mo27388a(CacheErrorLogger.EnumC3922a.WRITE_UPDATE_FILE_NOT_FOUND, DefaultDiskStorage.f17413b, \"updateResource\", e);\n throw e;\n }\n }", "public void flush() {\n writer.flush();\n }", "public void flush()\n/* */ throws IOException\n/* */ {\n/* 833 */ _flushBuffer();\n/* 834 */ if ((this._writer != null) && \n/* 835 */ (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM))) {\n/* 836 */ this._writer.flush();\n/* */ }\n/* */ }", "public void streamWrite(byte[] buffer,int bufferOffset,int nrOfBytes) throws VlException\n {\n if (this instanceof VStreamWritable)\n {\n VStreamWritable wfile = (VStreamWritable) (this);\n OutputStream ostr = wfile.getOutputStream(); // do not append\n\n try\n {\n ostr.write(buffer, bufferOffset, nrOfBytes);\n ostr.flush(); \n ostr.close(); // Close between actions !\n }\n catch (IOException e)\n {\n throw new VlIOException(\"Failed to write to file:\" + this, e);\n }\n }\n else\n {\n throw new nl.uva.vlet.exception.NotImplementedException(\"File type does not support (remote) write access\");\n }\n }", "public void writeTo(OutputStream arg0) throws IOException {\n\t\t\r\n\t}", "public StreamWriter write(byte[] buffer)\r\n {\r\n \t_stream.write(buffer,0,buffer.length);\r\n\t\treturn this;\r\n }", "@Override\n public void write() {\n for(MDCWriter writer : this.writers) {\n writer.write();\n }\n }", "public void write(IORequest request) throws MemoryFault {\n setBaseLimit();\n //sets what we need for the read and write\n // System.out.println(\"[Debug] Base & Limit set\");\n int deviceNumber = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc);\n int platter = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 1);\n int platStart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n int datasize = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 3);\n int memLoc = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 4) + Process_Table[request.prognum].base;\n Process_Table[currentProcess].status = ProcessState.waiting;\n //System.out.println(\"ACC:\" + Process_Table[currentProcess].acc);\n machine.devices[deviceNumber].controlRegister.register[0] = DeviceControllerOperations.WRITE;\n machine.devices[deviceNumber].controlRegister.register[1] = platter;\n machine.devices[deviceNumber].controlRegister.register[2] = platStart;\n machine.devices[deviceNumber].controlRegister.register[3] = datasize;\n // System.out.println(\"[Debug] Registers set\");\n for (int i = 0; i < datasize; i++) {\n machine.devices[deviceNumber].buffer[i] = machine.memory.load(memLoc + i);\n\n\n }\n\n machine.devices[deviceNumber].controlRegister.latch(); // initiate the latch\n }", "protected abstract void sendInternal(ByteBuffer outputBuffer) throws IOException;", "@Override\r\n\tpublic int write() throws Exception {\n\t\treturn 0;\r\n\t}", "public void write( byte[] wBuf, int wOffset, int numToWrite ) throws IOException {\n\t\tif ( (this.currBytes + numToWrite) > this.currSize ) // Yazilmak istenen veri boyutu asiyorsa\n\t\t\tthrow new IOException( \"request to write '\" + numToWrite + \"' bytes exceeds size in header of '\"\n + this.currSize + \"' bytes\" );\n\t\tif ( this.assemLen > 0 ) { // Ikincil tampon\n\t\t\tif ( (this.assemLen + numToWrite ) >= this.recordBuf.length ) {\n\t\t\t\tint aLen = this.recordBuf.length - this.assemLen;\n\t\t\t\tSystem.arraycopy( this.assemBuf, 0, this.recordBuf, 0, this.assemLen ); // Once ikincil tampondan \n\t\t\t\tSystem.arraycopy( wBuf, wOffset, this.recordBuf, this.assemLen, aLen ); // Sonra verilen bytelar yazilir\n\t\t\t\tthis.buffer.writeRecord( this.recordBuf );\n\t\t\t\tthis.currBytes += this.recordBuf.length;\n\t\t\t\twOffset += aLen;\n\t\t\t\tnumToWrite -= aLen;\n\t\t\t\tthis.assemLen = 0;\n\t\t\t\t}\n\t\t\telse // ( (this.assemLen + numToWrite ) < this.recordBuf.length )\n\t\t\t\t{\n\t\t\t\tSystem.arraycopy( wBuf, wOffset, this.assemBuf,\tthis.assemLen, numToWrite );\n\t\t\t\twOffset += numToWrite; // Verilen byte tamamen yazilir\n\t\t\t\tthis.assemLen += numToWrite; \n\t\t\t\tnumToWrite -= numToWrite;\n\t\t\t\t}\n\t\t\t}\n\t\tfor ( ; numToWrite > 0 ; ) { // Simdi ya ikincil tampon bosaldi ya da tum veriler yazildi.\n\t\t\tif ( numToWrite < this.recordBuf.length ) { // Veriler ikincil tampona atilir\n\t\t\t\tSystem.arraycopy( wBuf, wOffset, this.assemBuf, this.assemLen, numToWrite );\n\t\t\t\tthis.assemLen += numToWrite;\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tthis.buffer.writeRecord( wBuf, wOffset ); // Yazilmak istenen veriler kayiti dolduruyorsa tampona yazilir\n\t\t\tlong num = this.recordBuf.length;\n\t\t\tthis.currBytes += num;\n\t\t\tnumToWrite -= num;\n\t\t\twOffset += num;\n\t\t\t}\n\t\t}", "@Override\n public void flush() {\n }", "@Override\n public void flush() {\n }", "@Override\n public void flush() {\n }", "private void concurrencyWrites2() {\n\t\ttry {\n\t\t\tlog.info(\"Starting TrxTableClient5: concurrencyWrites2\");\n\t\t\tlog.info(\"main--put[v1]\");\n\t\t\tlog.info(\"t1-----------beginTrans---put[v2]---------------------------commit\");\n\t\t\tlog.info(\"t2-------------------------------------beginTrans---put[v3]----------abort\");\n\t\t\tlog.info(\"main---get[v2]\");\n\t\t\tSsccTableClientUtils.initialize();\n\t\t\tputValue();\n\n\t\t\tfinal P0Trx11 t1 = new P0Trx11();\n\t\t\tfinal P0Trx12 t2 = new P0Trx12();\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt1.doWork();\n\t\t\t\t\tlog.info(\" Trx1 finished\");\n\t\t\t\t\tcdl2.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx1\").start();\n\n\t\t\t// to make sure t2 is later than t1\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tt2.doWork();\n\t\t\t\t\tlog.info(\" Trx2 finished\");\n\t\t\t\t\tcdl2.countDown();\n\t\t\t\t}\n\t\t\t}, \"Trx2\").start();\n\n\t\t\tcdl2.await();\n\n\t\t\tSsccTableClientUtils.testSsccBeginTransaction();\n\t\t\tInteger[] result = SsccTableClientUtils.testSsccGet();\n\t\t\tSsccTableClientUtils.testSsccCommitIfPossible();\n\t\t\tlog.info(\"Finish TrxTableClient5: concurrencyWrites2\");\n\n\t\t\tif (result.length == 1 && result[0] == 2) {\n\t\t\t\tsuccessNum++;\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"SUCCESS\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t} else {\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"FAILURE\");\n\t\t\t\tlog.info(\" \");\n\t\t\t\tlog.info(\"=========================================\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void flush() throws SolrServerException, IOException {\n if (adds > 0) {\n Map<Integer, Map<String, SolrInputDocument>> maps = writeBuffers.asMap();\n for (Map.Entry<Integer, Map<String, SolrInputDocument>> entry : maps.entrySet()) {\n if (entry.getValue().size() > 0) {\n delegateWriter.add(entry.getKey(), ImmutableMap.copyOf(entry.getValue()));\n }\n }\n docOutputCounter.increment(adds);\n docBatchCounter.increment(1L);\n adds = 0;\n writeBuffers.invalidateAll();\n }\n }", "@Override\r\n\tpublic void flush() {\n\t}", "public void writeFile(ByteBuffer buf, int len, int pos, long offset,\n\t\t\tboolean propigate) throws java.io.IOException, DataArchivedException {\n\n\t\tif (SDFSLogger.isDebug()) {\n\t\t\tSDFSLogger.getLog().debug(\n\t\t\t\t\t\"fc writing \" + df.getMetaFile().getPath() + \" at \"\n\t\t\t\t\t\t\t+ offset + \" \" + buf.capacity() + \" bytes len=\"\n\t\t\t\t\t\t\t+ len + \" pos=\" + pos);\n\t\t\tif (df.getMetaFile().getPath().endsWith(\".vmx\")\n\t\t\t\t\t|| df.getMetaFile().getPath().endsWith(\".vmx~\")) {\n\t\t\t\tbyte[] _zb = new byte[len];\n\t\t\t\tbuf.get(_zb);\n\n\t\t\t\tSDFSLogger.getLog().debug(\n\t\t\t\t\t\t\"###### In fc Text of VMX=\"\n\t\t\t\t\t\t\t\t+ df.getMetaFile().getPath() + \"=\"\n\t\t\t\t\t\t\t\t+ new String(_zb, \"UTF-8\"));\n\t\t\t}\n\t\t}\n\t\tLock l = df.getReadLock();\n\t\tl.lock();\n\t\ttry {\n\t\t\tbuf.position(pos);\n\t\t\tthis.writtenTo = true;\n\t\t\tlong _cp = offset;\n\t\t\t// ByteBuffer buf = ByteBuffer.wrap(bbuf, pos, len);\n\t\t\tint bytesLeft = len;\n\t\t\tint write = 0;\n\t\t\twhile (bytesLeft > 0) {\n\t\t\t\t// Check to see if we need a new Write buffer\n\t\t\t\t// WritableCacheBuffer writeBuffer = df.getWriteBuffer(_cp);\n\t\t\t\t// Find out where to write to in the buffer\n\t\t\t\tDedupChunkInterface writeBuffer = null;\n\t\t\t\tlong filePos = df.getChuckPosition(_cp);\n\t\t\t\tint startPos = (int) (_cp - filePos);\n\t\t\t\tif (startPos < 0)\n\t\t\t\t\tSDFSLogger.getLog().fatal(\"Error \" + _cp + \" \" + filePos);\n\t\t\t\t// Find out how many total bytes there are left to write in\n\t\t\t\t// this\n\t\t\t\t// loop\n\n\t\t\t\tint _len = Main.CHUNK_LENGTH - startPos;\n\t\t\t\tif (bytesLeft < _len)\n\t\t\t\t\t_len = bytesLeft;\n\t\t\t\t/*\n\t\t\t\t * if (_len == Main.CHUNK_LENGTH) newBuf = true;\n\t\t\t\t */\n\n\t\t\t\tbyte[] b = new byte[_len];\n\t\t\t\ttry {\n\t\t\t\t\tbuf.get(b);\n\t\t\t\t} catch (java.nio.BufferUnderflowException e) {\n\t\t\t\t\tbuf.get(b, 0, buf.capacity() - buf.position());\n\t\t\t\t\tSDFSLogger.getLog().error(\n\t\t\t\t\t\t\t\"buffer underflow getting \"\n\t\t\t\t\t\t\t\t\t+ (buf.capacity() - buf.position())\n\t\t\t\t\t\t\t\t\t+ \" instead of \" + _len);\n\t\t\t\t}\n\t\t\t\twhile (writeBuffer == null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\twriteBuffer = df.getWriteBuffer(filePos);\n\t\t\t\t\t\t\twriteBuffer.write(b, startPos);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (_len != Main.CHUNK_LENGTH && propigate\n\t\t\t\t\t\t\t\t&& df.getMetaFile().getDev() != null) {\n\t\t\t\t\t\t\teventBus.post(new BlockDeviceSmallWriteEvent(df\n\t\t\t\t\t\t\t\t\t.getMetaFile().getDev(),\n\t\t\t\t\t\t\t\t\tByteBuffer.wrap(b), filePos + startPos,\n\t\t\t\t\t\t\t\t\t_len));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (Main.volume.isClustered())\n\t\t\t\t\t\t\twriteBuffer.flush();\n\t\t\t\t\t} catch (BufferClosedException e) {\n\t\t\t\t\t\tif (SDFSLogger.isDebug())\n\t\t\t\t\t\t\tSDFSLogger.getLog().debug(\"trying to write again\");\n\t\t\t\t\t\twriteBuffer = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_cp = _cp + _len;\n\t\t\t\tbytesLeft = bytesLeft - _len;\n\t\t\t\twrite = write + _len;\n\t\t\t\tthis.currentPosition = _cp;\n\t\t\t\tif (_cp > df.getMetaFile().length()) {\n\t\t\t\t\tdf.getMetaFile().setLength(_cp, false);\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch(DataArchivedException e) {\n\t\t\tif(Main.checkArchiveOnRead) {\n\t\t\t\tSDFSLogger.getLog().warn(\"Archived data found in \"+ df.getMetaFile().getPath()+ \" at \" + pos + \". Recovering data from archive. This may take up to 4 hours\");\n\t\t\t\tthis.recoverArchives();\n\t\t\t\tthis.writeFile(buf, len, pos, offset, propigate);\n\t\t\t}\n\t\t\telse throw e;\n\t\t}catch (FileClosedException e) {\n\t\t\tSDFSLogger.getLog()\n\t\t\t\t\t.warn(df.getMetaFile().getPath()\n\t\t\t\t\t\t\t+ \" is closed but still writing\");\n\t\t\tthis.closeLock.lock();\n\t\t\ttry {\n\t\t\t\tdf.registerChannel(this);\n\t\t\t\tthis.closed = false;\n\t\t\t\tthis.writeFile(buf, len, pos, offset, propigate);\n\t\t\t} finally {\n\t\t\t\tthis.closeLock.unlock();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSDFSLogger.getLog().fatal(\n\t\t\t\t\t\"error while writing to \" + this.df.getMetaFile().getPath()\n\t\t\t\t\t\t\t+ \" \" + e.toString(), e);\n\t\t\tMain.volume.addWriteError();\n\t\t\tthrow new IOException(\"error while writing to \"\n\t\t\t\t\t+ this.df.getMetaFile().getPath() + \" \" + e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdf.getMetaFile().setLastModified(System.currentTimeMillis());\n\t\t\t} catch (Exception e) {\n\t\t\t}\n\t\t\tl.unlock();\n\t\t}\n\t}", "@Override\n\tpublic void flush() {\n\t}", "void flush() throws IOException;", "void flush() throws IOException;", "void flush() throws IOException;", "public void writeTo(OutputStream os) throws IOException, MessagingException {\n/* 96 */ LineOutputStream los = null;\n/* 97 */ if (os instanceof LineOutputStream) {\n/* 98 */ los = (LineOutputStream)os;\n/* */ } else {\n/* 100 */ los = new LineOutputStream(os);\n/* */ } \n/* */ \n/* */ \n/* 104 */ Enumeration hdrLines = getAllHeaderLines();\n/* 105 */ while (hdrLines.hasMoreElements()) {\n/* 106 */ los.writeln(hdrLines.nextElement());\n/* */ }\n/* */ \n/* 109 */ los.writeln();\n/* */ \n/* */ \n/* 112 */ getDataHandler().writeTo(os);\n/* 113 */ os.flush();\n/* */ }", "@Override\n protected void sendBuffer(byte[] buffer) {\n final UsbSerialDriver serialDriver = serialDriverRef.get();\n if (serialDriver != null) {\n try {\n serialDriver.write(buffer, 500);\n } catch (IOException e) {\n Log.e(TAG, \"Error Sending: \" + e.getMessage(), e);\n }\n }\n }", "public void setOutputStream(DataOutputStream dos) {\n this.careuOutputStream= dos;\n }", "public void write(OutputStream arg0) throws IOException {\n\n\t}" ]
[ "0.65065813", "0.6498815", "0.63203067", "0.61462146", "0.5796917", "0.57638437", "0.57383555", "0.5661247", "0.56302685", "0.5612726", "0.558953", "0.5579995", "0.55552673", "0.5536008", "0.5526867", "0.5519197", "0.54630077", "0.5413565", "0.5375236", "0.5360719", "0.53480273", "0.5347087", "0.53367054", "0.5324458", "0.5322474", "0.531132", "0.53081995", "0.5302612", "0.52879095", "0.5280795", "0.5280795", "0.5280795", "0.5280795", "0.5280795", "0.5280795", "0.5280795", "0.5280795", "0.52654475", "0.52654475", "0.52654475", "0.52654475", "0.52618986", "0.52539873", "0.5243836", "0.52421767", "0.5239584", "0.523717", "0.52349025", "0.5217414", "0.52021223", "0.5200815", "0.5191467", "0.51850486", "0.51850486", "0.51850486", "0.51850486", "0.5181605", "0.518069", "0.5170548", "0.51525754", "0.51496", "0.5149296", "0.5144695", "0.51392967", "0.5133673", "0.5132632", "0.51277536", "0.5124258", "0.51200736", "0.5115156", "0.51041293", "0.5103671", "0.5099111", "0.50984687", "0.5094102", "0.50899076", "0.5085812", "0.5084312", "0.5083445", "0.50813615", "0.5080012", "0.50791633", "0.506809", "0.5068081", "0.50605404", "0.50605404", "0.50605404", "0.5059031", "0.5047008", "0.50352883", "0.5034586", "0.5031733", "0.50183916", "0.50183916", "0.50183916", "0.5016535", "0.50151825", "0.5013827", "0.50124073" ]
0.6484379
2
Try to fill bbout from the message queue
private void processOut() { while (!queue.isEmpty()) { var bb = queue.peek(); if (bb.remaining() <= bbout.remaining()) { queue.remove(); bbout.put(bb); } else { break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void queueMessage(ByteBuffer bb) {\n queue.add(bb);\n processOut();\n updateInterestOps();\n }", "private void processOut() {\n\t\tsynchronized (lock){\n\t\twhile (!queue.isEmpty()) {\n\t\t\tvar bb = queue.peek();\n\t\t\tif (bb.remaining() <= bbout.remaining()) {\n\t\t\t\tqueue.remove();\n\t\t\t\tbbout.put(bb);\n\t\t\t}\n\t\t}}\n\t}", "@Override\n\tpublic Future<Integer> write(ByteBuffer bb) {\n\t\tthis.outcomingMessageQ.offer(bb);\n\n\t\t/*\n\t\t * Read the Q and send the packet util the Q is empty.\n\t\t * \n\t\t * This method will for ever called after the offer call on the Q to\n\t\t * make sure write will be triggered if the Q isn't empty.\n\t\t */\n\t\treturn sendOne();\n\n\t}", "public void queueMessage(ByteBuffer bb) {\n\t\tqueue.add(bb);\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "private void workOnQueue() {\n }", "private void dequeueMessages()\n\t{\n\t\twhile (_msg_queue.size() > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t_ml.messageReceived( (Serializable) _msg_queue.removeFirst());\n\t\t\t}\n\t\t\tcatch (RuntimeException rte)\n\t\t\t{\n\t\t\t\trte.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public synchronized void bufferMessage() throws Exception\r\n {\r\n\r\n System.out.println(\"BUFFER: Message from future round received. Buffering message.\");\r\n // Wait until node moves to next round.\r\n wait();\r\n\r\n }", "protected void addChannelToReadCompletePendingQueue() {\n/* 354 */ while (!Http2MultiplexHandler.this.readCompletePendingQueue.offer(this)) {\n/* 355 */ Http2MultiplexHandler.this.processPendingReadCompleteQueue();\n/* */ }\n/* */ }", "public Object consumeBloqueante();", "private void writeNextMessageInQueue() {\n // This should not happen in practice since this method is private and should only be called\n // for a non-empty queue.\n if (mMessageQueue.isEmpty()) {\n Log.e(TAG, \"Call to write next message in queue, but the message queue is empty.\");\n return;\n }\n\n if (mMessageQueue.size() == 1) {\n writeValueAndNotify(mMessageQueue.remove().toByteArray());\n return;\n }\n\n mHandler.post(mSendMessageWithTimeoutRunnable);\n }", "protected abstract long waitOnQueue();", "public void h() {\n long currentTimeMillis = System.currentTimeMillis();\n this.m.sendEmptyMessageDelayed(48, q.c(currentTimeMillis));\n this.m.sendEmptyMessageDelayed(49, q.d(currentTimeMillis));\n }", "void blockUntilFreeSlotForMessage() throws InterruptedException {\n lock.lockInterruptibly();\n try {\n while (messageQueue.size() == messageCapacity) {\n messageQueueNotFull.await();\n }\n } finally {\n lock.unlock();\n }\n }", "@Override\n public void handleMessage(Message msg) {\n sendEmptyMessageDelayed(0, 3000);\n if (resClient.getSendBufferFreePercent() <= 0.05) {\n Toast.makeText(StreamingActivity.this, \"sendbuffer is full,netspeed is low!\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\tpublic void waitMail() {\n\t\tif (Harness.TRACE)\n\t\t\tHarness.trace(String.format(\"[HarnessMailbox] WaitMail from %d, timeout %d\",\n\t\t\t\t\t\t\t\t\t\t(int)mailbox_number, timeout));\n\t\t\n\t\tif (mail_count[mailbox_number] > 0) {\n\t\t\twait_result = MSG_RECEIVED;\n\t\t\texecution_result = MSG_RECEIVED;\n\t\t\tmessage = mail_message[mailbox_number];\n\n\t\t\tif (Harness.TRACE)\n\t\t\t\tHarness.trace(String.format(\"[HarnessMailbox] Message from %d is %d = 0x%x\",\n\t\t\t\t\t\t\t\t\t\t\t(int)mailbox_number, (int)message, (int)message));\n\t\t\t\n\t\t\tmail_count[mailbox_number]--;\n\t\t} else {\n\t\t\twait_result = TIMEOUT_OCCURRED;\n\t\t\texecution_result = TIMEOUT_OCCURRED;\n\t\t\tmessage = 0;\n\t\t}\n\t}", "private boolean queueFullError() {\n\t\tSystem.out.println(\"Queue Full!!!\");\n\t\treturn false;\n\t}", "private void dealChatMsg() {\n /*\n r4 = this;\n r0 = new java.util.LinkedList;\n r0.<init>();\n r1 = com.tomatolive.library.ui.activity.live.PrepareLiveActivity.class;\n monitor-enter(r1);\n r2 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n if (r2 == 0) goto L_0x0033;\n L_0x000c:\n r2 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0038 }\n if (r2 == 0) goto L_0x0015;\n L_0x0014:\n goto L_0x0033;\n L_0x0015:\n r2 = 0;\n L_0x0016:\n r3 = 5;\n if (r2 >= r3) goto L_0x0029;\n L_0x0019:\n r3 = r4.receiveMsgQueue;\t Catch:{ all -> 0x0038 }\n r3 = r3.poll();\t Catch:{ all -> 0x0038 }\n r3 = (com.tomatolive.library.model.ChatEntity) r3;\t Catch:{ all -> 0x0038 }\n if (r3 == 0) goto L_0x0029;\n L_0x0023:\n r0.add(r3);\t Catch:{ all -> 0x0038 }\n r2 = r2 + 1;\n goto L_0x0016;\n L_0x0029:\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n r1 = new com.tomatolive.library.ui.activity.live.-$$Lambda$PrepareLiveActivity$WexsRlm5pU6uK-2JwaAGWgcPHqs;\n r1.<init>(r4, r0);\n r4.handlerMainPost(r1);\n return;\n L_0x0033:\n r0 = 1;\n r4.asleep = r0;\t Catch:{ all -> 0x0038 }\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n return;\n L_0x0038:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0038 }\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tomatolive.library.ui.activity.live.PrepareLiveActivity.dealChatMsg():void\");\n }", "public void propagate(XQueue in, XQueue[] out) throws JMSException {\n Message inMessage = null;\n String msgStr = null, ruleName = null;\n StringBuffer strBuf = null;\n Object o;\n Map rule;\n Browser browser;\n MessageFilter[] filters = null;\n Template template = null;\n AssetList taskList = null;\n String[] propertyName = null, propertyValue = null;\n long[] outInfo = null, ruleInfo = null, taskInfo;\n int[] ruleMap;\n long currentTime, sessionTime;\n long count = 0;\n int mask, ii, hbeat, retry;\n int i = 0, id, hid, tid, m, n;\n int cid = -1; // the cell id of the message in input queue\n int rid = 0; // the id of the ruleset\n int oid = 0; // the id of the output queue\n boolean dspBody = false, inDetail = ((debug & DEBUG_REPT) > 0);\n boolean ckBody = false;\n byte[] buffer = new byte[bufferSize];\n\n i = in.getCapacity();\n if (capacity != i) { // assume it only occurs at startup\n new Event(Event.WARNING, name + \": \" + in.getName() +\n \" has the different capacity of \" + i + \" from \" +\n capacity).send();\n capacity = i;\n msgList.clear();\n msgList = new AssetList(name, capacity);\n cells.clear();\n cells = new CollectibleCells(name, capacity);\n }\n\n // initialize patterns\n n = ruleList.size();\n filters = new MessageFilter[n];\n browser = ruleList.browser();\n ruleMap = new int[n];\n i = 0;\n while ((rid = browser.next()) >= 0) {\n rule = (Map) ruleList.get(rid);\n filters[i] = (MessageFilter) rule.get(\"Filter\");\n if (filters[i] != null) {\n if ((!ckBody) && filters[i].checkBody())\n ckBody = true;\n }\n ruleMap[i++] = rid;\n }\n\n // update assetList\n n = out.length;\n for (i=0; i<n; i++) {\n Object[] asset = (Object[]) assetList.get(i);\n asset[ASSET_XQ] = out[i];\n outInfo = assetList.getMetaData(i);\n if (outInfo[OUT_CAPACITY] != out[i].getCapacity())\n outInfo[OUT_CAPACITY] = out[i].getCapacity();\n }\n pool = out[outLinkMap[POOL_OUT]];\n poolInfo = assetList.getMetaData(outLinkMap[POOL_OUT]);\n if (pool.getCapacity() != reqList.getCapacity()) { // rereate reqList\n reqList.clear();\n reqList = new AssetList(name, pool.getCapacity());\n }\n\n n = ruleMap.length;\n strBuf = new StringBuffer();\n // set all groups active at startup but the first\n hid = heartbeat.length - 1;\n hbeat = heartbeat[hid];\n currentTime = System.currentTimeMillis();\n sessionTime = currentTime;\n ii = 0;\n while (((mask = in.getGlobalMask()) & XQueue.KEEP_RUNNING) > 0) {\n if ((mask & XQueue.STANDBY) > 0) // standby temporarily\n break;\n if ((cid = in.getNextCell(waitTime)) >= 0) { // got a new msg\n currentTime = System.currentTimeMillis();\n\n if ((inMessage = (Message) in.browse(cid)) == null) {\n in.remove(cid);\n new Event(Event.WARNING, name + \": \" + Event.traceStack(\n new JMSException(\"null msg from \"+in.getName()))).send();\n continue;\n }\n\n msgStr = null;\n rid = 0;\n i = 0;\n try {\n if (ckBody)\n msgStr = MessageUtils.processBody(inMessage, buffer);\n for (i=1; i<n; i++) {\n if (filters[i].evaluate(inMessage, msgStr)) {\n rid = ruleMap[i];\n break;\n }\n }\n }\n catch (Exception e) {\n String str = name;\n Exception ex = null;\n if (e instanceof JMSException)\n ex = ((JMSException) e).getLinkedException();\n if (ex != null)\n str += \" Linked exception: \" + ex.toString() + \"\\n\";\n new Event(Event.ERR, str + \" failed to apply the filter \"+i+\n \": \" + Event.traceStack(e)).send();\n i = -1;\n }\n\n ruleName = ruleList.getKey(rid);\n ruleInfo = ruleList.getMetaData(rid);\n\n if (i < 0) // failed on filter\n oid = outLinkMap[FAILURE_OUT];\n else if (TYPE_ACTION != (int) ruleInfo[RULE_PID]) // bypass\n oid = (int) ruleInfo[RULE_OID];\n else try { // to init the monitor and to add it to taskList\n rule = (Map) ruleList.get(rid);\n propertyName = (String[]) rule.get(\"PropertyName\");\n template = (Template) rule.get(\"Template\");\n Map<String,Object> task=initTask(template,buffer,inMessage);\n if (task != null && task.size() > 0) {\n String key = (String) task.get(\"Name\");\n TimeWindows tw = (TimeWindows) task.get(\"TimeWindow\");\n if (ruleInfo[RULE_TTL] > 0)\n tw.setStopTime(currentTime + ruleInfo[RULE_TTL]);\n if (propertyName != null) // copy properties over\n copyProperties(propertyName, task, inMessage);\n taskList = (AssetList) rule.get(\"TaskList\");\n id = taskList.add(key, new long[TASK_TIME+1], task);\n if ((debug & DEBUG_UPDT) > 0)\n new Event(Event.DEBUG, name + \" \" + ruleName +\n \" added a new task of \" + key + \" from \" + cid +\n \" to \" + id + \" with \" + taskList.size() + \" \" +\n ruleInfo[RULE_PEND]).send();\n if (id >= 0) {\n taskInfo = taskList.getMetaData(id);\n for (i=0; i<=TASK_TIME; i++)\n taskInfo[i] = 0;\n taskInfo[TASK_ID] = -1;\n taskInfo[TASK_GID] = -1;\n taskInfo[TASK_STATUS] = NODE_READY;\n taskInfo[TASK_TIME] = currentTime;\n ruleInfo[RULE_PEND] ++;\n ruleInfo[RULE_TIME] = currentTime;\n if (ruleInfo[RULE_OPTION] > 0) { // on wait\n // hold the message until it is done \n taskInfo[TASK_GID] = cid;\n continue;\n }\n oid = outLinkMap[BYPASS_OUT];\n }\n else { // failed to add to the list\n MonitorReport report;\n report = (MonitorReport) task.get(\"Report\");\n if (report != null)\n report.destroy();\n task.clear();\n if (taskList.getID(key) < 0) {\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to add new task of \" + key +\n \" \" + taskList.size() + \"/\" +\n ruleInfo[RULE_EXTRA]).send();\n oid = outLinkMap[FAILURE_OUT];\n }\n else {\n new Event(Event.WARNING, name +\": \"+ruleName+\n \" has an active task for \" + key).send();\n oid = outLinkMap[BYPASS_OUT];\n }\n }\n }\n else { // failed to init occurrence\n oid = outLinkMap[FAILURE_OUT];\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to init a new task\").send();\n }\n }\n catch (Exception e) {\n oid = outLinkMap[FAILURE_OUT];\n new Event(Event.ERR, name + \": \" + ruleName +\n \" failed to create a new task: \" +\n Event.traceStack(e)).send();\n }\n\n if ((debug & DEBUG_PROP) > 0)\n new Event(Event.DEBUG, name+\" propagate: cid=\" + cid +\n \" rid=\" + rid + \" oid=\" + oid).send();\n\n if (displayMask > 0) try {// display message\n if (dspBody)\n msgStr = MessageUtils.processBody(inMessage, buffer);\n new Event(Event.INFO, name+\": \"+ruleName+\" processed msg \"+\n (count + 1)+\":\"+MessageUtils.display(inMessage, msgStr,\n displayMask, displayPropertyName)).send();\n }\n catch (Exception e) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" failed to display msg: \" + e.toString()).send();\n }\n\n count += passthru(currentTime, inMessage, in, rid, oid, cid, 0);\n feedback(in, -1L);\n }\n\n currentTime = System.currentTimeMillis();\n if (currentTime < sessionTime) { // session not due yet\n if (pool.collectible() > 0)\n collect(in, outLinkMap[RESULT_OUT]);\n if (msgList.size() > 0)\n feedback(in, -1L);\n continue;\n }\n\n inDetail = ((debug & DEBUG_REPT) > 0);\n m = 0;\n browser.reset();\n while ((rid = browser.next()) >= 0) { // update active rulesets\n ruleInfo = ruleList.getMetaData(rid);\n if (ruleInfo[RULE_PID] != TYPE_ACTION)\n continue;\n if ((hbeat % (int) ruleInfo[RULE_MODE]) != 0) // not active\n continue;\n if (ruleInfo[RULE_PEND] <= 0) // empty rule\n continue;\n\n ruleName = ruleList.getKey(rid);\n rule = (Map) ruleList.get(rid);\n taskList = null;\n if (rule == null || rule.size() <= 0) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" is empty\").send();\n continue;\n }\n taskList = (AssetList) rule.get(\"TaskList\");\n if (taskList == null) {\n new Event(Event.WARNING, name + \": \" + ruleName +\n \" has no taskList\").send();\n continue;\n }\n if (inDetail)\n new Event(Event.DEBUG, name + \": \" + ruleName +\n \" is active with \" + taskList.size() + \" tasks\").send();\n if (taskList.size() <= 0)\n continue;\n retry = (int) ruleInfo[RULE_GID];\n Browser b = taskList.browser();\n while ((tid = b.next()) >= 0) { // dispatch tasks\n taskInfo = taskList.getMetaData(tid);\n id = (int) taskInfo[TASK_ID];\n if (id < 0) { // ready for next run\n ObjectEvent msg = new ObjectEvent();\n msg.setPriority(Event.INFO);\n msg.setAttribute(\"name\", taskList.getKey(tid));\n msg.setBody(taskList.get(tid));\n id = pool.reserve(waitTime);\n if (id >= 0) { // reserved\n if (reqList.existsID(id)) { // preoccupied?\n collect(currentTime, id, in,\n outLinkMap[RESULT_OUT]);\n }\n pool.add(msg, id);\n taskInfo[TASK_ID] = id;\n taskInfo[TASK_STATUS] = NODE_RUNNING;\n taskInfo[TASK_TIME] = currentTime;\n taskInfo[TASK_RETRY] = 0;\n reqList.add(String.valueOf(id),\n new long[]{rid, tid}, msg, id);\n poolInfo[OUT_SIZE] ++;\n poolInfo[OUT_TIME] = currentTime;\n poolInfo[OUT_QTIME] = currentTime;\n m ++;\n if (inDetail)\n strBuf.append(\"\\n\\t\" + ruleName + \"/\" +\n taskList.getKey(tid) + \": \" + tid + \" \" +\n id + \" \" + taskInfo[TASK_RC] + \" \" +\n taskInfo[TASK_COUNT]);\n }\n else { // failed to reserve\n new Event(Event.ERR, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" failed to reserve \"+\n \"from \" + pool.getName() + \" \" + pool.depth()+\n \":\" + pool.size() + \"/\" + id).send();\n }\n }\n else if (ruleInfo[RULE_GID] > 0 &&\n taskInfo[TASK_RETRY] >= ruleInfo[RULE_GID]) { // stuck\n taskInfo[TASK_RETRY] ++;\n if (taskInfo[RULE_STATUS] == NODE_RUNNING ||\n taskInfo[RULE_STATUS] == NODE_READY)\n taskInfo[RULE_STATUS] = NODE_RETRYING;\n new Event(Event.ERR, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" timed out and stuck \"+\n taskInfo[TASK_RETRY] + \" times at \" + id).send();\n }\n else {\n taskInfo[TASK_RETRY] ++;\n new Event(Event.WARNING, name + \" \"+ ruleName + \":\" +\n taskList.getKey(tid) + \" timed out and stuck \"+\n taskInfo[TASK_RETRY] + \" times at \" + id).send();\n }\n }\n }\n\n if (pool.collectible() > 0)\n collect(in, outLinkMap[RESULT_OUT]);\n if (msgList.size() > 0)\n feedback(in, -1L);\n\n if (inDetail && strBuf.length() > 0) {\n new Event(Event.DEBUG, name + \" RULE/KEY: TID ID RC COUNT - \" +\n m + \" \" + hid + \" \" + hbeat + \" \" + pool.size() + \":\" +\n pool.depth() + \" \" + reqList.size() +\n strBuf.toString()).send();\n strBuf = new StringBuffer();\n }\n\n hid ++;\n if (hid >= heartbeat.length) { // reset session\n hid = 0;\n sessionTime += heartbeat[hid];\n }\n else {\n sessionTime += heartbeat[hid] - hbeat;\n }\n hbeat = heartbeat[hid];\n currentTime = System.currentTimeMillis();\n if (currentTime > sessionTime) // reset sessionTime\n sessionTime = currentTime;\n }\n }", "private void extractProcessMessagesFromBufferIntoQueue(ByteBuffer byteBuffer){\n // when this function is called, byte buffer is ready for being read\n // i.e. position should point to the last byte written\n ProcessMessage procMsg;\n while((procMsg = extractProcessMessageFromByteBuffer(byteBuffer)) != null){\n // put procMsg into queue\n receivedMessagesQueue.add(procMsg);\n }\n\n // compact buffer for further reading new data\n byteBuffer.compact();\n\n }", "public void sendMessage(Event event){\n // find the last queue and add the message to that\n // if the last queue is full then create a new queue and add to that\n if(messageQueues.size() <= 0){\n Queue<Event> newQueue = new LinkedList<>();\n Queue<Event> newBackupQueue = new LinkedList<>();\n messageQueues.add(newQueue);\n backupMessageQueues.add(newBackupQueue);\n// System.out.println(\"Size of new Q: \" + messageQueues.size());\n }\n\n // getting hold of the working queue and the backup queue.\n Queue<Event> queue = messageQueues.get(messageQueues.size() - 1);\n Queue<Event> backupQueue = backupMessageQueues.get(backupMessageQueues.size() - 1);\n\n try{\n if(queue.size() >= queueSize){\n Queue<Event> newQueue = new LinkedList<>();\n Queue<Event> newBackupQueue = new LinkedList<>();\n // throw an excpetion for a certain message\n if(event.payload.trim().equals(\"CrashQueue\"))\n // this is done to simulate the queue crashing when it tries to add messages\n throw new Exception(\"Queue has been crashed\");\n // adding the message to both the backup and the main queue\n newQueue.add(event);\n messageQueues.add(newQueue);\n\n newBackupQueue.add(event);\n backupMessageQueues.add(newBackupQueue);\n } else {\n if(event.payload.trim().equals(\"CrashQueue\"))\n // this is done to simulate the queue crashing when it tries to add messages\n throw new Exception(\"Queue has been crashed\");\n queue.add(event);\n backupQueue.add(event);\n }\n }catch(Exception e){\n System.out.println(\"Queue crashed, switching it with the backup queue\");\n // if the queue fails then switch it with the backup queue and create a new backup\n messageQueues = backupMessageQueues;\n // create a duplicate backup message queue\n }\n// System.out.println(\"The message queuesss are : \" + messageQueues);\n }", "private void receive() {\n\t\tMQGetMessageOptions gmo = new MQGetMessageOptions();\n\t\tif (keepMessages) {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t| MQConstants.MQGMO_BROWSE_FIRST;\n\t\t} else {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2;\n\t\t\tif (syncPoint) {\n\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t}\n\t\t}\n\t\tgmo.matchOptions = MQConstants.MQMO_NONE;\n\t\tgmo.waitInterval = this.waitInterval;\n\n\t\ttry {\n\t\t\tint lastSeqNo = 0;\n\t\t\tlong lastTs = 0;\n\t\t\tint messagecounter = 0;\n\t\t\twhile (true) {\n\t\t\t\tif (!(qmgr.isConnected())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\tif (!(queue.isOpen())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\thaltFileExists();\n\t\t\t\tif (haltStatus) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t} else {\n\t\t\t\t\treadQueue = true;\n\t\t\t\t}\n\t\t\t\tint queueNotInhibited = queue.getInhibitGet();\n\t\t\t\tif (queueNotInhibited == MQConstants.MQQA_GET_INHIBITED) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t}\n\t\t\t\tproduceCounts();\n\t\t\t\tif (readQueue) {\n\t\t\t\t\tqueueDepth = queue.getCurrentDepth();\n\t\t\t\t\tif (queueDepth != 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trcvMessage = new MQMessage();\n\t\t\t\t\t\t\tif (mqccsid != 0) {\n\t\t\t\t\t\t\t\trcvMessage.characterSet = mqccsid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqueue.get(rcvMessage, gmo);\n\t\t\t\t\t\t\trecordCountsRcvd++;\n\t\t\t\t\t\t\tstrLen = rcvMessage.getMessageLength();\n\t\t\t\t\t\t\tstrData = new byte[strLen];\n\t\t\t\t\t\t\trcvMessage.readFully(strData);\n\t\t\t\t\t\t\tmessagePutMs = rcvMessage.putDateTime.getTimeInMillis();\n\t\t\t\t\t\t\tseqNo = rcvMessage.messageSequenceNumber;\n\t\t\t\t\t\t\tif (lastTs == messagePutMs && seqNo == 1) {\n\t\t\t\t\t\t\t\tseqNo = lastSeqNo + seqNo;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmsgText = new String(strData);\n\t\t\t\t\t\t\tjsonOut = new JSONArray();\n\t\t\t\t\t\t\tjsonKey = new JSONObject();\n\t\t\t\t\t\t\tjsonValue = new JSONObject();\n\t\t\t\t\t\t\tjsonKey.put(\"key\", Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tjsonValue.put(\"value\", msgText);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgKey: \" + Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgValue: \" + msgText);\n\t\t\t\t\t\t\tjsonOut.put(jsonKey);\n\t\t\t\t\t\t\tjsonOut.put(jsonValue);\n\t\t\t\t\t\t\tmsgList.add(jsonOut.toString());\n\t\t\t\t\t\t\tlastTs = messagePutMs;\n\t\t\t\t\t\t\tlastSeqNo = seqNo;\n\t\t\t\t\t\t\tmessagecounter++;\n\t\t\t\t\t\t\t// move cursor to next message\n\t\t\t\t\t\t\tif (msgList.size() > maxUMsg / 2) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (msgList.size() > queueDepth) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (keepMessages) {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT | MQConstants.MQGMO_BROWSE_NEXT;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT;\n\t\t\t\t\t\t\t\tif (syncPoint) {\n\t\t\t\t\t\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (MQException e) {\n\t\t\t\t\t\t\tif (e.reasonCode == MQConstants.MQRC_NO_MSG_AVAILABLE) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else if (e.reasonCode == MQConstants.MQRC_SYNCPOINT_LIMIT_REACHED) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\tCalendar.getInstance().getTime() + \" - MQ Reason Code: \" + e.reasonCode);\n\t\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\t\t\tSystem.out.println(Calendar.getInstance().getTime() + \" - Error: \" + ioe.getMessage());\n\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t}\n\t\t\t\t\tthreadWait();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Throwable t) {\n\t\t\t// restart if there is any other error\n\t\t\trestart(Calendar.getInstance().getTime() + \" - Error receiving data from Queue or QMGR\", t);\n\t\t}\n\n\t}", "public void announcingBusBoarding() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tBusDriver busDriver = (BusDriver) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.BD_ANNOUNCING_BOARDING);\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\t\tclientCom.close();\n\t}", "private void AsyncPush(String topic){\n\t\t\t\t \t\n\t \t/**\n\t \t * output a map, delete existed items\n\t \t */\n\t \t//Map<Key, Integer> deduplicatedBuff = mergeDuplicatedItemsAndDelte(buff);\n\t \t\n\t \t//not in, create, delay\n\t \tif(!producerMap.containsKey(topic)){\n\t \t\ttry {\n\t\t\t\t\t\t\tCreateProducer(topic,LogicController.batchMessagesMaxMessagesPerBatch);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t \t\t \n\t \t}\n\t \tlog.info(\"#publish\"+topic+\", \"+buffMap.size());\n\t \tProducer<byte[]> producer = producerMap.get(topic);\n\t \t/**\n\t \t * init set, copy to hash set\n\t \t */\n\t \t//Set<Key> Keys = Sets.newConcurrentHashSet(buffMap.keySet());\n\t \t\n\t \t \n\t \tfor (Key key : buffMap.keySet()){\n\t \t\t \n\t \t\t //if(buffMap.containsKey(key)){\n\t \t\t \n\t \t\t \n\t \t\t if(buffMap.containsKey(key)){\n\t \t\t\t Integer val = buffMap.get(key);\n\t \t\t\t //clear,skip\n\t \t\t\t if(val<=0){buffMap.remove(key);continue;}\n\t \t\t\t //concenate\n\t \t\t\t byte[] out = createKVByte(key,val);\n\t \t\t\t \n\t \t\t\t//get producer\n\t\t\t \t\t\t \n\t\t\t \t\t\t //byte[] tempTable = new byte[](buffMap);\n\t\t producer.sendAsync(out).thenRun(() -> {\n\t\t\t messagesSent.increment();\n\t\t\t bytesSent.add(out.length);\n\t\t\t //update\n\t\t\t TopicMap.replace(topic, TopicMap.get(topic)+out.length);\t\n\t\t\t \n\t\t\t //delete\n\t\t\t rescaleBufferMap(buffMap,key,val);\n\t\t\t \n\t\t\t //CheckNumberPacketsEnoughEndMessageAndSend(topic);\n\t\t\t //buffMap.remove(key);\n\t\t\t //remove from the set\n\t\t\t //ier.remove();\n\t\t\t \t\t \t\t \n\t\t\t }).exceptionally(ex -> {\n\t\t\t log.warn(\"Write error on message\", ex);\n\t\t\t //System.exit(-1);\n\t\t\t return null;\n\t\t\t });\n\t \t\t }\n\t \t\t }\n\t \t\t \n\t \t }", "@Override\n public void run() {\n destination nextState = desembarque.whatShouldIDo(id,finalDest, nMalasTotal,log);\n bagCollect getBag = null;\n switch (nextState) {\n case WITH_BAGGAGE:\n \n // System.out.println(\"tenho bagagem -----------------\");\n do {\n if ( (getBag=recolha.goCollectABag(id,log) ) == bagCollect.MINE) {\n nMalasEmPosse++;\n }\n //System.out.println(\"ID: \" + id + \" posse: \" + nMalasEmPosse + \" total: \" + nMalasTotal);\n //System.out.println(getBag.toString());\n\n } while (nMalasEmPosse < nMalasTotal && getBag != bagCollect.NOMORE);\n if (nMalasEmPosse < nMalasTotal) {\n recolha.reportMissingBags(id, nMalasTotal - nMalasEmPosse,log);\n }\n transicao.goHome(id,log);\n break;\n case IN_TRANSIT:\n int ticket; //bilhete para entrar no autocarro.\n ticket = transferencia.takeABus(log,id);\n auto.enterTheBus( log,ticket,id);\n auto.leaveTheBus(id, log,ticket);\n transicao.prepareNextLeg(id,log);\n break;\n case WITHOUT_BAGGAGE:\n transicao.goHome(id,log);\n break;\n }\n }", "private synchronized void flushMessageQueue() {\n\t\tif(peers.size() > 0) {\n\t\t\twhile(!noPeersMessageQueue.isEmpty()) {\n\t\t\t\tpropagateToAllPeers(noPeersMessageQueue.poll());\n\t\t\t}\n\t\t}\n\t}", "private void processMessageQueue(){\n\t\tKIDSGUIAlert m = null;\n\t\tStringBuilder newText = new StringBuilder(logLines.getText());\n\t\twhile ((m = this.logMessages.poll()) != null){\n\t\t\tnewText.append(String.format(\"%s\\n\", m.toString()));\n\t\t}\n\t\tlogLines.setText(newText.toString());\n\t}", "public void readMessages() {\n if (!this.isConnectedToClientServer){return;}\n String inputMessage = inputQueue.poll();\n if (inputMessage != null){\n try{\n ClientMessageType messageType = ClientMessageParser.parse(inputMessage);\n if (messageType == ClientMessageType.INCOMING_BALL){\n //parses the message to get a ball, which is then added to the board\n Ball ball = ClientMessageParser.parseIncomingBall(inputMessage);\n board.addBall(ball);\n }\n else if (messageType == ClientMessageType.WALL_INVISIBILITY){\n //parses the messages to find out which boundary to make invisible, and does so\n BoundarySide whichBoundary = ClientMessageParser.parseWallInvisibility(inputMessage, board.neighbors);\n board.makeInvisible(whichBoundary);\n }\n else if (messageType == ClientMessageType.WALL_VISIBILITY){\n //parses the messages to find out which boundary to make visible, and does so\n BoundarySide whichBoundary = ClientMessageParser.parseWallVisibility(inputMessage, board.neighbors);\n board.makeVisible(whichBoundary);\n }\n else if (messageType == ClientMessageType.DISCONNECT_CLIENT){\n disconnectFromClientAndServer();\n }\n } catch (IncorrectFormatException e){\n //don't do anything --> message is not parsed, but play on this board still continues\n }\n }\n }", "public void prepareTheBill(){\n Waiter w = (Waiter) Thread.currentThread();\n CommunicationChannel com = new CommunicationChannel(serverHostName, serverPortNumb);\n Object[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n state_fields[0] = w.getWaiterID();\n \tstate_fields[1] = w.getWaiterState();\n\n Message m_toServer = new Message(3, params, 0, state_fields, 2, null); \n Message m_fromServer;\n\n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n\n w.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }", "private void consume()\r\n\t{\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tSubscriberMessage sifMsg = queue.blockingPull();\t\t\t\t\r\n\t\t\tif (sifMsg != null)\r\n\t\t\t{\r\n\t\t\t\tlogger.debug(consumerID+\" has receive a message from its SubscriberQueue.\");\r\n\t\t\t\tif (sifMsg.isEvent())\r\n\t\t\t\t{\r\n\t\t\t\t\tSIFEvent sifEvent = new SIFEvent(sifMsg.getSIFObject(), sifMsg.getEventAction());\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubscriber.processEvent(sifEvent, sifMsg.getZone(), sifMsg.getMappingInfo(), consumerID);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.error(\"Failed processing SIF Event for subscriber \"+subscriber.getId()+\": \"+ex.getMessage()+\"\\nEvent Data:\\n\"+sifEvent, ex);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSIFDataObject sifObj = sifMsg.getSIFObject();\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubscriber.processResponse(sifObj, sifMsg.getZone(), sifMsg.getMappingInfo(), consumerID);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.error(\"Failed processing SIF Object for subscriber \"+subscriber.getId()+\": \"+ex.getMessage()+\"\\nSIF Object Data:\\n\"+((sifObj == null) ? \"null\" : sifObj.toXML()), ex);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlogger.error(consumerID+\" has encountered a problem receiving a message from its SubscriberQueue.\");\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "@Override\n public void upcall(ReadMessage message) throws IOException, ClassNotFoundException {\n\t MessageObject readMessage = (MessageObject) message\n .readObject();\n message.finish();\n \tReceivePortIdentifier requestor = readMessage.requestor;\n MessageObject response = new MessageObject();\n if(requestor == null)\n\t \treturn;\n synchronized (masterJobsList){\n if(readMessage.messageType == MessageObject.message_id.JOB_STEALING){\n // Provide slave with one another job\n synchronized (jobListBusy){\n if(masterJobsList.size() > 0){\n response.messageType = MessageObject.message_id.JOB_BOARD;\n response.data = masterJobsList.get(0);\n masterJobsList.remove(0);\n response.maximumBound = solutionsStep;\n }\n }\n\n SendPort replyPort = myIbis.createSendPort(replyPortType);\n replyPort.connect(requestor);\n WriteMessage reply = replyPort.newMessage();\n reply.writeObject((response));\n reply.finish();\n replyPort.close();\n\n\n } else if (readMessage.messageType == MessageObject.message_id.SOLUTIONS_NUM){\n --jobCounter;\n Pair<Integer, Integer> res = (Pair<Integer, Integer>)readMessage.data;\n System.out.println(\"GOT RESULT (\" + res.getKey() + \" ; \" + res.getValue() + \")\");\n synchronized(jobListBusy){\n if(res.getValue() < solutionsStep){\n solutionsNum = res.getKey();\n solutionsStep = res.getValue();\n endTime = System.currentTimeMillis();\n } else if (res.getValue() == solutionsStep){\n solutionsNum += res.getKey();\n endTime = System.currentTimeMillis();\n } else {\n // do nothing\n }\n if(jobCounter == 0)\n jobListBusy.notify();\n }\n\n }\n\n }\n }", "protected void onQueued() {}", "@Override\n public void run() {\n reprocessPendingMessage();\n }", "public void onQueue();", "@Override public void run() {\n waitUntil(\"message\", new Condition() {\n @Override public boolean isMet() {\n return false;\n }\n }, 0);\n }", "@Override\n public void flush() {\n new QueueConsumer().run();\n }", "String addReceiveQueue();", "@Override\n public void replicationFinished()\n {\n MyMessage dummyMessage = new MyMessage(this);\n registration().getQueue().enqueue(dummyMessage);\n registration().getQueue().dequeue();\n examination().getQueue().enqueue(dummyMessage);\n examination().getQueue().dequeue();\n vaccination().getQueue().enqueue(dummyMessage);\n vaccination().getQueue().dequeue();\n syringes().getQueue().enqueue(dummyMessage);\n syringes().getQueue().dequeue();\n //End of dummy message\n \n getFinishTime().addSample(currentTime());\n \n getCoolingLengths().addSample(currentTime() - 32400);\n getArrivals().addSample(enviroment().getArrivals());\n getDepartures().addSample(enviroment().getDepartures());\n\n getRegistrationWaitings().addSample(registration().getWaitingStat().mean());\n getExaminationWaitings().addSample(examination().getWaitingStat().mean());\n getVaccinationWaitings().addSample(vaccination().getWaitingStat().mean());\n\n getRegistrationQueueLengths().addSample(registration().getQueueStat().mean());\n getExaminationQueueLengths().addSample(examination().getQueueStat().mean());\n getVaccinationQueueLengths().addSample(vaccination().getQueueStat().mean());\n\n double efficiency = 0.0;\n for (Staff personal : registration().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getRegistrationEfficiency().addSample(efficiency / registration().getPersonal().size());\n\n efficiency = 0.0;\n for (Staff personal : examination().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getExaminationEfficiency().addSample(efficiency / examination().getPersonal().size());\n\n efficiency = 0.0;\n for (Staff personal : vaccination().getPersonal()) {\n efficiency += (personal.getWorkingTime() / (currentTime() - (personal.getLunchEnd() - personal.getLunchStart())));\n }\n getVaccinationEfficiency().addSample(efficiency / vaccination().getPersonal().size());\n\n getWaitingRoomFilling().addSample(waitingRoom().getFillingStat().mean());\n\n getRefillWaitings().addSample(syringes().getWaitingStat().mean());\n getRefillQueueLengths().addSample(syringes().getQueueStat().mean());\n \n getLunchLengths().addSample(canteen().getLunchLengthStat().mean());\n \n super.replicationFinished();\n }", "void recive() throws IOException, TimeoutException, InterruptedException, Exception\n {\n ConnectionFactory connfac = new ConnectionFactory();\n connfac.setHost(hostName);\n connfac.setUsername(\"student\");\n connfac.setPassword(\"cph\");\n \n //make the connection\n Connection conn = connfac.newConnection();\n //make the channel for messaging\n Channel chan = conn.createChannel();\n \n //Declare a queue\n chan.exchangeDeclare(ExchangeName.OUTPUT_LOAN_REQUEST, \"fanout\");\n String queueName = chan.queueDeclare().getQueue();\n chan.queueBind(queueName,ExchangeName.OUTPUT_LOAN_REQUEST,\"\");\n \n\t System.out.println(\" [*] Waiting for messages on \"+ ExchangeName.OUTPUT_LOAN_REQUEST +\". To exit press CTRL+C\");\n \n\t QueueingConsumer consumer = new QueueingConsumer(chan);\n\t chan.basicConsume(queueName, true, consumer);\n\t \n //start polling messages\n\t while (true) {\n\t QueueingConsumer.Delivery delivery = consumer.nextDelivery();\n\t String m = new String(delivery.getBody());\n\t System.out.println(\" [x] Received '\" + m + \"'\");\n Gson gson = new GsonBuilder().create();\n Message fm = gson.fromJson(m, Message.class);\n int creditScore = creditScore(fm.getSsn());\n fm.setCreditScore(creditScore);\n fm.setSsn(fm.getSsn().replace(\"-\", \"\"));\n send(fm);\n \n \n\t }\n \n \n }", "@Override\n\tpublic void invoke() {\n\t\t\n\t\tIBuffer b = Buffer.getBuffer();\n\t\tint r = b.getRemainingCapacity();\n\t\t\n\t\t// the buffer is empty - this means that invoke was called after a grid was removed\n\t\t// and we need to fill it up to prevent starvation. Ideally the only way this could\n\t\t// happen is if the buffer size was 1\n\t\tif (r == 0) {\n\t\t\tPublisher.getInstance().send(new ProduceMessage());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (r < b.getCapacity())\n\t\t\tPublisher.getInstance().send(new ProduceMessage());\n\t\t\n\t\tif (r > 0)\n\t\t\tPublisher.getInstance().send(new ConsumeMessage());\n\t\t\n\t}", "@Override\n public void run() {\n //gets messages\n byte[] b = new byte[65000];\n try {\n multicastSocket = new MulticastSocket(mcastPort);\n multicastSocket.joinGroup(InetAddress.getByName(mscastAdress));\n\n while (true) {\n try {\n DatagramPacket received = new DatagramPacket(b, b.length);\n multicastSocket.receive(received);\n DealWithPacketBackup deal = new DealWithPacketBackup(received , multicastSocket , Peer.getPeerId());\n Peer.getExecutor().execute(deal);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }", "public static void checkQueue(){\n if(Duel.getLobby().getQueue().size() >= 2){\n Duel.getGameManager().startingAGame();\n// for(Player player : Bukkit.getOnlinePlayers()){\n// if(Lobby.getQueue().get(0).equals(player.getUniqueId()) || Lobby.getQueue().get(1).equals(player.getUniqueId())){\n// Duel.getGameManager().startingAGame();\n// }\n// for(UUID uuid : Lobby.getQueue()){\n// Duel.getGameManager().startingAGame();\n// }\n }\n }", "@Override\n public void run() {\n try {\n boolean busy = true;\n while (busy) {\n AbstractBasicMessage msg = readMsg();\n if (msg != null) {\n busy = msg.operate(this.persistor, this.pushServer);\n }\n }\n } catch (IOException e) {\n // Treat an IOException as a termination of the message\n // exchange, and let this message-processing thread die.\n\n // CODE VON DOZENTEN...\n } catch (OperationNotSupportedException ex) {\n System.out.println(\"Error while reading incoming message\");\n ex.printStackTrace();\n }\n }", "public void run() {\n\t\tString line = null;\n\t\tMessage message;\n\t\tBufferQueueElement<Message> messageList = new BufferQueueElement<Message>();\n\t\tlong t1 = System.nanoTime();\n\t long t2 = 0;\n\t\ttry {\n\t\t\twhile ((line = messageIO.readMessage()) != null) {\n\t\t\t\tt2 = System.nanoTime();\n\t\t\t\t/* Ok, we can close the stream. But process the last message list. */\n\t\t\t\tif (CLOSE_STREAM.equals(line)) {\n\t\t\t\t\tmessageList.setStreamClosed(true);\n\t\t\t\t\tqueue.put(messageList);\n\t\t\t\t\tbreak;\n\t\t\t\t} else if((t2 - t1) < ONE_SECOND) {\n\t\t\t\t\tmessage = new Message(line);\n\t\t\t\t\tmessageList.setMessageElement(message);\n\t\t\t\t} else {\n\t\t\t\t\tqueue.put(messageList);\n\t\t\t\t\tmessageList = new BufferQueueElement<Message>();\n\t\t\t\t\tt1 = System.nanoTime();\n\t\t\t\t\tmessage = new Message(line);\n\t\t\t\t\tmessageList.setMessageElement(message);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n public void run()\n {\n while (true) {\n if (isReadyToStop && (buffer.poll() == null)) {\n System.out.println(\"Thread stop\");\n producerClient.close();\n return;\n }\n try {\n Message msg = buffer.poll(config.getBufferPollTimeout());\n if (msg == null) {\n // ignore it\n continue;\n }\n System.out.println(\"Sent out: [\" + msg + \"]\");\n if (msg.getTopic().isPresent()) {\n String topic = msg.getTopic().get();\n Optional<Function<String, Integer>> function = funcMapBuffer.get(topic);\n function.ifPresent(stringLongFunction -> {\n int fiberId = stringLongFunction.apply(msg.getKey());\n msg.setFiberId(fiberId);\n producerClient.send(topic, fiberId, msg);\n });\n // else ignore this message\n }\n // else ignore this message\n }\n catch (InterruptedException ignored) {\n // if poll nothing, enter next loop\n }\n }\n }", "private void addFromQueue()\n\t{\n\t\twhile( humanQueue.size()>0 )\n\t\t\thumans.add(humanQueue.remove(0));\n\t\twhile( zombieQueue.size()>0 )\n\t\t\tzombies.add(zombieQueue.remove(0));\n\t}", "public abstract void backoffQueue();", "protected void enqueue(StdPeerMessage message)\n {\n// if (DEBUG) {\n// if (message.type == StdPeerMessage.REQUEST) {\n// System.out.println(System.nanoTime() + \" [stdpc] enqueue: req \" + message.index + \" \" + (message.begin >> 14));\n// } else {\n// System.out.println(\"[stdpc] enqueue: \" + message.type);\n// }\n// }\n\n if (message.type == StdPeerMessage.CHOKE)\n {\n // remove reply messages with piece (block) data\n // from the send queue (due to spec)\n for (int i = sendQueue.size() - 1; 0 <= i; i--) {\n StdPeerMessage pm = sendQueue.get(i);\n if (pm.type == StdPeerMessage.PIECE) {\n sendQueue.remove(i);\n TorrentStorage.Block block = (TorrentStorage.Block) message.params;\n block.release();\n pmCache.release(pm);\n }\n }\n // set choke status\n choke = true;\n // send choke asap\n sendQueue.add(0, message);\n }\n else if (message.type == StdPeerMessage.CANCEL)\n {\n // remove the linked request if it's still in the queue\n for (int i = sendQueue.size() - 1; 0 <= i; i--) {\n StdPeerMessage pm = sendQueue.get(i);\n if ((pm.type == StdPeerMessage.REQUEST)\n && (pm.index == message.index)\n && (pm.begin == message.begin)\n && (pm.length == message.length)) // this check is redundant as length is fixed\n {\n sendQueue.remove(i);\n pmCache.release(pm);\n // don't really enqueue CANCEL as the linked request\n // has been found and removed\n pmCache.release(message);\n return;\n }\n }\n // send asap\n sendQueue.add(0, message);\n }\n else {\n if (message.type == StdPeerMessage.INTERESTED) {\n interested = true;\n }\n else if (message.type == StdPeerMessage.NOT_INTERESTED) {\n interested = false;\n }\n else if (message.type == StdPeerMessage.UNCHOKE) {\n choke = false;\n }\n\n // enqueue message\n sendQueue.add(message);\n }\n\n// sendQueue.forEach(pm -> System.out.println(\" -x> \" + System.identityHashCode(pm) + pm.type + \" ,\" + pm.index +\",\" + pm.begin +\",\" + pm.length) );\n\n }", "Message pull();", "public LQT_Message_Queue() {\n\ta_list = new LinkedList<LQT_Message>();\n }", "public void testMaximumMessages() throws Exception {\n for (int i = 0; i < 1024 + 1; i++) {\n sendMessage(i);\n waitForMs(50);\n }\n\n sendMessage(0);\n waitForMs(40);\n // Check if the oldest one has been already evicted.\n CellBroadcastMessage cbmTest =\n (CellBroadcastMessage) mServiceIntentToVerify.getExtras().get(\"message\");\n CellBroadcastMessage cbm = new CellBroadcastMessage(createMessage(0));\n\n compareCellBroadCastMessage(cbm, cbmTest);\n mActivityIntentToVerify = null;\n }", "public void takeABus() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tPassenger passenger = (Passenger) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.PASSENGERS_WAITING);\n\t\tpkt.setId(passenger.getPassengerId());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\n\t\tpassenger.setCurrentState(pkt.getState());\n\t\tclientCom.close();\n\t}", "private void m57235e() {\n if (this.f41223d != null) {\n this.f41223d.sendEmptyMessage(1);\n }\n }", "void processQueue();", "void notifyBlockComplete(MessageSnapshot snapshot);", "@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private void refill(MessagingEvent evt) {\n disruptorPublish(evt);\n }", "private void push() {\n ImmutableSortedSet<T> myAvailable = _outstanding.apply(\n new Syncd.Transformer<ImmutableSortedSet<T>, ImmutableSortedSet<T>>() {\n public Tuple<ImmutableSortedSet<T>, ImmutableSortedSet<T>> apply(ImmutableSortedSet<T> aBefore) {\n final SortedSet<T> myRemaining = new TreeSet<>(new MessageComparator<T>());\n\n // Identify those messages that are sequentially contiguous from _floor and can be passed on\n //\n ImmutableSortedSet<T> myAccessible =\n new ImmutableSortedSet.Builder<>(new MessageComparator<T>()).addAll(\n Iterables.filter(aBefore, new Predicate<T>() {\n public boolean apply(T aMessage) {\n Long myCurrent = _floor.get();\n\n if (aMessage.getSeq() == myCurrent) {\n // This message can be sent out to listeners so long as we're first to try\n //\n if (_floor.testAndSet(myCurrent, myCurrent + 1))\n return true;\n } else\n // This message must remain\n //\n myRemaining.add(aMessage);\n\n // Couldn't send message out or it must remain\n //\n return false;\n }\n })\n ).build();\n\n return new Tuple<>(new ImmutableSortedSet.Builder<>(\n new MessageComparator<T>()).addAll(myRemaining).build(),\n myAccessible);\n }\n }\n );\n\n send(myAvailable);\n archive(myAvailable);\n }", "private void sendMessage()\n\t{\n\t\tfinal String message = messageTextArea.getText(); \n\t\tif(message.length() == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tmessageTextArea.setText(\"\");\n\t\ttry\n\t\t{\n\t\t\teventsBlockingQueue.put(new MessageEvent(message));\n\t\t}\n\t\tcatch (final InterruptedException e1)\n\t\t{\n\t\t}\n\t}", "@Override\n public void run() {\n while (!bShutDown || !messageCache.isEmpty()) {\n try {\n while (!messageCache.isEmpty()) {\n HttpMessage httpMessage = messageCache.poll();\n if (httpMessage != null) {\n SendResult result = sendMessageWithHostInfo(\n httpMessage.getBodies(), httpMessage.getGroupId(),\n httpMessage.getStreamId(), httpMessage.getDt(),\n httpMessage.getTimeout(), httpMessage.getTimeUnit());\n httpMessage.getCallback().onMessageAck(result);\n }\n }\n TimeUnit.MILLISECONDS.sleep(proxyClientConfig.getAsyncWorkerInterval());\n } catch (Exception exception) {\n logger.error(\"exception caught\", exception);\n }\n }\n }", "public void sendFromMessageQueue() throws IOException {\n Date canSendDate = new Date(lastReceiveMsgDate.getTime() + 2000);\n if (canSendDate.before(new Date())) {\n String msg = messageQueue.poll();\n if (msg == null)\n return;\n\n output.writeBytes(msg + \"\\n\");\n }\n }", "protected void syncConsumeLoop(MessageConsumer requestConsumer) {\n try {\n Message message = requestConsumer.receive(5000);\n if (message != null) {\n onMessage(message);\n } else {\n System.err.println(\"No message received\");\n }\n } catch (JMSException e) {\n onException(e);\n }\n }", "public int onEnd() {\n\t\t\t\tflushMessageQueue();\n\t\t\t\treturn 0;\n\t\t\t}", "void onMessageProcessingAttempt(String internalQueueName);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\thandler.sendEmptyMessage(0);\n\t\t\t}", "public int queue() \n { return waiting; }", "pb4server.BuffBagAskReq getBuffBagAskReq();", "public void parkTheBus() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tBusDriver busDriver = (BusDriver) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.BD_ARRIVING);\n\t\tpkt.setState(busDriver.getBusDriverState());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\t\tclientCom.close();\n\t\tbusDriver.setBusDriverState(pkt.getState());\n\t}", "@Ignore(\"Надо переделать!!\")\n @Test\n public void testFull() throws Exception {\n // SYSTEM.DEF.SVRCONN/TCP/vs338(1414)\n // SYSTEM.ADMIN.SVRCONN/TCP/vs338(1414)\n // UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\n\n MQQueueConnectionFactory cf = new MQQueueConnectionFactory();\n\n\n // Config\n cf.setHostName(\"vs338\");\n cf.setPort(1414);\n cf.setTransportType(WMQConstants.WMQ_CM_CLIENT);\n cf.setQueueManager(\"QM_MBROKER10_TEST\");\n cf.setChannel(\"SYSTEM.ADMIN.SVRCONN\");\n\n SingleActionJob job =\n SingleActionJobBuilder.create()\n .withClass(MovementCreateTask.class)\n\n// .withProps(\n// \"mq.type = queue\\n\" +\n// \"mq.host = vs338\\n\" +\n// \"mq.port = 1414\\n\" +\n// \"mq.queueManager = QM_MBROKER10_TEST\\n\" +\n// \"mq.channel = SYSTEM.DEF.SVRCONN\\n\" +\n// \"mq.batchSize = 1\\n\" + //todo\n// \"mq.topics = LIRQ!!!!:UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF:UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\"+\n// \";BALIRQ:UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF:UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\\n\"+\n// \"mq.user=er22228\\n\" +\n// \"mq.password=Vugluskr6\"\n//\n// )//;MIDAS_UPDATE:UCBRU.ADP.BARSGL.V4.ACDENO.MDSUPD.NOTIF\n\n .build();\n jobService.executeJob(job);\n \n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n\n }", "public void messageArrived(String topic, MqttMessage message) throws Exception {\n\t\tSystem.out.println(\"&&&&&&&&&&&&&&&\");\n\t\tSystem.out.println(message.getClass());\n\t\t/*\n\t\t obj.put(\"start\",startDate);\n obj.put(\"end\",endDate);\n obj.put(\"topicName\",topicName_New);\n obj.put(\"bf\",bf);\n\t\t */\n\t\tSystem.out.println(\"topic on which data has been received is :\"+topic);\n\t\tSystem.out.println(\"the data packet from the broker has been received in JSON\");\n\t\t\n\t\t\n\t\tByteArrayInputStream baos = new ByteArrayInputStream(message.getPayload());\n\t\tSystem.out.println(\"after message payload\");\n\t\tObjectInputStream outputStream = new ObjectInputStream(baos);\n\t\t\n\t\tJSONObject datapacket=null;\n\t\ttry{\n\t\t\t datapacket=(JSONObject)outputStream.readObject();\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(\"koi to gadbad hai\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"parsing the data from the json packets.....started\");\n\t\tBloomFilter bfilter=new BloomFilter(0.01,1000);\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tbyte[] buffer=(byte[]) datapacket.get(\"bf\");\n\t\t\tByteBuffer bb=ByteBuffer.wrap(buffer);\n\t\t\t\n\t\t\tbfilter.deSerialize(bb);\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tSystem.out.println(\"error in getting the bloom filter\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"bloom filter obtained\");\n\t\tString TOPIC_TOSUBSCRIBE=(String) datapacket.get(\"topicName\");\n\t\t\n\t\tString SD=(String) datapacket.get(\"start\");\n\t\tString ED=(String) datapacket.get(\"end\");\n\t\t\n\t\tSystem.out.println(\"printing the bloom filter object parametersss....\");\n\t\tSystem.out.println(bfilter.getBitVectorSize());\n\t\tSystem.out.println(bfilter.getNumberOfEntries());\n\t\t\n\t\t\n\t\tSystem.out.println(\"deserialization object checking=== \"+bfilter.contains(\"random string10000\"));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tFile file = new File(\"/Users/gaurav/Desktop/BrokerMessages.txt\");\n\t\tif (!file.exists()) {\n\t\t\tfile.createNewFile();\n\t\t}\n\tSystem.out.println(\"control in callback subscriber\");\n//\t\t\n//\t\tSystem.out.println(\"file absolute path :\" + file.getAbsoluteFile());\n\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile(), true);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tString h = message.toString();\n\t\tbw.write(h);\n\t\tbw.write(\"\\n\");\n\t\tbw.close();\n\n\t\tSystem.out.println(\"Done\");\n\n\t\tif (\"testing/LWT\".equals(topic)) {\n\t\t\tSystem.err.println(\"Sensor gone!\");\n\t\t}\n\t}", "private void IntervalEndMessageAndSend0() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\tString topic;\n\t\t\tIterator<String> ier = TopicMap.keySet().iterator();\n\t\t\twhile(ier.hasNext()){\n\t\t\t\ttopic = ier.next();\n\t\t\t\t//AsyncPushOneFlow(topic, new byte[](new Key(new byte[]{0,0,0}),Sub4SketchingKVStream.endSignal));\n\t\t\t}\n\t\t\t}", "public void newQueue(){\r\n\t\tgenerateQueue();\r\n\t\trefreshLeft = true;\r\n\t}", "@Override\n\tpublic void msgAtBed() {\n\t\t\n\t}", "public synchronized void checkTimeoutMessages() {\n SQSMessage SQSMessage;\n String receiptHandler;\n long currentTimeStampDifference;\n for (Map.Entry pairs : receivedMessages.entrySet()) {\n SQSMessage = (SQSMessage) pairs.getValue();\n currentTimeStampDifference = System.currentTimeMillis() - SQSMessage.getReceivedTimeStamp();\n if (currentTimeStampDifference > SQSMessage.getDefaultVisibilityTimeout()) {\n receiptHandler = (String) pairs.getKey();\n SQSMessageQueue.addFirst(SQSMessage);\n receivedMessages.remove(receiptHandler);\n }\n }\n }", "@Override\n public void run() {\n Message message;\n while(true){\n logger.debug(\"SMS Reader Thread is waiting for incoming messages\");\n message = messageQueue.getInputSMS().poll() ;\n logger.debug(\"SMS message has been received from \"+ message.getFromWhom());\n view.receivedMessages.append(message.getFromWhom().toString() +\" :\");\n view.receivedMessages.append(message.getData() + \"\\n\");\n view.setPreferredSize(new Dimension(view.getSize().height+10, view.getSize().width));\n view.jScrollPaneReceivedMessages.getVerticalScrollBar().setValue(view.jScrollPaneReceivedMessages.getVerticalScrollBar().getMaximum());\n view.revalidate();\n }\n }", "@Override\n public void finishMessageSending() {\n for (int i = 0; i < fragNum; ++i) {\n long bytesWriten = cacheOut[i].bytesWriten();\n cacheOut[i].finishSetting();\n cacheOut[i].writeLong(0, bytesWriten - SIZE_OF_LONG);\n\n if (bytesWriten == SIZE_OF_LONG) {\n logger.debug(\n \"[Finish msg] sending skip msg from {} -> {}, since msg size: {}\",\n fragId,\n i,\n bytesWriten);\n continue;\n }\n if (i == fragId) {\n nextIncomingMessageStore.digest(cacheOut[i].getVector());\n logger.info(\n \"In final step, Frag [{}] digest msg to self of size: {}\",\n fragId,\n bytesWriten);\n } else {\n grapeMessager.sendToFragment(i, cacheOut[i].getVector());\n logger.info(\n \"In final step, Frag [{}] send msg to [{}] of size: {}\",\n fragId,\n i,\n bytesWriten);\n }\n }\n // if (maxSuperStep > 0) {\n // grapeMessager.ForceContinue();\n // maxSuperStep -= 1;\n // }\n\n // logger.debug(\"[Unused res] {}\", unused);\n // logger.debug(\"adaptor hasNext {}, grape hasNext{}\", adaptorHasNext, grapeHasNext);\n // logger.debug(\"adaptor next {}, grape next {}\", adaptorNext, grapeNext);\n // logger.debug(\"adaptor neighbor {}, grape neighbor {}\", adaptorNeighbor,\n // grapeNeighbor);\n }", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\twhile(runFlg){\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\twhile(mQueue.getSize() >0 ){\n\t\t\t\t\t\tbyte[] data = getData();\n\t\t\t\t\t\tmOut.write(data);\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\tLog.e(TAG,e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void ClearUnsentQueue() {\n \t\tjobqueue.clear();\n \t}", "private void sendQueue() {\r\n firePropertyChange(\"boardQueue\", null, myBoardQueue);\r\n firePropertyChange(\"scaleQueue\", null, myScaleDialogQueue);\r\n firePropertyChange(\"gui\", null, this);\r\n }", "public static void testIBMMQReceiveData(){\n\n MQParam param = new MQParam();\n param.setHost(\"10.86.92.194\");\n param.setPort(30099);\n param.setCcsid(1208);\n param.setChannel(\"SVRCONN_GW_OUT\");\n param.setQueueManager(\"ESB_OUT\");\n param.setQueueName(\"EIS.QUEUE.REQUEST.OUT.GCDCHZWMES\");\n param.setReplyToQueueName(\"EIS.QUEUE.RESPONSE.IN.GCDCHZWMES\");\n param.setUserId(\"mqm\");\n param.setPassword(\"mqm\");\n\n new Thread(new IBMSenderThread(param,\"data1\")).run();\n new Thread(new IBMSenderThread(param,\"datata22\")).run();\n new Thread(new IBMSenderThread(param,\"datatatata333\")).run();\n }", "public void run() {\n // If we've sent all the messages\n if (count >= bombAmount)\n {\n SwapSendButton(0);\n }\n // If we get our defuseal text\n if (bombDefuse.equals(SmsListener.messageBody))\n {\n SwapSendButton(0);\n Toast.makeText(getApplicationContext(), \"Bomb Defused\", Toast.LENGTH_SHORT).show();\n }\n else if (count < bombAmount && !bombDefuse.equals(SmsListener.messageBody))\n {\n // a delay of 0 doesn't work IRL\n // So in truth the quickest you can send a text bomb is 1 second apart\n if (delayAmount < 1)\n {\n smsManager.sendTextMessage(phoneNumber, \"ME\", messageToSend, null, null);\n handler.postDelayed(this, ((delayAmount + 1) * 1000));\n ++count;\n }\n else\n {\n smsManager.sendTextMessage(phoneNumber, \"ME\", messageToSend, null, null);\n handler.postDelayed(this, (delayAmount * 1000));\n ++count;\n }\n }\n }", "public InMemoryQueueService(){\n this.ringBufferQueue = new QueueMessage[10000];\n }", "private void initializeSlotMapForQueue() throws AndesException, ConnectionException {\n int databaseReadsCounter = 0;\n int restoreMessagesCounter = 0;\n long messageCountOfQueue = messageStore.getMessageCountForQueue(queueName);\n\n LongArrayList messageIdList = messageStore.getNextNMessageIdsFromQueue(queueName, 0, slotSize);\n int numberOfMessages = messageIdList.size();\n\n databaseReadsCounter++;\n restoreMessagesCounter = restoreMessagesCounter + messageIdList.size();\n\n long lastMessageID;\n long firstMessageID;\n long lastStatPublishTime = System.currentTimeMillis();\n\n while (numberOfMessages > 0) {\n int lastMessageArrayIndex = numberOfMessages - 1;\n lastMessageID = messageIdList.get(lastMessageArrayIndex);\n firstMessageID = messageIdList.get(0);\n\n if (log.isDebugEnabled()) {\n log.debug(\"Created a slot with \" + messageIdList.size() + \" messages for queue (\" + queueName + \")\");\n }\n\n if (AndesContext.getInstance().isClusteringEnabled()) {\n SlotManagerClusterMode.getInstance().updateMessageID(queueName,\n AndesContext.getInstance().getClusterAgent().getLocalNodeIdentifier(), firstMessageID,\n lastMessageID, lastMessageID);\n } else {\n SlotManagerStandalone.getInstance().updateMessageID(queueName, lastMessageID);\n }\n\n long currentTimeInMillis = System.currentTimeMillis();\n if (currentTimeInMillis - lastStatPublishTime > STAT_PUBLISHING_INTERVAL) {\n // messageCountOfQueue is multiplied by 1.0 to convert it to double\n double recoveredPercentage = (restoreMessagesCounter / (messageCountOfQueue * 1.0)) * 100.0;\n log.info(restoreMessagesCounter + \"/\" + messageCountOfQueue + \" (\" + Math.round(recoveredPercentage)\n + \"%) messages recovered for queue \\\"\" + queueName + \"\\\"\");\n lastStatPublishTime = currentTimeInMillis;\n }\n\n // We need to increment lastMessageID since the getNextNMessageMetadataFromQueue returns message list\n // including the given starting ID.\n messageIdList = messageStore.getNextNMessageIdsFromQueue(queueName, lastMessageID + 1, slotSize);\n numberOfMessages = messageIdList.size();\n //increase value of counters\n databaseReadsCounter++;\n restoreMessagesCounter = restoreMessagesCounter + messageIdList.size();\n }\n\n log.info(\"Recovered \" + restoreMessagesCounter + \" messages for queue \\\"\" + queueName + \"\\\" using \"\n + databaseReadsCounter + \" database calls\");\n }", "MessageDto dequeueMessage(MessageQueryInfoDto messageQueryInfo) throws IOException, MlmqException;", "private void messageReceived(GoToBagCheck goToBagCheck) {\r\n\t\tBaggage baggage = goToBagCheck.getBaggage();\r\n\t\tBagCheckReport bagCheckReport = new BagCheckReport(baggage,\r\n\t\t\t\tbaggage.doesBaggagePass());\r\n\r\n\t\tlogger.debug(\"BagCheck \"+ this.lineNumber +\" sent a bagCheckReport message to its Security.\");\r\n\t\tsecurityActor.tell(bagCheckReport);\r\n\r\n\t}", "public void run() {\r\n while(true) { // outer loop\r\n if(first) // we already have the queue CAS acquired\r\n first=false;\r\n else {\r\n if(!queue.acquire())\r\n return;\r\n }\r\n\r\n try {\r\n Message msg_to_deliver;\r\n while((msg_to_deliver=queue.remove()) != null) { // inner loop\r\n try {\r\n up_prot.up(new Event(Event.MSG, msg_to_deliver));\r\n }\r\n catch(Throwable t) {\r\n log.error(\"couldn't deliver message \" + msg_to_deliver, t);\r\n }\r\n }\r\n }\r\n finally {\r\n queue.release();\r\n }\r\n\r\n // although ConcurrentLinkedQueue.size() iterates through the list, this is not costly,\r\n // as at this point, the queue is almost always empty, or has only a few elements\r\n if(queue.size() == 0) // prevents a concurrent add() (which returned) to leave a dangling message in the queue\r\n break;\r\n }\r\n }", "public static void start() {\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\tDate dtnow = new Date();\r\n\t\t\t//Verify email queue\r\n\t\t\tIterator<Mailtogo> it = new MailtogoDAO().getQueue().iterator();\r\n\t\t\twhile(it.hasNext())\r\n\t\t\t{\r\n\t\t\t\tMailtogo mtg = (Mailtogo)it.next();\r\n\t\t\t\tmtg.setMtg_status(\"P\");\r\n\t\t\t\tmtg.save();\r\n\t\t\t\tdtnow = new Date();\r\n\t\t\t\tSystem.out.println(format.format(dtnow) + \" -> Sending message \" + mtg.getMtg_id());\r\n\t\t\t\tsend(mtg);\r\n\t\t\t}\r\n\t\t} catch (Exception e)\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n void enqueuePiece(ByteBuffer buffer, int index, int position, int length, Object params)\n {\n// if (DEBUG) System.out.println(\"[stdpc] enqueuePiece:\" + index + \",\" + position + \",\" + length + \" buf:\" + buffer.remaining());\n// sendQueue.forEach(pm ->\n// System.out.println(\" -s> \" + System.identityHashCode(pm) + \" \" +pm.type + \" ,\" + pm.index +\",\" + pm.begin + \",\" + pm.length)\n// );\n// peerBlockRequests.forEach(pm -> {\n// System.out.println(\" -p> \" + pm.type + \" ,\" + pm.index +\",\" + pm.begin + \",\" + pm.length);\n// });\n\n\n boolean found = false;\n\n // check for the active linked peer request and remove it\n for (int i = 0; i < peerBlockRequests.size(); i++) {\n StdPeerMessage pm = peerBlockRequests.get(i);\n if ((pm.index == index)\n && (pm.begin == position)\n && (pm.length == length))\n {\n peerBlockRequests.remove(i);\n pmCache.release(pm);\n found = true;\n break;\n }\n }\n if (!found && DEBUG) {\n if (DEBUG) System.out.println(\"[stdpc] pBR not found\");\n }\n\n enqueue(pmCache.piece(index, position, length, buffer, params));\n }", "@Override\n\tpublic void run() {\n\t\tlong starttime = System.currentTimeMillis();\n\n\t\tboolean started = statusMap.get(type);\n\t\tif (!started) {\n\n\t\t\tstatusMap.put(type, true);\n\t\t\tlogger.info(\n\t\t\t\t\t\"task of id add to queue of busType : {} started,current milestone : {}\",\n\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), milestone);\n\t\t\ttry {\n\t\t\t\tIdGeneratorQueue queue = QueueUtil\n\t\t\t\t\t\t.getIdGeneratorQueue(AptConstants.BUS_NAME_MAP.get(type));\n\n\t\t\t\tif (null == queue) {\n\t\t\t\t\tlogger.error(\n\t\t\t\t\t\t\t\"task of add id to queue faile , no queue of name: {} finded\",\n\t\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlogger.info(\"queue : {} has {} id not uesed.\", queue.getSize());\n\t\t\t\tlong nextMilestone = generatorService.nextMilestone(type);\n\t\t\t\tlogger.info(\"task of add id to queue,nextMilestone is {}\", nextMilestone);\n\n\t\t\t\tif (nextMilestone <= milestone) {\n\t\t\t\t\tlogger.error(\n\t\t\t\t\t\t\t\"task of get next milestone error,nextMileStone is smaller, busType: {},miletone : {}\",\n\t\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), milestone);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlong start = milestone + 1;\n\t\t\t\tlong end = nextMilestone + 1;\n\n\t\t\t\tlogger.info(\"start add id to queue : {},start : {},end : {}\",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), start, end);\n\t\t\t\tqueue.setMileStone(nextMilestone);\n\t\t\t\t//填充数据 满等待\n\t\t\t\tfor (long i = start; i <= end; i++) {\n\t\t\t\t\tqueue.putId(i);\n\t\t\t\t}\n\t\t\t\tlogger.info(\"success add id to queue! busType : {}\",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\tstatusMap.put(type, false);\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(\"task of id add to queue of busType : {} failed \",\n\t\t\t\t\t\tAptConstants.BUS_NAME_MAP.get(type));\n\t\t\t\tlogger.error(\"\", e);\n\t\t\t}\n\t\t}\n\t\tlong endtime = System.currentTimeMillis();\n\n\t\tlogger.info(\"task off add to queue ended,busType : {},usetime : {}\",\n\t\t\t\tAptConstants.BUS_NAME_MAP.get(type), endtime - starttime);\n\t}", "public void run() {\n JabberPacket packet=null;\n\n do {\n try {\n packet=queue.pull();\n\n if (packet!=null) {\n PacketHandler h=null;\n if (((JabberSkypeSettings) Main.Settings()).getDebug()) {\n \tSystem.out.println(\"Client: \" + packet.generateXML());\n }\n String e=packet.getElement();\n if (e!=null) {\n String key=null;\n\n if (e.equals(\"iq\")) {\n JabberPacket pQuery=packet.getFirstChild(\"query\");\n\n if (pQuery!=null) {\n key=pQuery.getAttribute(\"xmlns\");\n } else {\n \tJabberPacket pVcard=packet.getFirstChild(\"vcard\");\n \tif (pVcard!= null) {\n \t\tkey=pVcard.getAttribute(\"xmlns\");\n \t\t//need to do difference between setting vcard, and getting it for a user\n \t}\n }\n } else\n key=e;\n\n if (key!=null) {\n h=(PacketHandler)mHandlers.get(key);\n\n if (h==null)\n h=getDefaultHandler();\n\n h.processPacket(packet);\n } //key!=null\n } //e!=null\n } //packet!=null\n } //try\n catch (Exception e) {\n server.getLogger().severe(\"Caught exception: \"+e.getMessage());\n }\n } while (packet!=null && server.getRunning());\n }", "public void afterReceive() {\n\t}", "@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n\n //ipaddress\n String ipAdr = \"\";\n try{\n\n //Print IPAdress\n ipAdr = channel.getRemoteAddress().toString();\n System.out.println(ipAdr);\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //if client is close ,return\n buf.flip();\n if (buf.limit() == 0) return;\n\n //Print Message\n String msg = getString(buf);\n\n //time\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Taipei\"));\n System.out.println(sdf.format(new Date()) + \" \" + buf.limit() + \" client: \"+ ipAdr + \" \" + msg);\n\n //\n order ord = null;\n try{\n ord = ParseOrder(sdf.format(new Date()), msg, ipAdr);\n }catch(Exception ex){\n startRead( channel );\n return;\n }\n //2021/05/23 15:55:14.763,TXF,B,10000.0,1,127.0.0.1\n //2021/05/23 15:55:14.763,TXF,S,10000.0,1,127.0.0.1\n\n if (ord.BS.equals(\"B\")) {\n limit(ord, bid);\n }\n if (ord.BS.equals(\"S\")) {\n limit(ord, ask);\n }\n if (trade(bid, ask, match) == true){\n startWrite(clientChannel, \"Mat:\" + match.get(match.size()-1).sysTime + \",\" + match.get(match.size()-1).stockNo+\",\"+\n match.get(match.size()-1).BS+\",\"+match.get(match.size()-1).qty+\",\"+match.get(match.size()-1).price+\"\\n\");\n }\n\n //send to all \n startWrite(clientChannel, \"Ord:\" + getAllOrder(bid, ask)+\"\\n\");\n \n //bid size and ask size\n System.out.println(\"Blist:\" + bid.size() + \" Alist:\" + ask.size());\n\n // echo the message\n//------------------> //startWrite( channel, buf );\n \n //start to read next message again\n startRead( channel );\n }", "@Override\n public void run() {\n while (this.isAlive()) {\n try {\n this.semaphoreHashMap.get(\"lock\").acquire();\n this.guestNo = -1;\n this.bellhopGuestHashMap = null;\n this.semaphoreHashMap.get(\"bellhops\").release();\n this.helper.addToBellhopQueue(this);\n this.semaphoreHashMap.get(\"lock\").release();\n\n printStringToConsole(toStringId, \"is ready to help a guest\");\n\n this.mutex.acquire();\n\n printStringToConsole(toStringId, \"has obtained the bags of [Guest \", guestNo + \"\", \"]\");\n this.bellhopGuestHashMap.get(\"hasBags\").release();\n\n this.bellhopGuestHashMap.get(\"guestNeedsBags\").acquire();\n\n this.bellhopGuestHashMap.get(\"inRoom\").acquire();\n printStringToConsole(toStringId, \"has entered the room of [Guest \", guestNo + \"\", \"]\");\n\n printStringToConsole(toStringId, \"has given the bags to [Guest \", guestNo + \"\", \"]\");\n this.bellhopGuestHashMap.get(\"giveBags\").release();\n\n this.bellhopGuestHashMap.get(\"giveTip\").acquire();\n printStringToConsole(toStringId, \"has gotten their tip and leaves from [Guest \", guestNo + \"\", \"]\");\n\n this.bellhopGuestHashMap.get(\"gotTip\").release();\n\n printStringToConsole(toStringId, \"is ready to help a guest\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "private void CheckNumberPacketsEnoughEndMessageAndSend0(String topic) {\n\t\t\t// TODO Auto-generated method stub\n\n\t\t\tif(TopicMap.get(topic)>LogicController.NumberFlowsPerPeriod){\n\t\t\t\t//AsyncPushOneFlow(topic, new byte[](new Key(new byte[]{0,0,0}),Sub4SketchingKVStream.endSignal));\n\t\t\t\t//reset\n\t\t\t\tTopicMap.replace(topic,0L);\n\t\t\t}\n\t\t}", "public void flush() {\n mMessages.postToServer();\n }", "@Override\n public int getResponseQueueLength() {\n return 0;\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tStaticString.information = null;// 判断回复信息之间清空之前信息\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\t\tSocketConnet.getInstance().communication(888,new String[]{mLogsIndexNumber});\r\n\t\t\t\tif (ReplyParser.waitReply()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public void handle(PBFTBag bag){\n\n JDSUtility.debug(\"[PBFTServer:handle(bag)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", received \" + bag);\n\n if(isValid(bag)){\n int f = getServiceBFTResilience();\n JDSUtility.debug(\"[PBFTServer:handle(bag)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", is going to processing \" + bag);\n for(IMessage m: bag.getMessages()){\n\n if(m instanceof PBFTRequest){\n\n PBFTRequest r = (PBFTRequest) m;\n \n if(!getRequestInfo().hasRequest(r)){\n handle(r);\n }\n\n }\n\n if(m instanceof PBFTPrePrepare){\n PBFTPrePrepare pp = (PBFTPrePrepare) m;\n if(!getPrePrepareInfo().contains(pp)) {\n handle(pp);\n }\n }\n\n if(m instanceof PBFTPrepare){\n PBFTPrepare p = (PBFTPrepare) m;\n if(!getPrepareInfo().contains(p)){\n handle(p);\n }\n }\n\n if(m instanceof PBFTCommit){\n PBFTCommit c = (PBFTCommit) m;\n if(!getCommitInfo().contains(c)){\n handle(c);\n }\n }\n \n if(m instanceof PBFTCheckpoint){\n handle((PBFTCheckpoint)m);\n }\n\n if(m instanceof PBFTNewView){\n handle((PBFTNewView)m);\n }\n\n if(m instanceof PBFTChangeView){\n handle((PBFTChangeView)m);\n }\n\n if(m instanceof PBFTChangeViewACK){\n handle((PBFTChangeViewACK)m);\n }\n }\n }\n }", "@Override\n public void run() {\n graphIn = new Handler(Looper.getMainLooper()) {\n\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case handlerState2:\n received = Boolean.parseBoolean((String) msg.obj);\n break;\n case handlerState4:\n sampleTime = Integer.parseInt((String) msg.obj);\n break;\n case handlerState1:\n ppgWaveBuffer.addAll((ArrayList) msg.obj);\n bluetoothIn.obtainMessage(handlerState5, \"ACK\").sendToTarget();\n break;\n\n }\n }\n };\n\n for (; ; ) {\n\n if (!VerifyActivity.isActivityVisible()) {\n ppgWaveBuffer.clear();\n break;\n }\n if (received == true && ppgWaveBuffer.size() != 0) {\n\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (ppgWaveBuffer.size() != 0) {\n graph.update(ppgWaveBuffer);\n }\n }\n });\n try {\n Thread.sleep(sampleTime + compensatoryTime);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }" ]
[ "0.6459321", "0.6443775", "0.6402734", "0.639069", "0.63262844", "0.6283115", "0.61285436", "0.6127755", "0.6110515", "0.60827893", "0.59894013", "0.5907161", "0.5884178", "0.58804065", "0.5839489", "0.5802453", "0.5795554", "0.5791643", "0.579158", "0.578937", "0.57810724", "0.5779656", "0.5771981", "0.5771607", "0.5752827", "0.57450175", "0.5734247", "0.5730633", "0.5726613", "0.57207596", "0.5716991", "0.5703918", "0.5702626", "0.5684681", "0.5678028", "0.56776977", "0.56649494", "0.5662912", "0.5655626", "0.5648686", "0.56475466", "0.5646966", "0.56378865", "0.56279284", "0.561051", "0.5599102", "0.5588492", "0.5588186", "0.5577089", "0.55515337", "0.5548321", "0.55411744", "0.5534277", "0.5530783", "0.553048", "0.5530172", "0.5522471", "0.5521152", "0.55143625", "0.5512773", "0.5508907", "0.5502898", "0.5500852", "0.5500277", "0.54954684", "0.54905117", "0.548729", "0.5487145", "0.547629", "0.54675275", "0.5464576", "0.5463742", "0.54625785", "0.5460346", "0.544501", "0.54442006", "0.5442121", "0.5441776", "0.5440816", "0.5439724", "0.5438334", "0.543625", "0.5428063", "0.5427162", "0.5423982", "0.5410285", "0.5405145", "0.54041445", "0.54033744", "0.53985214", "0.5391923", "0.538517", "0.5385099", "0.5384171", "0.5381409", "0.537929", "0.5377522", "0.5376268", "0.53677475" ]
0.6587414
1
Performs the read action on sc The convention is that both buffers are in writemode before the call to doRead and after the call
@Override public void doRead() throws IOException { if (sc.read(bbin) == -1) { state = State.CLOSED; } processIn(); updateInterestOps(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readSysCall() {\n read = false;\n clientChannel.read(readBuffer, this, readCompletionHandler);\n }", "public void doReads(Reader reader) throws IOException;", "private void doRead() throws IOException {\n\t\t\tvar res = sc.read(bb);\n\n\t\t\tif ( res == -1 ) {\n\t\t\t\tlogger.info(\"Connection closed with the client.\");\n\t\t\t\tclosed = true;\n\t\t\t}\n\n\t\t\tupdateInterestOps();\n\t\t}", "void read(Buffer buffer);", "public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n closed = true;\n }\n processIn();\n updateInterestOps();\n }", "public void read() {\n\t\tthis.isRead = true;\n\t}", "protected void doBeginRead() throws Exception {}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "int doReadChars(TclObject obj, int toRead)\n throws IOException {\n final boolean debug = false;\n ChannelBuffer buf;\n int copied, copiedNow, result;\n IntPtr offset = new IntPtr();\n\n if (encoding == null) {\n TclByteArray.setLength(null, obj, 0);\n } else {\n TclString.empty(obj);\n }\n offset.i = 0;\n\n // if toRead is negative, read until EOF\n if (toRead < 0) {\n toRead = Integer.MAX_VALUE;\n }\n\n done: {\n for (copied = 0; toRead > 0; ) {\n copiedNow = -1;\n if (inQueueHead != null) {\n if (encoding == null) {\n if (debug) { System.out.println(\"calling readBytes \" + toRead); }\n copiedNow = readBytes(obj, toRead, offset);\n } else {\n if (debug) { System.out.println(\"calling readChars \" + toRead); }\n copiedNow = readChars(obj, toRead);\n }\n\n // If the current buffer is empty recycle it.\n\n buf = inQueueHead;\n if (debug) {\n System.out.println(\"after read* buf.nextRemoved is \" + buf.nextRemoved);\n System.out.println(\"after read* buf.nextAdded is \" + buf.nextAdded);\n }\n if (buf.nextRemoved == buf.nextAdded) {\n if (debug) { System.out.println(\"recycling empty buffer\"); }\n ChannelBuffer next;\n\n next = buf.next;\n recycleBuffer(buf, false);\n inQueueHead = next;\n if (next == null) {\n if (debug) { System.out.println(\"inQueueTail set to null\"); }\n inQueueTail = null;\n } else {\n if (debug) { System.out.println(\"inQueueTail is not null\"); }\n }\n }\n }\n if (copiedNow < 0) {\n\t\t if (debug) { System.out.println(\"copiedNow < 0\"); }\n if (eofCond) {\n if (debug) { System.out.println(\"eofCond\"); }\n break;\n }\n if (blocked) {\n if (debug) { System.out.println(\"blocked\"); }\n if (!blocking) {\n break;\n }\n blocked = false;\n }\n result = getInput();\n if (result != 0) {\n if (debug) { System.out.println(\"non-zero result\"); }\n if (result == TclPosixException.EAGAIN) {\n break;\n }\n copied = -1;\n break done; //goto done\n }\n } else {\n copied += copiedNow;\n if (debug) { System.out.println(\"copied incremented to \" + copied); }\n toRead -= copiedNow;\n if (debug) { System.out.println(\"toRead decremented to \" + toRead); }\n }\n }\n\n blocked = false;\n\n if (encoding == null) {\n TclByteArray.setLength(null, obj, offset.i);\n if (debug) {\n System.out.println(\"set byte array length to \" + offset.i);\n }\n }\n } // end done: block\n\n //done:\n updateInterest();\n\n obj.invalidateStringRep();\n String srep = obj.toString();\n\n if (debug) {\n System.out.println(\"returning copied = \" + copied);\n System.out.println(\"returning string \\\"\" + srep + \"\\\"\");\n }\n\n if (copied > 0) {\n int len = srep.length();\n if (len != copied) {\n throw new TclRuntimeError(\"copied \" + copied +\n \" != \" + len);\n }\n } else {\n if (! srep.equals(\"\")) {\n throw new TclRuntimeError(\"expected empty TclObject result\" +\n \" since copied is \" + copied);\n }\n }\n\n return copied;\n }", "public void readSampless(){\n\t\tif (loop) {\n\t\t\treadBytesLoop();\n\t\t} else {\n\t\t\treadBytes();\n\t\t}\n\t\t// convert them to floating point\n\t\t// hand those arrays to our effect\n\t\t// and convert back to bytes\n\t\tprocess();\n\t\t\n\t\t// write to the line.\n\t\twriteBytes();\n\t\t// send samples to the listener\n\t\t// these will be what we just put into the line\n\t\t// which means they should be pretty well sync'd\n\t\t// with the audible result\n\t\tbroadcast();\n\t}", "public void read() {\n\t\tthis.jtfSoundReaderServ = new JtfSoundReaderServ(this.audioFormat, this.targetDataLine);\n\t\tthis.readerThread = new Thread(this.jtfSoundReaderServ);\n\t\tthis.readerThread.start();\n\t}", "abstract void read();", "private void readSerial() {\r\n\t\twhile(myPort.available() > 0) {\r\n\t\t\tbyte[] newBuffer = new byte[512];\r\n\t\t\tint n = myPort.readBytes(newBuffer);\r\n\t\t\tnewBuffer = PApplet.subset(newBuffer,0,n);\r\n\t\t\tif(debug) System.out.println(\"readSerial() reads in \"+n+\" bytes\");\r\n\t\t\tif(newBuffer != null) {\r\n\t\t\t\tinBuffer = PApplet.concat(inBuffer, newBuffer);\r\n\t\t\t\tif(inBuffer.length > 0) checkBuffer();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void read ();", "Read createRead();", "@Override\r\n\tpublic void read() {\n\r\n\t}", "@Override\n\tpublic void read() {\n\n\t}", "public static void testBuffer() throws Exception {\n\t\tStopwatch.start();\n\t\t// readWithoutBuffer(new FileInputStream(\"bigdata\"));\n\t\tStopwatch.stop();\n\n\t\t/*\n\t\t * When read a single byte(or small piece of data), BufferedInputStream\n\t\t * improve performance significantly\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\t\t\n\t\t/*\n\t\t * When read a single byte(or small piece of data), BufferedInputStream\n\t\t * improve performance significantly\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBufferEnhanced(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\n\t\t/*\n\t\t * When read a chunk at a time, BufferedInputStream won't help\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer2(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\t\t\n\t\t/*\n\t\t * NIO way, same as chunk read \n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer3(new RandomAccessFile(\"bigdata.data\", \"r\").getChannel());\n\t\tStopwatch.stop();\n\t}", "@Override\n public int read(byte[] outBuf, int bufferBytePos, int len) throws EhcacheStreamException {\n checkIfOpen();\n\n // activeStreamMaster could be null here if there was no entry in cache in the first place...\n if(null == activeStreamMaster) {\n return -1;\n }\n\n //because we didn't increment the reader count, we need to check the cache to see if anything has changed since being open\n //And since we're not really atomic anyway (since we didn't lock anything in the open()), a simple get and compare would do i think...\n //overall, let's compare if the cache entry has not been written since we opened (the lastWritten bit would have changed)\n EhcacheStreamMaster currentStreamMaster = getEhcacheStreamUtils().getStreamMasterFromCache(getPublicCacheKey());\n boolean isWeaklyConsistent =\n currentStreamMaster != null &&\n currentStreamMaster.getChunkCount() == activeStreamMaster.getChunkCount() &&\n currentStreamMaster.getLastWrittenTime() == activeStreamMaster.getLastWrittenTime();\n\n if(!isWeaklyConsistent)\n throw new EhcacheStreamIllegalStateException(\"Concurrent modification exception: EhcacheStreamMaster has changed since opening: a concurrent write must have happened. Consider retrying in a bit.\");\n\n try {\n // copy the cache chunks into the buffer based on the internal index tracker\n return read1(outBuf, bufferBytePos, len);\n } catch (EhcacheStreamIllegalStateException exc){\n throw new EhcacheStreamIllegalStateException(String.format(\"Could not read the cache chunk. Current StreamMaster[=%s]\", EhcacheStreamUtilsInternal.toStringSafe(activeStreamMaster)), exc);\n }\n }", "public void ownRead();", "private static void read(SelectionKey key) throws IOException {\r\n\t\t// socket def. has something to say (not 0). But may be -1\r\n\t\t\r\n\t\tSocketChannel sc = (SocketChannel) key.channel();\r\n\t\tByteBuffer buf = ByteBuffer.allocateDirect(1024);\r\n\t\t\r\n\t\t// READ data fom channel into buf\r\n\t\t// CHANNEL--read--> --write-->BUF\r\n\t\tint read = sc.read(buf);\r\n\t\tif(read == -1) {\r\n\t\t\tpendingData.remove(sc);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// Note: We do not need to check for read == 0, since this would not have been called if\r\n\t\t// there was no data to read (or the socket had closed)\r\n\r\n\t\t// PREPARE FOR READING from BUF into CHANNEL\r\n\t\t\r\n\t\t// set BUF into WRITE mode\r\n\t\t// e.g.: sets the limit to 'max read position' and set position to 0\r\n\t\tbuf.flip();\r\n\t\t\r\n\t\t// BUF--read--> <PROCESS-DATA> --write-->BUF\r\n\t\tfor(int i = 0; i < buf.limit(); ++i)\r\n\t\t\tbuf.put(i, (byte) Util.switchCase(buf.get(i)));\r\n\t\t\r\n\t\t// note: We only want to write once socket is ready for writing\r\n\t\t// therefore instead make a queue of data to written onto\r\n\t\t// this socket\r\n\t\t//socket.write(buf);\r\n\t\t\t\t\r\n\t\t// save processed data until selector says channel is ready for WRITING\r\n\t\tpendingData.get(sc).add(buf);\r\n\t\t\r\n\t\t// Let selector know we want to know when socket is ready to \r\n\t\t// have pending data written\r\n\t\tsc.register(key.selector(), SelectionKey.OP_WRITE);\r\n\t\t\r\n\t\t// NOTE: For the SocketChannel sc, multiple calls to \r\n\t\t// IOServerTest6.read() may have been before it is ready to be\r\n\t\t// written to. Therefore, this is why we use an ordered Collection\r\n\t\t// (like a FIFO Queue or LinkedList) to store pending writes, so\r\n\t\t// that they are written back to SocketChannel in the correct order.\t\t\r\n\t}", "public synchronized void beginRead() {\n\t\tSystem.out.println(\"READER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint readTurn = currentTurn;\n\t\tcurrentTurn++;\n\t\t\n\t\twhile(readTurn!=nextTurn || numWriters > 0 ){\n\t\t\ttry {\n//\t\t\t\tSystem.out.println(\"READER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\twait();\n//\t\t\t\tSystem.out.println(\"READER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//number of readers at front of the queue\n\t\t//(unblocked reader)\n\t\tnumReaders ++;\n\n\t}", "@Override public int read(char[] cbuf, int off, int len) throws IOException {\r\n\t\tif (off < 0 || len < 0 || off + len > cbuf.length) throw new IndexOutOfBoundsException();\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tint r = -1;\r\n\t\twhile (r == -1){\r\n\t\t\tReader in = getCurrentReader();\r\n\t\t\tif (in == null){\r\n\t\t\t\tif (doneAddingReaders) return -1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (InterruptedException iox){\r\n\t\t\t\t\tthrow new IOException(\"Interrupted\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr = in.read(cbuf, off, len);\r\n\t\t\t\tif (r == -1) advanceToNextReader();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "private void ensureRead() throws IOException, BadDescriptorException {\n if (reading) return;\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }", "public void read(IORequest request) throws MemoryFault {\n setBaseLimit();\n // sets what we need to be able to read\n int deviceNumber = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc);\n int platter = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 1);\n int platStart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n int datasize = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 3);\n int memLoc = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 4) + Process_Table[request.prognum].base;\n// System.out.println(deviceNumber+\"device\");\n// System.out.println(platter+\"plat\");\n// System.out.println(platStart+\"Start\");\n// System.out.println(datasize+\"data\");\n// System.out.println(memLoc+\"mem\");\n\n Process_Table[currentProcess].status = ProcessState.waiting;\n\n machine.devices[deviceNumber].controlRegister.register[0] = DeviceControllerOperations.READ;\n machine.devices[deviceNumber].controlRegister.register[1] = platter;\n machine.devices[deviceNumber].controlRegister.register[2] = platStart;\n machine.devices[deviceNumber].controlRegister.register[3] = datasize;\n machine.devices[deviceNumber].controlRegister.latch();\n for (int i = 0; i < datasize; i++) {\n machine.memory.store(i + memLoc, machine.devices[deviceNumber].buffer[i]);\n\n }\n //System.out.println(waitQ[Machine.DISK1].size() + \" READ\");\n // initiate the latch\n\n }", "abstract void onReadable();", "private void read(){\n try {\n if (c != -1) c = r.read();\n } catch (IOException e){\n throw new IOError(e);\n }\n }", "@Override\r\n\tpublic void reading() {\n\t\tSystem.out.println(\"reading\");\r\n\t}", "@Override\r\n\tpublic void read(IByteBuffer source, long offset) {\n\r\n\t}", "public synchronized int read() throws InterruptedException\n {\n while (bufferEmpty(\"Consumer\"))\n {\n // Console.println(\"Consumer\" + \" Waiting on Buffer\");\n\n this.wait();\n\n // bufferEmpty = bufferEmpty(\"Consumer\");\n }\n\n int out = theBuffer;\n // Console.println(\"Consumer reading \" + out + \" from Buffer\");\n theBuffer = 0;\n this.notify();\n\n return out;\n }", "@Override\n public void run() {\n try {\n\n byte[] data = new byte[TcpClient.BUFFER_SIZE * 2];\n\n while(!Rebroadcaster.INSTANCE.isHalted()) {\n int len = is.read(data, 0, data.length);\n os.write(data, 0, len);\n os.flush();\n }\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "public void readSerial() {\r\n rightShoe.getSerialReader().stopRead();\r\n leftShoe.getSerialReader().stopRead();\r\n rightShoe.getSerialReader().closePort();\r\n leftShoe.getSerialReader().closePort();\r\n timeController.initializeSerial();\r\n }", "public int read(byte[] r10, int r11, int r12) throws java.io.IOException {\n /*\n r9 = this;\n r8 = 1;\n r3 = 0;\n r4 = r11 + r12;\n r5 = r10.length;\n com.google.common.base.Preconditions.checkPositionIndexes(r11, r4, r5);\n if (r12 != 0) goto L_0x000c;\n L_0x000a:\n r2 = r3;\n L_0x000b:\n return r2;\n L_0x000c:\n r2 = 0;\n r0 = r9.endOfInput;\n L_0x000f:\n r4 = r9.draining;\n if (r4 == 0) goto L_0x002d;\n L_0x0013:\n r4 = r11 + r2;\n r5 = r12 - r2;\n r4 = r9.drain(r10, r4, r5);\n r2 = r2 + r4;\n if (r2 == r12) goto L_0x0022;\n L_0x001e:\n r4 = r9.doneFlushing;\n if (r4 == 0) goto L_0x0026;\n L_0x0022:\n if (r2 > 0) goto L_0x000b;\n L_0x0024:\n r2 = -1;\n goto L_0x000b;\n L_0x0026:\n r9.draining = r3;\n r4 = r9.byteBuffer;\n r4.clear();\n L_0x002d:\n r4 = r9.doneFlushing;\n if (r4 == 0) goto L_0x003d;\n L_0x0031:\n r1 = java.nio.charset.CoderResult.UNDERFLOW;\n L_0x0033:\n r4 = r1.isOverflow();\n if (r4 == 0) goto L_0x0055;\n L_0x0039:\n r9.startDraining(r8);\n goto L_0x000f;\n L_0x003d:\n if (r0 == 0) goto L_0x0048;\n L_0x003f:\n r4 = r9.encoder;\n r5 = r9.byteBuffer;\n r1 = r4.flush(r5);\n goto L_0x0033;\n L_0x0048:\n r4 = r9.encoder;\n r5 = r9.charBuffer;\n r6 = r9.byteBuffer;\n r7 = r9.endOfInput;\n r1 = r4.encode(r5, r6, r7);\n goto L_0x0033;\n L_0x0055:\n r4 = r1.isUnderflow();\n if (r4 == 0) goto L_0x006d;\n L_0x005b:\n if (r0 == 0) goto L_0x0063;\n L_0x005d:\n r9.doneFlushing = r8;\n r9.startDraining(r3);\n goto L_0x000f;\n L_0x0063:\n r4 = r9.endOfInput;\n if (r4 == 0) goto L_0x0069;\n L_0x0067:\n r0 = 1;\n goto L_0x002d;\n L_0x0069:\n r9.readMoreChars();\n goto L_0x002d;\n L_0x006d:\n r4 = r1.isError();\n if (r4 == 0) goto L_0x002d;\n L_0x0073:\n r1.throwException();\n r2 = r3;\n goto L_0x000b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.common.io.ReaderInputStream.read(byte[], int, int):int\");\n }", "public void setRead(){\n \tthis.isRead = true;\n }", "public void releaseReadIOBuffer(byte[] buf)\n/* */ {\n/* 207 */ if (buf != null)\n/* */ {\n/* */ \n/* */ \n/* 211 */ _verifyRelease(buf, this._readIOBuffer);\n/* 212 */ this._readIOBuffer = null;\n/* 213 */ this._bufferRecycler.releaseByteBuffer(0, buf);\n/* */ }\n/* */ }", "public synchronized void mProcessSerial(){ //170927 Returns array of data received from serial RX they are also put on receive buffer\n for (int loop=0;loop<oTXFIFO.nBytesAvail;loop++){\n if (oTXFIFO.mCanPop(1)==false) break; //Send FIFO data to serial output stream\n int byB=oTXFIFO.mFIFOpop();\n mWriteByte(oOutput, (byte) byB);\n }\n byte[] aBytes = mReadBytes(oInput);\n if (aBytes==null) return ;\n for (int i=0;i<aBytes.length;i++){ //Loop through buffer and transfer from input stream to FIFO buffer //+170601 revised from while loop to avoid endless loop\n if (oRXFIFO.mCanPush()){\n oRXFIFO.mFIFOpush(aBytes[i]); //Put the data on the fifo\n }\n else\n {\n mStateSet(cKonst.eSerial.kOverflow);\n nDataRcvd=-1;\n }\n }\n }", "boolean getRead();", "private void ensureReadNonBuffered() throws IOException, BadDescriptorException {\n if (reading) {\n if (buffer.hasRemaining()) {\n Ruby localRuntime = getRuntime();\n if (localRuntime != null) {\n throw localRuntime.newIOError(\"sysread for buffered IO\");\n } else {\n throw new IOException(\"sysread for buffered IO\");\n }\n }\n } else {\n // libc flushes writes on any read from the actual file, so we flush here\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }\n }", "public void setBuffering() {\n try {\n doc = StaxUtils.read(stream);\n stream = null;\n } catch (XMLStreamException e) {\n throw new Fault(e); \n }\n }", "@VisibleForTesting\n static int drainBuffer(BufferedReader br, StringBuffer storageBuf, int maxLength, int bytesRead, boolean readAll)\n throws IOException {\n int bReadSession = 0;\n int chunkSize = 1024;\n if (br.ready()) {\n char[] buf = new char[1024];\n int bReadCurrent;\n boolean wantsToReadFurther;\n do {\n bReadCurrent = br.read(buf, 0, chunkSize);\n if (storageBuf != null && bytesRead < maxLength && bReadCurrent != -1) {\n storageBuf.append(buf, 0, bReadCurrent);\n }\n if (bReadCurrent != -1) {\n bReadSession += bReadCurrent;\n }\n wantsToReadFurther = bReadCurrent != -1 && (readAll || bReadCurrent == chunkSize);\n } while (br.ready() && wantsToReadFurther);\n }\n return bReadSession;\n }", "@Override public void run()\n\t\t{\n\t\t\twhile (mutex)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\");\n\t\t\t}\n\t\t\tmutex = true; \n\t\t\treadCount++;\n\t\t\tif (readCount == 1)\n\t\t\t{\n\t\t\twrt = true; // Locking writer when reader is active\n\t\t\t}\n\t\t\tmutex = false;\n\t\t\t// Critical Section \n\t\t\ttry {\n\t\t\t\t\tFile myObj = new File(\"shared.txt\"); \n\t\t\t\t\tScanner myReader = new Scanner(myObj); \n\t\t\t\t\tString data = myReader.nextLine(); \n\t\t\t\t\tSystem.out.println(\"Reading: \" + data); \n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e){}\n\n\t\t\t// Leave Critical section\n\t\t\twhile (mutex) { System.out.print(\"\"); } mutex = true;\n\t\t\treadCount--;\n\t\t\tif (readCount == 0) \n\t\t\t{\n\t\t\t\twrt = false; // Unlocking writer if all reading process is done.\n\t\t\t}\n\t\t\tmutex = false;\n\t\t}", "public synchronized List getBufferForReading() {\n// if some writer is writing, wait until no writer is writing \n while (readerNumber < 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber >= 0 \n readerNumber++;\n return buffer;\n }", "void read(StreamOption streamOpt);", "@Override\n\tpublic void readBourse(Bourse brs) {\n\t\t\n\t}", "private DFEVar[][] createBuffer(DFEVector<DFEVar> reference,\n\t\t\t DFEVar writeEnable,\n\t\t\t DFEVar[] writeAddress,\n\t\t\t DFEVar[] readAddress1,\n\t\t\t DFEVar[] readAddress2,\n\t\t\t DFEVar whichBuffer,\n\t\t\t int cyclesToReadAhead)\n\t{\n\t\tDFEVar[][] bufferOutput = new DFEVar[m_scalars.blockSize][m_scalars.blockSize + m_scalars.numPipes - 1];\n\t\tfor (int i = 0; i < m_scalars.blockSize; i++) {\n\t\t\tRamPortParams<DFEVector<DFEVar>> writePort = mem.makeRamPortParams(RamPortMode.WRITE_ONLY, writeAddress[0], reference.getType())\n\t\t\t .withDataIn(reference)\n .withWriteEnable((writeAddress[1] === i) & writeEnable);\n\n\t\t\tRamPortParams<DFEVector<DFEVar>> readPort1 = mem.makeRamPortParams(RamPortMode.READ_ONLY, readAddress1[i], reference.getType());\n\t\t\tRamPortParams<DFEVector<DFEVar>> readPort2 = mem.makeRamPortParams(RamPortMode.READ_ONLY, readAddress2[i], reference.getType());\n\n\t\t\tDFEVector<DFEVar> ram1 = mem.ramDualPort(m_scalars.bufferDepth, RamWriteMode.READ_FIRST, writePort, readPort1).getOutputB();\n\t\t\tDFEVector<DFEVar> ram2 = mem.ramDualPort(m_scalars.bufferDepth, RamWriteMode.READ_FIRST, writePort, readPort2).getOutputB();\n\n\t\t\tfor (int j = 0; j < cyclesToReadAhead; j++) {\n\t\t\t\tDFEVector<DFEVar> temp = whichBuffer ? stream.offset(ram2, j - cyclesToReadAhead + 1) : stream.offset(ram1, j - cyclesToReadAhead + 1);\n\t\t\t\tfor (int k = 0; k < m_scalars.numPipes; k++) {\n\t\t\t\t\tif (j * m_scalars.numPipes + k < bufferOutput[0].length) {\n\t\t\t\t\t\tbufferOutput[i][j * m_scalars.numPipes + k] = temp[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn bufferOutput;\n\t}", "boolean isUsedForReading();", "private void readData()\n {\n while(System.currentTimeMillis() - start <= durationMillis)\n {\n counters.numRequested.incrementAndGet();\n readRate.acquire();\n\n if (state.get() == SimulationState.TEARING_DOWN)\n break;\n }\n }", "private void readIt() throws IOException, InterruptedException\n {\n //resets the buffer and reads from it\n outVideo.println(\"==>\");\n outVideo.flush();\n if(!initializationMode)\n while (!inKeyboard.ready())\n {\n Thread.sleep(50);\n }\n msgIN = inKeyboard.readLine();\n }", "protected BiFunction<SelectionKey, Integer, Runnable> onReading() {\n return readable;\n }", "@Override\n\t\tpublic void readyToRead(Vector<byte[]> outQ) {\n\t\t\t\n\t\t}", "protected void readImpl(@NotNull final ByteBuffer buffer) {\n }", "@Override\n\tpublic void readCB(CB cb) {\n\t\t\n\t}", "public abstract void read0(int aPosition, PageIOStream aStream);", "public void sensorReader() {\n try {\n Log.i(TAG, \"wants to read from Arduino\");\n this.inputStream = socket.getInputStream();\n this.inputStreamReader = new InputStreamReader(inputStream);\n Log.i(TAG, \"inputstream ready\");\n this.bufferedReader = new BufferedReader(inputStreamReader);\n Log.i(TAG, \"buffered reader ready\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void read( int readIndex, byte[] array, int firstIndex,\n\t\t\tint count );", "public abstract void read(DataInput input) throws IOException;", "public void doRead(ClientChatos client, SelectionKey key) throws IOException {\n\t\tif (sc.read(bbin) == -1) {\n\t\t\tlogger.info(\"read raté\");\n\t\t\tclosed = true;\n\t\t}\n\t\tprocessIn(client, key);\n\t\tupdateInterestOps();\n\t}", "public void processStreamInput() {\n }", "public void returnBuffer(byte[] current, boolean cdrStr)\n {\n if (current != null)\n {\n int log_curr = calcLog(current.length);\n \n if( log_curr >= MIN_CACHE)\n {\n if( log_curr > maxManagedBufferSize )\n {\n synchronized(this)\n {\n // Only cache if CDROutputStream is called, cache is enabled &\n // the new value is > than the cached value.\n if (cdrStr &&\n (time >= 0 &&\n (bufferMax == null || bufferMax.length < current.length)))\n {\n bufferMax = current;\n }\n return;\n }\n }\n \n int expected = (1 << log_curr + 1) - 1;\n if (current.length != expected)\n {\n if (logger.isWarnEnabled())\n {\n logger.warn (\"BufferManager.returnBuffer, log = \" + log_curr +\n \" got length \" +\n Integer.toHexString (current.length) +\n \" expected length \" +\n Integer.toHexString (expected));\n }\n }\n else\n {\n final Collection s = bufferPool[ log_curr-MIN_CACHE ];\n doReturnBuffer(s, current, threshold);\n }\n }\n }\n }", "public abstract void endRead(boolean restart);", "@Override\n\tpublic synchronized int read(char[] cbuf, int off, int len)\n\t\t\tthrows IOException {\n\t\tint read = 0;\n\t\tint rightChunkLength = Math.min(m_queue.length - m_queuePosition,\n\t\t\t\tm_queueLength);\n\t\tint charsToRead = Math.min(rightChunkLength, len);\n\t\tif (charsToRead > 0) {\n\t\t\tSystem.arraycopy(m_queue, m_queuePosition, cbuf, off, charsToRead);\n\t\t\tread += charsToRead;\n\t\t\tlen -= charsToRead;\n\n\t\t\tm_queuePosition = (m_queuePosition + charsToRead) % m_queue.length;\n\t\t\tm_queueLength -= charsToRead;\n\t\t}\n\n\t\t// feel free to try the left chunk too:\n\t\tif (len > 0 && m_queueLength > 0) {\n\t\t\tint leftChunkLength = m_queueLength;\n\t\t\tcharsToRead = Math.min(leftChunkLength, len);\n\t\t\tif (charsToRead > 0) {\n\t\t\t\tSystem.arraycopy(m_queue, 0, cbuf, off + read, charsToRead);\n\t\t\t\tread += charsToRead;\n\t\t\t\tlen -= charsToRead;\n\t\t\t\tm_queuePosition = (m_queuePosition + charsToRead)\n\t\t\t\t\t\t% m_queue.length;\n\t\t\t\tm_queueLength -= charsToRead;\n\t\t\t}\n\t\t}\n\n\t\tpopulateQueue();\n\t\treturn read;\n\t}", "void waitToRead();", "public void execHandlerRead( Message msg ) {\n\t \t// create valid data bytes\n\t\tbyte[] buffer = (byte[]) msg.obj;\n\t\tint length = (int) msg.arg1;\n\t\tbyte[] bytes = new byte[ length ];\n\t\tfor ( int i=0; i < length; i++ ) {\n\t\t\tbytes[ i ] = buffer[ i ];\n\t\t}\n\t\t// debug\n\t\tString read = buildMsgBytes( \"r \", bytes );\n\t\tlog_d( read );\n\t\taddAndShowTextViewDebug( read );\n\t\tnotifyRead( bytes );\n\t}", "public synchronized List getBufferForWriting() {\n// if some writer is writing or some reader is reading, wait until no one is writing or reading \n while (readerNumber != 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber == 0 \n readerNumber--; // now readderNumber == -1. \n return buffer;\n }", "public synchronized void readInput() throws InterruptedException, IOException \n\t{\n\t\twhile (getDataSourceEOFlag())\n\t\t{\n\t\t\tcontent.set(incomingPipe.take());\n\t\t\t\n\t\t\t// Ensure thread-timing uniformity (a speed-limiter)\n\t\t\t//Thread.sleep(100);\n\t\t\t\n\t\t\tprocess();\n\t\t\t// Discard the text to free up memory.\n\t\t\tcontent.set(null);\n\t\t}\n\t}", "@Test\n public void testWriteThenRead() {\n PipelineResult writeResult = runWrite();\n writeResult.waitUntilFinish();\n PipelineResult readResult = runRead();\n readResult.waitUntilFinish();\n gatherAndPublishMetrics(writeResult, readResult);\n }", "private void t1() {\n // read and write to the same region: just want the write effect\n writeProtected();\n readProtected();\n }", "private int read()\n\t{\n\t\ttry{\n\t\t\twhile(dev_in.available()==0);\n\t\t\treturn dev_in.read();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t\treturn -1;\n\t}", "int filterBytes(GetsState gs) {\n ChannelBuffer buf;\n byte[] raw;\n int rawStart, rawEnd;\n char[] dst;\n int offset, toRead, /*dstNeeded,*/ spaceLeft, result, rawLen, length;\n TclObject obj;\n final int ENCODING_LINESIZE = 20; // Lower bound on how many bytes\n // to convert at a time. Since we\n // don't know a priori how many\n // bytes of storage this many\n // source bytes will use, we\n // actually need at least\n // ENCODING_LINESIZE bytes of room.\n\n boolean goto_read = false; // Set to true when jumping to the read\n // label, used to simulate a goto.\n\n final boolean debug = false;\n\n obj = gs.obj;\n\n // Subtract the number of bytes that were removed from channel buffer\n // during last call.\n\n buf = gs.buf;\n if (buf != null) {\n buf.nextRemoved += gs.rawRead.i;\n if (buf.nextRemoved >= buf.nextAdded) {\n buf = buf.next;\n }\n }\n gs.totalChars += gs.charsWrote.i;\n\n read: while (true) {\n if (goto_read || (buf == null) || (buf.nextAdded == buf.BUFFER_PADDING)) {\n // All channel buffers were exhausted and the caller still hasn't\n // seen EOL. Need to read more bytes from the channel device.\n // Side effect is to allocate another channel buffer.\n\n //read:\n if (blocked) {\n if (!blocking) {\n gs.charsWrote.i = 0;\n gs.rawRead.i = 0;\n return -1;\n }\n blocked = false;\n }\n if (getInput() != 0) {\n gs.charsWrote.i = 0;\n gs.rawRead.i = 0;\n return -1;\n }\n buf = inQueueTail;\n gs.buf = buf;\n }\n\n // Convert some of the bytes from the channel buffer to characters.\n // Space in obj's string rep is used to hold the characters.\n\n rawStart = buf.nextRemoved;\n raw = buf.buf;\n rawEnd = buf.nextAdded;\n rawLen = rawEnd - rawStart;\n\n toRead = ENCODING_LINESIZE;\n if (toRead > rawLen) {\n toRead = rawLen;\n }\n dst = new char[toRead];\n result = externalToUnicode(raw, rawStart, rawLen,\n dst, 0, toRead,\n gs.rawRead, /*gs.bytesWrote*/ null, gs.charsWrote,\n gs.charToBytes);\n TclString.append(gs.obj, dst, 0, gs.charsWrote.i);\n\n if (debug) {\n System.out.println(\"filterBytes chars\");\n\n String srep = gs.obj.toString();\n int len = srep.length();\n\n for (int i=0; i < len; i++) {\n char c = srep.charAt(i);\n String prep;\n if (c == '\\r') {\n prep = \"\\\\r\";\n } else if (c == '\\n') {\n prep = \"\\\\n\";\n } else {\n prep = \"\" + c;\n }\n\n System.out.println(\"filtered[\" + i + \"] = '\" +\n prep +\n \"' (int) \" + ((int) srep.charAt(i)) +\n \" 0x\" + Integer.toHexString((int) srep.charAt(i)));\n }\n }\n\n // Make sure that if we go through 'gets', that we reset the\n // TCL_ENCODING_START flag still. [Bug #523988]\n\n encodingStart = false;\n\n if (result == TCL_CONVERT_MULTIBYTE) {\n // The last few bytes in this channel buffer were the start of a\n // multibyte sequence. If this buffer was full, then move them to\n // the next buffer so the bytes will be contiguous. \n\n if (debug) {\n System.out.println(\"TCL_CONVERT_MULTIBYTE decode result found\");\n }\n\n ChannelBuffer next;\n int extra;\n\n next = buf.next;\n if (buf.nextAdded < buf.bufLength) {\n if (gs.rawRead.i > 0) {\n // Some raw bytes were converted to UTF-8. Fall through,\n // returning those UTF-8 characters because a EOL might be\n // present in them.\n } else if (eofCond) {\n // There was a partial character followed by EOF on the\n // device. Fall through, returning that nothing was found.\n\n buf.nextRemoved = buf.nextAdded;\n } else {\n // There are no more cached raw bytes left. See if we can\n // get some more.\n\n goto_read = true;\n continue read; //goto read;\n }\n } else {\n if (next == null) {\n next = new ChannelBuffer(bufSize);\n buf.next = next;\n inQueueTail = next;\n }\n extra = rawLen - gs.rawRead.i;\n System.arraycopy(raw, rawStart + gs.rawRead.i,\n next.buf, buf.BUFFER_PADDING - extra, extra);\n next.nextRemoved -= extra;\n buf.nextAdded -= extra;\n\n if (debug) {\n System.out.println(\"copied \" + extra + \" bytes to \" +\n \"next ChannelBuffer\");\n }\n }\n }\n\n break read; // End loop in the normal case\n } // End read labeled while loop\n\n gs.buf = buf;\n return 0;\n }", "public boolean read() {\n return so;\n }", "boolean getForRead();", "public void run() {\n try {\n DataInputStream in = new DataInputStream(new BufferedInputStream(s.getInputStream()));\n try {\n byte op = (byte) in.read();\n if (op == OP_WRITE_BLOCK) {\n writeBlock(in);\n } else if (op == OP_READ_BLOCK || op == OP_READSKIP_BLOCK ||\n op == OP_READ_RANGE_BLOCK) {\n readBlock(in, op);\n } else {\n while (op >= 0) {\n System.out.println(\"Faulty op: \" + op);\n op = (byte) in.read();\n }\n throw new IOException(\"Unknown opcode for incoming data stream\");\n }\n } finally {\n in.close();\n }\n } catch (IOException ie) {\n LOG.warn(\"DataXCeiver\", ie);\n } finally {\n try {\n xceiverCount.decr();\n LOG.debug(\"Number of active connections is: \"+xceiverCount);\n s.close();\n } catch (IOException ie2) {\n }\n }\n }", "void drain() {\n if (stdOutReader != null) {\n stdOutReader.drain();\n }\n if (stdErrReader != null) {\n stdErrReader.drain();\n }\n }", "public void internalRead() {\r\n\t\tbusInt.put(data);\r\n\t}", "public int read(long offset, byte buffer[],int bufferOffset,int nrOfBytes)\n throws VlException\n {\n boolean forceUseStreamRead=false; //true; // default value \n\n// // when reading the first bytes, streamread is faster \n// if (offset==0) \n// forceUseStreamRead=true; \n\n // Try Random Accessable Interface ! \n if ((this instanceof VRandomReadable) && (forceUseStreamRead==false))\n {\n // use Sync Read ! \n return StreamUtil.syncReadBytes((VRandomReadable)this,offset,buffer,bufferOffset,nrOfBytes);\n }\n // else try StreamReadable interface \n else if (this instanceof VStreamReadable)\n {\n //sync stream Read ! \n return streamRead(offset,buffer,bufferOffset,nrOfBytes);\n }\n else\n {\n throw new nl.uva.vlet.exception.ResourceTypeMismatchException(\n \"File type does not support (remote) read access\");\n }\n }", "@Override\n public int read() throws IOException\n {\n if (_tmpBuffer == null) {\n _tmpBuffer = new char[1];\n }\n if (read(_tmpBuffer, 0, 1) < 1) {\n return -1;\n }\n return _tmpBuffer[0];\n }", "boolean hasRead();", "protected int populateBuffer()\n {\n interlock.beginReading();\n // System.out.println(\"populateBuffer: 2\");\n return byteBuffer.limit();\n }", "@Override\n\tpublic void readClient(Client clt) {\n\t\t\n\t}", "public void readSector(TransID tid, int sectorNum, byte buffer[])\n throws IOException, IllegalArgumentException, \n IndexOutOfBoundsException{\t\t\t\t\t\t\t\t// Not quite done yet\n\t try{\n\t\t ADisk_lock.lock();\n\n\t\t readTid = tid.getTidfromTransID();\n readSector = sectorNum;\n d.startRequest(Disk.READ, tid.getTidfromTransID(), sectorNum, buffer);\n readWait();\n \n wblist.checkRead(sectorNum, buffer);\n Transaction temp = atranslist.get(tid);\n if(temp != null)\n \t temp.checkRead(sectorNum, buffer);\n\t }\n\t finally{\n\t\t ADisk_lock.unlock();\n\t }\n }", "public ConsumptionStatus consumeBuffer() {\n\t\tif (status == ConsumptionStatus.BUFFERED){\n\t\t\tString buffered = newBuffer;\n\t\t\tnewBuffer = null;\n\t\t\tstatus = ConsumptionStatus.EMPTY;\n\t\t\tconsumeLine(buffered);\n\t\t\treturn status;\n\t\t}else {\n\t\t\tthrow new IllegalStateException(\"There is no buffer to consume.\");\n\t\t}\n\t}", "abstract protected boolean read();", "public void test_readXXXAndWriteXXX_basic_BB_FC_io() {\n tezt_readXXXAndWriteXXX_basic_BB_FC_io_impl();\n }", "public void run() {\n readFromClient();\n }", "@Override\n\tpublic int read(CCMultiChannelBuffer outBuffer) {\n\t\tif (buffer.getSampleCount() != outBuffer.getBufferSize()) {\n\t\t\tbuffer.changeSampleCount(outBuffer.getBufferSize(), true);\n\t\t\trawBytes = new byte[buffer.getByteArrayBufferSize(format)];\n\t\t}\n\t\tint framesRead = 0;\n\t\tif (play) {\n\t\t\tframesRead = mRead();\n\t\t} else {\n\t\t\tbuffer.makeSilence();\n\t\t}\n\t\tfor (int i = 0; i < buffer.getChannelCount(); i++) {\n\t\t\toutBuffer.setChannel(i, buffer.getChannel(i));\n\t\t}\n\n\t\treturn framesRead;\n\t}", "public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\"+this.lockState);\n lock.lock();\n logger.log(Level.INFO,\"lock_read : taking mutex : \"+this.lockState);\n \t\tswitch(this.lockState){\n \t\t\tcase RLC :\n \t\t\t\tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"reading in cache\");\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t\tthis.lockState=State.RLT_WLC;\n \t\t\t\tlogger.log(Level.INFO,\"reading in cache as previous writer\");\n \t\t\tbreak;\n \t\t\tdefault:\n update = true;\n \t\t\tbreak;\t\t\t\t\t\n \t\t}\n lock.unlock();\n logger.log(Level.FINE,\"lock_read : release the lock with :\"+lockState+\".\");\n if(update){\n logger.log(Level.INFO,\"Updating lockState to RLT\");\n \tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"Lockstate was updated to \"+lockState);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n this.obj = client.lock_read(this.id);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n logger.log(Level.INFO,\"lock_read(): end with \"+lockState);\n }\n \t}", "@Override public int read() throws IOException {\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tint r = -1;\r\n\t\twhile (r == -1){\r\n\t\t\tReader in = getCurrentReader();\r\n\t\t\tif (in == null){\r\n\t\t\t\tif (doneAddingReaders) return -1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (InterruptedException iox){\r\n\t\t\t\t\tthrow new IOException(\"Interrupted\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr = in.read();\r\n\t\t\t\tif (r == -1) advanceToNextReader();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "@Override\n public void consume(ParsableByteArray data) {\n checkStateNotNull(sampleReader);\n checkStateNotNull(output);\n int offset = data.getPosition();\n int limit = data.limit();\n byte[] dataArray = data.getData();\n\n // Append the data to the buffer.\n totalBytesWritten += data.bytesLeft();\n output.sampleData(data, data.bytesLeft());\n\n while (true) {\n int startCodeOffset = NalUnitUtil.findNalUnit(dataArray, offset, limit, prefixFlags);\n\n if (startCodeOffset == limit) {\n // We've scanned to the end of the data without finding another start code.\n if (!hasOutputFormat) {\n csdBuffer.onData(dataArray, offset, limit);\n }\n sampleReader.onData(dataArray, offset, limit);\n if (userData != null) {\n userData.appendToNalUnit(dataArray, offset, limit);\n }\n return;\n }\n\n // We've found a start code with the following value.\n int startCodeValue = data.getData()[startCodeOffset + 3] & 0xFF;\n // This is the number of bytes from the current offset to the start of the next start\n // code. It may be negative if the start code started in the previously consumed data.\n int lengthToStartCode = startCodeOffset - offset;\n\n if (!hasOutputFormat) {\n if (lengthToStartCode > 0) {\n csdBuffer.onData(dataArray, offset, /* limit= */ startCodeOffset);\n }\n // This is the number of bytes belonging to the next start code that have already been\n // passed to csdBuffer.\n int bytesAlreadyPassed = lengthToStartCode < 0 ? -lengthToStartCode : 0;\n if (csdBuffer.onStartCode(startCodeValue, bytesAlreadyPassed)) {\n // The csd data is complete, so we can decode and output the media format.\n output.format(\n parseCsdBuffer(csdBuffer, csdBuffer.volStartPosition, checkNotNull(formatId)));\n hasOutputFormat = true;\n }\n }\n\n sampleReader.onData(dataArray, offset, /* limit= */ startCodeOffset);\n\n if (userData != null) {\n int bytesAlreadyPassed = 0;\n if (lengthToStartCode > 0) {\n userData.appendToNalUnit(dataArray, offset, /* limit= */ startCodeOffset);\n } else {\n bytesAlreadyPassed = -lengthToStartCode;\n }\n\n if (userData.endNalUnit(bytesAlreadyPassed)) {\n int unescapedLength = NalUnitUtil.unescapeStream(userData.nalData, userData.nalLength);\n castNonNull(userDataParsable).reset(userData.nalData, unescapedLength);\n castNonNull(userDataReader).consume(pesTimeUs, userDataParsable);\n }\n\n if (startCodeValue == START_CODE_VALUE_USER_DATA\n && data.getData()[startCodeOffset + 2] == 0x1) {\n userData.startNalUnit(startCodeValue);\n }\n }\n\n int bytesWrittenPastPosition = limit - startCodeOffset;\n long absolutePosition = totalBytesWritten - bytesWrittenPastPosition;\n sampleReader.onDataEnd(absolutePosition, bytesWrittenPastPosition, hasOutputFormat);\n // Indicate the start of the next chunk.\n sampleReader.onStartCode(startCodeValue, pesTimeUs);\n // Continue scanning the data.\n offset = startCodeOffset + 3;\n }\n }", "private void doWrite() throws IOException {\n\t\t\tbb.flip();\n\t\t\tsc.write(bb);\n\t\t\tbb.compact();\n\n\t\t\tupdateInterestOps();\n\t\t}", "private int castingRead(byte[] outputBuf, int off, int len)\n throws IOException {\n if (charBuffer == null) {\n charBuffer = new char[DEFAULT_BUFFER_CAPACITY];\n }\n if (len > DEFAULT_BUFFER_CAPACITY) {\n len = DEFAULT_BUFFER_CAPACITY;\n }\n int numRead = in.read(charBuffer, 0, len);\n for (int ix=0; ix<numRead; ix++) {\n outputBuf[off+ix] = (byte)charBuffer[ix];\n }\n return numRead;\n }", "public abstract int process(Buffer input, Buffer output);", "public void setRead(boolean read)\n\t{\n\t\tthis.read = read;\n\t}", "private static void read(int r, int c) throws IOException {\n\t\tinit(r, c);\r\n\t\tfor (int i = 0; i < r; ++ i) {\r\n\t\t\tmapData[ i ] = next();\r\n\t\t}\r\n\t\tint si = nextInt();\r\n\t\tint sj = nextInt();\r\n\t\tint ti = nextInt();\r\n\t\tint tj = nextInt();\r\n\t\t\r\n\t\tastar(r, c, si, sj, ti, tj);\r\n\t\t\r\n//\t\tcin.close();\r\n\t}", "public void receiveData() throws IOException;", "protected void writeRead ()\n {\n stream.println (\" public void _read (org.omg.CORBA.portable.InputStream i)\");\n stream.println (\" {\");\n if (entry instanceof ValueBoxEntry)\n {\n TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;\n SymtabEntry mType = member.type ();\n if (mType instanceof StringEntry)\n stream.println (\" value = i.read_string ();\");\n\n else if (mType instanceof PrimitiveEntry)\n stream.println (\" value = \" + helperClass + \".read (i).value;\");\n\n else\n stream.println (\" value = \" + helperClass + \".read (i);\");\n }\n else\n stream.println (\" value = \" + helperClass + \".read (i);\");\n stream.println (\" }\");\n stream.println ();\n }", "int read(long pos, byte[] buf)throws IOException;", "private final byte[] readBuffer( int size ) throws IOException {\n byte[] buffer = new byte[ size ];\n\n int read = 0;\n while ( read < size ) {\n int next = dataSource.read( buffer, read, size - read );\n if ( next < 0 ) throw new IOException( \"End of Stream\" );\n read += next;\n\t}\n return buffer;\n }", "public void run() {\n\n do {\n\n ByteBuffer byteBuffer = (ByteBuffer) slist[0];\n slist = (Object[]) slist[1];\n if (0 == bufsize) {\n if (null == slist) {\n buffer = byteBuffer;\n break;//optimization\n }\n linkedList = new LinkedList<ByteBuffer>();\n }\n bufsize += byteBuffer.limit();\n linkedList.addFirst(byteBuffer);\n\n } while (null != slist);\n\n if (null == buffer) {\n buffer = ByteBuffer.allocateDirect(bufsize);\n\n for (ByteBuffer netBuffer : linkedList) {\n buffer.put(netBuffer);\n }\n }\n\n buffer.rewind();\n System.err.println(\"MsgSize: \" + buffer.limit());\n int i = ENDL.length - 1;\n byte b1 = ENDL[i];\n do {\n ByteBuffer b = buffer.slice();\n while (b.hasRemaining() && b.get() != b1);\n b.flip();\n Integer integer = Integer.valueOf(UTF8.decode(b).toString().trim(), 0x10);\n System.err.println(\"RecordSize: \" + integer);\n buffer = ((ByteBuffer) buffer.position(b.limit())).slice();\n ByteBuffer handoff = (ByteBuffer) buffer.slice().limit(integer);\n final String trim = UTF8.decode(handoff).toString().trim();\n // System.err.println(\"RecordId: \" + trim);\n final LinkedHashMap couchChange = CouchDriver.GSON.fromJson(trim, LinkedHashMap.class);\n\n EXECUTOR_SERVICE.submit(getDocUpdateHandler(couchChange));\n buffer.position(handoff.limit() + ENDL.length);\n buffer = buffer.slice();\n } while (buffer.hasRemaining());\n }", "public synchronized static void readFlash(Context context, ByteBuffer buffer, int addr, int len) {\n byte[] flashData = null;\n\n File dir = context.getFilesDir();\n File targetFile = new File(dir.getAbsolutePath() + File.separator + FILE_NAME);\n\n try {\n if (!targetFile.exists()) {\n flashData = new byte[DATA_LEN];\n for (int i = 0; i < flashData.length; i++) {\n flashData[i] = (byte) 0xFF;\n }\n targetFile.createNewFile();\n FileOutputStream fos = new FileOutputStream(targetFile);\n fos.write(flashData);\n fos.flush();\n fos.close();\n } else {\n InputStream stream = new FileInputStream(targetFile);\n int length = stream.available();\n flashData = new byte[length];\n stream.read(flashData);\n stream.close();\n }\n } catch (IOException e) {\n }\n// TelinkLog.e(\"readFlash -- flashData capacity:\" + flashData.length + \" -- addr:\" + addr + \" -- len:\" + len);\n byte[] result = new byte[len];\n System.arraycopy(flashData, addr, result, 0, len);\n buffer.position(0);\n// buffer.\n buffer.put(result);\n// TelinkLog.e(\"########## buffer.capacity: \" + buffer.capacity());\n byte data0 = buffer.get(0);\n// TelinkLog.e(\"########## buffer.get(0): \" + buffer.get(0));\n\n// return flashData;\n }" ]
[ "0.5995053", "0.5957478", "0.595645", "0.5910929", "0.5903501", "0.58859795", "0.585422", "0.5734561", "0.5615145", "0.5597771", "0.55147946", "0.54674304", "0.543328", "0.5384637", "0.53670156", "0.5349019", "0.53483176", "0.53114057", "0.53042156", "0.5275469", "0.526068", "0.52581376", "0.5257035", "0.52253455", "0.5213252", "0.5213167", "0.5205272", "0.5188368", "0.5171969", "0.51713973", "0.5166195", "0.51549363", "0.51514506", "0.5145897", "0.5142716", "0.51394564", "0.5113571", "0.5093641", "0.50780404", "0.50748146", "0.5065175", "0.5062972", "0.5061837", "0.50609255", "0.5042922", "0.50353265", "0.5027149", "0.5025763", "0.5020049", "0.5019795", "0.50122106", "0.50017893", "0.4992059", "0.49872565", "0.49843684", "0.49698406", "0.49616262", "0.4961228", "0.4948467", "0.49469602", "0.49355826", "0.4934205", "0.4915869", "0.49137524", "0.49134067", "0.49106768", "0.49067968", "0.490363", "0.49025238", "0.49011624", "0.4897342", "0.48798048", "0.48790032", "0.48697814", "0.48664263", "0.48626843", "0.48624638", "0.48577583", "0.4852376", "0.48459497", "0.48444837", "0.48422083", "0.48375943", "0.48375574", "0.48371047", "0.48303476", "0.48236573", "0.4822177", "0.48206672", "0.48201743", "0.48192278", "0.48146027", "0.48105422", "0.48080397", "0.4806946", "0.48063123", "0.4788602", "0.47875705", "0.4785925", "0.47845417" ]
0.5655635
8
Process the content of bbin The convention is that bbin is in writemode before the call to process and after the call
private void processIn() { if (state != State.ESTABLISHED) { bbin.flip(); if (bbin.get() != 10) { silentlyClose(); return; } else { state = State.ESTABLISHED; } bbin.compact(); } else { switch (intReader.process(bbin)) { case ERROR: return; case REFILL: return; case DONE: var size = intReader.get(); bbin.flip(); var bb = ByteBuffer.allocate(size); for (var i = 0; i < size; i++) { bb.put(bbin.get()); } System.out.println(UTF.decode(bb.flip()).toString()); bbin.compact(); intReader.reset(); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processIn() throws IOException {\n for (; ; ) {\n var status = fr.process(bbin);\n switch (status) {\n case ERROR:\n silentlyClose();\n return;\n case REFILL:\n return;\n case DONE:\n Frame frame = fr.get();\n fr.reset();\n treatFrame(frame);\n break;\n }\n }\n }", "@Override\r\n\tpublic void process() {\n\t\tSystem.out.println(\"this is singleBOx \" + this.toString());\r\n\t}", "public void transformBinary(PENDataElement penElement) throws Exception {\n SourceDataElement srcDataElement = this.lookupSourceDataElement(getCurrentItem());\n TxDataElement txDataElement = this.lookupTxDataElement(getCurrentItem());\n Collection binaries = srcDataElement.getBinaryCollection();\n if(null== binaries || binaries.size() <1) return;\n txDataElement.getBinaryFiles().addAll(binaries);\n }", "public void setBin(final ByteArray bin) {\n this.bin = bin;\n }", "public void setBin(java.lang.String bin) {\r\n this.bin = bin;\r\n }", "@Override\n protected int processBins(final ProcessContext context, final ProcessSessionFactory sessionFactory) {\n final Queue<Bin> readyBins = getReadyBins();\n if (readyBins.size() <= 1) {\n return super.processBins(context, sessionFactory);\n }\n\n final ComponentLog logger = getLogger();\n int binsProcessed = 0;\n long bytesProcessed = 0L;\n\n final ProcessSession batchSession = sessionFactory.createSession();\n\n Bin bin;\n while (isScheduled() && (bin = readyBins.poll()) != null) {\n long binBytes = 0L;\n for (final FlowFile flowFile : bin.getContents()) {\n binBytes += flowFile.getSize();\n }\n\n BinProcessingResult binProcessingResult;\n try {\n binProcessingResult = this.processBin(bin, context);\n } catch (final ProcessException e) {\n logger.error(\"Failed to process bundle of {} files due to {}\", new Object[] {bin.getContents().size(), e});\n\n final ProcessSession binSession = bin.getSession();\n for (final FlowFile flowFile : bin.getContents()) {\n binSession.transfer(flowFile, REL_FAILURE);\n }\n binSession.commitAsync();\n continue;\n } catch (final Exception e) {\n logger.error(\"Failed to process bundle of {} files due to {}; rolling back sessions\", new Object[] {bin.getContents().size(), e});\n\n bin.getSession().rollback();\n continue;\n }\n\n // If this bin's session has been committed, move on.\n if (!binProcessingResult.isCommitted()) {\n final ProcessSession binSession = bin.getSession();\n bin.getContents().forEach(ff -> binSession.putAllAttributes(ff, binProcessingResult.getAttributes()));\n binSession.transfer(bin.getContents(), REL_ORIGINAL);\n\n // Migrate FlowFiles to our batch session. Then commit the bin session to free up any resources\n binSession.migrate(batchSession);\n binSession.commitAsync();\n }\n\n binsProcessed++;\n bytesProcessed += binBytes;\n\n // Every 100 bins or 5 MB of input, commit the session\n if (binsProcessed % 100 == 0 || bytesProcessed > 5_000_000L) {\n batchSession.commitAsync();\n break;\n }\n }\n\n batchSession.commitAsync();\n return binsProcessed;\n }", "void flushBf()\n {\n if (components.contains(Component.FILTER))\n {\n File path = descriptor.fileFor(Component.FILTER);\n try (SeekableByteChannel fos = Files.newByteChannel(path.toPath(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE);\n DataOutputStreamPlus stream = new BufferedDataOutputStreamPlus(fos))\n {\n // bloom filter\n BloomFilter.serializer.serialize((BloomFilter) bf, stream);\n stream.flush();\n SyncUtil.sync((FileChannel) fos);\n }\n catch (IOException e)\n {\n throw new FSWriteError(e, path);\n }\n }\n }", "public void decodeBX() throws Exception {\r\n\t\tLog.p(tag, \"Decode Binary XML...\");\r\n\t\tLog.d(tag, \"Number of Binary XML files: \"+ xmlFiles.size());\r\n\t\tLog.d(tag, \"-> \"+ xmlFiles);\r\n\t\t\r\n\t\t\r\n\t\t// Convert WBXML to XML\r\n\t\t/*\r\n\t\t * aapt (Android Assents Packaging Tool) converts XML files to Android Binary XML. It is not same as\r\n\t\t * WBXML format.\r\n\t\t */\r\n\t\tfor(int i=0; i<xmlFiles.size(); i++)\r\n\t\t{\r\n\t\t\tLog.p(tag, \"XML File: \"+ xmlFiles.get(i));\r\n\t\t\t\r\n\t\t\t// 23rd March, 2012. Prasanta. \r\n\t\t\t// Skip exception while parsing any file and complete the complete parsing cycle.\r\n\t\t\tAndroid_BX2 abx2;\r\n\t\t\ttry{\r\n\t\t\t\tabx2 = new Android_BX2(new GenXML());\r\n\t\t\t\tabx2.parse(xmlFiles.get(i));\r\n\t\t\t\t\r\n\t\t\t}catch(Exception ex){\r\n\t\t\t\tLog.e(tag, \"Fail to parse - \"+ xmlFiles.get(i), ex);\r\n\t\t\t}\r\n\t\t\tfinally{\r\n\t\t\t\tabx2 = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract void outputBmp(FastStringBuffer buf);", "public int process(Buffer in, Buffer out) {\n\t\t\taccessFrame(in);\r\n\r\n\t\t\t// Swap the data between the input & output.\r\n\t\t\tObject data = in.getData();\r\n\t\t\tin.setData(out.getData());\r\n\t\t\tout.setData(data);\r\n\r\n\t\t\t// Copy the input attributes to the output\r\n\t\t\tout.setFormat(in.getFormat());\r\n\t\t\tout.setLength(in.getLength());\r\n\t\t\tout.setOffset(in.getOffset());\r\n\r\n\t\t\treturn BUFFER_PROCESSED_OK;\r\n\t\t}", "@Override\r\n\tpublic void process() {\n\t\tSystem.out.println(\"this is CompositeBOx \" + this.toString());\r\n\t\tfinal Iterator it = mBoxList.iterator();\r\n\t\twhile(it.hasNext())\r\n\t\t{\r\n\t\t\tIBox box = (IBox)it.next();\r\n\t\t\tbox.process();\r\n\t\t}\r\n\t}", "public ByteArray getBin() {\n return bin;\n }", "public void process() {\n cycleID.incrementAndGet();\r\n List<ChunkBB> chunkbbs;\r\n synchronized (loadedChunks) {\r\n chunkbbs = new LinkedList<>(loadedChunks);\r\n }\r\n\r\n Condition cond = chunkbbs.stream().map(\r\n b -> GAIA_STATES.WORLD_UUID.eq(b.getWorld())\r\n .and(GAIA_STATES.X.gt(b.getX() * 16))\r\n .and(GAIA_STATES.Z.gt(b.getZ() * 16))\r\n .and(GAIA_STATES.X.le(b.getX() * 16 + 16))\r\n .and(GAIA_STATES.Z.le(b.getZ() * 16 + 16))\r\n ).reduce(DSL.falseCondition(), (a, b) -> a.or(b));\r\n\r\n Gaia.DBI().submit((conf) -> {\r\n DSLContext ctx = DSL.using(conf);\r\n ctxref.set(ctx);\r\n ReturnContainer rec;\r\n\r\n while ((rec = input.poll()) != null) {\r\n switch (rec.getState()) {\r\n case DELETE:\r\n LOG.fine(\"[\" + cycleID + \"]Deleting:\\n\" + rec);\r\n ctx.executeDelete(rec.getRec());\r\n break;\r\n case UPDATE:\r\n try {\r\n LOG.fine(\"[\" + cycleID + \"]Updating:\\n\" + rec);\r\n ctx.executeUpdate(rec.getRec());\r\n } catch (Exception e) {\r\n LOG.log(Level.SEVERE, \"[\" + cycleID + \"]Failed to update record.\\n\" + rec.getRec(), e);\r\n }\r\n break;\r\n default:\r\n LOG.severe(\"[\" + cycleID + \"]Failed to process record.\\n\" + rec.getRec() + \"\\nUnknown state: \" + rec.getState());\r\n }\r\n }\r\n if (output.isEmpty()) {\r\n List<GaiaStatesRecord> recs = ctx\r\n .selectFrom(GAIA_STATES)\r\n .where(GAIA_STATES.TRANSITION_TIME.lt(new Timestamp(System.currentTimeMillis())))\r\n .and(cond)\r\n .fetch();\r\n if (!recs.isEmpty()) {\r\n LOG.fine(\"Adding \" + recs.size() + \" records to output queue.\");\r\n output.addAll(recs);\r\n }\r\n }\r\n ctxref.set(null);\r\n });\r\n }", "@ReflectiveMethod(name = \"b\", types = {NMSNBTTagCompound.class})\n public void b(NMSNBTTagCompound nBTTagCompound){\n NMSWrapper.getInstance().exec(nmsObject, nBTTagCompound);\n }", "public abstract int process(Buffer input, Buffer output);", "@Override\n\tpublic void processData() {\n\t\t\n\t}", "public abstract void inClassOutputBmp(FastStringBuffer buf);", "private void processBuffer(boolean flushBuffer, boolean endOfInput) throws IOException {\n decodeBuffer(flushBuffer || endOfInput);\n if (!endOfInput && !flushBuffer && cb.position() < PROCESS_THRESHOLD) {\n return;\n }\n cb.flip();\n found = SubstituteUtil.processSubstitute(cb, substitute, endOfInput, outputCharset, stream);\n // Write the tail bytes in the byte buffer if required\n if (bb.position() > 0 && (found || endOfInput)) {\n bb.flip();\n while (bb.hasRemaining()) {\n stream.write(bb.get());\n }\n bb.clear();\n }\n }", "public int processBlock(byte[] in, int inOff, byte[] out, int outOff) {\n\t}", "public void process(Bitmap bitmap) {\n this.bitmap = getCompressedBitmap(bitmap);\n execute();\n }", "public abstract void outputComplementBmp(FastStringBuffer buf);", "@Override\n public void run () {\n try {\n int i = 0;\n String tupleString = this.inReadEnds[i].getNextString();\n while (tupleString != null && i < this.inReadEnds.length - 1){\n BMap tempStore = BMap.makeBMap(tupleString);\n mapStore = BMap.or(mapStore, tempStore);\n i++;\n tupleString = this.inReadEnds[i].getNextString();\n }\n \n BMap tempStore = BMap.makeBMap(tupleString);\n this.mapStore = BMap.or(mapStore, tempStore);\n \n this.outWriteEnd.putNextString(mapStore.getBloomFilter());\n this.outWriteEnd.close();\n } \n catch (Exception e) {\n ReportError.msg(this.getClass().getName() + \" \" + e);\n }\n }", "protected void drawBin (Graphics g, int binNo, int ct) {\n int height = parent.getHistHeight (ct);\n if (height == 0) height = 1;\n if (height > (_yPix - 3 * parent.lineSize)) height = _yPix - 3 * parent.lineSize;\n \n int d = (int)Math.rint ((binNo * _xPix) / ((double)parent.numBins));\n \n if (d >= _xPix) d = _xPix - 1;\n int x1 = d;\n \n int e = (int)Math.rint (((binNo + 1) * _xPix) / ((double)parent.numBins));\n\n int x2 = e;\n \n int width = x2 - x1;\n if (width == 0) width = 1;\n \n int y = _yPix - 3 * parent.lineSize - height;\n \n g.setColor (parent.stateDef.color);\n g.fillRect (x1, y, width, height);\n }", "@Override\r\n\tpublic String process(HttpServletRequest request, HttpServletResponse response) {\n\t\t\r\n\t\tBDao bdao = new BDao();\r\n\t\t\r\n\t\tint ridx = Integer.parseInt(request.getParameter(\"ridx\"));\r\n\t\tint bidx = Integer.parseInt(request.getParameter(\"bidx\"));\r\n\t\t\r\n\t\tbdao.delReply(ridx);\r\n\t\t\r\n\t\treturn \"board?cmd=bread&idx=\"+bidx;\r\n\t}", "protected abstract void splitBAMs();", "@Override\n protected void onBinaryMessage(ByteBuffer byteBuffer) throws IOException {\n System.out.println(\"Binary\");\n throw new UnsupportedOperationException(\"not supported binary messages\");\n }", "@Override\n\tpublic void visit(BitField bf) {\n\t\tSystem.out.println(\"process bitfield\");\n\t\tpieces = new ArrayList<Integer>();\n\t\tbyte[] body = bf.getBody();\n\t\t// boucle afficher body\n\t\t/*\n\t\t * byte b, mask2 = 0x01; for (int i = 0; i < body.length; i++) { b =\n\t\t * body[i]; for (int j = 0; j < 8; j++) { if ((b & mask2) == 0) {\n\t\t * System.out.println(0); } else { System.out.println(1); } } }\n\t\t */\n\t\t// boucle afficher body\n\t\tint mask;\n\t\tfor (int i = 0; i < body.length; i++) {\n\t\t\tmask = body[i];\n\t\t\tfor (int j = 0; j < 8; j++) {\n\t\t\t\tif ((mask & 0x80) != 0) {\n\t\t\t\t\tpieces.add(j + (i * 8));\n\t\t\t\t}\n\t\t\t\tmask = mask << 1;\n\t\t\t}\n\t\t}\n\t\tph.setPeerPieces(pieces);\n\t\tSystem.out.println(pieces.size());\n\t\t// for(Integer i : pieces) {\n\t\t// System.out.println(\"bitfield : \" + i);\n\t\t// }\n\t\tSystem.out.println(\"taille bitfield : \" + pieces.size());\n\t}", "private void processInput(byte b) throws IOException {\n\t\ttry {\n\t\t\tProtocol protocol = Protocol.fromValue(b);\n\t\t\tprocessInput(protocol);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tlogger.catching(e);\n\t\t}\n\t}", "public abstract byte[] renderBinary(VirtualDocument document)\n\t\t\tthrows RenderingException;", "protected void DoGibbsSampling(){\n\t\twhile (gibbs_sample_num <= num_gibbs_total_iterations){\t\t\t\n\t\t\tDoOneGibbsSample();\n\t\t\t//now flush the previous previous gibbs sample to not leak memory\n\t\t\tFlushDataForSample(gibbs_samples_of_bart_trees[gibbs_sample_num - 1]);\n\t\t\t//keep one previous for interaction constraints\n//\t\t\tif (gibbs_sample_num > 1) {\n//\t\t\t\tFlushDataForSample(gibbs_samples_of_bart_trees[gibbs_sample_num - 2]);\n//\t\t\t}\t\t\t\n\t\t\tDeleteBurnInsOnPreviousSamples();\n\t\t\tgibbs_sample_num++;\n\t\t}\n\t}", "public java.lang.String getBin() {\r\n return bin;\r\n }", "void addGeneralBloomFilter(BloomFilterWriter bfw);", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void feed(byte[] bArr) {\n synchronized (this) {\n if (this.b != null) {\n this.b.a(bArr);\n }\n }\n }", "@Override\n public synchronized void flushBin(Empty request, StreamObserver<OperationStatusResponse> responseObserver) {\n bin.flush();\n notifyObservers();\n responseObserver.onNext(OperationStatusResponse.newBuilder()\n .setResult(OperationStatusResponse.OperationStatus.SUCCESS).build());\n responseObserver.onCompleted();\n }", "private void addBinaryData(Document doc, OutputStream out, String tempDir) throws TransformerException {\n InputStream xsl = Thread.currentThread().getContextClassLoader()\n .getResourceAsStream(\"data/xslt/bytestreams.xsl\");\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n Transformer transformer = transformerFactory.newTransformer(new StreamSource(xsl));\n transformer.setParameter(\"tempDir\", tempDir);\n\n Source xmlSource = new DocumentSource(doc);\n\n Result outputTarget = new StreamResult(out); // new\n // FileWriter(outFile));\n\n log.debug(\"starting bytestream transformation ...\");\n transformer.transform(xmlSource, outputTarget);\n log.debug(\"FINISHED bytestream transformation!\");\n }", "public void barrBMaker(int rowNum, int columnNum){\n \tfor (int i=0;i<rowNum;i++){\n \t\tfor (int j=0;j<columnNum;j++){\n \t\t\tBarrierBlock barrblock= new BarrierBlock(barrx+i*(barrw/rowNum),barry+j*(barrh/rowNum),barrw/rowNum,barrh/columnNum);\n \t\t\tbarrBList.add (barrblock);\n \t\t}\n \t}\n }", "public void binMasses()\n\t{\n\t\t//Create arrays\n\t\tcreateBins(calcArraySize(massBinSize,minMass, maxMass));\n\n\t\t//Check if any spectra from each polarity has been created\n\t\tif (librarySpectra.size()>0)\n\t\t{\n\t\t\t//Populate count array to correctly initialize array size for positive library spectra\n\t\t\tfor (int i=0; i<librarySpectra.size(); i++)\n\t\t\t{\n\t\t\t\tcountBin[findBinIndex(librarySpectra.get(i).precursor,massBinSize,minMass)] ++;\n\t\t\t}\n\t\t\tupdateProgress(17,\"% - Creating Composite Library\",true);\n\n\t\t\t//Use count bin to initialize new arrays to place positive spectra into hash table\n\t\t\tfor (int i=0; i<countBin.length; i++)\n\t\t\t{\n\t\t\t\tmassBin[i] = new LibrarySpectrum[countBin[i]];\n\t\t\t}\n\t\t\tupdateProgress(33,\"% - Creating Composite Library\",true);\n\n\n\t\t\t//Populate spectrum arrays for positive spectra\n\t\t\tfor (int i=0; i<librarySpectra.size(); i++)\n\t\t\t{\n\t\t\t\tmassBin[findBinIndex(librarySpectra.get(i).precursor,massBinSize,minMass)]\n\t\t\t\t\t\t[addedBin[findBinIndex(librarySpectra.get(i).precursor,massBinSize,minMass)]] = librarySpectra.get(i);\n\t\t\t\taddedBin[findBinIndex(librarySpectra.get(i).precursor,massBinSize,minMass)]++;\n\t\t\t}\n\t\t\tupdateProgress(50,\"% - Creating Composite Library\",true);\n\t\t}\n\t}", "public abstract void onBinaryReceived(byte[] data);", "private void processNode(BranchNode bn, Grid[][] map) {\n\t\tif (bn.leaf_alive) {\r\n\t\t\tfor (int i = 0; i < leaf_size; i++) {\r\n\t\t\t\tint l = bn.x + i - leaf_size / 2;\r\n\t\t\t\tif (l >= 0 && l < World.WORLD_WIDTH) {\r\n\t\t\t\t\thealth += map[l][bn.y].sunlight;\r\n\t\t\t\t\tmap[l][bn.y].sunlight -= World.LEAF_BLOCK;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Kill Leaf if the leaf is too old\r\n\t\t\tbn.leaf_age += 1;\r\n\t\t\tif (bn.leaf_age >= LEAF_LIFETIME) {\r\n\t\t\t\tbn.killLeaf(this, map);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// If I really want to be safe, I should put a check for if bn.children.size() > 0\r\n\t\t// But the for loop here checks it for me already.\r\n\t\tfor (int i = 0; i < bn.children.size(); i++) {\r\n\t\t\tprocessNode(bn.children.get(i), map);\r\n\t\t}\t\t\r\n\t}", "public int onBytes(byte[] b) {\n synchronized (this) {//ensure block is not interleaved with new input on other threads.\n int accum = 0;\n for (byte item : b) {//#PRESERVE order!\n accum = onByte(item & 255);//lookahead is of bytes alone, no codes will be mebedded\n }\n return accum;\n }\n }", "public void binToDec(){\n\t\tthis.inputBin();\n\t\tif(checkValue()==true){\n\t\t\tthis.toDec();\n\t\t\tthis.outDec();\n\t\t}\n\t}", "public RealBuffer process( RealBuffer buffer )\n\t{\n\t\tfloat[] samples = buffer.getSamples();\n\n\t\tfor( int x = 0; x < samples.length; x++ )\n\t\t{\n\t\t\tsamples[ x ] = process( samples[ x ] );\n\t\t}\n\t\t\n\t\treturn new RealBuffer( samples );\n\t}", "public void process() {\n\t}", "BOp createBOp();", "protected void update(byte[] b) {\n/* 49 */ update(b, 0, b.length);\n/* */ }", "public void setBinmode() {\n }", "public void openBoB() {\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t\tif (summonedFamiliar.familiarType == FamiliarType.BOB) {\n\t\t\t\tshift();\n\t\t\t\tif (c.getOutStream() != null && c != null) {\n\t\t\t\t\tc.getItems().resetItems(24002, burdenedItems);\n\t\t\t\t\tc.flushOutStream();\n\t\t\t\t}\n\t\t\t\tc.getItems().resetItems(24006);\n\t\t\t\tc.getOutStream().createFrame(248);\n\t\t\t\tc.getOutStream().writeWordA(24000);\n\t\t\t\tc.getOutStream().writeWord(24005);\n\t\t\t\tc.flushOutStream();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void write(byte[] b_array) throws IOException {\n int i;\n int flag = 1;\n int my_decimal1=0;\n for (i = 0; i < 12; i++) {\n out.write(b_array[i]);\n }\n //write to output stream the rest of the bytearray's size - division 8\n int rest = (b_array.length - 12) % 8;\n out.write((byte) rest);\n\n\n while (i < b_array.length) {\n //start to count the number of 0\n if (i < b_array.length - rest) {\n for (int j = 0; j < 8; j++) {\n //check if we not in the rest part of the byte array\n if (i < b_array.length - rest) {\n //my_str = String.valueOf((int)b_array[i]);\n my_decimal1 += (int)b_array[i]*(Math.pow(2, j));\n i++;\n }\n else {\n flag = 0;\n break;\n }\n }\n }\n else{\n flag=0;\n }\n //if the for loop finish without break;\n if (flag == 1) {\n out.write((byte) my_decimal1);\n my_decimal1 = 0;\n }\n else {\n out.write(b_array[i]);\n i++;\n }\n }\n\n //>>\n\n\n }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public final void mB() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:528:11: ( ( 'b' | 'B' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:528:13: ( 'b' | 'B' )\n {\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public BbsOperation () {\r\n\t\tsuper();\r\n\t}", "static void readWrites(FileInputStream raf,BufferedOutputStream bw, int numBytes,int indice) throws IOException {\n\n // System.out.println(\"frag num \"+ indice +\" Envoyé\");\n int nbsousfrag = numBytes/taillesousfrag; \n System.out.println(\"nombre des sous fragements : \" + nbsousfrag);\n int sousfragrest = numBytes % taillesousfrag;\n System.out.println(sousfragrest);\n for (int i=0; i < nbsousfrag; i++) { \n\t readWrite(raf,bw, taillesousfrag);\n \t System.out.println(\"sous frag num \"+ i +\" Envoyé\");\n\t}\n if (sousfragrest != 0) {\n\t\treadWrite(raf,bw, sousfragrest);\t\n\t}\n\n}", "public void bufferingState(){\n\t\twhile ( buffer.isBufferUnderRun() ){\n\t\t\t/** Do not leave the while loop with nothing, it will increase the CPU usage 25% */\n\t\t\ttry {Thread.sleep(1);\n\t\t\t} catch (InterruptedException ex) {}\n\t\t} \n\t}", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public void process() {\r\n String marbleClone = INTL_NODE.get1stOutMarble();\r\n TMNL_NODE.addInMarble(marbleClone);\r\n }", "public void run() {\n\t\t\ttry {\n\t\t\t\tfinal List<BusItem> items;\n\t\t\t\titems = LocationParser.parse(BlueBus.this);\n\t\t\t\tmapItemOverlay.updateBuses(items);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t\n\t\t\t}\n\t\t}", "@Override\n\tpublic void visit(SendBlock sb) {\n\t\tSystem.out.println(\"SendBlock reću\");\n\t\tbyte[] body = sb.getBody();\n\t\tbyte[] indexB = new byte[4], beginB = new byte[4];\n\t\tTorrent torrent = ph.getTorrent();\n\t\tint index = 0, begin = 0;\n\t\tbyte[] block = new byte[sb.length - 9];\n\n\t\tindexB = Arrays.copyOfRange(body, 0, 4);\n\t\tindex = byteArrayToInt(indexB);\n\n\t\tbeginB = Arrays.copyOfRange(body, 4, 8);\n\t\tbegin = byteArrayToInt(beginB);\n\n\t\tblock = Arrays.copyOfRange(body, 8, body.length);\n\n\t\tPiece piece = torrent.getPieces().get(index);\n\t\tpiece.feed(begin, block);\n\t\tSystem.out.println(\"piece fed\");\n\t\tif (piece.getChecked()) {\n\t\t\tHave h = new Have(indexB);\n\t\t\tthis.ph.addMessageQueue(h);\n\t\t\tSystem.out.println(\"have envoye, block bien reću\");\n\t\t}\n\t}", "public void handle(PBFTBag bag){\n\n JDSUtility.debug(\"[PBFTServer:handle(bag)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", received \" + bag);\n\n if(isValid(bag)){\n int f = getServiceBFTResilience();\n JDSUtility.debug(\"[PBFTServer:handle(bag)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", is going to processing \" + bag);\n for(IMessage m: bag.getMessages()){\n\n if(m instanceof PBFTRequest){\n\n PBFTRequest r = (PBFTRequest) m;\n \n if(!getRequestInfo().hasRequest(r)){\n handle(r);\n }\n\n }\n\n if(m instanceof PBFTPrePrepare){\n PBFTPrePrepare pp = (PBFTPrePrepare) m;\n if(!getPrePrepareInfo().contains(pp)) {\n handle(pp);\n }\n }\n\n if(m instanceof PBFTPrepare){\n PBFTPrepare p = (PBFTPrepare) m;\n if(!getPrepareInfo().contains(p)){\n handle(p);\n }\n }\n\n if(m instanceof PBFTCommit){\n PBFTCommit c = (PBFTCommit) m;\n if(!getCommitInfo().contains(c)){\n handle(c);\n }\n }\n \n if(m instanceof PBFTCheckpoint){\n handle((PBFTCheckpoint)m);\n }\n\n if(m instanceof PBFTNewView){\n handle((PBFTNewView)m);\n }\n\n if(m instanceof PBFTChangeView){\n handle((PBFTChangeView)m);\n }\n\n if(m instanceof PBFTChangeViewACK){\n handle((PBFTChangeViewACK)m);\n }\n }\n }\n }", "public void baocun() {\n\t\t\n\t}", "BElementStructure createBElementStructure();", "public void setBh(Integer bh) {\r\n this.bh = bh;\r\n }", "public Binary(PrintWriter pw){\n\t\tthis.pw = pw;\n\t\tbinary = null;\n\t}", "public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n closed = true;\n }\n processIn();\n updateInterestOps();\n }", "@Override\n\tpublic String setBinContents(ByteBuffer fileBytes, byte[] container) {\n\t\tfileBytes.get(container);\n\t\treturn Arrays.toString(container);\n\t}", "private void processSuperHighValue(Bid bid) {\n\t}", "public final void entryRuleBSOperation() throws RecognitionException {\n try {\n // InternalBSQL2Java.g:204:1: ( ruleBSOperation EOF )\n // InternalBSQL2Java.g:205:1: ruleBSOperation EOF\n {\n before(grammarAccess.getBSOperationRule()); \n pushFollow(FOLLOW_1);\n ruleBSOperation();\n\n state._fsp--;\n\n after(grammarAccess.getBSOperationRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }", "private void enableBtmon() {\n System.out.println(\"Starting Btmon Service...\");\n try {\n btmonProcess = new ProcessBuilder(\"/usr/bin/btmon\").start();\n InputStreamReader inputStream = new InputStreamReader(btmonProcess.getInputStream());\n int size;\n char buffer[] = new char[1024];\n while ((size = inputStream.read(buffer, 0, 1024)) != -1) {\n // System.out.println(\" --- Read ----\");\n String data = String.valueOf(buffer, 0, size);\n processBeaconMessage(data);\n // Thread.sleep(1000);\n }\n } catch (IOException ex ) {\n ex.printStackTrace();\n } catch (Exception ex ) {\n ex.printStackTrace();\n } finally {\n if (btmonProcess != null)\n btmonProcess.destroy();\n }\n }", "public abstract boolean process(byte[] input, int offset, int len, boolean finish);", "void run(int size, byte b);", "private interface BinVisitor {\n /** @return true if something has been removed from the bin. */\n abstract boolean visit(TIntList bin, long mapKey);\n }", "private void notifyOnBinaryReceived(byte[] data) {\n synchronized (globalLock) {\n if (isRunning) {\n onBinaryReceived(data);\n }\n }\n }", "public synchronized void b() {\n if (!this.c && n.isFinished() && l.isFinished() && m.isFinished() && k.isFinished() && j.isFinished() && i.isFinished() && h.isFinished()) {\n this.c = true;\n }\n if (this.c && this.b) {\n LocalBroadcastManager.getInstance(AppApplication.getInstance()).sendBroadcast(new Intent().setAction(WxNotifyRefrshReceiver.b).putExtra(CleanSwitch.CLEAN_DATA, WxNotifyRefrshReceiver.c));\n }\n }", "public int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws IllegalStateException;", "public FeedBinServiceImpl(Bin bin) {\n this.bin = bin;\n this.observers = ConcurrentHashMap.newKeySet();\n }", "private void passB() {\n // PROGRAM 1: Student must complete this method\n //place inputB data into output\n for (int i = 0; i < output.length; i++) {\n output[i] = inputB[i];\n }\n }", "@Override\r\n\tpublic void visit(ParkB parkB) {\n\t\t\r\n\t}", "@Override\n public synchronized void inspectBin(Empty request, StreamObserver<BinStatusUpdate> responseObserver) {\n responseObserver.onNext(buildNewStatus());\n responseObserver.onCompleted();\n }", "public static ArrayList < ArrayList < Double >> binPack(double weight[], int n, double bin_cap) { \r\n int binCount = 0;\r\n int k = 0;\r\n double[] bin_space = new double[n];\r\n\r\n ArrayList < Integer > bin = new ArrayList < Integer > ();\r\n ArrayList < Double > val = new ArrayList < Double > ();\r\n ArrayList < ArrayList < Double >> binVal = new ArrayList < ArrayList < Double >> ();\r\n binVal.add(k, new ArrayList < Double > ());\r\n System.out.println(\".......Commencing Calculation...........\\n\");\r\n startTime = System.nanoTime();\r\n for (int i = 0; i < n; i++) {\r\n int j;\r\n for (j = 0; j < binCount; j++) {\r\n \r\n if (bin_space[j] >= weight[i]) {\r\n bin_space[j] = bin_space[j] - weight[i];\r\n //val.add(weight[i]);\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + j + \" took in weight \" + weight[i]);\r\n break;\r\n }\r\n \r\n }\r\n System.out.println(\"*Bad fit for next weight size \"+ weight[i]+ \r\n \"\\n\\n ***NEW BIN CREATED***\\n\");\r\n if (j == binCount) {\r\n \r\n bin_space[binCount] = bin_cap - weight[i];\r\n //val.add(weight[i]);\r\n binCount++;\r\n //k++;\r\n bin.add(j);\r\n binVal.add(j, new ArrayList < Double > ());\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + k + \" took in weight **\" + weight[i]);\r\n }\r\n } \r\n endTime = System.nanoTime();\r\n elapsedTime = (endTime- startTime);\r\n System.out.println(\"\\nBIN PACKING ALGORITHM COMPLETE\\n\");\r\n \r\n return binVal;\r\n }", "private void processToXML(StringBuffer buffer) {\n\n buffer.append(getStartElement(PROCESS));\n\n\n respValue = this.getMashupResponse().toUpperCase();\n\n buffer.append(getStartElementWithAtrribute(MASHUP, RESPONSETYPE, respValue));\n buffer.append(getStartElement(MASHUP_SQL));\n //buffer.append(XmlUtil.escapeXML(this.mashupQuery.toXMLString()));\n buffer.append(this.mashupQuery.toXMLString());\n buffer.append(getEndElement(MASHUP_SQL));\n buffer.append(getEndElement(MASHUP));\n buffer.append(getEndElement(PROCESS));\n }", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public void generateB(){\n\t\t\tfor(int i = 0;i < w.length;i++){\n\t\t\t\tb[i] = w[i].multiply(r).mod(q);\n\t\t\t}\n\t}", "@Override\n protected void onBinaryData(InputStream is) throws IOException {\n }", "@Override // c.d.a.m.w.n\n public /* bridge */ /* synthetic */ boolean b(byte[] bArr) {\n return true;\n }", "public boolean isBinary()\n {\n return false;\n }", "private void handleImage(byte[] b) throws IOException {\n Log.i(\"ScrencapHandler\",\"handleImage\");\n long utime = System.currentTimeMillis();\n byte[] unixTime = toByteArray(utime);\n int start = b.length - unixTime.length - 1; //-1 for the seqnum\n for (int i = 0; i < unixTime.length; i++) {\n b[start + i] = unixTime[i];\n }\n\n if (jitterControl.channelIsFree()) {\n int seq = jitterControl.sendt(utime, b.length);\n\n // Add seq number.\n b[b.length - 1] = (byte) seq;\n\n // Send out the data to the network.\n Log.i(\"ScrencapHandler\",\"Send out the data to the network\");\n mWebkeyVisitor.send(b);\n }\n }", "public final void mB() throws RecognitionException {\n try {\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:395:11: ( ( 'b' | 'B' ) )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:395:12: ( 'b' | 'B' )\n {\n if ( input.LA(1)=='B'||input.LA(1)=='b' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "private synchronized void parsebm() throws MessagingException {\n/* 777 */ if (this.parsed) {\n/* */ return;\n/* */ }\n/* 780 */ InputStream in = null;\n/* 781 */ SharedInputStream sin = null;\n/* 782 */ long start = 0L, end = 0L;\n/* */ \n/* */ try {\n/* 785 */ in = this.ds.getInputStream();\n/* 786 */ if (!(in instanceof java.io.ByteArrayInputStream) && !(in instanceof BufferedInputStream) && !(in instanceof SharedInputStream))\n/* */ {\n/* */ \n/* 789 */ in = new BufferedInputStream(in); } \n/* 790 */ } catch (Exception ex) {\n/* 791 */ throw new MessagingException(\"No inputstream from datasource\", ex);\n/* */ } \n/* 793 */ if (in instanceof SharedInputStream) {\n/* 794 */ sin = (SharedInputStream)in;\n/* */ }\n/* 796 */ ContentType cType = new ContentType(this.contentType);\n/* 797 */ String boundary = null;\n/* 798 */ if (!this.ignoreExistingBoundaryParameter) {\n/* 799 */ String bp = cType.getParameter(\"boundary\");\n/* 800 */ if (bp != null)\n/* 801 */ boundary = \"--\" + bp; \n/* */ } \n/* 803 */ if (boundary == null && !this.ignoreMissingBoundaryParameter && !this.ignoreExistingBoundaryParameter)\n/* */ {\n/* 805 */ throw new MessagingException(\"Missing boundary parameter\");\n/* */ }\n/* */ \n/* */ try {\n/* 809 */ LineInputStream lin = new LineInputStream(in);\n/* 810 */ StringBuffer preamblesb = null;\n/* */ \n/* 812 */ String lineSeparator = null; String line;\n/* 813 */ while ((line = lin.readLine()) != null) {\n/* */ int k;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 821 */ for (k = line.length() - 1; k >= 0; k--) {\n/* 822 */ char c = line.charAt(k);\n/* 823 */ if (c != ' ' && c != '\\t')\n/* */ break; \n/* */ } \n/* 826 */ line = line.substring(0, k + 1);\n/* 827 */ if (boundary != null) {\n/* 828 */ if (line.equals(boundary))\n/* */ break; \n/* 830 */ if (line.length() == boundary.length() + 2 && line.startsWith(boundary) && line.endsWith(\"--\")) {\n/* */ \n/* 832 */ line = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* 841 */ } else if (line.length() > 2 && line.startsWith(\"--\") && (\n/* 842 */ line.length() <= 4 || !allDashes(line))) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 850 */ boundary = line;\n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* 857 */ if (line.length() > 0) {\n/* */ \n/* */ \n/* 860 */ if (lineSeparator == null) {\n/* */ try {\n/* 862 */ lineSeparator = System.getProperty(\"line.separator\", \"\\n\");\n/* */ }\n/* 864 */ catch (SecurityException ex) {\n/* 865 */ lineSeparator = \"\\n\";\n/* */ } \n/* */ }\n/* */ \n/* 869 */ if (preamblesb == null)\n/* 870 */ preamblesb = new StringBuffer(line.length() + 2); \n/* 871 */ preamblesb.append(line).append(lineSeparator);\n/* */ } \n/* */ } \n/* */ \n/* 875 */ if (preamblesb != null) {\n/* 876 */ this.preamble = preamblesb.toString();\n/* */ }\n/* 878 */ if (line == null) {\n/* 879 */ if (this.allowEmpty) {\n/* */ return;\n/* */ }\n/* 882 */ throw new MessagingException(\"Missing start boundary\");\n/* */ } \n/* */ \n/* */ \n/* 886 */ byte[] bndbytes = ASCIIUtility.getBytes(boundary);\n/* 887 */ int bl = bndbytes.length;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 894 */ int[] bcs = new int[256];\n/* 895 */ for (int i = 0; i < bl; i++) {\n/* 896 */ bcs[bndbytes[i] & 0xFF] = i + 1;\n/* */ }\n/* */ \n/* 899 */ int[] gss = new int[bl];\n/* */ \n/* 901 */ for (int j = bl; j > 0; j--) {\n/* */ \n/* 903 */ int k = bl - 1; while (true) { if (k >= j) {\n/* */ \n/* 905 */ if (bndbytes[k] == bndbytes[k - j]) {\n/* */ \n/* 907 */ gss[k - 1] = j;\n/* */ \n/* */ k--;\n/* */ } \n/* */ \n/* */ break;\n/* */ } \n/* 914 */ while (k > 0)\n/* 915 */ gss[--k] = j; break; }\n/* */ \n/* 917 */ } gss[bl - 1] = 1;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 923 */ boolean done = false;\n/* */ \n/* 925 */ while (!done) {\n/* 926 */ int eolLen; MimeBodyPart part; InternetHeaders headers = null;\n/* 927 */ if (sin != null) {\n/* 928 */ start = sin.getPosition();\n/* */ \n/* 930 */ while ((line = lin.readLine()) != null && line.length() > 0);\n/* */ \n/* 932 */ if (line == null) {\n/* 933 */ if (!this.ignoreMissingEndBoundary) {\n/* 934 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* */ \n/* 937 */ this.complete = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } else {\n/* 942 */ headers = createInternetHeaders(in);\n/* */ } \n/* */ \n/* 945 */ if (!in.markSupported()) {\n/* 946 */ throw new MessagingException(\"Stream doesn't support mark\");\n/* */ }\n/* 948 */ ByteArrayOutputStream buf = null;\n/* */ \n/* 950 */ if (sin == null) {\n/* 951 */ buf = new ByteArrayOutputStream();\n/* */ } else {\n/* 953 */ end = sin.getPosition();\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 965 */ byte[] inbuf = new byte[bl];\n/* 966 */ byte[] previnbuf = new byte[bl];\n/* 967 */ int inSize = 0;\n/* 968 */ int prevSize = 0;\n/* */ \n/* 970 */ boolean first = true;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ while (true) {\n/* 976 */ in.mark(bl + 4 + 1000);\n/* 977 */ eolLen = 0;\n/* 978 */ inSize = readFully(in, inbuf, 0, bl);\n/* 979 */ if (inSize < bl) {\n/* */ \n/* 981 */ if (!this.ignoreMissingEndBoundary) {\n/* 982 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* 984 */ if (sin != null)\n/* 985 */ end = sin.getPosition(); \n/* 986 */ this.complete = false;\n/* 987 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ int k;\n/* 992 */ for (k = bl - 1; k >= 0 && \n/* 993 */ inbuf[k] == bndbytes[k]; k--);\n/* */ \n/* */ \n/* 996 */ if (k < 0) {\n/* 997 */ eolLen = 0;\n/* 998 */ if (!first) {\n/* */ \n/* */ \n/* 1001 */ int b = previnbuf[prevSize - 1];\n/* 1002 */ if (b == 13 || b == 10) {\n/* 1003 */ eolLen = 1;\n/* 1004 */ if (b == 10 && prevSize >= 2) {\n/* 1005 */ b = previnbuf[prevSize - 2];\n/* 1006 */ if (b == 13)\n/* 1007 */ eolLen = 2; \n/* */ } \n/* */ } \n/* */ } \n/* 1011 */ if (first || eolLen > 0) {\n/* 1012 */ if (sin != null)\n/* */ {\n/* */ \n/* 1015 */ end = sin.getPosition() - bl - eolLen;\n/* */ }\n/* */ \n/* 1018 */ int b2 = in.read();\n/* 1019 */ if (b2 == 45 && \n/* 1020 */ in.read() == 45) {\n/* 1021 */ this.complete = true;\n/* 1022 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 1027 */ while (b2 == 32 || b2 == 9) {\n/* 1028 */ b2 = in.read();\n/* */ }\n/* 1030 */ if (b2 == 10)\n/* */ break; \n/* 1032 */ if (b2 == 13) {\n/* 1033 */ in.mark(1);\n/* 1034 */ if (in.read() != 10)\n/* 1035 */ in.reset(); \n/* */ break;\n/* */ } \n/* */ } \n/* 1039 */ k = 0;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1049 */ int skip = Math.max(k + 1 - bcs[inbuf[k] & Byte.MAX_VALUE], gss[k]);\n/* */ \n/* 1051 */ if (skip < 2) {\n/* */ \n/* */ \n/* */ \n/* 1055 */ if (sin == null && prevSize > 1)\n/* 1056 */ buf.write(previnbuf, 0, prevSize - 1); \n/* 1057 */ in.reset();\n/* 1058 */ skipFully(in, 1L);\n/* 1059 */ if (prevSize >= 1) {\n/* */ \n/* 1061 */ previnbuf[0] = previnbuf[prevSize - 1];\n/* 1062 */ previnbuf[1] = inbuf[0];\n/* 1063 */ prevSize = 2;\n/* */ } else {\n/* */ \n/* 1066 */ previnbuf[0] = inbuf[0];\n/* 1067 */ prevSize = 1;\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1072 */ if (prevSize > 0 && sin == null) {\n/* 1073 */ buf.write(previnbuf, 0, prevSize);\n/* */ }\n/* 1075 */ prevSize = skip;\n/* 1076 */ in.reset();\n/* 1077 */ skipFully(in, prevSize);\n/* */ \n/* 1079 */ byte[] tmp = inbuf;\n/* 1080 */ inbuf = previnbuf;\n/* 1081 */ previnbuf = tmp;\n/* */ } \n/* 1083 */ first = false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1090 */ if (sin != null) {\n/* 1091 */ part = createMimeBodyPartIs(sin.newStream(start, end));\n/* */ } else {\n/* */ \n/* 1094 */ if (prevSize - eolLen > 0) {\n/* 1095 */ buf.write(previnbuf, 0, prevSize - eolLen);\n/* */ }\n/* */ \n/* 1098 */ if (!this.complete && inSize > 0)\n/* 1099 */ buf.write(inbuf, 0, inSize); \n/* 1100 */ part = createMimeBodyPart(headers, buf.toByteArray());\n/* */ } \n/* 1102 */ super.addBodyPart(part);\n/* */ } \n/* 1104 */ } catch (IOException ioex) {\n/* 1105 */ throw new MessagingException(\"IO Error\", ioex);\n/* */ } finally {\n/* */ try {\n/* 1108 */ in.close();\n/* 1109 */ } catch (IOException cex) {}\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1114 */ this.parsed = true;\n/* */ }", "private void processMediumValue(Bid bid) {\n\t}", "public BinNumber(int currentBinNum) {\n this.currentBinNum = currentBinNum;\n }", "public /*byte[]*/String BinaryCaster(Object item){\n String Sitem = Integer.toBinaryString((int)item);\n //byte[] b = new byte[Sitem.length()];\n //for(int i=0;i<Sitem.length();i++){\n // b[i] = (byte)Sitem.charAt(i);\n //}\n //return b;\n return Sitem;\n }", "@Override\n\tpublic void interpretBytes() {\n\t\t\n\t}", "boolean supportsBinaryInProc();", "public void doRender(EntityBat p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)\n {\n int var10 = ((ModelBat)this.mainModel).getBatSize();\n\n if (var10 != this.renderedBatSize)\n {\n this.renderedBatSize = var10;\n this.mainModel = new ModelBat();\n }\n\n super.doRender((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);\n }", "protected void renderDocument(BufferedDocOp document, final StringBuilder blipsText, final String BlipsID) {\n\t\tif (document==null){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tdocument.apply(new InitializationCursorAdapter(\r\n\t\t new DocInitializationCursor() {\r\n\r\n\t\t\t\t\tpublic void annotationBoundary(AnnotationBoundaryMap arg0) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void characters(String arg0) {\r\n\t\t\t\t\t\t//blipsText.append(arg0);\r\n\t\t\t\t\t\tBlip newblip = new Blip();\r\n\t\t\t\t\t\tnewblip.Content = arg0;\r\n\t\t\t\t\t\tnewblip.BlipID = BlipsID;\r\n\t\t\t\t\t\tnewblip.BlipsParentWaveID = CurrentWaveletID;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tblips.add(newblip);\r\n\t\t\t\t\t\tLog.i(\"wave\",\"blips text=\"+arg0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void elementEnd() {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tblipsText.append(\"\\n\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void elementStart(String type, Attributes attr) {\r\n\t\t\t\t\t\tif( type.equals(DocumentConstants.LINE)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//\tLog.i(\"wave\",\" \"+DocumentConstants.BLIP_ID);\r\n\t\t\t\t\t//\tLog.i(\"wave\",\" \"+DocumentConstants.MANIFEST_DOCUMENT_ID);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t })\r\n\t\t);\r\n\t\t\r\n\t\t//mainWindow.addMessage(blipsText.toString());\r\n\t\t//blips = blipsText.toString();\r\n\t}", "void postProcess();", "void postProcess();", "public void setBNumber(int B_numberIn){\n\t\tB_number = B_numberIn;\n\t}", "private void storeSerializedBlog(Stack recordBin) {\r\n Stack recordSet = new Stack();\r\n\r\n // stack order: (bottom)[thumb, full](top)\r\n while (!recordBin.isEmpty() && this.blogType == this.BLOG_PM) {\r\n recordSet.push(recordBin.pop());\r\n }\r\n if (this.blogType == this.BLOG_M) {\r\n recordSet.push(recordBin.pop());\r\n }\r\n\r\n // store serialized blog in rms\r\n if (this.recordManager.setBlog(this.STORED_BLOGS, this.blogType, recordSet)) {\r\n ////#debug\r\n System.out.println(\"blog stored!\");\r\n\r\n if (this.isJourneyBlog) {\r\n this.journeyBlogCounter++;\r\n if (this.location != null) {\r\n this.waypointCounter++;\r\n // track blog as new journey waypoint\r\n this.traceManager.trackWaypoint(this.timestamp, this.location);\r\n }\r\n } else if (this.location != null) {\r\n this.waypointCounter++;\r\n }\r\n this.cleanUp();\r\n this.controller.loadStoredBlogs();\r\n// Displayable screen = this.controller.getScreen(this.controller.MAIN_SCR);\r\n// this.controller.show(screen);\r\n } else {\r\n //#debug error\r\n System.out.println(\"FATAL: blog not stored!\");\r\n this.cleanUp();\r\n Displayable next = controller.getScreen(controller.BLOG_SCR);\r\n controller.show(controller.ERROR_ASCR, Locale.get(\"blogManager.alert.storageFailed\")+Locale.get(\"photoManager.alert.memoryProblem\"), null, next);\r\n }\r\n }" ]
[ "0.62009", "0.58158064", "0.5706525", "0.5573226", "0.55460525", "0.5520034", "0.54996693", "0.53382266", "0.53002113", "0.52244973", "0.5219786", "0.51865107", "0.51719576", "0.51340634", "0.5092822", "0.50671107", "0.5036896", "0.502821", "0.502257", "0.50187063", "0.50053334", "0.49736023", "0.4955587", "0.49423322", "0.49376848", "0.49358004", "0.4908804", "0.48935685", "0.4886701", "0.48809335", "0.4877667", "0.48710236", "0.48689815", "0.48490644", "0.48365965", "0.48361588", "0.48001525", "0.47835624", "0.47778237", "0.47646606", "0.4753912", "0.4741324", "0.47337317", "0.4729107", "0.4723969", "0.4715738", "0.47128528", "0.47109577", "0.47079352", "0.47059873", "0.47044584", "0.4695312", "0.4694317", "0.46928284", "0.468728", "0.46849245", "0.46810663", "0.46738693", "0.46712115", "0.46654803", "0.46520683", "0.46424106", "0.46389621", "0.46341267", "0.46336198", "0.4631506", "0.46296316", "0.4627121", "0.46248457", "0.46189678", "0.46176013", "0.46121374", "0.46108758", "0.4608794", "0.46084324", "0.46075642", "0.46052533", "0.46044886", "0.4601584", "0.45949295", "0.45926037", "0.45889634", "0.45880347", "0.458768", "0.4581851", "0.45817137", "0.45807764", "0.45751736", "0.45737985", "0.4572601", "0.45647725", "0.45643285", "0.45599657", "0.4559947", "0.45597008", "0.45501044", "0.4543122", "0.4543122", "0.45397407", "0.4529528" ]
0.5278664
9
Update the interestOps of the key looking only at values of the boolean closed and of both ByteBuffers. The convention is that both buffers are in writemode before the call to updateInterestOps and after the call. Also it is assumed that process has been be called just before updateInterestOps.
private void updateInterestOps() { var interesOps = 0; if (state != State.CLOSED && bbin.hasRemaining()) { interesOps = interesOps | SelectionKey.OP_READ; } if (bbout.position() != 0) { interesOps |= SelectionKey.OP_WRITE; } if (interesOps == 0) { silentlyClose(); return; } key.interestOps(interesOps); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateInterestOps() {\n var interesOps = 0;\n if (!closed && bbin.hasRemaining()) {\n interesOps = interesOps | SelectionKey.OP_READ;\n }\n if (bbout.position() != 0) {\n interesOps |= SelectionKey.OP_WRITE;\n }\n if (interesOps == 0) {\n silentlyClose();\n return;\n }\n key.interestOps(interesOps);\n }", "private void updateInterestOps() {\n\t\tvar interesOps = 0;\n\t\tif (!closed && bbin.hasRemaining()) {\n\t\t\tinteresOps = interesOps | SelectionKey.OP_READ;\n\t\t}\n\t\tif (!closed && bbout.position() != 0) {\n\t\t\tinteresOps |= SelectionKey.OP_WRITE;\n\t\t}\n\t\tif (interesOps == 0) {\n\t\t\tsilentlyClose();\n\t\t\treturn;\n\t\t}\n\t\tkey.interestOps(interesOps);\n\t}", "private void updateInterestOps() {\n\t\t\tvar interestOps = 0x0;\n\n\t\t\tif ( !closed && bb.hasRemaining() ) {\n\t\t\t\tinterestOps |= SelectionKey.OP_READ;\n\n\t\t\t}\n\n\t\t\tif ( bb.position() > 0 ) {\n\t\t\t\tinterestOps |= SelectionKey.OP_WRITE;\n\t\t\t}\n\n\t\t\tif ( interestOps == 0 ) {\n\t\t\t\tsilentlyClose();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tkey.interestOps(interestOps);\n\t\t}", "@Override\n public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n state = State.CLOSED;\n }\n processIn();\n updateInterestOps();\n }", "protected synchronized SSLSelectionKey interestData(int nOps)\n {\n if (nOps != m_nOpsInterestData)\n {\n int nOpsApp = m_nOpsInterestApp;\n if (nOpsApp != 0)\n {\n ((SSLSelector) selector()).setInterestOps(m_delegate, (nOps | nOpsApp\n | m_nOpsInterestProtocol) & ~m_nOpsInterestExclude);\n }\n // else; application isn't interested in forward progress now; don't force it\n\n m_nOpsInterestData = nOps;\n }\n return this;\n }", "protected void markKeysReadable(boolean fReadable)\n {\n for (SSLSelectionKey key = m_keyFirst; key != null;\n key = key.m_keyNext)\n {\n if (fReadable)\n {\n // mark the channel as read ready\n key.setDataReadyOps(SelectionKey.OP_READ);\n // add interest in OP_WRITE to help avoid getting blocked in selector\n key.interestData(SelectionKey.OP_WRITE);\n }\n else // no data buffered\n {\n // unmark the channel as read ready\n key.setDataReadyOps(0);\n // remove artificial OP_WRITE interest\n key.interestData(0);\n }\n }\n }", "private void process(ByteBuffer output, final byte[] input, int inPos, KeyStream keyStream) {\n ByteBuffer buf = ByteBuffer.allocate(BLOCK_SIZE_IN_BYTES).order(ByteOrder.LITTLE_ENDIAN);\n int pos = inPos;\n int inLen = input.length - inPos;\n int todo;\n while (inLen > 0) {\n todo = inLen < BLOCK_SIZE_IN_BYTES ? inLen : BLOCK_SIZE_IN_BYTES;\n buf.asIntBuffer().put(keyStream.next());\n for (int j = 0; j < todo; j++, pos++) {\n output.put((byte) (input[pos] ^ buf.get(j)));\n }\n inLen -= todo;\n }\n }", "public void processKeystrokes() {\n\t\t// Only send an update if the keystroke count object is not null and we have\n\t\t// keystroke activity\n\t\t//\n\t\tif (this.hasData()) {\n\t\t\t\n\t\t\tthis.endUnendedFiles();\n\n\t\t\t//\n\t\t\t// Send the info now\n\t\t\t//\n\t\t\tthis.sendKeystrokeData(this);\n\t\t}\n\t}", "public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n closed = true;\n }\n processIn();\n updateInterestOps();\n }", "protected synchronized SSLSelectionKey interestProtocol(int nOps, int nExclusions)\n {\n if (!(nOps == m_nOpsInterestProtocol && nExclusions == m_nOpsInterestExclude))\n {\n int nOpsApp = m_nOpsInterestApp;\n if (nOpsApp != 0)\n {\n ((SSLSelector) selector()).setInterestOps(m_delegate, (nOps | nOpsApp\n | m_nOpsInterestData) & ~nExclusions);\n }\n // else; application isn't interested in forward progress now; don't force it\n\n m_nOpsInterestProtocol = nOps;\n m_nOpsInterestExclude = nExclusions;\n }\n return this;\n }", "void updateInterest() {\n // FIXME: Currently unimplemented\n }", "private void doWrite() throws IOException {\n\t\t\tbb.flip();\n\t\t\tsc.write(bb);\n\t\t\tbb.compact();\n\n\t\t\tupdateInterestOps();\n\t\t}", "@Override\n public void run () {\n try {\n int i = 0;\n String tupleString = this.inReadEnds[i].getNextString();\n while (tupleString != null && i < this.inReadEnds.length - 1){\n BMap tempStore = BMap.makeBMap(tupleString);\n mapStore = BMap.or(mapStore, tempStore);\n i++;\n tupleString = this.inReadEnds[i].getNextString();\n }\n \n BMap tempStore = BMap.makeBMap(tupleString);\n this.mapStore = BMap.or(mapStore, tempStore);\n \n this.outWriteEnd.putNextString(mapStore.getBloomFilter());\n this.outWriteEnd.close();\n } \n catch (Exception e) {\n ReportError.msg(this.getClass().getName() + \" \" + e);\n }\n }", "int updateByPrimaryKeySelective(BasicInfoPrecursorProcessType record);", "private void updateBinary(APDU apdu, byte[] buffer) \r\n \t //@ requires current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n \t //@ ensures current_applet(this) &*& [1/2]valid() &*& APDU(apdu, buffer) &*& array_slice(buffer, 0, buffer.length, _);\r\n\t{\r\n\t\t// check if access to this file is allowed\r\n\t\tif (!fileAccessAllowed(UPDATE_BINARY))\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// use P1 and P2 as offset\r\n\t\tshort offset = Util.makeShort(buffer[ISO7816.OFFSET_P1], buffer[ISO7816.OFFSET_P2]);\r\n\t\t// impossible to start updating from offset larger than max size of file\r\n\t\t// this however does not imply that the file length can not change\r\n\t\tJCSystem.beginTransaction();\r\n\t\t//@ open valid();\r\n\t\tif (selectedFile == masterFile)\r\n\t\t\tISOException.throwIt(ISO7816.SW_FILE_INVALID); //~allow_dead_code Dead because fileAccessAllowed() checks that selectedFile instanceof ElementaryFile and masterFile is not an ElementaryFile.\r\n\t\t//@ open selected_file_types(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _);\r\n\t\tshort size = ((ElementaryFile) selectedFile).getMaxSize();\r\n\t\tif (offset > size)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t// number of bytes in file starting from offset\r\n\t\t// short remaining = (short) (size - offset);\r\n\t\t// get the new data\r\n\t\tshort byteRead = apdu.setIncomingAndReceive();\r\n\t\t// check Lc\r\n\t\tshort lc = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);\r\n\t\tif ((lc == 0) || (byteRead == 0))\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\r\n\t\t// update file\r\n\t\tif (offset < 0 || ISO7816.OFFSET_CDATA + lc > buffer.length || offset + lc > size)\r\n\t\t\tISOException.throwIt(ISO7816.SW_WRONG_P1P2);\r\n\t\t((ElementaryFile) selectedFile).updateData(offset, buffer, ISO7816.OFFSET_CDATA, lc);\r\n\t\t// //@ close valid(); // auto\r\n\t\tJCSystem.commitTransaction();\r\n\t}", "public boolean put2BuffMap( byte[] rec){\n\t\t/**\n\t\t * update\n\t\t */\n\t\t\n\t\tKey key = new Key(rec);\n\t\t\n\t\tif(buffMap.containsKey(key)){\n\t\t\tint val = buffMap.get(key)+1;\n\t\t\tbuffMap.replace(key, val);\n\t\t}else{\n\t\t\tbuffMap.put(key, 1);\n\t\t}\n\t\treturn true;\n\t}", "public void filterImage() {\n\n if (opIndex == lastOp) {\n return;\n }\n\n lastOp = opIndex;\n switch (opIndex) {\n case 0:\n biFiltered = bi; /* original */\n return;\n case 1:\n biFiltered = ImageNegative(bi); /* Image Negative */\n return;\n\n case 2:\n biFiltered = RescaleImage(bi);\n return;\n\n case 3:\n biFiltered = ShiftImage(bi);\n return;\n\n case 4:\n biFiltered = RescaleShiftImage(bi);\n return;\n\n case 5:\n biFiltered = Add(bi, bi1);\n return;\n\n case 6:\n biFiltered = Subtract(bi, bi1);\n return;\n\n case 7:\n biFiltered = Multiply(bi, bi1);\n return;\n\n case 8:\n biFiltered = Divide(bi, bi1);\n return;\n\n case 9:\n biFiltered = NOT(bi);\n return;\n\n case 10:\n biFiltered = AND(bi, bi1);\n return;\n\n case 11:\n biFiltered = OR(bi, bi1);\n return;\n\n case 12:\n biFiltered = XOR(bi, bi1);\n return;\n\n case 13:\n biFiltered = ROI(bi);\n return;\n\n case 14:\n biFiltered = Negative_Linear(bi);\n return;\n\n case 15:\n biFiltered= Logarithmic_function(bi);\n return;\n\n case 16:\n biFiltered = Power_Law(bi);\n return;\n\n case 17:\n biFiltered = LUT(bi);\n return;\n\n case 18:\n biFiltered = Bit_planeSlicing(bi);\n return;\n\n case 19:\n biFiltered = Histogram(bi1,bi2);\n return;\n\n case 20:\n biFiltered = HistogramEqualisation(bi,bi3);\n return;\n\n case 21:\n biFiltered = Averaging(bi1);\n return;\n\n case 22:\n biFiltered = WeightedAveraging(bi1);\n return;\n\n case 23:\n biFiltered = fourNeighbourLaplacian(bi1);\n return;\n\n case 24:\n biFiltered= eightNeighbourLaplacian(bi1);\n return;\n\n case 25:\n biFiltered = fourNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 26:\n biFiltered = eightNeighbourLaplacianEnhancement(bi1);\n return;\n\n case 27:\n biFiltered = Roberts(bi1);\n return;\n\n case 28:\n biFiltered = SobelX(bi1);\n return;\n\n case 29:\n biFiltered = SobelY(bi1);\n return;\n\n case 30:\n biFiltered = Gaussian(bi1);\n return;\n\n case 31:\n biFiltered = LoG (bi1);\n return;\n\n case 32:\n biFiltered = saltnpepper(bi4);\n return;\n\n case 33:\n biFiltered = minFiltering(bi4);\n return;\n\n case 34:\n biFiltered = maxFiltering(bi4);\n return;\n\n case 35:\n biFiltered = maidpointFiltering(bi4);\n return;\n\n case 36:\n biFiltered = medianFiltering(bi4);\n return;\n\n case 37:\n biFiltered = simpleThresholding(bi5);\n return;\n\n case 38:\n biFiltered = automatedThresholding(bi6);\n return;\n\n case 39:\n biFiltered = adaptiveThresholding(bi7);\n return;\n }\n }", "private void processSelectedKeys() {\r\n Iterator<SelectionKey> it = selector.selectedKeys().iterator();\r\n while (it.hasNext()) {\r\n // remove the selected key to not process it twice\r\n SelectionKey key = it.next();\r\n it.remove();\r\n\r\n // erase flags of ready operation\r\n key.interestOps(key.interestOps() & ~key.readyOps());\r\n\r\n if (key.isAcceptable()) {\r\n ((AcceptHandler) key.attachment()).handleAccept();\r\n }\r\n if (key.isValid() && key.isConnectable()) {\r\n ((ConnectHandler) key.attachment()).handleConnect();\r\n }\r\n if (key.isValid() && key.isReadable()) {\r\n ((ReadWriteHandler) key.attachment()).handleRead();\r\n }\r\n if (key.isValid() && key.isWritable()) {\r\n ((ReadWriteHandler) key.attachment()).handleWrite();\r\n }\r\n }\r\n }", "@Override\n\tpublic void handleKeyInputs(Map<Integer, Boolean> keys) {\n\t\t\n\t}", "final void channelInterestChangedCallback() {\n Channel ch = getIOChannel();\n if (ch != null) {\n boolean writable = ch.isWritable();\n\n eventSerializeLock.lock();\n try {\n if (previousEvent == OUTPUT_DISABLED && writable) {\n fireOutputRecovered();\n } else if (previousEvent == OUTPUT_RECOVERED && !writable) {\n fireOutputDisabled();\n }\n } finally {\n eventSerializeLock.unlock();\n }\n }\n }", "@Override\n public void updateWithObservationsFromDatastreamOnly(SensingDevice sensingDevice, Datastream datastream) {\n }", "int updateByPrimaryKeySelective(QuestionWithBLOBs record);", "int updateByPrimaryKeySelective(XxAreaWithBLOBs record);", "@Override\r\n\t\tpublic void reduce(MyCompoundKey key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n\t\t\tif (flagDoFW) {\r\n\r\n\t\t\t\tString idkplusFW = null;\r\n\r\n\t\t\t\t// line 1\r\n\t\t\t\t// ordered set of id's on which to compute next id\r\n\t\t\t\tTreeSet<Sig> tsFW = new TreeSet<Sig>();\r\n\r\n\t\t\t\tboolean flagDoOnce = true;\r\n\t\t\t\t// line 2\r\n\t\t\t\tfor (Text val : values) {\r\n\t\t\t\t\t//\t\t\t\t\tSystem.out.println(\"key:\" + context.getCurrentKey());\r\n\t\t\t\t\tif (context.getCurrentKey().order == 0) {\r\n\r\n\t\t\t\t\t\tString[] line = val.toString().split(\" \");\r\n\r\n\t\t\t\t\t\t// line 4\r\n\t\t\t\t\t\tSig s = new Sig(line[1].toString(), line[3].toString());\r\n\t\t\t\t\t\tif (!tsFW.contains(s)) {\r\n\t\t\t\t\t\t\ttsFW.add(s);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// line 5 end\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (context.getCurrentKey().order == 1) {\r\n\t\t\t\t\t\tif (flagDoOnce) {\r\n\t\t\t\t\t\t\tflagDoOnce = false;\r\n\t\t\t\t\t\t\tif (tsFW.size() == 0) {\r\n\t\t\t\t\t\t\t\tidkplusFW = hash(\"0\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tidkplusFW = hash(tsFW.toString());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (idkplusFW == null) {\r\n\t\t\t\t\t\t\tSystem.err.println(\"Cannot have null sig here\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tString[] line = val.toString().split(\" \");\r\n\r\n\t\t\t\t\t\t// line 10\r\n\t\t\t\t\t\tString newLine = line[0] + \" \" + line[1] + \" \" + line[2] + \" \" + idkplusFW;\r\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(\"newline:\" + newLine);\r\n\t\t\t\t\t\t//\t\t\t\tcontext.write(new Text(\"\"), new Text(newLine));\r\n\t\t\t\t\t\tmultipleOutputs.write(new Text(\"\"), new Text(newLine), context.getConfiguration().get(\"vs.outbasepath\") + File.separatorChar + \"graph\" + File.separatorChar + \"graph\");\r\n\t\t\t\t\t\t// line 11 end\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (flagDoOnce) {\r\n\t\t\t\t\tif (tsFW.size() == 0) {\r\n\t\t\t\t\t\tidkplusFW = hash(\"0\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tidkplusFW = hash(tsFW.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// line 12, 13\r\n\t\t\t\tText k = new Text();\r\n\t\t\t\tText v = new Text();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tk.set(key.s);\r\n\t\t\t\t\tv.set(idkplusFW);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\tSystem.out.println(\"k:\" + k + \", v:\" + v);\r\n\r\n\t\t\t\t// place s first to order by s\r\n\t\t\t\t//\t\t\t\tmultipleOutputs.write(k, v, context.getConfiguration().get(\"vs.outbasepath\") + File.separatorChar + \"nodes\" + File.separatorChar + \"nodes\");\r\n\r\n\t\t\t\t// place block first to order by block id\r\n\t\t\t\tmultipleOutputs.write(v, k, context.getConfiguration().get(\"vs.outbasepath\") + File.separatorChar + \"nodes\" + File.separatorChar + \"nodes\");\r\n\t\t\t}\r\n\r\n\t\t}", "public void streamClosed(boolean inStream) throws IOException {\n if (!isGet) {\n if ((!inStream) && (!isDone)) {\n // to deal with outputstream in put operation\n\n boolean more = true;\n\n if ((privateOutput != null) && (privateOutput.size() <= 0)) {\n byte[] headerArray = OBEXHelper.createHeader(requestHeaders, false);\n if (headerArray.length <= 0)\n more = false;\n }\n // If have not sent any data so send all now\n if (replyHeaders.responseCode == -1) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n }\n\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x02);\n }\n\n /*\n * According to the IrOBEX specification, after the final put, you\n * only have a single reply to send. so we don't need the while\n * loop.\n */\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n\n sendRequest(0x82);\n }\n isDone = true;\n } else if ((inStream) && (isDone)) {\n // how to deal with input stream in put stream ?\n isDone = true;\n }\n } else {\n isValidateConnected = false;\n if ((inStream) && (!isDone)) {\n\n // to deal with inputstream in get operation\n // Have not sent any data so send it all now\n\n if (replyHeaders.responseCode == -1) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n }\n\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n if (!sendRequest(0x83)) {\n break;\n }\n }\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x83, null, replyHeaders, privateInput);\n }\n isDone = true;\n } else if ((!inStream) && (!isDone)) {\n // to deal with outputstream in get operation\n // part of the data may have been sent in continueOperation.\n\n boolean more = true;\n\n if ((privateOutput != null) && (privateOutput.size() <= 0)) {\n byte[] headerArray = OBEXHelper.createHeader(requestHeaders, false);\n if (headerArray.length <= 0)\n more = false;\n }\n\n if (privateInput == null) {\n privateInput = new PrivateInputStream(this);\n }\n if ((privateOutput != null) && (privateOutput.size() <= 0))\n more = false;\n\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x03);\n }\n sendRequest(0x83);\n // parent.sendRequest(0x83, null, replyHeaders, privateInput);\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n\n }\n }\n }", "protected final boolean canModifyBuffer() {\n return (_ioContext != null);\n }", "public void incrHedgedReadOps() {\n hedgedReadOps.inc();\n }", "private void processIn(ClientChatos client, SelectionKey key) throws IOException {\n\t\tfor (var cpt =0 ; ; cpt++) {\n\t\t\tboolean isPrivateConnection = client.isConnectionPrivate(key);\n\t\t\tProcessStatus status;\n\t\t\tif (isPrivateConnection && cpt == 0) {\n\t\t\t\tstatus = httpReader.process(bbin, key);\n\t\t\t} else {\n\t\t\t\tstatus = reader.process(bbin);\n\t\t\t}\n\t\t\tswitch (status) {\n\t\t\tcase DONE:\n\t\t\t\tif (isPrivateConnection && cpt == 0) {\n\t\t\t\t\tData value = httpReader.get();\n\t\t\t\t\tvalue.decode(client, key);\n\t\t\t\t\thttpReader.reset();\n\t\t\t\t} else {\n\t\t\t\t\tData value = reader.get();\n\t\t\t\t\tvalue.decode(client, key);\n\t\t\t\t\treader.reset();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase REFILL:\n\t\t\t\treturn;\n\t\t\tcase ERROR:\n\t\t\t\tsilentlyClose();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public ByteBuf setBoolean(int index, boolean value)\r\n/* 265: */ {\r\n/* 266:280 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 267:281 */ return super.setBoolean(index, value);\r\n/* 268: */ }", "int updateByPrimaryKeySelective(ResPartnerBankEntityWithBLOBs record);", "public void incorporateBitMapInfo(final BitMap otherFlags) {\n _bitMap |= otherFlags.getBitMap(); // logical OR\n }", "@Override\n\tpublic void setOptimizeMergeBuffer(boolean arg0) {\n\n\t}", "int updateByPrimaryKeyWithBLOBs(StatusReplies record);", "Get<K, C> setFilterOp(BooleanOp op);", "public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n updateInterestOps();\n }", "public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n updateInterestOps();\n }", "protected void updateFlags() {\n USE_CANNY = USE_CANNY && mainInterface.DEBUG_FRAME;\n DEBUG_PREP_FRAME = DEBUG_PREP_FRAME && mainInterface.DEBUG_FRAME;\n DEBUG_CONTOURS = DEBUG_CONTOURS && mainInterface.DEBUG_FRAME;\n DEBUG_POLY = DEBUG_POLY && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_MARKERS = DEBUG_DRAW_MARKERS && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_MARKER_ID = DEBUG_DRAW_MARKER_ID && mainInterface.DEBUG_FRAME;\n DEBUG_DRAW_SAMPLING = DEBUG_DRAW_SAMPLING && mainInterface.DEBUG_FRAME;\n }", "public boolean update(ConProcess conProcess) throws AppException;", "@Override\n public void function() {\n App.memory.setMemory(op2, Memory.convertBSToBoolArr(Memory.length32(Integer.toBinaryString(\n op1 * Integer.parseInt(App.memory.getMemory(op2, 1 << 2 + 2 + 1), 2)))));\n }", "@Override\r\n\tpublic void visit(SimplePin pin) {\n\t\tboolean pinMod;\r\n\t\tif (isForward()) {\r\n\t\t\tpinMod = pin.propagateValuesForward();\r\n\t\t} else {\r\n\t\t\tpinMod = pin.propagateValuesBackward();\r\n\t\t}\r\n\t\tmodified |= pinMod;\r\n\t}", "int updateByPrimaryKeySelective(ChannelAli record);", "private void updateChildesValues(int value){\n\n for (int i = 0; i < mDataSize; i++) {\n\n if(((value >> i) & 1) == 1){\n mChildTags.get(i).setValue(true);}\n else {mChildTags.get(i).setValue(false);}\n }\n }", "void freeze() {\n setState(State.FROZEN); // prevent new puts to this chunk\n while (pendingOps.get() != 0) ;\n }", "ReadPolyState(boolean isAccept){\n this.isAccept = isAccept; \n }", "boolean doLogicalReplaceUnlocked(final TCServerMap map, final Object key, final Object current,\n final Object newValue, MetaDataDescriptor mdd)\n throws AbortedOperationException;", "private void commitAll(){\n if(isDiskBufferEnabled && persistenceService != null){\n persistenceService.commit(WIKIDATA_SYNONYMY_BUFFER);\n persistenceService.commit(WIKIDATA_HYPERNYMY_BUFFER);\n persistenceService.commit(WIKIDATA_ASK_BUFFER);\n }\n }", "public void updateInterest(){\n //Caculate when all fields are available\n String amountStr = amountInput.getText().toString();\n String yieldStr = annualizedYieldInput.getText().toString();\n String bankStr = bankInput.getText().toString();\n\n if (mStartDate!=null && mEndDate!=null\n && !Utils.isNullOrEmpty(amountStr)\n && !Utils.isNullOrEmpty(yieldStr)\n && !Utils.isNullOrEmpty(bankStr)){\n\n float days = Utils.getDiffDays(mStartDate,mEndDate);\n mAmount = Float.valueOf(amountStr);\n mYield = Float.valueOf(yieldStr);\n\n //Caculate the value\n mInterest = mAmount * (mYield/100)*(days/ Constants.DAYS_OF_ONE_YEAR);\n mInterest = Utils.roundFloat(mInterest);\n //Update the interest in UI\n expectedInterestInput.setText(Utils.formatFloat(mInterest));\n Log.d(Constants.LOG_TAG, \"start = \" + mStartDate.toString() + \"\\nend = \" + mEndDate.toString()\n + \"\\ndays = \" + days + \"\\namount = \" + mAmount + \"\\nyield = \" + mYield + \"\\ninterest = \" + mInterest);\n }\n }", "synchronized void flushAll(int txnum) {\n\t \n for (ExerciseBuffer buff : bufferpool)\n if (buff.isModifiedBy(txnum))\n buff.flush();\n }", "int updateByPrimaryKeyWithBLOBs(AliUserInfoDO record);", "public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {\n\n updateBinaryStream(columnIndex, x, -1);\n }", "int updateByPrimaryKeyWithBLOBs(Yqbd record);", "@Override\n\tpublic void multiPut(List<KeyValueVersion> ops) throws RemoteException,\n\t\t\tInterruptedException {\n\t\t\n\t}", "public void updateByteMetrics() {\n try {\n for (Optional<Fork> fork : this.forks) {\n if (fork.isPresent()) {\n fork.get().updateByteMetrics();\n }\n }\n } catch (IOException ioe) {\n LOG.error(\"Failed to update byte-level metrics for task \" + this.taskId);\n }\n }", "public void operate(FlowProcess flowProcess, FunctionCall<NullContext> funcCall) {\n Tuple tuple = funcCall.getArguments().getTuple();\n TupleEntryCollector collector = funcCall.getOutputCollector();\n Tuple outTuple = new Tuple();\n String inKey = tuple.getString(0);\n String inValue = tuple.getString(1);\n int outKey;\n int outValue;\n HashMap<String, Integer> index = ExportPinterestPrefsWorkflow.getIndex();\n int highestID = ExportPinterestPrefsWorkflow.getHighestID();\n if( index.containsKey(inKey) ){\n outKey = index.get(inKey);\n } else { //new id-string mapping\n outKey = highestID;\n index.put(inKey, outKey);\n highestID += 1;\n }\n if( index.containsKey(inValue) ){\n outValue = index.get(inValue);\n } else { //new id-string mapping\n outValue = highestID;\n index.put(inValue, outValue);\n highestID += 1;\n }\n outTuple.add(outKey);\n outTuple.add(outValue+\"\\t1.0\");\n collector.add(outTuple);\n ExportPinterestPrefsWorkflow.setHighestID(highestID);\n ExportPinterestPrefsWorkflow.setIndex(index);//todo not sure this is needed if index is a reference to enclosing class's index it's already modified. If it's a deep copy yikes, copied with every get?????\n }", "int updateByPrimaryKeyWithBLOBs(AnnouncementDO record);", "int updateByPrimaryKeySelective(IntegralExchange record);", "int updateByPrimaryKeySelective(ResourceWithBLOBs record);", "private synchronized void saveData() throws RuntimeException {\r\n // if too much, serialize\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n // write out to the other file\r\n FileWriter fw = null;\r\n BufferedWriter bw = null;\r\n try {\r\n // read from the current toggle file\r\n fr = new FileReader(getToggleFile());\r\n br = new BufferedReader(fr);\r\n // change files\r\n toggle = !toggle;\r\n fw = new FileWriter(getToggleFile());\r\n bw = new BufferedWriter(fw);\r\n // sort the items\r\n ProjectFilePart[] pfps = (ProjectFilePart[]) buf.toArray(new ProjectFilePart[0]);\r\n Arrays.sort(pfps);\r\n int pfpsIndex = 0;\r\n // read/copy the lines\r\n for (String line = br.readLine(); line != null; line = br.readLine()) {\r\n // if it is empty, skip\r\n if (line.trim().equals(\"\")) {\r\n continue;\r\n // load the project file part\r\n }\r\n ProjectFilePart pfp = convertToProjectFilePart(line);\r\n // check which is less\r\n if (pfpsIndex >= pfps.length || pfp.compareTo(pfps[pfpsIndex]) <= 0) {\r\n bw.write(convertToStringLine(pfp));\r\n } else if (pfp.compareTo(pfps[pfpsIndex]) > 0) {\r\n // write all of the ones that are less\r\n while (pfpsIndex < pfps.length && pfp.compareTo(pfps[pfpsIndex]) > 0) {\r\n bw.write(convertToStringLine(pfps[pfpsIndex]));\r\n pfpsIndex++;\r\n }\r\n // write out the current entry\r\n bw.write(convertToStringLine(pfp));\r\n } else {\r\n System.out.println(\"Skipping \" + pfp.getRelativeName());\r\n }\r\n }\r\n // write the rest\r\n for (; pfpsIndex < pfps.length; pfpsIndex++) {\r\n bw.write(convertToStringLine(pfps[pfpsIndex]));\r\n }\r\n // clear the buffer\r\n buf.clear();\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n } finally {\r\n // close the input\r\n IOUtil.safeClose(br);\r\n IOUtil.safeClose(fr);\r\n // flush the output\r\n try {\r\n bw.flush();\r\n } catch (Exception e) {\r\n }\r\n try {\r\n fw.flush();\r\n } catch (Exception e) {\r\n }\r\n // close the output\r\n IOUtil.safeClose(bw);\r\n IOUtil.safeClose(fw);\r\n }\r\n }", "int updateByPrimaryKeySelective(ItemStockDO record);", "int updateByPrimaryKeySelective(BPBatchBean record);", "public void C(boolean bl2) {\n this.h = bl2;\n synchronized (this) {\n long l10 = this.m;\n long l11 = 2;\n this.m = l10 |= l11;\n }\n this.notifyPropertyChanged(36);\n super.requestRebind();\n }", "public void updateInterestAPI(long userId, String interests, String userHandle, String sessionToken){\n final Handler mainHandler = new Handler(context.getMainLooper());\n profileApi.updateInterest(Long.toString(userId), interests.trim(), userHandle, sessionToken)\n .subscribeOn(Schedulers.io())\n .subscribe(new Action1<InterestResponse>() {\n @Override\n public void call(InterestResponse response) {\n\n mainHandler.post(new Runnable() {\n @Override\n public void run() {\n bus.post(new InterestUpdateEvent());\n\n UIHelper.getInstance().dismissProgressDialog();\n }\n });\n }\n }, new Action1<Throwable>() {\n @Override\n public void call(Throwable throwable) {\n Log.e(\"Mobisys: \", \"cannot update interest\", throwable);\n mainHandler.post(new Runnable() {\n @Override\n public void run() {\n UIHelper.getInstance().dismissProgressDialog();\n UIHelper.getInstance().showAlert(context, \"Please try again later.\");\n }\n });\n\n\n }\n });\n }", "public void handleUpdateState(QSTile.BooleanState booleanState, Object obj) {\n boolean z;\n int i;\n int i2 = 1;\n boolean z2 = obj == QSTileImpl.ARG_SHOW_TRANSIENT_ENABLING;\n if (booleanState.slash == null) {\n booleanState.slash = new QSTile.SlashState();\n }\n boolean z3 = z2 || this.mHotspotController.isHotspotTransient();\n checkIfRestrictionEnforcedByAdminOnly(booleanState, \"no_config_tethering\");\n if (obj instanceof CallbackInfo) {\n CallbackInfo callbackInfo = (CallbackInfo) obj;\n booleanState.value = z2 || callbackInfo.isHotspotEnabled;\n i = callbackInfo.numConnectedDevices;\n z = callbackInfo.isDataSaverEnabled;\n } else {\n booleanState.value = z2 || this.mHotspotController.isHotspotEnabled();\n i = this.mHotspotController.getNumConnectedDevices();\n z = this.mDataSaverController.isDataSaverEnabled();\n }\n booleanState.icon = this.mEnabledStatic;\n booleanState.label = this.mContext.getString(R$string.quick_settings_hotspot_label);\n booleanState.isTransient = z3;\n booleanState.slash.isSlashed = !booleanState.value && !z3;\n if (z3) {\n booleanState.icon = QSTileImpl.ResourceIcon.get(17302458);\n }\n booleanState.expandedAccessibilityClassName = Switch.class.getName();\n booleanState.contentDescription = booleanState.label;\n boolean z4 = booleanState.value || booleanState.isTransient;\n if (z) {\n booleanState.state = 0;\n } else {\n if (z4) {\n i2 = 2;\n }\n booleanState.state = i2;\n }\n String secondaryLabel = getSecondaryLabel(z4, z3, z, i);\n booleanState.secondaryLabel = secondaryLabel;\n booleanState.stateDescription = secondaryLabel;\n }", "public void process() {\n cycleID.incrementAndGet();\r\n List<ChunkBB> chunkbbs;\r\n synchronized (loadedChunks) {\r\n chunkbbs = new LinkedList<>(loadedChunks);\r\n }\r\n\r\n Condition cond = chunkbbs.stream().map(\r\n b -> GAIA_STATES.WORLD_UUID.eq(b.getWorld())\r\n .and(GAIA_STATES.X.gt(b.getX() * 16))\r\n .and(GAIA_STATES.Z.gt(b.getZ() * 16))\r\n .and(GAIA_STATES.X.le(b.getX() * 16 + 16))\r\n .and(GAIA_STATES.Z.le(b.getZ() * 16 + 16))\r\n ).reduce(DSL.falseCondition(), (a, b) -> a.or(b));\r\n\r\n Gaia.DBI().submit((conf) -> {\r\n DSLContext ctx = DSL.using(conf);\r\n ctxref.set(ctx);\r\n ReturnContainer rec;\r\n\r\n while ((rec = input.poll()) != null) {\r\n switch (rec.getState()) {\r\n case DELETE:\r\n LOG.fine(\"[\" + cycleID + \"]Deleting:\\n\" + rec);\r\n ctx.executeDelete(rec.getRec());\r\n break;\r\n case UPDATE:\r\n try {\r\n LOG.fine(\"[\" + cycleID + \"]Updating:\\n\" + rec);\r\n ctx.executeUpdate(rec.getRec());\r\n } catch (Exception e) {\r\n LOG.log(Level.SEVERE, \"[\" + cycleID + \"]Failed to update record.\\n\" + rec.getRec(), e);\r\n }\r\n break;\r\n default:\r\n LOG.severe(\"[\" + cycleID + \"]Failed to process record.\\n\" + rec.getRec() + \"\\nUnknown state: \" + rec.getState());\r\n }\r\n }\r\n if (output.isEmpty()) {\r\n List<GaiaStatesRecord> recs = ctx\r\n .selectFrom(GAIA_STATES)\r\n .where(GAIA_STATES.TRANSITION_TIME.lt(new Timestamp(System.currentTimeMillis())))\r\n .and(cond)\r\n .fetch();\r\n if (!recs.isEmpty()) {\r\n LOG.fine(\"Adding \" + recs.size() + \" records to output queue.\");\r\n output.addAll(recs);\r\n }\r\n }\r\n ctxref.set(null);\r\n });\r\n }", "int updateByPrimaryKeySelective(CommonQuestionStrategyType record);", "public void putBooleanData(String key, Boolean value) {\n editor.putBoolean(key, value);\n editor.apply();\n }", "public void doWrite() throws IOException {\n\t\tbbout.flip();\n\t\tsc.write(bbout);\n\t\tbbout.compact();\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "int updateByPrimaryKeyWithBLOBs(MemberAdvisoryComment record);", "void setPendingBinaryOperation(DoubleBinaryOperator op);", "int updateByPrimaryKeyWithBLOBs(ResPartnerBankEntityWithBLOBs record);", "protected void processStartedObserving(int gameNumber, String whiteName, String blackName, int wildNumber, String ratingCategoryString,\n boolean isRated, int whiteInitial, int whiteIncrement, int blackInitial, int blackIncrement, boolean isPlayedGame, String exString,\n int whiteRating, int blackRating, long gameID, String whiteTitles, String blackTitles, boolean isIrregularLegality,\n boolean isIrregularSemantics, boolean usesPlunkers, String fancyTimeControls) {\n if (!isPlayedGame) {\n return;\n }\n Player whitePlayer = tournamentService.findPlayer(whiteName);\n Player blackPlayer = tournamentService.findPlayer(blackName);\n if (whitePlayer == null) return;\n if (blackPlayer == null) return;\n Game game = tournamentService.findGame(gameNumber);\n if (game == null) {\n alertManagers(\"A game has started on an unpredicted board: {0} - {1} {2}\", gameNumber, whiteName, blackName);\n game = tournamentService.findPlayerGame(whitePlayer);\n }\n if (game == null) {\n alertManagers(\"I am totally confused. I don't have a scheduled game for: {0} {1}\", whiteName, blackName);\n return;\n }\n tournamentService.updateGameStatus(game, GameState.PLAYING);\n tournamentService.flush();\n game.needsAnnounce = true;\n game.whitePlayer = whitePlayer;\n game.blackPlayer = blackPlayer;\n game.observerCountCurrent = 0;\n command.spoof(\"ROBOadmin\", \"observe {0}\", gameNumber);\n command.sendAdminCommand(\"spoof {0} set busy 2\", whitePlayer);\n command.sendAdminCommand(\"spoof {0} set busy 2\", blackPlayer);\n command.qsuggest(\"USCLTD\", \"observe {0}\", gameNumber);\n command.sendAdminCommand(\"spoof {0} ;-notify USCL; +notify USCLTD\", whitePlayer);\n command.sendAdminCommand(\"spoof {0} ;-notify USCL; +notify USCLTD\", blackPlayer);\n /* Announcement will occur when the move list arrives, since we can then tell if it's a resumed game. */\n }", "private void addUpdateOp(Uri uri) {\n ContentProviderOperation.Builder builder =\n newUpdateCpo(uri, mIsSyncOperation, mIsYieldAllowed).withValues(mValues);\n mIsYieldAllowed = false;\n mBatchOperation.add(builder.build());\n }", "int updateByPrimaryKeySelective(SpecialCircumstance record);", "int updateByPrimaryKeySelective(AccountPaymentMethodEntityWithBLOBs record);", "public void update(byte[] bArr, int i, int i2) {\n checkNotDone();\n this.digest.update(bArr, i, i2);\n }", "@Override\n public void update(int bit)\n {\n this.mixer.update(bit);\n this.bpos = (this.bpos + 1) & 7;\n this.c0 = (this.c0 << 1) | bit;\n\n if (this.c0 > 255)\n { \n this.buffer[this.pos&MASK2] = (byte) this.c0;\n this.pos++;\n this.c4 = (this.c4 << 8) | (this.c0 & 0xFF);\n this.hash = (((this.hash*43707) << 4) + this.c4) & MASK1;\n final int shiftIsBinary = ((this.c4 >>> 31) | ((this.c4 & 0x00800000) >>> 23) | \n ((this.c4 & 0x00008000) >>> 15) | ((this.c4 & 0x80) >>> 7)) << 4;\n this.c0 = 1;\n\n // Select Neural Net\n this.mixer.setContext(this.c4 & 0x07FF);\n \n // Add contexts to NN\n this.addContext(this.c4 ^ (this.c4 & 0xFFFF));\n this.addContext(hash(C1, this.c4 << 24)); // hash with random primes\n this.addContext(hash(C2, this.c4 << 16)); \n this.addContext(hash(C3, this.c4 << 8));\n this.addContext(hash(C4, this.c4 & 0xF0F0F0F0));\n this.addContext(hash(C5, this.c4));\n this.addContext(hash(this.c4>>shiftIsBinary, \n (this.buffer[(this.pos-6)&MASK2]<<8)| (this.buffer[(this.pos-5)&MASK2]))); \n \n // Find match\n this.findMatch(); \n\n // Keep track of new match position\n this.hashes[this.hash] = this.pos;\n }\n\n // Add inputs to NN\n for (int i=this.ctxId-1; i>=0; i--)\n {\n if (this.cp[i] != 0)\n this.states[this.cp[i]] = STATE_TABLE[(this.states[this.cp[i]]<<1)|bit]; \n \n this.cp[i] = (this.ctx[i] + this.c0) & MASK3; \n this.mixer.addInput(SM[(i<<8)|this.states[this.cp[i]]]); \n }\n\n if (this.bpos == 7)\n this.ctxId = 0;\n \n if (this.matchLen > 0) \n this.addMatchContext();\n\n // Get prediction from NN\n int p = this.mixer.get();\n \n // Adjust with APM\n p = this.apm.get(bit, p, this.c0);\n this.pr = p + ((p - 2048) >>> 31); \n }", "@Override\n\tprotected void processPostUpdateStream(KStream<String, Event> events) {\n\n\t}", "int updateByPrimaryKeySelective(BasicInfoAnodeBurningLossRate record);", "public void update(byte[] paramArrayOfbyte, int paramInt1, int paramInt2) throws XMLSignatureException {\n/* 231 */ this.signatureAlgorithm.engineUpdate(paramArrayOfbyte, paramInt1, paramInt2);\n/* */ }", "int updateByPrimaryKeySelective(TDictAreas record);", "int updateByPrimaryKeyWithBLOBs(XxAreaWithBLOBs record);", "public void updateIndication() {\n int i;\n if (TextUtils.isEmpty(this.mTransientIndication)) {\n this.mWakeLock.setAcquired(false);\n }\n Log.i(\"KeyguardIndication\", \"updateIndication: mVisible \" + this.mVisible + \" mDozing \" + this.mDozing + \" mTransientIndication \" + this.mTransientIndication + \" mPowerPluggedIn \" + this.mPowerPluggedIn + \" mShouldUpdateBatteryIndication \" + this.mShouldUpdateBatteryIndication + \" mUpArrowIndication \" + this.mUpArrowIndication);\n if (this.mVisible) {\n if (this.mDozing) {\n if (!TextUtils.isEmpty(this.mTransientIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mTransientIndication);\n this.mTextView.setTextColor(this.mTransientTextColor);\n } else {\n this.mTextView.switchIndication((CharSequence) null);\n }\n } else if (!TextUtils.isEmpty(this.mTransientIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mTransientIndication);\n this.mTextView.setTextColor(this.mTransientTextColor);\n } else if (this.mPowerPluggedIn) {\n if (this.mShouldUpdateBatteryIndication) {\n this.mHandler.removeMessages(6);\n this.mHandler.sendEmptyMessageDelayed(6, 500);\n }\n } else if (Build.IS_CM_CUSTOMIZATION_TEST && this.mSignalAvailable && !this.mIsCMSingleClicking) {\n this.mTextView.switchIndication((int) R.string.emergency_call_string);\n this.mTextView.setTextColor(getTextColor());\n } else if (this.mUpdateMonitor.isFaceUnlock() && this.mUpdateMonitor.isStayScreenFaceUnlockSuccess() && shouldShowFaceTransientIndication()) {\n this.mTextView.switchIndication((int) R.string.face_unlock_success);\n this.mTextView.setTextColor(getTextColor());\n } else if (!TextUtils.isEmpty(this.mUpArrowIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mUpArrowIndication);\n this.mTextView.setTextColor(getTextColor());\n ImageView imageView = this.mUpArrow;\n if (this.mDarkMode) {\n i = R.drawable.miui_default_lock_screen_up_arrow_dark;\n } else {\n i = R.drawable.miui_default_lock_screen_up_arrow;\n }\n imageView.setImageResource(i);\n } else {\n this.mTextView.switchIndication((CharSequence) this.mRestingIndication);\n this.mTextView.setTextColor(getTextColor());\n }\n }\n }", "int updateByPrimaryKeyWithBLOBs(AccuseInfo record);", "@NotNull\n @Generated\n @Selector(\"filterDataVerdictWithFilterInbound:peekInboundBytes:filterOutbound:peekOutboundBytes:\")\n public static native NEFilterNewFlowVerdict filterDataVerdictWithFilterInboundPeekInboundBytesFilterOutboundPeekOutboundBytes(\n boolean filterInbound, @NUInt long peekInboundBytes, boolean filterOutbound, @NUInt long peekOutboundBytes);", "public void BufferUpdates()\n {\n //Clear the dispatch list and start buffering changed entities.\n DispatchList.clear();\n bBufferingUpdates = true;\n }", "int updateByPrimaryKeyWithBLOBs(QuestionWithBLOBs record);", "private void processBuffer(boolean flushBuffer, boolean endOfInput) throws IOException {\n decodeBuffer(flushBuffer || endOfInput);\n if (!endOfInput && !flushBuffer && cb.position() < PROCESS_THRESHOLD) {\n return;\n }\n cb.flip();\n found = SubstituteUtil.processSubstitute(cb, substitute, endOfInput, outputCharset, stream);\n // Write the tail bytes in the byte buffer if required\n if (bb.position() > 0 && (found || endOfInput)) {\n bb.flip();\n while (bb.hasRemaining()) {\n stream.write(bb.get());\n }\n bb.clear();\n }\n }", "int updateByPrimaryKeySelective(AutoAssessDetailWithBLOBs record);", "public void not() {\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\tif (!i.hasNext())\n\t\t\treturn;\n\t\twhile (true) {\n\t\t\tfinal RunningLengthWord rlw1 = i.next();\n\t\t\tif (rlw1.getRunningLength() > 0)\n\t\t\t\trlw1.setRunningBit(!rlw1.getRunningBit());\n\t\t\tfor (int j = 0; j < rlw1.getNumberOfLiteralWords(); ++j) {\n\t\t\t\ti.buffer()[i.dirtyWords() + j] =\n\t\t\t\t\t\t~i.buffer()[i.dirtyWords() + j];\n\t\t\t}\n\t\t\tif (!i.hasNext()) {// must potentially adjust the last dirty word\n\t\t\t\tif (rlw1.getNumberOfLiteralWords() == 0)\n\t\t\t\t\treturn;\n\t\t\t\tint usedbitsinlast = this.sizeinbits % wordinbits;\n\t\t\t\tif (usedbitsinlast == 0)\n\t\t\t\t\treturn;\n\t\t\t\ti.buffer()[i.dirtyWords() + rlw1.getNumberOfLiteralWords() - 1] &=\n\t\t\t\t\t\t((oneMask) >>> (wordinbits - usedbitsinlast));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void mo1087b() {\n this.f1007h = new SparseBooleanArray();\n notifyDataSetChanged();\n }", "public R visit(BinOp n) {\n R _ret=null;\n n.f0.accept(this);\n Integer temp = (Integer)n.f1.accept(this);\n //new\n \n ArrayList<Integer> newHold = use.get(statementNumber);\n newHold.add(temp);\n use.put(statementNumber, newHold);\n \n //new\n \n \n if(temp >= arguments){\n\t ArrayList<Integer> hold = live.get(temp);\n\t hold.add(statementNumber);\n\t live.put(temp, hold);\n }\n n.f2.accept(this);\n return _ret;\n }", "public void rasterScanning(){\r\n ReadParameter embedPara = new ReadParameter();\r\n QuantisationEmbedding subband = new QuantisationEmbedding();\r\n int i,j,k,p;\r\n double[] coeffStream, modCoeffStream;\r\n //Modification in selected subband only\r\n if(embedPara.getSubbandChoice().compareTo(\"LF\") == 0){\r\n //Embed in low low subband only\r\n //Initialise the coefficient stream to be modified\r\n coeffStream = new double[subband.getSubbandLL().length * subband.getSubbandLL()[0].length];\r\n modCoeffStream = coeffStream; \r\n k=0;\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n coeffStream[k++] = subband.getSubbandLL()[i][j];\r\n }\r\n }\r\n \r\n // Coeff modification\r\n modCoeffStream = subband.rasterEmbed(coeffStream);\r\n \r\n // Write it back in proper order\r\n k = 0; // Reset k value\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandLL()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n \r\n } else if(embedPara.getSubbandChoice().compareTo(\"HF\") == 0){\r\n //Embed in high frequency subband only\r\n //Initialise the coefficient stream to be modified\r\n coeffStream = new double[subband.getSubbandLL().length * subband.getSubbandLL()[0].length * 3];\r\n modCoeffStream = coeffStream; \r\n k=0;\r\n \r\n // Make it fir three high frequency subbands\r\n for(p=0; p<3; p++){\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n if(p==0){ //Get LH Subband values\r\n coeffStream[k++] = subband.getSubbandLH()[i][j];\r\n \r\n } else if(p==1){ //Get HL Subband values\r\n coeffStream[k++] = subband.getSubbandHL()[i][j];\r\n \r\n } else if(p==2){ //Get HH Subband values\r\n coeffStream[k++] = subband.getSubbandHH()[i][j];\r\n \r\n } // End of if-else condition \r\n } // End of inner loop\r\n } \r\n } // End of outer loop\r\n \r\n \r\n // Coeff modification\r\n modCoeffStream = subband.rasterEmbed(coeffStream);\r\n \r\n \r\n // Write it back in proper order\r\n k=0; // Reset k value\r\n //Write back LH Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandLH()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back HL Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandHL()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back HH Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandHH()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n \r\n \r\n } else if(embedPara.getSubbandChoice().compareTo(\"AF\") == 0){\r\n //Embed in all subbands\r\n //Initialise the coefficient stream to be modified\r\n coeffStream = new double[subband.getSubbandLL().length * subband.getSubbandLL()[0].length * 4];\r\n modCoeffStream = coeffStream; \r\n k=0;\r\n \r\n // Make it fir three high frequency subbands\r\n for(p=0; p<4; p++){\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n if(p==0){ //Get LL Subband values\r\n coeffStream[k++] = subband.getSubbandLL()[i][j];\r\n \r\n } else if(p==1){ //Get LH Subband values\r\n coeffStream[k++] = subband.getSubbandLH()[i][j];\r\n \r\n } else if(p==2){ //Get HL Subband values\r\n coeffStream[k++] = subband.getSubbandHL()[i][j];\r\n \r\n } else if(p==3){ //Get HH Subband values\r\n coeffStream[k++] = subband.getSubbandHH()[i][j];\r\n \r\n } // End of if-else condition \r\n } // End of inner loop\r\n } \r\n } // End of outer loop\r\n \r\n \r\n \r\n // Coeff modification\r\n modCoeffStream = subband.rasterEmbed(coeffStream);\r\n \r\n \r\n \r\n // Write it back in proper order\r\n k = 0; //Reset k value\r\n //Write back LL Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandLL()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back LH Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandLH()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back HL Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandHL()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n //Write back HH Subband\r\n for(i=0; i<subband.getSubbandLL().length; i++){\r\n for(j=0; j<subband.getSubbandLL()[0].length; j++){\r\n subband.getSubbandHH()[i][j] = modCoeffStream[k++];\r\n }\r\n }\r\n \r\n } // End subband choice if-else condition\r\n \r\n }", "public void updateData(Trick completedTrick);", "void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}", "DoubleBinaryOperator getPendingBinaryOperation();", "int updateByPrimaryKeySelective(PathologyInfo record);", "protected void _setBooleanElement(int index, boolean value) {\n\t\tint bitOffset = Math.multiplyExact(index, this.step);\n\t\t// the number of the Bit in the byte it is in\n\t\tbyte bitnum = (byte) (bitOffset % Constants.BITS_PER_BYTE);\n\t\t// position of the byte in the data section\n\t\tint position = (this.ptr + bitOffset / Constants.BITS_PER_BYTE);\n\t\tbyte oldValue = this.segment.buffer.get(position);\n\t\t// the left side of the '|' zeros the selected bit; the right side sets the new value\n\t\tthis.segment.buffer.put(position, (byte) ((oldValue & (~(1 << bitnum))) | ((value ? 1 : 0) << bitnum)));\n\t}", "private void processIn() throws IOException {\n for (; ; ) {\n var status = fr.process(bbin);\n switch (status) {\n case ERROR:\n silentlyClose();\n return;\n case REFILL:\n return;\n case DONE:\n Frame frame = fr.get();\n fr.reset();\n treatFrame(frame);\n break;\n }\n }\n }", "int updateByPrimaryKeySelective(CmsCouponBatch record);", "int updateByPrimaryKeySelective(ComplainNoteDO record);" ]
[ "0.7082172", "0.70488226", "0.69438744", "0.4956687", "0.4737158", "0.47318372", "0.46210945", "0.46103773", "0.46097934", "0.45904484", "0.45635337", "0.45585048", "0.441614", "0.43986446", "0.43336758", "0.431432", "0.42986003", "0.42907014", "0.42676666", "0.41937026", "0.41926578", "0.41804624", "0.41677436", "0.41664183", "0.4160195", "0.41388208", "0.41365013", "0.41004983", "0.40953216", "0.40838444", "0.4061384", "0.40577915", "0.40571493", "0.40536547", "0.40452397", "0.40452397", "0.40320083", "0.40236402", "0.4018011", "0.4016813", "0.40161413", "0.40138632", "0.4011932", "0.401164", "0.4007562", "0.3986566", "0.3985958", "0.39616436", "0.39600542", "0.39534825", "0.3943517", "0.39335778", "0.39259297", "0.39237803", "0.39195415", "0.39136213", "0.391183", "0.38982084", "0.389335", "0.3887403", "0.38870728", "0.38819963", "0.38805678", "0.3878874", "0.38780543", "0.38779706", "0.38723233", "0.3870646", "0.38501918", "0.38487512", "0.38483766", "0.38482484", "0.38482034", "0.3846565", "0.38425177", "0.38407227", "0.38404018", "0.3835717", "0.38342646", "0.3833672", "0.38325274", "0.38230968", "0.38197947", "0.38196084", "0.38187417", "0.3815907", "0.38143805", "0.3814254", "0.3813657", "0.38085762", "0.3806851", "0.3801091", "0.37918943", "0.3790162", "0.3780398", "0.3778655", "0.3777279", "0.37769765", "0.37766656", "0.37764505" ]
0.7000103
2
~vam6I~//~1am3I~//~va54I~ //~vam6I~//~1am3I~//~va54I~ for APi>=19 //~vam6I~//~1am3I~//~va54I~ //~vam6I~//~1am3I~//~va54I~
private static void getRealSize(Display Pdisplay,Point Ppoint) //~vam6I~//~1am3I~//~va54I~ { //~vam6I~//~1am3I~//~va54I~ if (Dump.Y) Dump.println("Utils.getRealSize apiLevel="+Build.VERSION.SDK_INT);//~vam6I~//~1am3I~//~va54I~//~va56R~ if (Build.VERSION.SDK_INT>=31) //Navigationbar can be hidden//~vam6I~//~1am3I~//~va54I~ getRealSize_from31(Pdisplay,Ppoint); //~vam6I~//~1am3I~//~va54I~ else //~vam6I~//~1am3I~//~va54I~ getRealSize_19To30(Pdisplay,Ppoint); //~vam6I~//~1am3I~//~va54I~ if (Dump.Y) Dump.println("Utils.getRealSize exit point="+Ppoint);//~vam6I~//~1am3I~//~va54I~//~va56R~ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }", "@Test\n void testParseTestcaseFrom50Specification(){\n String testcase = \"\\r\\n\" +\n \"/ISk5\\\\2MT382-1000\\r\\n\" +\n \"\\r\\n\" +\n \"1-3:0.2.8(50)\\r\\n\" +\n \"0-0:1.0.0(101209113020W)\\r\\n\" +\n \"0-0:96.1.1(4B384547303034303436333935353037)\\r\\n\" +\n \"1-0:1.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:1.8.2(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.2(123456.789*kWh)\\r\\n\" +\n \"0-0:96.14.0(0002)\\r\\n\" +\n \"1-0:1.7.0(01.193*kW)\\r\\n\" +\n \"1-0:2.7.0(00.000*kW)\\r\\n\" +\n \"0-0:96.7.21(00004)\\r\\n\" +\n \"0-0:96.7.9(00002)\\r\\n\" +\n \"1-0:99.97.0(2)(0-0:96.7.19)(101208152415W)(0000000240*s)(101208151004W)(0000000301*s)\\r\\n\" +\n \"1-0:32.32.0(00002)\\r\\n\" +\n \"1-0:52.32.0(00001)\\r\\n\" +\n \"1-0:72.32.0(00000)\\r\\n\" +\n \"1-0:32.36.0(00000)\\r\\n\" +\n \"1-0:52.36.0(00003)\\r\\n\" +\n \"1-0:72.36.0(00000)\\r\\n\" +\n \"0-0:96.13.0(303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F30313233343536373839\" +\n \"3A3B3C3D3E3F303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F)\\r\\n\" +\n \"1-0:32.7.0(220.1*V)\\r\\n\" +\n \"1-0:52.7.0(220.2*V)\\r\\n\" +\n \"1-0:72.7.0(220.3*V)\\r\\n\" +\n \"1-0:31.7.0(001*A)\\r\\n\" +\n \"1-0:51.7.0(002*A)\\r\\n\" +\n \"1-0:71.7.0(003*A)\\r\\n\" +\n \"1-0:21.7.0(01.111*kW)\\r\\n\" +\n \"1-0:41.7.0(02.222*kW)\\r\\n\" +\n \"1-0:61.7.0(03.333*kW)\\r\\n\" +\n \"1-0:22.7.0(04.444*kW)\\r\\n\" +\n \"1-0:42.7.0(05.555*kW)\\r\\n\" +\n \"1-0:62.7.0(06.666*kW)\\r\\n\" +\n \"0-1:24.1.0(003)\\r\\n\" +\n \"0-1:96.1.0(3232323241424344313233343536373839)\\r\\n\" +\n \"0-1:24.2.1(101209112500W)(12785.123*m3)\\r\\n\" +\n \"!EF2F\\r\\n\" +\n \"\\r\\n\";\n DSMRTelegram dsmrTelegram = ParseDsmrTelegram.parse(testcase);\n\n // CHECKSTYLE.OFF: ParenPad\n assertEquals(\"/ISk5\\\\2MT382-1000\", dsmrTelegram.getRawIdent());\n assertEquals(\"ISK\", dsmrTelegram.getEquipmentBrandTag());\n assertEquals(\"MT382-1000\", dsmrTelegram.getIdent());\n\n assertEquals(\"5.0\", dsmrTelegram.getP1Version());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:30:20+01:00\"), dsmrTelegram.getTimestamp());\n\n assertEquals(\"K8EG004046395507\", dsmrTelegram.getEquipmentId());\n assertEquals(\"0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?\", dsmrTelegram.getMessage());\n\n assertEquals( 2, dsmrTelegram.getElectricityTariffIndicator());\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedNormalTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedNormalTariff(), 0.001);\n assertEquals( 1.193, dsmrTelegram.getElectricityPowerReceived(), 0.001);\n assertEquals( 0.0, dsmrTelegram.getElectricityPowerReturned(), 0.001);\n assertEquals( 4, dsmrTelegram.getPowerFailures());\n assertEquals( 2, dsmrTelegram.getLongPowerFailures());\n\n assertEquals(2, dsmrTelegram.getPowerFailureEventLogSize());\n\n List<PowerFailureEvent> powerFailureEventLog = dsmrTelegram.getPowerFailureEventLog();\n assertEquals(2, powerFailureEventLog.size());\n assertPowerFailureEvent(powerFailureEventLog.get(0), \"2010-12-08T15:20:15+01:00\", \"2010-12-08T15:24:15+01:00\", \"PT4M\");\n assertPowerFailureEvent(powerFailureEventLog.get(1), \"2010-12-08T15:05:03+01:00\", \"2010-12-08T15:10:04+01:00\", \"PT5M1S\");\n\n assertEquals( 2, dsmrTelegram.getVoltageSagsPhaseL1());\n assertEquals( 1, dsmrTelegram.getVoltageSagsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSagsPhaseL3());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL1());\n assertEquals( 3, dsmrTelegram.getVoltageSwellsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL3());\n assertEquals( 220.1, dsmrTelegram.getVoltageL1(), 0.001);\n assertEquals( 220.2, dsmrTelegram.getVoltageL2(), 0.001);\n assertEquals( 220.3, dsmrTelegram.getVoltageL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getCurrentL1(), 0.001);\n assertEquals( 2, dsmrTelegram.getCurrentL2(), 0.001);\n assertEquals( 3, dsmrTelegram.getCurrentL3(), 0.001);\n assertEquals( 1.111, dsmrTelegram.getPowerReceivedL1(), 0.001);\n assertEquals( 2.222, dsmrTelegram.getPowerReceivedL2(), 0.001);\n assertEquals( 3.333, dsmrTelegram.getPowerReceivedL3(), 0.001);\n assertEquals( 4.444, dsmrTelegram.getPowerReturnedL1(), 0.001);\n assertEquals( 5.555, dsmrTelegram.getPowerReturnedL2(), 0.001);\n assertEquals( 6.666, dsmrTelegram.getPowerReturnedL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getMBusEvents().size());\n\n assertEquals( 3, dsmrTelegram.getMBusEvents().get(1).getDeviceType());\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getMBusEvents().get(1).getEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getMBusEvents().get(1).getTimestamp());\n assertEquals( 12785.123, dsmrTelegram.getMBusEvents().get(1).getValue(), 0.001);\n assertEquals( \"m3\", dsmrTelegram.getMBusEvents().get(1).getUnit());\n\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getGasEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getGasTimestamp());\n assertEquals(12785.123, dsmrTelegram.getGasM3(), 0.001);\n\n assertEquals(\"EF2F\", dsmrTelegram.getCrc());\n\n // The CRC of this testcase is invalid.\n // Or better: I have not been able to copy it from the documentation and\n // recreate the \"original\" record for which the provided CRC was calculated.\n // assertTrue(dsmrTelegram.isValidCRC());\n }", "@Test\n public void testRedundant2version() {\n String ver2 = Textile.straighten_weft2(\"aad.bbd+d*ac\");\n assertEquals(\"d.bbac\",ver2);\n }", "public static void main(String[] args) throws Exception {\n String data=\"=1&sta=dc4f223eb429&shop=1&token=123232jd&r=8134ad506c4e&id=12a2c334&type=check&data=t572007166r0e0c0h31624hb18fe34010150aps1800api5si10em2pl1024pll3072tag20 sp1\";\r\n// String data=\"=1&sta=dc4f223eb429&shop=1&token=123232jd&r=8134ad506c4e&id=12a2c334&type=configa&data=ch1cas5cat5sc5t30603970r0e0c0h47368cst36000iga1st1\";\r\n// System.out.println((int)'&');\r\n// System.out.println(data);\r\n// data = \"c3RhPTY4YzYzYWUwZGZlZiZzaG9wPTEmdG9rZW49MTIzMjMyamQmcj05NGQ5YjNhOWMyNmYmaWQ9MmRlY2ZkY2UmdHlwZT1wcm9iZWEmZGF0YT0lMDE5NGQ5YjNhOWMyNmYmJTAxJTAxMDAxN2M0Y2QwMWNmeCUwMTc4NjI1NmM2NzI1YkwlMDE1Yzk2OWQ3MWVmNjNRJTAxOTRkOWIzYTljMjZmJTIxJTAxN2NjNzA5N2Y0MWFmeCUwMSUwMWRjODVkZWQxNjE3ZjklMDE1NGRjMWQ3MmE0NDB4JTAxNzg2MjU2YzY3MjViRSUwMTVjOTY5ZDcxZWY2M0olMDE5NGQ5YjNhOWMyNmYlMUUlMDFlNGE3YTA5M2UzOTJ4JTAxNGMzNDg4OTQ5YjY2eCUwMTNjNDZkODMwZTAyMDYlMDElMDE2MGYxODk2ZjJmY2JDJTAxOTRkOWIzYTljMjZmKyUwMTkwYzM1ZjE3NWQ2MXglMDE0YzM0ODg5NDliNjZ4JTAxZTRhN2M1YzhjYzA4JTNBJTAxJTAxZjBiNDI5ZDI1MTFjWCUwMTVjOTY5ZDcxZWY2MyU1QyUwMWQ0NmE2YTE1NWJmMXglMDE5NGQ5YjNhOWMyNmYqJTAxPQ==\";\r\n// data = \"c3RhPTY4YzYzYWUwZGZlZiZzaG9wPTEmdG9rZW49MTIzMjMyamQmcj05NGQ5YjNhOWMyNmYmaWQ9NWY0NTQzZWMmdHlwZT1wcm9iZWEmZGF0YT0lMDE2OGM2M2FlMGRmZWYmJTAxMDhmNjljMDYzNDdmRSUwMTIwM2NhZThlMjZlY0clMDE9\";\r\n System.out.println(WIFIReportVO.buildWIFIReportVO(data));\r\n System.out.println(WIFIReportVO.buildWIFIReportVO(new String(Base64Utils.decodeFromString(data))));\r\n\r\n// HttpUtils.postJSON(\"http://127.0.0.1:8080/soundtooth/callout\" , \"{\\\"user_name\\\":\\\"用户名\\\",\\\"iSeatNo\\\":\\\"1001001\\\",\\\"callId\\\":\\\"210ab0fdfca1439ba268a6bf8266305c\\\",\\\"telA\\\":\\\"18133331269\\\",\\\"telB\\\":\\\"181****1200\\\",\\\"telX\\\":\\\"17100445588\\\",\\\"telG\\\":\\\"07556882659\\\",\\\"duration\\\":\\\"19\\\",\\\"userData\\\":\\\"ef7ede6f36c84f1d45333863c38ff14c\\\"}\");\r\n//// HttpUtils.postJSON(\"http://127.0.0.1:8080/soundtooth/callout\" , \"{\\\"user_name\\\":\\\"用户名\\\",\\\"iSeatNo\\\":\\\"1001001\\\",\\\"callId\\\":\\\"210ab0fdfca1439ba268a6bf8266305c\\\",\\\"telA\\\":\\\"18133331269\\\",\\\"telB\\\":\\\"181****1200\\\",\\\"telX\\\":\\\"17100445588\\\",\\\"telG\\\":\\\"07556882659\\\",\\\"duration\\\":\\\"19\\\",\\\"userData\\\":\\\"ef7ede6f36c84f1d45333863c38ff14c\\\"}\");\r\n// System.out.println(HttpUtils.postJSON(\"http://s.slstdt.com/collector/collect\" , \"\"));\r\n// System.out.println(HttpUtils.postJSON(\"http://s.slstdt.com/soundtooth/callout\" , \"\"));\r\n\r\n\r\n }", "private static String m60359b(String str, String str2, String str3) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 4 + String.valueOf(str2).length() + String.valueOf(str3).length());\n sb.append(str);\n sb.append(\"|T|\");\n sb.append(str2);\n sb.append(\"|\");\n sb.append(str3);\n return sb.toString();\n }", "private String m1032a(String str, int i) {\n String[] split = this.f682B.split(\"\\\\*\")[i].split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n if (str.equals(\"lac\")) {\n return split[0];\n }\n if (str.equals(\"cellid\")) {\n return split[1];\n }\n if (str.equals(\"signal\")) {\n return split[2];\n }\n return null;\n }", "private boolean m76078a(String str) {\n return str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAD7D27B8E9A0AAD39BD28E517\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAD7D27B8E9A0AAD39BD28E517\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF58E0ECD5D66A9A\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF58E0ECD5D66A9A\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAC2C77986D416E025BF24D91D9F5DE0E6C68A688DD108B039AF\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAC2C77986D416E025BF24D91D9F5DE0E6C68A688DD108B039AF\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668DEA0EA620AE\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668DEA0EA620AE\")) || str.contains(C6969H.m41409d(\"G738BDC12AA6AE466F51B9245FBF1FCD16C86D118BE33A0\")) || str.contains(Uri.encode(C6969H.m41409d(\"G738BDC12AA6AE466F51B9245FBF1FCD16C86D118BE33A0\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668D\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668D\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466E340C110ABABC0D92690D111F031AC3BE30B9D4DFCF18CD36C97D413B37EAF26B906994CF7F1CCC73497C70FBA\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466E340C110ABABC0D92690D111F031AC3BE30B9D4DFCF18CD36C97D413B37EAF26B906994CF7F1CCC73497C70FBA\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F10F8006F1E8D3D67A90C515AD24E52AE903DF5AF7F6CCC27B80D009F038BF24EA419347FCF1D1D66A979B12AB3DA7\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F10F8006F1E8D3D67A90C515AD24E52AE903DF5AF7F6CCC27B80D009F038BF24EA419347FCF1D1D66A979B12AB3DA7\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466EB1DDE52E8FD9A996A8D9A12AB3DA766E90F855CFAAAD3C56697DA19B03CF967EE1A9D44\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466EB1DDE52E8FD9A996A8D9A12AB3DA766E90F855CFAAAD3C56697DA19B03CF967EE1A9D44\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA27F2078358F3E88CC26781D915BC3B\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA27F2078358F3E88CC26781D915BC3B\")));\n }", "public static void main(String[] args) {\n\t\tDecimalFormat k_10df = new DecimalFormat(\"###,###,###,###,###\");\n //숫자 5 이름 32 가격 15 수량 2 총가격 15\n\t\tString[] k_10itemname = { // item이름을 위한 배열이다\n\t\t\t\t\"01 테스트라면555 3,000 1 3,000\", \n\t\t\t\t\"02* 맛asdadad포카칩 1,000 2 2,000\",\n\t\t\t\t\"03 ddd초코센드위치ss위치 1,000 2 2,000\", \n\t\t\t\t\"04 피시방햄버거는맛없어 1,000 12 13,000\",//틀린거 \n\t\t\t\t\"05* 치즈없는피자 111,000 2 223,000\", \n\t\t\t\t\"06 맛있는포카칩 1,000 2 2,000\", \n\t\t\t\t\"07 뉴질랜드산항이 11,000 2 2,000\", \n\t\t\t\t\"08* 오늘의커피아이스 7,000 2 12,000\", //틀린거 \n\t\t\t\t\"09 시티위아아 1,000 2 2,000\", \n\t\t\t\t\"10 가나가맛있어 1,000 2 2,000\", \n\t\t\t\t\"11 스물두번째과자 800 2 1,600\", \n\t\t\t\t\"12 (싸이버버세트라지 4,000 2 8,000\", \n\t\t\t\t\"13 aaa프링클스오리지널 1,000 2 2,000\",\n\t\t\t\t\"14 55포카칩어니언맛 1,000 2 2,000\", \n\t\t\t\t\"15 떡없는떡볶이 1,000 6 6,000\", \n\t\t\t\t\"16* 호식이두마리치킨 1,000 2 2,000\", \n\t\t\t\t\"17* 땅땅치킨매운맛 3,000 2 6,000\", \n\t\t\t\t\"18 라면은역시매고랭 1,000 2 2,000\", \n\t\t\t\t\"19 된장찌개맛사탕 1,000 2 2,000\", \n\t\t\t\t\"20 삼겹살맛치토스 1,000 2 2,000\", \n\t\t\t\t\"21* 나홀로집에세트 1,000 2 2,000\", \n\t\t\t\t\"22 자바칩세트는맛없다 1,000 2 2,000\",\n\t\t\t\t\"23* 오레오레오레오 1,000 2 2,000\", \n\t\t\t\t\"24 자바에이드 1,000 2 2,000\", \n\t\t\t\t\"25 자이언트자바 1,000 2 2,000\", \n\t\t\t\t\"26 이건오떡오떡 2,000 10 20,100\", // 틀린거 \n\t\t\t\t\"27 마지막과자세트 1,000 11 11,000\", \n\t\t\t\t\"28* 차가운삼각김밥 1,000 2 2,000\", \n\t\t\t\t\"29 신라면짜장맛 1,000 2 2,000\", \n\t\t\t\t\"30 맛탕과김치 1,000 2 2,000\" }; \n\t\t\n\t\tfor (int k_10_i = 0; k_10_i < k_10itemname.length; k_10_i++) {\n\t\t\tString k_10_ToString = k_10itemname[k_10_i].toString();\n\t\t\tbyte [] k_10_bb = k_10_ToString.getBytes();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tString k_10_number = new String (k_10_bb,0,5);\t\t\t\t\t\t\t\t\t\t// 1번째부터 5바이트만큼 크기로 정의\n\t\t\tString k_10_name = new String (k_10_bb,5,33);\t\t\t\t\t\t\t\t\t\t// 6번째부터 33바이트만큼 크기로 정의\n\t\t\tString k_10_price1 = new String (k_10_bb,35,15);\t\t\t\t\t\t\t\t\t// 36번째부터 15바이트만큼 크기로 정의\n\t\t\tString k_10_units1 = new String (k_10_bb,55,10);\t\t\t\t\t\t\t\t\t// 56번째부터 10바이트만큼 크기로 정의\n\t\t\tString k_10_totalprice1 = new String (k_10_bb,60,14);\t\t\t\t\t\t\t\t// 61번째부터 14바이트만큼 크기로 정의\n\t\t\t\n\t\t\tint k_10_price = Integer.parseInt(k_10_price1.replace(\",\", \"\").trim());\t\t\t\t// int로 바꾸고 , 제거 후 공백도 제거\n\t\t\tint k_10_units = Integer.parseInt(k_10_units1.replace(\",\", \"\").trim());\t\t\t\t// int로 바꾸고 , 제거 후 공백도 제거\n\t\t\t\n\t\t\t//String price1 = k_10itemname[i].substring(33, 48);\n\t\t\t\n\t\t\t//String units1 = k_10itemname[i].substring(45, 58);\n\n\t\t\tint k_10_totalprice = Integer.parseInt(k_10_totalprice1.replace(\",\", \"\").trim()); // int로 바꾸고 , 제거 후 공백도 제거\n\t\t\t\n\t\t\tif(k_10_price * k_10_units != k_10_totalprice) {\n\t\t\t\tSystem.out.println(\"******************************\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ( ) 출력\n\t\t\t\tSystem.out.printf(\"오류[%s%s%10s%10s%10s]\\n\", k_10_number, k_10_name, k_10_price1, k_10_units1, k_10df.format(k_10_totalprice));\t\t\t// ( ) 출력\n\t\t\t\tSystem.out.printf(\"수정[%s%s%10s%10s%10s]\\n\", k_10_number, k_10_name, k_10_price1, k_10_units1, k_10df.format(k_10_price * k_10_units));\t// ( ) 출력\n\t\t\t\tSystem.out.println(\"******************************\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ( ) 출력\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\n\t\t\n\t}", "public final String[] mo24226W(C7620bi c7620bi) {\n int i = 1;\n AppMethodBeat.m2504i(113302);\n String[] strArr = new String[2];\n String str = c7620bi.field_content;\n if (C5046bo.isNullOrNil(str)) {\n strArr[0] = \"\";\n strArr[1] = \"\";\n AppMethodBeat.m2505o(113302);\n return strArr;\n }\n int i2;\n String str2;\n if (c7620bi.field_isSend == 0) {\n i2 = 1;\n } else {\n i2 = 0;\n }\n if (C1855t.m3896kH(c7620bi.field_talker) && i2 != 0) {\n i2 = C1829bf.m3761ox(str);\n if (i2 != -1) {\n str = str.substring(i2 + 1).trim();\n }\n }\n C5136b Ro = ((C6982j) C1720g.m3528K(C6982j.class)).bOr().mo15261Ro(str);\n if (Ro.dua()) {\n str = Ro.label;\n str2 = Ro.eUu;\n strArr[0] = str;\n strArr[1] = str2;\n } else {\n strArr[0] = Ro.label;\n strArr[1] = \"\";\n }\n if (C5046bo.isNullOrNil(strArr[0]) && C5046bo.isNullOrNil(strArr[1])) {\n C4990ab.m7416i(\"MicroMsg.LocationServer\", \"pull from sever\");\n long j = c7620bi.field_msgId;\n if (!(this.nJC == null || this.nJC.contains(Long.valueOf(j)))) {\n str2 = c7620bi.field_content;\n if (c7620bi.field_isSend != 0) {\n i = 0;\n }\n if (C1855t.m3896kH(c7620bi.field_talker) && i != 0) {\n i = C1829bf.m3761ox(str2);\n if (i != -1) {\n str2 = str2.substring(i + 1).trim();\n }\n }\n Ro = C5136b.apD(str2);\n this.nJC.add(Long.valueOf(j));\n C18657c.agw().mo33924a(Ro.nJu, Ro.nJv, this.nJD, Long.valueOf(c7620bi.field_msgId));\n }\n }\n AppMethodBeat.m2505o(113302);\n return strArr;\n }", "private void m81852p() {\n String c = m81844c(C6969H.m41409d(\"G738BEA12B634AE16E80F8677F0E4D1\"));\n if (!TextUtils.isEmpty(c)) {\n if (C6969H.m41409d(\"G6F82D909BA\").equals(c)) {\n this.f58078j = false;\n } else if (C6969H.m41409d(\"G7D91C01F\").equals(c)) {\n this.f58078j = true;\n }\n }\n }", "public static void main(String[] args) throws Exception {\n String s;\n// s = \"0000000000000\";\n s = \"000000-123456\";\n// s = \"000000123456\";\n if (s.matches(\"^0+$\")) {\n s = \"0\";\n }else{\n s = s.replaceFirst(\"^0+\",\"\");\n }\n System.out.println(s);\n\n\n// System.out.println(StringUtils.addRight(s,'A',mod));\n// String s = \"ECPay thong bao: Tien dien T11/2015 cua Ma KH PD13000122876, la 389.523VND. Truy cap www.ecpay.vn hoac lien he 1900561230 de biet them chi tiet.\";\n// Pattern pattern = Pattern.compile(\"^(.+)[ ](\\\\d+([.]\\\\d+)*)+VND[.](.+)$\");\n// Matcher matcher = pattern.matcher(s);\n// if(matcher.find()){\n// System.out.println(matcher.group(2));\n// }\n }", "public static String m3982ti(String str) {\n AppMethodBeat.m2504i(93202);\n int lastIndexOf = str.lastIndexOf(\";?enc=\");\n if (lastIndexOf > 0) {\n str = str.substring(0, lastIndexOf);\n AppMethodBeat.m2505o(93202);\n return str;\n }\n AppMethodBeat.m2505o(93202);\n return str;\n }", "private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }", "public String mo38887b() {\n String trim = this.f30736g0.getText().toString().trim();\n if (trim.length() < 2) {\n return \"\";\n }\n return trim.substring(0, 2);\n }", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String idNum = \"410326880818551\";\n System.out.println(verify15(idNum));\n// String idNum2 = \"411111198808185510\";\n String idNum2 = \"410326198808185515\";\n System.out.println(verify(idNum2));\n }", "private void m81854r() {\n this.f58073e = m81844c(C6969H.m41409d(\"G738BEA14BE26A22EE71A9947FCDAD7DE7D8FD0\"));\n this.f58080l = m81844c(C6969H.m41409d(\"G738BEA14BE269425E30884\"));\n String c = m81844c(C6969H.m41409d(\"G738BEA14BE269424EF0A\"));\n String c2 = m81844c(C6969H.m41409d(\"G738BEA14BE26943BEF09985C\"));\n if (!TextUtils.isEmpty(c)) {\n if (C6969H.m41409d(\"G7A86D408BC38\").equals(c)) {\n this.f58075g = true;\n } else if (C6969H.m41409d(\"G7D8AC116BA\").equals(c)) {\n this.f58075g = false;\n } else {\n C6969H.m41409d(\"G6C8EC50EA6\").equals(c);\n }\n }\n if (!TextUtils.isEmpty(c2)) {\n this.f58076h = c2;\n }\n this.f58081m = m81844c(C6969H.m41409d(\"G738BEA1EBA36AA3CEA1AAF5BF7E4D1D461BCC103AF35\"));\n this.f58074f = m81844c(C6969H.m41409d(\"G738BEA18BE33A016E41B845CFDEBFCD4668FDA08\"));\n }", "private String[] mergeInfo(String info) {\n String []ans= new String[4];\n ans[0]=info.substring(info.indexOf(\"[\")+1,info.indexOf(\"]\"));\n String dfTf=info.substring(info.indexOf(\"]!\")+2);\n ans[2]=dfTf;\n ans[1]= dfTf.substring(0, dfTf.indexOf(\"!\"));\n if(dfTf.contains(\"^\")){\n ans[3]= dfTf.substring(dfTf.length()-1);\n ans[2]= ans[2].substring(ans[2].indexOf(\"!\")+1, ans[2].length()-2);\n }\n\n else\n ans[2]= ans[2].substring(dfTf.indexOf(\"!\")+1);\n\n return ans;\n }", "private void m81843b(String str) {\n if (this.f58083o) {\n if (C6969H.m41409d(\"G6F82D909BA\").equals(str)) {\n this.f58077i = true;\n m81851o();\n return;\n }\n this.f58077i = false;\n m81851o();\n } else if (C6969H.m41409d(\"G6F82D909BA\").equals(str)) {\n this.f58077i = true;\n m81851o();\n } else if (C6969H.m41409d(\"G7D91C01F\").equals(str)) {\n this.f58077i = false;\n m81851o();\n }\n }", "private static boolean m4389a(String str) {\n return str != null && str.length() != 0 && Pattern.compile(\"^[0-9A-Fa-f]{13,18}+$\").matcher(str).matches() && str.indexOf(\"000000000\") == -1 && str.indexOf(\"111111111\") == -1 && str.indexOf(\"222222222\") == -1 && str.indexOf(\"333333333\") == -1 && str.indexOf(\"444444444\") == -1 && str.indexOf(\"555555555\") == -1 && str.indexOf(\"666666666\") == -1 && str.indexOf(\"777777777\") == -1 && str.indexOf(\"888888888\") == -1 && str.indexOf(\"999999999\") == -1;\n }", "public static String m114840g() {\n String str;\n if (!C7163a.m22363a() || !f93231M.mo93305a(Property.UseEffectCam)) {\n str = \"142710f02c3a11e8b42429f14557854a\";\n } else {\n str = \"68d32050064f11e891efe7cc07299bc5\";\n }\n if (!str.equals(\"142710f02c3a11e8b42429f14557854a\")) {\n return str;\n }\n if (!C7163a.m22363a() || !f93231M.mo93305a(Property.UsePlanQi)) {\n return \"142710f02c3a11e8b42429f14557854a\";\n }\n return \"9f623eb0ee4911e98a27811dc5ef9137\";\n }", "public void mo9824b(String str) {\n int i;\n int i2;\n try {\n int length = str.length() * 3;\n int i3 = C3670m.m8671i(length);\n int i4 = i3 + length;\n if (i4 > this.f9107e) {\n byte[] bArr = new byte[length];\n int a = C3700r1.m8885a(str, bArr, 0, length);\n mo9814c(a);\n mo9826b(bArr, 0, a);\n return;\n }\n if (i4 > this.f9107e - this.f9108f) {\n mo9827i();\n }\n int i5 = C3670m.m8671i(str.length());\n i = this.f9108f;\n if (i5 == i3) {\n int i6 = i + i5;\n this.f9108f = i6;\n int a2 = C3700r1.m8885a(str, this.f9106d, i6, this.f9107e - i6);\n this.f9108f = i;\n i2 = (a2 - i) - i5;\n mo9820l(i2);\n this.f9108f = a2;\n } else {\n i2 = C3700r1.m8884a((CharSequence) str);\n mo9820l(i2);\n this.f9108f = C3700r1.m8885a(str, this.f9106d, this.f9108f, i2);\n }\n this.f9109g += i2;\n } catch (C3703c e) {\n this.f9109g -= this.f9108f - i;\n this.f9108f = i;\n throw e;\n } catch (ArrayIndexOutOfBoundsException e2) {\n throw new C3674d(e2);\n } catch (C3703c e3) {\n mo9808a(str, e3);\n }\n }", "private byte m1656i() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 < this.f2518c) {\n CharSequence charSequence = this.f2516a;\n this.f2519d = i2 + 1;\n char charAt2 = charSequence.charAt(i2);\n this.f2520e = charAt2;\n if (charAt2 == '>') {\n return 12;\n }\n if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i3 = this.f2519d;\n if (i3 >= this.f2518c) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n this.f2519d = i3 + 1;\n charAt = charSequence2.charAt(i3);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n } else {\n this.f2519d = i;\n this.f2520e = '<';\n return 13;\n }\n }\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n String string0 = SQLUtil.normalize(\"Wk-M{)u04i&=ml]M\", false);\n assertEquals(\"Wk - M {) u04i & = ml ] M\", string0);\n }", "private static String m12564b(String str, String str2, String str3) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 4 + String.valueOf(str2).length() + String.valueOf(str3).length());\n sb.append(str);\n sb.append(\"|T|\");\n sb.append(str2);\n sb.append(\"|\");\n sb.append(str3);\n return sb.toString();\n }", "@kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000T\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\t\\n\\u0002\\b\\u0007\\n\\u0002\\u0010\\u000b\\n\\u0002\\b\\u0005\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0005\\n\\u0002\\u0010 \\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\n\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\bv\\u0018\\u00002\\u00020\\u0001:\\u0004./01J\\b\\u0010,\\u001a\\u00020\\u000fH&J\\b\\u0010-\\u001a\\u00020\\u000fH&R\\u0014\\u0010\\u0002\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0004\\u0010\\u0005R\\u0012\\u0010\\u0006\\u001a\\u00020\\u0007X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\b\\u0010\\tR\\u0014\\u0010\\n\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000b\\u0010\\u0005R\\u0014\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\r\\u0010\\u0005R\\u0012\\u0010\\u000e\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000e\\u0010\\u0010R\\u0012\\u0010\\u0011\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0011\\u0010\\u0010R\\u0014\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0013\\u0010\\u0005R\\u0014\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0016\\u0010\\u0017R\\u0014\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001a\\u0010\\u001bR\\u0014\\u0010\\u001c\\u001a\\u0004\\u0018\\u00010\\u001dX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001e\\u0010\\u001fR\\u0014\\u0010 \\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b!\\u0010\\u0005R\\u0018\\u0010\\\"\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b$\\u0010%R\\u0014\\u0010&\\u001a\\u0004\\u0018\\u00010\\'X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b(\\u0010)R\\u0018\\u0010*\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b+\\u0010%\\u0082\\u0001\\u000223\\u00a8\\u00064\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent;\", \"Lcom/stripe/android/model/StripeModel;\", \"clientSecret\", \"\", \"getClientSecret\", \"()Ljava/lang/String;\", \"created\", \"\", \"getCreated\", \"()J\", \"description\", \"getDescription\", \"id\", \"getId\", \"isConfirmed\", \"\", \"()Z\", \"isLiveMode\", \"lastErrorMessage\", \"getLastErrorMessage\", \"nextActionData\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"getNextActionData\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"nextActionType\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"getNextActionType\", \"()Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"paymentMethod\", \"Lcom/stripe/android/model/PaymentMethod;\", \"getPaymentMethod\", \"()Lcom/stripe/android/model/PaymentMethod;\", \"paymentMethodId\", \"getPaymentMethodId\", \"paymentMethodTypes\", \"\", \"getPaymentMethodTypes\", \"()Ljava/util/List;\", \"status\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"getStatus\", \"()Lcom/stripe/android/model/StripeIntent$Status;\", \"unactivatedPaymentMethods\", \"getUnactivatedPaymentMethods\", \"requiresAction\", \"requiresConfirmation\", \"NextActionData\", \"NextActionType\", \"Status\", \"Usage\", \"Lcom/stripe/android/model/PaymentIntent;\", \"Lcom/stripe/android/model/SetupIntent;\", \"payments-core_release\"})\npublic abstract interface StripeIntent extends com.stripe.android.model.StripeModel {\n \n /**\n * Unique identifier for the object.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getId();\n \n /**\n * Time at which the object was created. Measured in seconds since the Unix epoch.\n */\n public abstract long getCreated();\n \n /**\n * An arbitrary string attached to the object. Often useful for displaying to users.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getDescription();\n \n /**\n * Has the value true if the object exists in live mode or the value false if the object exists\n * in test mode.\n */\n public abstract boolean isLiveMode();\n \n /**\n * The expanded [PaymentMethod] represented by [paymentMethodId].\n */\n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getPaymentMethodId();\n \n /**\n * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionType getNextActionType();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getClientSecret();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.Status getStatus();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionData getNextActionData();\n \n /**\n * Whether confirmation has succeeded and all required actions have been handled.\n */\n public abstract boolean isConfirmed();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getLastErrorMessage();\n \n /**\n * Payment types that have not been activated in livemode, but have been activated in testmode.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();\n \n public abstract boolean requiresAction();\n \n public abstract boolean requiresConfirmation();\n \n /**\n * Type of the next action to perform.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\f\\b\\u0086\\u0001\\u0018\\u0000 \\u000e2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000eB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\r\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"RedirectToUrl\", \"UseStripeSdk\", \"DisplayOxxoDetails\", \"AlipayRedirect\", \"BlikAuthorize\", \"WeChatPayRedirect\", \"Companion\", \"payments-core_release\"})\n public static enum NextActionType {\n /*public static final*/ RedirectToUrl /* = new RedirectToUrl(null) */,\n /*public static final*/ UseStripeSdk /* = new UseStripeSdk(null) */,\n /*public static final*/ DisplayOxxoDetails /* = new DisplayOxxoDetails(null) */,\n /*public static final*/ AlipayRedirect /* = new AlipayRedirect(null) */,\n /*public static final*/ BlikAuthorize /* = new BlikAuthorize(null) */,\n /*public static final*/ WeChatPayRedirect /* = new WeChatPayRedirect(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionType.Companion Companion = null;\n \n NextActionType(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.NextActionType fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * - [The Intent State Machine - Intent statuses](https://stripe.com/docs/payments/intents#intent-statuses)\n * - [PaymentIntent.status API reference](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status)\n * - [SetupIntent.status API reference](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-status)\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\b\\u0086\\u0001\\u0018\\u0000 \\u000f2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000fB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\rj\\u0002\\b\\u000e\\u00a8\\u0006\\u0010\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"Canceled\", \"Processing\", \"RequiresAction\", \"RequiresConfirmation\", \"RequiresPaymentMethod\", \"Succeeded\", \"RequiresCapture\", \"Companion\", \"payments-core_release\"})\n public static enum Status {\n /*public static final*/ Canceled /* = new Canceled(null) */,\n /*public static final*/ Processing /* = new Processing(null) */,\n /*public static final*/ RequiresAction /* = new RequiresAction(null) */,\n /*public static final*/ RequiresConfirmation /* = new RequiresConfirmation(null) */,\n /*public static final*/ RequiresPaymentMethod /* = new RequiresPaymentMethod(null) */,\n /*public static final*/ Succeeded /* = new Succeeded(null) */,\n /*public static final*/ RequiresCapture /* = new RequiresCapture(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Status.Companion Companion = null;\n \n Status(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Status fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * See [setup_intent.usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) and\n * [Reusing Cards](https://stripe.com/docs/payments/cards/reusing-cards).\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\b\\u0086\\u0001\\u0018\\u0000 \\u000b2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000bB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\n\\u00a8\\u0006\\f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"OnSession\", \"OffSession\", \"OneTime\", \"Companion\", \"payments-core_release\"})\n public static enum Usage {\n /*public static final*/ OnSession /* = new OnSession(null) */,\n /*public static final*/ OffSession /* = new OffSession(null) */,\n /*public static final*/ OneTime /* = new OneTime(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Usage.Companion Companion = null;\n \n Usage(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Usage;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Usage fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000&\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0007\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0006\\u0003\\u0004\\u0005\\u0006\\u0007\\bB\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0006\\t\\n\\u000b\\f\\r\\u000e\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"Lcom/stripe/android/model/StripeModel;\", \"()V\", \"AlipayRedirect\", \"BlikAuthorize\", \"DisplayOxxoDetails\", \"RedirectToUrl\", \"SdkData\", \"WeChatPayRedirect\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"payments-core_release\"})\n public static abstract class NextActionData implements com.stripe.android.model.StripeModel {\n \n private NextActionData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\'\\u0012\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u0012\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0007J\\t\\u0010\\r\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u000e\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u000b\\u0010\\u000f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J+\\u0010\\u0010\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u00052\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0013\\u0010\\u0012\\u001a\\u00020\\u00132\\b\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015H\\u00d6\\u0003J\\t\\u0010\\u0016\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\t\\u0010\\u0017\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u001b2\\u0006\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\b\\u0010\\tR\\u0013\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000b\\u00a8\\u0006\\u001d\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"expiresAfter\", \"\", \"number\", \"\", \"hostedVoucherUrl\", \"(ILjava/lang/String;Ljava/lang/String;)V\", \"getExpiresAfter\", \"()I\", \"getHostedVoucherUrl\", \"()Ljava/lang/String;\", \"getNumber\", \"component1\", \"component2\", \"component3\", \"copy\", \"describeContents\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DisplayOxxoDetails extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The timestamp after which the OXXO expires.\n */\n private final int expiresAfter = 0;\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String number = null;\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String hostedVoucherUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails copy(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DisplayOxxoDetails() {\n super();\n }\n \n public DisplayOxxoDetails(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n super();\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int component1() {\n return 0;\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int getExpiresAfter() {\n return 0;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getNumber() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component3() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getHostedVoucherUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails[] newArray(int size) {\n return null;\n }\n }\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\u0017\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0006J\\t\\u0010\\u000b\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u001f\\u0010\\r\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u000e\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\u0013\\u0010\\u0010\\u001a\\u00020\\u00112\\b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0013H\\u00d6\\u0003J\\t\\u0010\\u0014\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0016\\u001a\\u00020\\u00172\\u0006\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u000fH\\u00d6\\u0001R\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0007\\u0010\\bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\n\\u00a8\\u0006\\u001b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"url\", \"Landroid/net/Uri;\", \"returnUrl\", \"\", \"(Landroid/net/Uri;Ljava/lang/String;)V\", \"getReturnUrl\", \"()Ljava/lang/String;\", \"getUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class RedirectToUrl extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri url = null;\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> CREATOR = null;\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl copy(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public RedirectToUrl(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component1() {\n return null;\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getUrl() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0004\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0081\\b\\u0018\\u0000 \\\"2\\u00020\\u0001:\\u0001\\\"B#\\b\\u0010\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0006B+\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\b\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\tJ\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u0011\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\bH\\u00c6\\u0003J\\u000b\\u0010\\u0013\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J5\\u0010\\u0014\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\b2\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\u0013\\u0010\\u0017\\u001a\\u00020\\u00182\\b\\u0010\\u0019\\u001a\\u0004\\u0018\\u00010\\u001aH\\u00d6\\u0003J\\t\\u0010\\u001b\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\t\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001d\\u001a\\u00020\\u001e2\\u0006\\u0010\\u001f\\u001a\\u00020 2\\u0006\\u0010!\\u001a\\u00020\\u0016H\\u00d6\\u0001R\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000bR\\u0013\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000bR\\u0011\\u0010\\u0004\\u001a\\u00020\\b\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\u000f\\u00a8\\u0006#\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"data\", \"\", \"webViewUrl\", \"returnUrl\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V\", \"authCompleteUrl\", \"Landroid/net/Uri;\", \"(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;)V\", \"getAuthCompleteUrl\", \"()Ljava/lang/String;\", \"getData\", \"getReturnUrl\", \"getWebViewUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"Companion\", \"payments-core_release\"})\n public static final class AlipayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String data = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String authCompleteUrl = null;\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri webViewUrl = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n @org.jetbrains.annotations.NotNull()\n private static final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect.Companion Companion = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect copy(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getAuthCompleteUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getWebViewUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.NotNull()\n java.lang.String webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect[] newArray(int size) {\n return null;\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0014\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0082\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0012\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\u0006\\u0010\\u0005\\u001a\\u00020\\u0004H\\u0002\\u00a8\\u0006\\u0006\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect$Companion;\", \"\", \"()V\", \"extractReturnUrl\", \"\", \"data\", \"payments-core_release\"})\n static final class Companion {\n \n private Companion() {\n super();\n }\n \n /**\n * The alipay data string is formatted as query parameters.\n * When authenticate is complete, we make a request to the\n * return_url param, as a hint to the backend to ping Alipay for\n * the updated state\n */\n private final java.lang.String extractReturnUrl(java.lang.String data) {\n return null;\n }\n }\n }\n \n /**\n * When confirming a [PaymentIntent] or [SetupIntent] with the Stripe SDK, the Stripe SDK\n * depends on this property to invoke authentication flows. The shape of the contents is subject\n * to change and is only intended to be used by the Stripe SDK.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0016\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0002\\u0003\\u0004B\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0002\\u0005\\u0006\\u00a8\\u0006\\u0007\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"Use3DS1\", \"Use3DS2\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"payments-core_release\"})\n public static abstract class SdkData extends com.stripe.android.model.StripeIntent.NextActionData {\n \n private SdkData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u0011\\u001a\\u00020\\u00122\\u0006\\u0010\\u0013\\u001a\\u00020\\u00142\\u0006\\u0010\\u0015\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0016\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"url\", \"\", \"(Ljava/lang/String;)V\", \"getUrl\", \"()Ljava/lang/String;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class Use3DS1 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String url = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS1(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001:\\u0001!B%\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0005\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\u0007H\\u00c6\\u0003J1\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0005\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0006\\u001a\\u00020\\u0007H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\fR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\fR\\u0011\\u0010\\u0005\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\f\\u00a8\\u0006\\\"\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"source\", \"\", \"serverName\", \"transactionId\", \"serverEncryption\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;)V\", \"getServerEncryption\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"getServerName\", \"()Ljava/lang/String;\", \"getSource\", \"getTransactionId\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"DirectoryServerEncryption\", \"payments-core_release\"})\n public static final class Use3DS2 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String source = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String serverName = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String transactionId = null;\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS2(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getSource() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getServerName() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getTransactionId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption component4() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption getServerEncryption() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2[] newArray(int size) {\n return null;\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\n\\u0002\\u0010 \\n\\u0002\\b\\u000e\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B-\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\f\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000f\\u0010\\u0011\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006H\\u00c6\\u0003J\\u000b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J9\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\u000e\\b\\u0002\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u00062\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\nR\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\nR\\u0017\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000e\\u00a8\\u0006!\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"Landroid/os/Parcelable;\", \"directoryServerId\", \"\", \"dsCertificateData\", \"rootCertsData\", \"\", \"keyId\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V\", \"getDirectoryServerId\", \"()Ljava/lang/String;\", \"getDsCertificateData\", \"getKeyId\", \"getRootCertsData\", \"()Ljava/util/List;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DirectoryServerEncryption implements android.os.Parcelable {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String directoryServerId = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String dsCertificateData = null;\n @org.jetbrains.annotations.NotNull()\n private final java.util.List<java.lang.String> rootCertsData = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String keyId = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption copy(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DirectoryServerEncryption(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDirectoryServerId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDsCertificateData() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> getRootCertsData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getKeyId() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption[] newArray(int size) {\n return null;\n }\n }\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000.\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u00c7\\u0002\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\t\\u0010\\u0003\\u001a\\u00020\\u0004H\\u00d6\\u0001J\\u0013\\u0010\\u0005\\u001a\\u00020\\u00062\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\bH\\u0096\\u0002J\\b\\u0010\\t\\u001a\\u00020\\u0004H\\u0016J\\u0019\\u0010\\n\\u001a\\u00020\\u000b2\\u0006\\u0010\\f\\u001a\\u00020\\r2\\u0006\\u0010\\u000e\\u001a\\u00020\\u0004H\\u00d6\\u0001\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class BlikAuthorize extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize INSTANCE = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> CREATOR = null;\n \n private BlikAuthorize() {\n super();\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @androidx.annotation.RestrictTo(value = {androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP})\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0000\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0011H\\u00d6\\u0001J\\u0019\\u0010\\u0012\\u001a\\u00020\\u00132\\u0006\\u0010\\u0014\\u001a\\u00020\\u00152\\u0006\\u0010\\u0016\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0017\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"weChat\", \"Lcom/stripe/android/model/WeChat;\", \"(Lcom/stripe/android/model/WeChat;)V\", \"getWeChat\", \"()Lcom/stripe/android/model/WeChat;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class WeChatPayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.WeChat weChat = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect copy(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public WeChatPayRedirect(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat getWeChat() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect[] newArray(int size) {\n return null;\n }\n }\n }\n }\n}", "public String apavada_prakruti_bhava(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA 3**********\");\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta); // anta\n // is\n // ITRANS\n // equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi); // adi is\n // ITRANS\n // equivalent\n\n String return_me = \"UNAPPLICABLE\";\n // 249\n if (VowelUtil.isPlutanta(X_anta) && X_adi.equals(\"iti\"))\n {// checked:29-6\n\n return_me = prakruti_bhava(X_anta, X_adi) + \", \" + utsarga_sandhi(X_anta, X_adi) + \"**\";\n ;\n /*\n * sandhi_notes = usg1 + sandhi_notes + \"\\nRegular Sandhis which\n * were being blocked by \" + \"pluta-pragRRihyA-aci-nityam(6.1.121)\n * are allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\" + \"\\n\" +\n * usg2 ;\n * \n * sandhi_notes+= Prkr + apavada + depend + sutra +\n * \"pluta-pragRRihyA aci nityam' (6.1.121)\" + \"\\nCondition: Only if\n * String 1 is a Vedic Usage(Arsha-prayoga)\";\n * \n * //This note below goes after the Notes returned fropm\n * utsarga_sandhi above String cond1 = \"\\nRegular Sandhis which were\n * being blocked by \" + \"'pluta-pragRRihyA-aci-nityam'(6.1.121) are\n * allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\";\n * vowel_notes.append_condition(cond1); ;\n */\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"Prakruti Bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pluta-ending word or a pragRRihya followed by any Vowel result in Prakruti bhava sandhi.\\n\" + \"<pluta-ending> || pragRRihya + vowel = prakruti bhava.\";\n comments.setConditions(cond1);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.2.125\");\n comments.setSutraPath(\"apluta-vadupasthite\");\n comments.setSutraProc(\"utsargic Sandhis Unblocked\");\n comments.setSource(Comments.sutra);\n String cond2 = depend + \"According to 6.1.121 plutantas followed by Vowels result in prakruti-bhaava\\n\" + \"However if the word 'iti' used is non-Vedic, then regular sandhis block 6.1.121.\";\n\n comments.setConditions(cond2);\n\n }\n\n // 250\n else if ((X_anta.endsWith(\"I3\") || X_anta.endsWith(\"i3\")) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 250\");\n return_me = utsarga_sandhi(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n /*\n * sandhi_notes += apavada + sutra + \"'I3 cAkravarmaNasya'\n * (6.1.126)\" + \"Blocks 'pluta-pragRRihyA aci nityam' (6.1.121)\";\n */\n // vowel_notes.start_adding_notes();\n // vowel_notes.set_sutra_num(\"6.1.126\") ;\n // vowel_notes.setSutraPath(\"I3 cAkravarmaNasya\") ;\n // vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n // vowel_notes.set_source(tippani.sutra) ;\n String cond1 = \"According to chaakravarman pluta 'i' should be trated as non-plutanta.\\n\" + \"Given in Panini Sutra 'I3 cAkravarmaNasya' (6.1.126). This sutra allows General Sandhis to operate by blocking\" + \"'pluta-pragRRihyA aci nityam' (6.1.121)\";\n comments.append_condition(cond1);\n\n }\n // prakrutibhava starts\n // 233-239 Vedic Usages\n // 243 : error (now fixed) shivA# isAgacha printing as sh-kaar ha-kaar\n // ikaar etc should be shakaar ikaar\n // **********ELSE IF****************//\n else if ((VowelUtil.isPlutanta(X_anta) || this.pragrhya == true) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using Vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 243\");\n return_me = prakruti_bhava(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n // sandhi_notes = Prkr + sutra + \"pluta-pragRRihyA aci nityam'\n // (6.1.121)\";\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"prakruti bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pragRRihyas or plutantas followed by any vowel result in NO SANDHI which is prakruti bhava\"; // Fill\n // Later\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && adi.equals(\"indra\")) // Avan~Na Adesh\n {// checked:29-6\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me = guna_sandhi(avang_adesh, X_adi);\n // We have to remove guna_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.120\");\n comments.setSutraPath(\"indre ca\");\n comments.setSutraProc(\"ava~nga Adesha followed by Guna Sandhi\");\n comments.setSource(Comments.sutra);\n String cond1 = \"Blocks Prakruti Bhava, and Ayadi Sandhi.\\n go + indra = go + ava~N + indra = gava + indra = gavendra.\"; // Fill\n // Later\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 241 242 Vik.\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && VowelUtil.isAjadi(X_adi))\n {// checked:29-6\n\n return_me = utsarga_sandhi(X_anta, X_adi); //\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me += \", \" + utsarga_sandhi(avang_adesh, X_adi);\n\n // We have to remove utsarga_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.119\");\n comments.setSutraPath(\"ava~N sphoTayanasya\");\n comments.setSutraProc(\"ava~nga Adesha followed by Regular Vowel Sandhis\");\n comments.setSource(Comments.sutra);\n String cond1 = padanta + \"View Only Supported by Sphotaayana Acharya.\\n\" + \"padanta 'go' + Vowel gets an avana~N-adesh resulting in gava + Vowel.\"; // Fill\n // Later...filled\n comments.setConditions(cond1);\n\n if (X_adi.startsWith(\"a\"))\n {\n return_me += \", \" + prakruti_bhava(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.118\");\n comments.setSutraPath(\"sarvatra vibhaaSaa goH\");\n comments.setSutraProc(\"Optional Prakruti Bhava for 'go'(cow)implying words ending in 'e' or 'o'.\");\n comments.setSource(Comments.sutra);\n String cond2 = \"Padanta Dependency. Prakruti bhava if 'go' is followed by any other Phoneme.\"; // Fill\n // Later\n comments.setConditions(cond2);\n\n return_me += \", \" + purva_rupa(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.105\");\n comments.setSutraPath(\"e~NaH padAntAdati\");\n comments.setSutraProc(\"purva-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond3 = padanta + \"If a padanta word ending in either 'e' or 'o' is followed by an 'a' purva-rupa ekadesh takes place\" + \"\\npadanta <e~N> 'e/o' + 'a' = purva-rupa ekadesha. Blocks Ayadi Sandhi\";\n comments.setConditions(cond3);\n\n }\n }\n // **********END OF ELSE IF****************//\n\n // 243\n\n // 244\n\n // 246 -250 , 253-260\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA3s**********\");\n\n return return_me; // apavada rules formulated by Panini\n }", "private static C2065a m7413d(C2063i c2063i) throws ParserException {\n if (c2063i.m7399a(24) != 5653314) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"expected code book to start with [0x56, 0x43, 0x42] at \");\n stringBuilder.append(c2063i.m7401b());\n throw new ParserException(stringBuilder.toString());\n }\n int i;\n int i2;\n int a = c2063i.m7399a(16);\n int a2 = c2063i.m7399a(24);\n long[] jArr = new long[a2];\n boolean a3 = c2063i.m7400a();\n long j = 0;\n if (a3) {\n int a4 = c2063i.m7399a(5) + 1;\n i = 0;\n while (i < jArr.length) {\n int a5 = c2063i.m7399a(C2069k.m7403a(a2 - i));\n int i3 = i;\n for (i = 0; i < a5 && i3 < jArr.length; i++) {\n jArr[i3] = (long) a4;\n i3++;\n }\n a4++;\n i = i3;\n }\n } else {\n boolean a6 = c2063i.m7400a();\n for (i2 = 0; i2 < jArr.length; i2++) {\n if (!a6) {\n jArr[i2] = (long) (c2063i.m7399a(5) + 1);\n } else if (c2063i.m7400a()) {\n jArr[i2] = (long) (c2063i.m7399a(5) + 1);\n } else {\n jArr[i2] = 0;\n }\n }\n }\n i2 = c2063i.m7399a(4);\n if (i2 > 2) {\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"lookup type greater than 2 not decodable: \");\n stringBuilder2.append(i2);\n throw new ParserException(stringBuilder2.toString());\n }\n if (i2 == 1 || i2 == 2) {\n c2063i.m7402b(32);\n c2063i.m7402b(32);\n i = c2063i.m7399a(4) + 1;\n c2063i.m7402b(1);\n if (i2 != 1) {\n j = (long) (a2 * a);\n } else if (a != 0) {\n j = C2069k.m7404a((long) a2, (long) a);\n }\n c2063i.m7402b((int) (j * ((long) i)));\n }\n return new C2065a(a, a2, jArr, i2, a3);\n }", "public static CheckResult extractStats4ALI(String line) {\n String[] splits = SEMI.split(line);\n if(splits!=null && splits.length>41) {\n Double sales = splits[22].equals(\"\")?Double.valueOf(\"0.00\"):Double.valueOf(splits[22]);\n\n return new CheckResult(1,sales,\"ALI\");\n }\n return new CheckResult(1,0.00,null);\n }", "String mo21078i();", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n String string0 = SQLUtil.normalize(\"TiI~,Q-Hqtp'@\", true);\n assertEquals(\"TiI ~, Q - Hqtp '@'\", string0);\n }", "C1458cs mo7613iS();", "public static void main(String[] args) throws Exception {\n\t\tString v25message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v25|T|2.5\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\";\n\n\t\tString v23message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v23|T|2.3\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\";\n\n\t\t/*\n\t\t * The first (and probably better in most ways) technique is as follows. Use a model class\n\t\t * factory called the CanonicalModelClassFactory. This class forces a specific version of\n\t\t * HL7 to be used. Because HL7 v2.x is a backwards compatible standard, you can choose the\n\t\t * highest version you need to support, and the model classes will be compatible with\n\t\t * messages from previous versions.\n\t\t */\n\n\t\tHapiContext context = new DefaultHapiContext();\n\n\t\t// Create the MCF. We want all parsed messages to be for HL7 version 2.5,\n\t\t// despite what MSH-12 says.\n\t\tCanonicalModelClassFactory mcf = new CanonicalModelClassFactory(\"2.5\");\n\t\tcontext.setModelClassFactory(mcf);\n\n\t\t// Pass the MCF to the parser in its constructor\n\t\tPipeParser parser = context.getPipeParser();\n\n\t\t// The parser parses the v2.3 message to a \"v25\" structure\n\t\tca.uhn.hl7v2.model.v25.message.ORU_R01 msg = (ca.uhn.hl7v2.model.v25.message.ORU_R01) parser.parse(v23message);\n\n\t\t// 20169838-v23\n\t\tSystem.out.println(msg.getMSH().getMessageControlID().getValue());\n\n\t\t// The parser also parses the v2.5 message to a \"v25\" structure\n\t\tmsg = (ca.uhn.hl7v2.model.v25.message.ORU_R01) parser.parse(v25message);\n\n\t\t// 20169838-v25\n\t\tSystem.out.println(msg.getMSH().getMessageControlID().getValue());\n\n//\t\t/*\n//\t\t * The second technique is to use the Terser. The Terser allows you\n//\t\t * to access field values using a path-like notation. For more information\n//\t\t * on the Terser, see the example here:\n//\t\t * http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/ExampleUseTerser.html\n//\t\t */\n//\n//\t\t// This time we just use a normal ModelClassFactory, which means we will be\n//\t\t// using the standard version-specific model classes\n//\t\tcontext.setModelClassFactory(new DefaultModelClassFactory());\n//\n//\t\t// 20169838-v23\n//\t\tMessage v23Message = parser.parse(v23message);\n//\t\tTerser t23 = new Terser(v23Message);\n//\t\tSystem.out.println(t23.get(\"/MSH-10\"));\n//\n//\t\t// 20169838-v25\n//\t\tMessage v25Message = parser.parse(v25message);\n//\t\tTerser t25 = new Terser(v25Message);\n//\t\tSystem.out.println(t25.get(\"/MSH-10\"));\n//\n//\t\t/*\n//\t\t * Note that this second technique has one major drawback: Although\n//\t\t * message definitions are backwards compatible, some group names\n//\t\t * change between versions. If you are accessing a group within\n//\t\t * a complex message structure, this can cause issues.\n//\t\t *\n//\t\t * This is less of an issue for some message types where groups are\n//\t\t * not used much (e.g. ADT)\n//\t\t */\n//\n//\t\t// This works and prints \"Test Value\"\n//\t\tSystem.out.println(t23.get(\"/RESPONSE/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n//\n//\t\t// This fails...\n//\t\t// System.out.println(t25.get(\"/RESPONSE/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n//\n//\t\t// ...because this would be required to extract the OBX-5 value from a v2.5 message\n//\t\tSystem.out.println(t25.get(\"/PATIENT_RESULT/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n\n\t\t/*\n\t\t * Another technique which may occasionally be useful is to simply use\n\t\t * a \"Generic\" message structure. Generic message structures can\n\t\t * represent anything within an HL7 message, but they don't actually\n\t\t * model all of the intricacies of the structure within the message,\n\t\t * but rather just model all of the data in an unstructured way.\n\t\t */\n\n\t\t// Create a new context using a Generic Model Class Factory\n\t\tcontext = new DefaultHapiContext();\n\t\tcontext.setModelClassFactory(new GenericModelClassFactory());\n\n\t\tv25message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v25|T|2.5\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\\r\"\n\t\t\t\t+ \"NTE||Note for OBX(1)\\r\"\n\t\t\t\t+ \"OBX|2|ST|||Value number 2\";\n\n\t\t// The parser will always parse this as a \"GenericMessage\"\n\t\tGenericMessage message = (GenericMessage) context.getPipeParser().parse(v25message);\n\n\t\t/*\n\t\t * A generic message has a flat structure, so you can ask for any\n\t\t * field by only its segment name, not a complex path\n\t\t */\n\t\tTerser t = new Terser(message);\n\t\tSystem.out.println(t.get(\"/OBX-5\"));\n\t\t// Prints: Test Value\n\n\t\t/*\n\t\t * This technique isn't great for messages with complex structures. For\n\t\t * example, the second OBX in the message above is a part of the base structure\n\t\t * because GenericMessage has no groups.\n\t\t *\n\t\t * It can be accessed using a new segment name (OBX2 instead of OBX)\n\t\t * but this is error prone, so use with caution.\n\t\t */\n\t\tSystem.out.println(t.get(\"/OBX2-5\"));\n\t\t// Prints: Value number 2\n\n\t}", "private static void m7411b(C2063i c2063i) throws ParserException {\n int a = c2063i.m7399a(6) + 1;\n for (int i = 0; i < a; i++) {\n if (c2063i.m7399a(16) > 2) {\n throw new ParserException(\"residueType greater than 2 is not decodable\");\n }\n int i2;\n c2063i.m7402b(24);\n c2063i.m7402b(24);\n c2063i.m7402b(24);\n int a2 = c2063i.m7399a(6) + 1;\n c2063i.m7402b(8);\n int[] iArr = new int[a2];\n for (i2 = 0; i2 < a2; i2++) {\n iArr[i2] = ((c2063i.m7400a() ? c2063i.m7399a(5) : 0) * 8) + c2063i.m7399a(3);\n }\n for (i2 = 0; i2 < a2; i2++) {\n for (int i3 = 0; i3 < 8; i3++) {\n if ((iArr[i2] & (1 << i3)) != 0) {\n c2063i.m7402b(8);\n }\n }\n }\n }\n }", "java.lang.String getField1248();", "public String mo38889c() {\n String trim = this.f30736g0.getText().toString().trim();\n return trim.length() == 5 ? trim.substring(3, 5) : \"\";\n }", "public void validateRpd8s22()\n {\n // Duplicate of 8s14\n }", "private void m81853q() {\n String c = m81844c(C6969H.m41409d(\"G738BEA09AB31BF3CF5319249E0DAD0C3708FD0\"));\n if (!TextUtils.isEmpty(c)) {\n if (C6969H.m41409d(\"G6D82C711\").equals(c)) {\n this.f58079k = true;\n } else if (C6969H.m41409d(\"G658AD212AB\").equals(c)) {\n this.f58079k = false;\n }\n }\n }", "public String mo3890a(String str) {\n if (!this.f681A.contains(str + SimpleComparison.GREATER_THAN_OPERATION)) {\n return \"0\";\n }\n int indexOf = this.f681A.indexOf(str + SimpleComparison.GREATER_THAN_OPERATION);\n return this.f681A.substring(indexOf + str.length() + 1, this.f681A.indexOf(\"</\" + str));\n }", "public static void main(String[] args) {\n\t\tString[] k42_arr = {\"행정동명,관리번호,설치장소,소재지도로명주소,수량,관리기관(부서),연락처,데이터기준일자,위도,경도\"\n\t\t\t\t, \"동대신1동,1,동대맨션 한양옷집 앞,부산광역시 서구 대영로 78,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1103299,129.0197194\"\n\t\t\t\t, \"동대신2동,2,전원빌라 맞은편 북산경로당 앞,부산광역시 서구 중앙공원로 24,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1159776,129.0241526\"\n\t\t\t\t, \"동대신3동,3,망양로 138 깔끄미세탁 맞은편,부산광역시 서구 망양로 138,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1162236,129.0214899\"\n\t\t\t\t, \"동대신3동,4,중앙빌라 앞 화단,부산광역시 서구 망양로 127,1,서구청(구민안전과),051-240-4645,2021-04-20,35.117069,129.0206052\"\n\t\t\t\t, \"동대신3동,5,수도사 옆 화단,부산광역시 서구 망양로 115,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1172885,129.0195286\"\n\t\t\t\t, \"동대신3동,6,덕산카센터 위 도로변,부산광역시 서구 망양로11번길 8,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1120714,129.0124013\"\n\t\t\t\t, \"동대신3동,7,동대신3동 문화아파트 앞 GS25 앞,부산광역시 서구 구덕로 350,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1151484,129.0160003\"\n\t\t\t\t, \"동대신3동,8,한신휴플러스 앞 육교 밑(재활용센터 앞),부산광역시 서구 보수대로 276,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1183062,129.0156566\"\n\t\t\t\t, \"동대신3동,9,망양로 108 맞은편 전월세 게시판 앞,부산광역시 서구 망양로 108,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1176623,129.0189112\"\n\t\t\t\t, \"서대신1동,10,해돋이로350번길 표지판 앞,부산광역시 서구 해돋이로 350,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1075342,129.015992\"\n\t\t\t\t, \"서대신1동,11,대티터널 입구 안전지대,부산광역시 서구 낙동대로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1103847,129.0113745\"\n\t\t\t\t, \"서대신1동,12,자유아파트 입구,부산광역시 서구 시약로 11,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1105379,129.0091847\"\n\t\t\t\t, \"서대신1동,13,대티배수지 입구,부산광역시 서구 해돋이로 418,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1081363,129.0096575\"\n\t\t\t\t, \"서대신1동,14,해돋이로378번길 19-1 옹벽 밑,부산광역시 서구 해돋이로378번길 19-1,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1073127,129.012643\"\n\t\t\t\t, \"서대신1동,15,고운들 공영주차장 펜스 옆,부산광역시 서구 해돋이로 386,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1074545,129.0120788\"\n\t\t\t\t, \"서대신3동,16,협성르네상스 APT 앞 소공원 입구,부산광역시 서구 대티로 159,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1127346,129.0099413\"\n\t\t\t\t, \"서대신3동,17,㈜도원 옆,부산광역시 서구 시약로 57,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1191936,129.0101583\"\n\t\t\t\t, \"서대신3동,18,효목딥스카이 2차 B동 옆,부산광역시 서구 시약로 77-1,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1167827,129.0093067\"\n\t\t\t\t, \"서대신4동,19,구덕야영장 입구(가로등 38-17 앞),부산광역시 서구 꽃마을로156번길 109,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1253387,129.010719\"\n\t\t\t\t, \"서대신4동,20,수원지 입구(가로등 38-12 앞),부산광역시 서구 꽃마을로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1217706,129.010189\"\n\t\t\t\t, \"서대신4동,21,수원지 중간(가로등 38-9 앞),부산광역시 서구 꽃마을로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1218706,129.012189\"\n\t\t\t\t, \"서대신4동,22,구덕수련관 입구 맞은편 공중화장실 밑,부산광역시 서구 꽃마을로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1218906,129.011189\"\n\t\t\t\t, \"서대신4동,23,유진대림아파트 입구 구덕터널 보행금지 표지판 앞,부산광역시 서구 보수대로320번길 11,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1207739,129.0119209\"\n\t\t\t\t, \"서대신4동,24,민방위교육장 앞,부산광역시 서구 꽃마을로 88,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1219026,129.0094225\"\n\t\t\t\t, \"서대신4동,25,부산국민체육센터 주차장 입구 아래 50m 지점,부산광역시 서구 대신로 150,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1173229,129.0156411\"\n\t\t\t\t, \"서대신4동,26,꽃마을 산마루오리전문점 입구,부산광역시 서구 엄광산로 33,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1286303,129.0085938\"\n\t\t\t\t, \"서대신4동,27,구덕기상관측소 도로(1),부산광역시 서구 꽃마을로163번길,1,서구청(구민안전과),051-240-4645,2021-04-20,35.126161,129.0048766\"\n\t\t\t\t, \"서대신4동,28,구덕기상관측소 도로(2),부산광역시 서구 꽃마을로163번길,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1223372,129.0068161\"\n\t\t\t\t, \"서대신4동,29,구덕기상관측소 도로(3),부산광역시 서구 꽃마을로163번길,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1298372,129.0128161\"\n\t\t\t\t, \"서대신4동,30,구덕기상관측소 도로(4),부산광역시 서구 꽃마을로163번길,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1288372,129.0058161\"\n\t\t\t\t, \"서대신4동,31,경성전자 정보고등학교 앞,부산광역시 서구 꽃마을로 23,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1161529,129.0128358\"\n\t\t\t\t, \"서대신4동,32,안나모자원 입구,부산광역시 서구 꽃마을로163번길 40,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1278372,129.0058161\"\n\t\t\t\t, \"서대신4동,33,민방위교육장 위,부산광역시 서구 꽃마을로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1278372,129.0058161\"\n\t\t\t\t, \"서대신4동,34,구 서대신4동 주민센터 앞,부산광역시 서구 보수대로 303,1,서구청(구민안전과),051-240-4645,2021-04-20,35.119095,129.0933\"\n\t\t\t\t, \"아미동,35,까치고개로 129-1 맞은편 행복센터 표지판 앞,부산광역시 서구 까치고개로 129-1,1,서구청(구민안전과),051-240-4645,2021-04-20,35.10175,129.0111538\"\n\t\t\t\t, \"아미동,36,87번 종점 아미전원빌라 횡단보도 앞,부산광역시 서구 까치고개로 91,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1047222,129.0109086\"\n\t\t\t\t, \"아미동,37,부산시아동보호종합센터 앞,부산광역시 서구 까치고개로 183,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1001541,129.015948\"\n\t\t\t\t, \"아미동,38,까치고개로 129-1 볼록거울 밑,부산광역시 서구 까치고개로 129-1,1,서구청(구민안전과),051-240-4645,2021-04-20,35.10175,129.0111538\"\n\t\t\t\t, \"아미동,39,까치고개로152번길 2-23 화단 앞,부산광역시 서구 까치고개로152번길 2-23,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1005791,129.0125542\"\n\t\t\t\t, \"아미동,40,대성사 앞,부산광역시 서구 옥천로 148,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0987971,129.0113554\"\n\t\t\t\t, \"아미동,41,아미성당 앞(감천고개) 육교 밑,부산광역시 서구 옥천로 129,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0975307,129.0107069\"\n\t\t\t\t, \"아미동,42,아미로 26-1 밑 구름전망대 가는입구 게시판 앞,부산광역시 서구 아미로 26-1,1,서구청(구민안전과),051-240-4645,2021-04-20,35.099439,129.0118887\"\n\t\t\t\t, \"아미동,43,세신빌라 앞,부산광역시 서구 옥천로 164,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0995194,129.0116597\"\n\t\t\t\t, \"아미동,44,마을버스 정류소 공중전화 앞,부산광역시 서구 아미로 111,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0991894,129.0145749\"\n\t\t\t\t, \"아미동,45,아미골 공영주차장 앞,부산광역시 서구 아미로 77,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0991669,129.013604\"\n\t\t\t\t, \"아미동,46,광성사 옆,부산광역시 서구 해돋이로 250,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0987057,129.0166879\"\n\t\t\t\t, \"아미동,47,캐릭터침대 옆,부산광역시 서구 해돋이로 278,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1010898,129.0167011\"\n\t\t\t\t, \"초장동,48,초장동 주민센터 옆,부산광역시 서구 초장로 35,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0951782,129.0204761\"\n\t\t\t\t, \"초장동,49,천마산악회 옆 전월세 게시판 앞,부산광역시 서구 해돋이로 178,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0930889,129.0186405\"\n\t\t\t\t, \"충무동,50,토성초등학교 담벼락 옆,부산광역시 서구 까치고개로 242,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0995101,129.0222137\"\n\t\t\t\t, \"남부민1동,51,해돋이 공영주차장 앞,부산광역시 서구 해돋이로 146,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0913071,129.0211758\"\n\t\t\t\t, \"남부민2동,52,영창1차빌라 게시판 앞,부산광역시 서구 해돋이로 49,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0839546,129.0189031\"\n\t\t\t\t, \"남부민2동,53,남부민공영주차장 밑 전신주,부산광역시 서구 남부민로 92,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0840324,129.0206904\"\n\t\t\t\t, \"남부민2동,54,남부민공영주차장 맞은편 버스정류소 내,부산광역시 서구 천마로 78,1,서구청(구민안전과),051-240-4645,2021-04-20,35.083911,129.0199048\"\n\t\t\t\t, \"남부민2동,55,천마산로 1 화단경계석 내,부산광역시 서구 천마산로 1,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0842811,129.0169497\"\n\t\t\t\t, \"남부민2동,56,남부민아파트 아래 횡단보도,부산광역시 서구 천해로 10-1,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0833125,129.0176505\"\n\t\t\t\t, \"남부민2동,57,대동송도맨션 CU편의점 옆 횡단보도,부산광역시 서구 해돋이로 2,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0829607,129.0213306\"\n\t\t\t\t, \"남부민2동,58,풀리페아파트 지하주차장 입구,부산광역시 서구 해돋이로 23,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0976903,129.0174891\"\n\t\t\t\t, \"암남동,59,알로이시오 전자기계고등학교 위(가로등155-9 밑),부산광역시 서구 감천로 237,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0824061,129.01448\"\n\t\t\t\t, \"암남동,60,고신대학교 장례식장 입구,부산광역시 서구 감천로 262,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0807796,129.014416\"\n\t\t\t\t, \"암남동,61,고신대학교병원 밑(가로등91-2 앞),부산광역시 서구 감천로 262,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0807796,129.014416\"\n\t\t\t\t, \"암남동,62,송도우체국 담벼락 밑,부산광역시 서구 충무대로 47,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0788688,129.0178409\"\n\t\t\t\t, \"암남동,63,암남공원 진입로 입구,부산광역시 서구 암남공원로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0635,129.0167\"\n\t\t\t\t, \"암남동,64,암남공원 관리사무실 맞은편,부산광역시 서구 암남공원로 179-13,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0627028,129.0196969\"\n\t\t\t\t, \"암남동,65,농림축산검역본부 담장 앞(신화참숯불갈비 맞은편),부산광역시 서구 암남공원로 185,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0625049,129.0152358\"\n\t\t\t\t, \"암남동,66,감천배수지 맞은편(예비군교육장 진입로),부산광역시 서구 장군산로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0625049,129.0152358\"\n\t\t\t\t, \"암남동,67,예비군교장 입구,부산광역시 서구 장군산로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0629,129.0152358\"\n\t\t\t\t, \"암남동,68,예비군교장 버스정류소(02-140) 밑,부산광역시 서구 암남공원로 2,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0756964,129.015943\"\n\t\t\t\t, \"암남동,69,송천빌라 맞은편 전월세 게시판 앞,부산광역시 서구 장군산로 51,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0723995,129.0152476\"\n\t\t\t\t, \"암남동,70,신한빌리지 앞,부산광역시 서구 천해남로 14,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0829778,129.0128411\"\n\t\t\t\t, \"암남동,71,대동주차장 입구,부산광역시 서구 천해로 42,1,서구청(구민안전과),051-240-4645,2021-04-20,35.084527,129.0149263\"\n\t\t\t\t, \"암남동,72,곡각지 탑스빌 앞(충무대로 56),부산광역시 서구 충무대로 56,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0779059,129.0185099\"\n\t\t\t\t, \"암남동,73,약수탕 옆 횡단보도 앞,부산광역시 서구 감천로 284,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0794076,129.0175406\"\n\t\t\t\t, \"암남동,74,진성석유 옆 암남동 곡각지 화단,부산광역시 서구 충무대로 67,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0789699,129.0199661\"\n\t\t\t\t, \"암남동,75,수국마을 맞은편 전신주 앞,부산광역시 서구 천해로45번길 7,1,서구청(구민안전과),051-240-4645,2021-04-20,35.084127,129.0145781\"\n\t\t\t\t, \"암남동,76,암남동주민센터 앞 버스정류소 밑,부산광역시 서구 충무대로 85,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0799732,129.0213603\"\n\t\t\t\t, \"암남동,77,알로이시오 기념관 옆,부산광역시 서구 감천로 229,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0825751,129.0131377\"\n\t\t\t\t, \"암남동,78,암남공원 진입로 시계탑 옆,부산광역시 서구 암남공원로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0627028,129.0196969\"\n\t\t\t\t, \"암남동,79,예비군 교육장 중간(가로등 81-9),부산광역시 서구 장군산로,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0629,129.0152358\"\n\t\t\t\t, \"암남동,80,송도태경시티빌 앞,부산광역시 서구 충무대로 76,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0789267,129.0208198\"\n\t\t\t\t, \"암남동,81,삼경빌라 앞,부산광역시 서구 감천로 277,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0800322,129.0182008\"\n\t\t\t\t, \"남부민1동,82,칠보사 뒤,부산광역시 서구 해돋이로 109,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0883917,129.0216374\"\n\t\t\t\t, \"남부민1동,83,남부민1동주민센터 앞,부산광역시 서구 충무대로 255-5,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0925184,129.023766\"\n\t\t\t\t, \"남부민2동,84,서구자원봉사센터 옆,부산광역시 서구 남부민로 40,1,서구청(구민안전과),051-240-4645,2021-04-20,35.0855421,129.0232161\"\n\t\t\t\t, \"동대신2동,85,씨티빌 입구,부산광역시 서구 보동길 254-4,1,서구청(구민안전과),051-240-4645,2021-04-20,35.113109,129.0249395\"\n\t\t\t\t, \"동대신3동,86,경남서점 앞,부산광역시 서구 동대로 19-14,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1191894,129.0183608\"\n\t\t\t\t, \"동대신3동,87,덕산카센터 앞,부산광역시 서구 망양로 118-8,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1169708,129.0193633\"\n\t\t\t\t, \"부민동,88,동아대학교 부민캠퍼스 옆,부산광역시 서구 구덕로 225,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1042116,129.0191299\"\n\t\t\t\t, \"부민동,89,푸른탕 앞,부산광역시 서구 임시수도기념로 36,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1035389,129.0179797\"\n\t\t\t\t, \"서대신1동,90,고운들 공영주차장 아래,부산광역시 서구 해돋이로 382,1,서구청(구민안전과),051-240-4645,2021-04-20,35.1067043,129.0125302\"};\n\t\tString[] k42_fieldname = k42_arr[0].split(\",\"); //배열의 첫번째 값을(필드명) 해당 파일의 구분자인 \",\"로 나누어 배열에 저장한다\n\t\tfor(int k42_i = 1; k42_i < k42_arr.length - 1; k42_i++) {\n\t\t\tString[] k42_field = k42_arr[k42_i].split(\",\"); //두번째 값부터 필드 값으로 저장한다\n\t\t\tSystem.out.println(\"=================================================\"); //구분선\n\t\t\t\n\t\t\tfor(int k42_j = 0; k42_j < 8; k42_j ++) {\n\t\t\t\tSystem.out.printf(\" %s : %s\\n\", k42_fieldname[k42_j], k42_field[k42_j]); //필드명: 필드 값의 형식으로 출력한다\n\t\t\t}\n\t\t\tfor(int k42_j = 8; k42_j < k42_fieldname.length; k42_j++ ) {\n\t\t\t\tSystem.out.printf(\" %s : %s\\n\", k42_fieldname[k42_j], numstr(k42_field[k42_j])); //필요한 필드 부분만 따로 출력한다\n\t\t\t}\n\t\t\tSystem.out.println(\"=================================================\");\n\t\t}\n\t}", "java.lang.String getField1080();", "public static String m3984tk(String str) {\n AppMethodBeat.m2504i(93204);\n int lastIndexOf = str.lastIndexOf(\";?enc=\");\n String trim;\n if (lastIndexOf > 0) {\n trim = str.substring(lastIndexOf + 6).trim();\n AppMethodBeat.m2505o(93204);\n return trim;\n }\n trim = \"\";\n AppMethodBeat.m2505o(93204);\n return trim;\n }", "public void testNmCode() throws Exception {\n String nmCode = \"E1-541-392740-1-img.E1-543-392740-1-a.E1-4-DengLu-1-a.E1-38-red&ChaDian-1-a.UT-601-392740-2*2-a\";\r\n //Pattern p = Pattern.compile(\"\\\\w+-(?:543|601)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-\\\\w+\\\\.?\");\r\n Pattern p = Pattern.compile(\"(\\\\w+)-(\\\\w+)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-\\\\w+\\\\.?\");\r\n //Pattern p = Pattern.compile(\".+-(?:639|640)-(\\\\w+)-(\\\\d+(\\\\*\\\\d+)?)-.*\");\r\n Matcher m = p.matcher(nmCode);\r\n while (m.find()) {\r\n p(m.group(1) + \",\" + m.group(2) + \",\" + m.group(3));\r\n }\r\n }", "private String m48359a(String str) {\n if (TextUtils.isEmpty(str)) {\n return \"\";\n }\n return C8145d.m48410a(str) ? \"xxxxxx\" : str;\n }", "public String apavada_vriddhi(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA UNO**********\");\n Log.info(\"X_adi == \" + X_adi);\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta);\n // x.transform(X_anta); // anta is ITRANS equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi);\n // x.transform(X_adi); // adi is ITRANS equivalent\n\n Log.info(\"adi == \" + adi);\n\n String return_me = \"UNAPPLICABLE\";\n\n boolean bool1 = VowelUtil.isAkaranta(X_anta) && (adi.equals(\"eti\") || adi.equals(\"edhati\"));\n boolean bool2 = VowelUtil.isAkaranta(X_anta) && adi.equals(\"UTh\");\n\n // 203\n // **********IF****************//\n if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"f\")) // watch out!!! must\n // be SLP not ITRANS\n {// checked:29-6\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"f\" + strip2;\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRiti RRi vA vacanam\");\n comments.setSutraProc(\"hrasva RRikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"small RRi followed by small RRi merge to become small RRi.\\n\" + \"RRi + RRi = RRi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 204\n // **********IF****************//\n else if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"x\")) // watch out!!!\n // must be SLP\n // not ITRANS\n { // checked:29-6 // SLP x = ITRANS LLi\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"x\" + strip2; // SLP\n // x =\n // ITRANS\n // LLi\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"LLiti LLi vA vacanam\");\n comments.setSutraProc(\"hrasva LLikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \" RRi/RRI followed by small LLi merge to become small LLi.\\n RRi/RRI + LLi = LLi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 207a-b\n // **********ELSE IF****************//\n else if (bool1 || bool2)\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.86\");\n comments.setSutraPath(\"eti-edhati-UThsu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.sutra);\n\n String cond1 = \"akaara followed by declensions of 'iN', 'edha' and 'UTh\" + \"<eti/edhati/UTh> are replaced by their vRRiddhi counterpart.\\n\" + \"a/A/a3 + eti/edhati/UTha = VRRiddhi Counterpart.\\n\" + \"Pls. Note.My Program cannot handle all the declensions of given roots.\" + \"Hence will only work for one instance of Third Person Singular Form\";\n comments.setConditions(cond1);\n\n String cond2 = \"Blocks para-rupa Sandhi given by 'e~ni pararUpam' which had blocked Normal Vriddhi Sandhi\";\n\n if (bool1)\n comments.append_condition(cond2);\n else if (bool2) comments.append_condition(\"Blocks 'Ad guNaH'\");\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 208\n // **********ELSE IF****************//\n else if (anta.equals(\"akSa\") && adi.equals(\"UhinI\"))\n {// checked:29-6\n return_me = \"akzOhiRI\"; // u to have give in SLP..had\n // ITRANS....fixed\n // not sending to vrridhit_sandhi becose of Na-inclusion\n // vriddhi_sandhi(X_anta,X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // ***/vowel_notes.decrement_pointer();/***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"akSAdUhinyAm\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"akSa + UhinI = akshauhiNI.Vartika blocks guna-sandhi ato allow vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // 209\n // **********ELSE IF****************//\n else if (anta.equals(\"pra\") && (adi.equals(\"Uha\") || adi.equals(\"UDha\") || adi.equals(\"UDhi\") || adi.equals(\"eSa\") || adi.equals(\"eSya\")))\n // checked:29-6\n {\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"prAd-Uha-UDha-UDhi-eSa-eSyeSu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"upasarga 'pra' + <prAd/Uha/UDha/UDhi/eSa/eSya> = vRRiddhi-ekadesha.\" + \"\\nVartika blocks para-rupa Sandhi and/or guna Sandhi to allow vRRidhi-ekadesh.\";\n\n comments.setConditions(cond1);\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 210\n // **********ELSE IF****************//\n else if (anta.equals(\"sva\") && (adi.equals(\"ira\") || adi.equals(\"irin\")))\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"svaadireriNoH\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"sva + <ira/irin> = vRRIddhi.\\n Blocks Guna Sandhi.\" + \"\\nPls. note. My program does not cover sandhi with declensions.\";\n comments.setConditions(cond1);\n }\n\n // **********END OF ELSE IF****************//\n\n // 211 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (VowelUtil.isAkaranta(X_anta) && X_adi.equals(\"fta\"))// adi.equals(\"RRita\"))\n {\n // checked:29-6\n // not working for 'a' but working for 'A'. Find out why...fixed\n\n return_me = utsarga_prakruti_bhava(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRite ca tRRitIyAsamAse\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If an akaranta ('a/aa/a3'-terminating phoneme) is going to form a Tritiya Samas compound with a RRi-initial word\" + \" vRRiddhi-ekadesha takes place blocking other rules.\\n\" + \"a/A/a3 + RRi -> Tritiya Samaasa Compound -> vRRiddhi-ekadesh\" + depend;\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 212-213\n // **********ELSE IF****************//\n else if ((anta.equals(\"pra\") || anta.equals(\"vatsatara\") || anta.equals(\"kambala\") || anta.equals(\"vasana\") || anta.equals(\"RRiNa\") || anta.equals(\"dasha\")) && adi.equals(\"RRiNa\"))\n\n // checked:29-6\n { // pra condition not working...fixed now . 5 MAR 05\n // return_me = guna_sandhi(X_anta,X_adi) + \", \" +\n // prakruti_bhava(X_anta,X_adi)\n\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n // vowel_notes.set_sutra_num(\"\") ;\n comments.setVartikaPath(\"pra-vatsatara-kambala-vasanArNa dashaanAm RRiNe\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If 'pra' etc are followed by the word 'RRiNa',\" + \" vRRiddhi-ekadesh takes place blocking Guna and Prakruti Bhava Sandhis.\" + \"\\n<pra/vatsatara/kambala/vasana/RRiNa/dash> + RRiNa = vRRiddhi\";\n comments.setConditions(cond1);\n }\n // ???? also implement prakruti bhava\n\n /**\n * **YEs ACCORDING TO SWAMI DS but not according to Bhaimi Bhashya else\n * if ( adi.equals(\"RRiNa\") && (anta.equals(\"RRiNa\") ||\n * anta.equals(\"dasha\")) ) { return_me = vriddhi_sandhi(X_anta,X_adi);\n * //*sandhi_notes = VE + apavada + vartika + \"'RRiNa dashAbhyAm ca'.\" +\n * \"\\nBlocks Guna and Prakruti Bhava Sandhi\";\n * \n * vowel_notes.start_adding_notes(); vowel_notes.set_sutra_num(\"\") ;\n * vowel_notes.set_vartika_path(\"RRiNa dashAbhyAm ca\") ;\n * vowel_notes.set_sutra_proc(\"Vriddhi-ekadesh\");\n * vowel_notes.set_source(tippani.vartika) ; String cond1 =depend +\n * \"Blocks Guna and Prakruti Bhava Sandhi\";\n * vowel_notes.set_conditions(cond1);\n * /* return_me = utsarga_prakruti_bhava(X_anta,X_adi) + \", \" +\n * vriddhi_sandhi(X_anta,X_adi) + \"**\"; sandhi_notes = usg1 +\n * sandhi_notes; sandhi_notes+= \"\\n\" + usg2 + VE +apavada + vartika +\n * \"'RRiNa dashAbhyAm ca'.\" + depend; // .... this was when I assumed\n * this niyama is optional with other // ???? also implement prakruti\n * bhava }\n */\n // **********END OF ELSE IF****************//\n // 214 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (anta.equals(\"A\") && VowelUtil.isAjadi(X_adi))\n {\n // checked:29-6\n // rules is A + Vowel = VRddhi\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n /*******************************************************************\n * sandhi_notes = usg1 + sandhi_notes + \"\\n\" + usg2 ; // We have to\n * remove vriddhi_sandhi default notes // this is done by /\n ******************************************************************/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.87\");\n comments.setSutraPath(\"ATashca\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"if String 1 equals 'aa' and implies 'AT'-Agama and \" + \"String 2 is a verbal form. E.g. A + IkSata = aikSata not ekSata.\\n\" + \" 'aa' + Verbal Form = vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n // akaranta uparga mein error....fixed 4 MAR\n // 215 Vik Semantic Dependency\n else if (is_akaranta_upsarga(X_anta) && X_adi.startsWith(\"f\")) // RRi\n // ==\n // SLP\n // 'f'USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n { // according to Vedanga Prakash Sandhi Vishaya RRIkara is being\n // translated\n // but checked with SC Basu Trans. it is RRIta not RRikara\n // checked:29-6\n\n Log.info(\" Rules 215 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // vowel_notes.decrement_pointer();\n\n // July 14 2005.. I have removed the above line\n // vowel_notes.decrement_pointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.88\");\n comments.setSutraPath(\"upasargAdRRiti dhAtau\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"akaranta upsarga(preverb) followed by verbal form begining with short RRi.\\n \" + \"preverb ending in <a> + verbal form begining with RRi = vRRiddhi-ekadesha\\n\";\n\n /*\n * \"By 6.1.88 it should block all \" + \"optional forms but by 'vA\n * supyApishaleH' (6.1.89) subantas are \" + \"permitted the Guna\n * option.\";\n */\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA UNO**********\");\n\n if (return_me.equals(\"UNAPPLICABLE\"))\n {\n return_me = apavada_para_rupa(X_anta, X_adi); // search for more\n // apavada rules\n }\n return return_me; // apavada rules formulated by Panini apply\n }", "@Test(timeout = 4000)\n public void test56() throws Throwable {\n String string0 = SQLUtil.normalize(\")]*/f/f2Nx{fI.* \", false);\n assertEquals(\") ] */ f / f2Nx { fI.*\", string0);\n }", "@Test\n public void RegistroC380Test() throws ParseException {\n RegistroC380 reg = new RegistroC380();\n LineModel line = reg.createModel();\n SimpleDateFormat sdf = new SimpleDateFormat(\"ddMMyyyy\");\n Date data = sdf.parse(\"17121986\");\n \n //02\n line.setFieldValue(RegistroC380.COD_MOD, \"02\");\n //03\n line.setFieldValue(RegistroC380.DT_DOC_INI, data);\n //04\n line.setFieldValue(RegistroC380.DT_DOC_FIN, data);\n //05\n line.setFieldValue(RegistroC380.NUM_DOC_INI, 123456L);\n //06\n line.setFieldValue(RegistroC380.NUM_DOC_FIN, 123456L);\n //07\n line.setFieldValue(RegistroC380.VL_DOC, 78911.11);\n //08\n line.setFieldValue(RegistroC380.VL_DOC_CANC, 78911.11);\n\n StringBuffer sb = line.getRepresentation();\n System.out.print(sb);\n// String expected = \"|C380|02|17121986|17121986|123456|123456|78911,11|78911,11|\";\n// assertEquals (expected, sb.toString());\n }", "java.lang.String getField1658();", "private static String m12563a(String str, String str2) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 3 + String.valueOf(str2).length());\n sb.append(str);\n sb.append(\"|S|\");\n sb.append(str2);\n return sb.toString();\n }", "public String getLBR_DocLine_ICMS_UU();", "static com.tencent.mm.plugin.appbrand.jsapi.b.a.a nI(java.lang.String r4) {\n /*\n r0 = 0;\n r1 = r4.length();\n r2 = 5;\n r1 = java.lang.Math.min(r1, r2);\n r1 = java.lang.Math.max(r0, r1);\n r1 = r4.substring(r0, r1);\n r2 = r1.toLowerCase();\n r1 = -1;\n r3 = r2.hashCode();\n switch(r3) {\n case 99228: goto L_0x003a;\n case 3704893: goto L_0x0025;\n case 104080000: goto L_0x002f;\n default: goto L_0x001e;\n };\n L_0x001e:\n r0 = r1;\n L_0x001f:\n switch(r0) {\n case 0: goto L_0x0045;\n case 1: goto L_0x0048;\n case 2: goto L_0x004b;\n default: goto L_0x0022;\n };\n L_0x0022:\n r0 = MONTH;\n L_0x0024:\n return r0;\n L_0x0025:\n r3 = \"year\";\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x001e;\n L_0x002e:\n goto L_0x001f;\n L_0x002f:\n r0 = \"month\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0038:\n r0 = 1;\n goto L_0x001f;\n L_0x003a:\n r0 = \"day\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0043:\n r0 = 2;\n goto L_0x001f;\n L_0x0045:\n r0 = YEAR;\n goto L_0x0024;\n L_0x0048:\n r0 = MONTH;\n goto L_0x0024;\n L_0x004b:\n r0 = DAY;\n goto L_0x0024;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.appbrand.jsapi.b.a.a.nI(java.lang.String):com.tencent.mm.plugin.appbrand.jsapi.b.a$a\");\n }", "static String GetCheckDigitAndCheckCode(String input) {\n int sum = 0;\n for(int i = 0; i < input.length(); i++) {\n if(i%2 == 0 || i == 0) {\n\n sum += 3 * Character.getNumericValue(input.charAt(i));\n }else {\n sum += Character.getNumericValue(input.charAt(i));\n }\n }\n int subDigit = ((sum/10) + 1 ) * 10;\n int checkDigit = subDigit - sum;\n\n input = input + checkDigit;\n\n\n int digit1 = get9Digits(input.substring(0, 8));\n int digit2 = get9Digits(input.substring(9));\n\n // NOTE - Not able to understand what means by index of 2\n // digit numbers so here am just adding instead of multiplying the 2 9 digits.\n int result = digit1 + digit2 + 207;\n int remainder = result % 103;\n\n StringBuilder sb = new StringBuilder();\n sb.append(checkDigit);\n sb.append(',');\n sb.append(remainder);\n return sb.toString();\n }", "private static boolean m66062a(String str, int i, int i2, byte[] bArr, int i3) {\n int i4 = i3;\n while (i < i2) {\n if (i4 == bArr.length) {\n return false;\n }\n if (i4 != i3) {\n if (str.charAt(i) != '.') {\n return false;\n }\n i++;\n }\n int i5 = i;\n int i6 = 0;\n while (i5 < i2) {\n char charAt = str.charAt(i5);\n if (charAt < '0' || charAt > '9') {\n break;\n } else if (i6 == 0 && i != i5) {\n return false;\n } else {\n i6 = ((i6 * 10) + charAt) - 48;\n if (i6 > 255) {\n return false;\n }\n i5++;\n }\n }\n if (i5 - i == 0) {\n return false;\n }\n int i7 = i4 + 1;\n bArr[i4] = (byte) i6;\n i4 = i7;\n i = i5;\n }\n if (i4 != i3 + 4) {\n return false;\n }\n return true;\n }", "boolean hasI12();", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "public String long_ip(long numero_ip){\n String str_num_ip=\"\";\n for(int i=3; i>=0; i--){\n str_num_ip += (0b1111_1111 & (numero_ip >> (i*8) )) + (i!=0? \".\": \"\");\n }\n return str_num_ip;\n }", "java.lang.String getField1275();", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n String string0 = SQLUtil.normalize(\"RUS9_R63q0--wSiH\", false);\n assertEquals(\"RUS9_R63q0 -- wSiH\", string0);\n }", "public final void zzy(int i) throws zzlm {\n zznu zznu;\n int i2;\n int i3 = 0;\n if (i != 160) {\n if (i == 174) {\n String str = this.zzbal.zzaor;\n if (\"V_VP8\".equals(str) || \"V_VP9\".equals(str) || \"V_MPEG2\".equals(str) || \"V_MPEG4/ISO/SP\".equals(str) || \"V_MPEG4/ISO/ASP\".equals(str) || \"V_MPEG4/ISO/AP\".equals(str) || \"V_MPEG4/ISO/AVC\".equals(str) || \"V_MPEGH/ISO/HEVC\".equals(str) || \"V_MS/VFW/FOURCC\".equals(str) || \"V_THEORA\".equals(str) || \"A_OPUS\".equals(str) || \"A_VORBIS\".equals(str) || \"A_AAC\".equals(str) || \"A_MPEG/L2\".equals(str) || \"A_MPEG/L3\".equals(str) || \"A_AC3\".equals(str) || \"A_EAC3\".equals(str) || \"A_TRUEHD\".equals(str) || \"A_DTS\".equals(str) || \"A_DTS/EXPRESS\".equals(str) || \"A_DTS/LOSSLESS\".equals(str) || \"A_FLAC\".equals(str) || \"A_MS/ACM\".equals(str) || \"A_PCM/INT/LIT\".equals(str) || \"S_TEXT/UTF8\".equals(str) || \"S_VOBSUB\".equals(str) || \"S_HDMV/PGS\".equals(str) || \"S_DVBSUB\".equals(str)) {\n i3 = 1;\n }\n if (i3 != 0) {\n this.zzbal.zza(this.zzbbf, this.zzbal.number);\n this.zzazy.put(this.zzbal.number, this.zzbal);\n }\n this.zzbal = null;\n } else if (i != 19899) {\n if (i != 25152) {\n if (i != 28032) {\n if (i == 357149030) {\n if (this.zzanu == C1470C.TIME_UNSET) {\n this.zzanu = 1000000;\n }\n if (this.zzbak != C1470C.TIME_UNSET) {\n this.zzack = zzdw(this.zzbak);\n }\n } else if (i != 374648427) {\n if (i == 475249515 && !this.zzbam) {\n zznp zznp = this.zzbbf;\n if (this.zzans == -1 || this.zzack == C1470C.TIME_UNSET || this.zzban == null || this.zzban.size() == 0 || this.zzbao == null || this.zzbao.size() != this.zzban.size()) {\n this.zzban = null;\n this.zzbao = null;\n zznu = new zznv(this.zzack);\n } else {\n int size = this.zzban.size();\n int[] iArr = new int[size];\n long[] jArr = new long[size];\n long[] jArr2 = new long[size];\n long[] jArr3 = new long[size];\n for (int i4 = 0; i4 < size; i4++) {\n jArr3[i4] = this.zzban.get(i4);\n jArr[i4] = this.zzans + this.zzbao.get(i4);\n }\n while (true) {\n i2 = size - 1;\n if (i3 >= i2) {\n break;\n }\n int i5 = i3 + 1;\n iArr[i3] = (int) (jArr[i5] - jArr[i3]);\n jArr2[i3] = jArr3[i5] - jArr3[i3];\n i3 = i5;\n }\n iArr[i2] = (int) ((this.zzans + this.zzant) - jArr[i2]);\n jArr2[i2] = this.zzack - jArr3[i2];\n this.zzban = null;\n this.zzbao = null;\n zznu = new zznl(iArr, jArr, jArr2, jArr3);\n }\n zznp.zza(zznu);\n this.zzbam = true;\n }\n } else if (this.zzazy.size() != 0) {\n this.zzbbf.zzfi();\n } else {\n throw new zzlm(\"No valid tracks were found\");\n }\n } else if (this.zzbal.zzaos && this.zzbal.zzbbi != null) {\n throw new zzlm(\"Combining encryption and compression is not supported\");\n }\n } else if (!this.zzbal.zzaos) {\n } else {\n if (this.zzbal.zzbbj != null) {\n this.zzbal.zzatr = new zzne(new zzne.zza(zzkt.zzarg, MimeTypes.VIDEO_WEBM, this.zzbal.zzbbj.zzazq));\n return;\n }\n throw new zzlm(\"Encrypted Track found but ContentEncKeyID was not found\");\n }\n } else if (this.zzanz == -1 || this.zzaoa == -1) {\n throw new zzlm(\"Mandatory element SeekID or SeekPosition not found\");\n } else if (this.zzanz == 475249515) {\n this.zzaoc = this.zzaoa;\n }\n } else if (this.zzbap == 2) {\n if (!this.zzaop) {\n this.zzbax |= 1;\n }\n zza(this.zzazy.get(this.zzbav), this.zzbaq);\n this.zzbap = 0;\n }\n }", "java.lang.String getField1648();", "public static void main(String[] args) {\n\n String str=\"22/2020\";\n String monath=str.substring(0,2);\n\n int monatI=Integer.valueOf(monath);\n if (monatI>=0 && monatI<=12){\n System.out.println(\"doğru\");\n }\n else\n System.out.println(\"yanlış\");\n }", "public static com.google.android.exoplayer2.metadata.icy.IcyHeaders parse(java.util.Map<java.lang.String, java.util.List<java.lang.String>> r13) {\n /*\n java.lang.String r0 = \"Invalid metadata interval: \"\n java.lang.String r1 = \"icy-br\"\n java.lang.Object r1 = r13.get(r1)\n java.util.List r1 = (java.util.List) r1\n java.lang.String r2 = \"IcyHeaders\"\n r3 = -1\n r4 = 1\n r5 = 0\n if (r1 == 0) goto L_0x0051\n java.lang.Object r1 = r1.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n int r6 = java.lang.Integer.parseInt(r1) // Catch:{ NumberFormatException -> 0x0039 }\n int r6 = r6 * 1000\n if (r6 <= 0) goto L_0x0021\n r1 = 1\n goto L_0x0037\n L_0x0021:\n java.lang.StringBuilder r7 = new java.lang.StringBuilder // Catch:{ NumberFormatException -> 0x003a }\n r7.<init>() // Catch:{ NumberFormatException -> 0x003a }\n java.lang.String r8 = \"Invalid bitrate: \"\n r7.append(r8) // Catch:{ NumberFormatException -> 0x003a }\n r7.append(r1) // Catch:{ NumberFormatException -> 0x003a }\n java.lang.String r7 = r7.toString() // Catch:{ NumberFormatException -> 0x003a }\n com.google.android.exoplayer2.util.Log.w(r2, r7) // Catch:{ NumberFormatException -> 0x003a }\n r1 = 0\n r6 = -1\n L_0x0037:\n r7 = r6\n goto L_0x0053\n L_0x0039:\n r6 = -1\n L_0x003a:\n java.lang.StringBuilder r7 = new java.lang.StringBuilder\n r7.<init>()\n java.lang.String r8 = \"Invalid bitrate header: \"\n r7.append(r8)\n r7.append(r1)\n java.lang.String r1 = r7.toString()\n com.google.android.exoplayer2.util.Log.w(r2, r1)\n r7 = r6\n r1 = 0\n goto L_0x0053\n L_0x0051:\n r1 = 0\n r7 = -1\n L_0x0053:\n java.lang.String r6 = \"icy-genre\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n r8 = 0\n if (r6 == 0) goto L_0x0067\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r9 = r1\n r1 = 1\n goto L_0x0068\n L_0x0067:\n r9 = r8\n L_0x0068:\n java.lang.String r6 = \"icy-name\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x007b\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r10 = r1\n r1 = 1\n goto L_0x007c\n L_0x007b:\n r10 = r8\n L_0x007c:\n java.lang.String r6 = \"icy-url\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x008f\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r11 = r1\n r1 = 1\n goto L_0x0090\n L_0x008f:\n r11 = r8\n L_0x0090:\n java.lang.String r6 = \"icy-pub\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x00a9\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n java.lang.String r6 = \"1\"\n boolean r1 = r1.equals(r6)\n r12 = r1\n r1 = 1\n goto L_0x00aa\n L_0x00a9:\n r12 = 0\n L_0x00aa:\n java.lang.String r6 = \"icy-metaint\"\n java.lang.Object r13 = r13.get(r6)\n java.util.List r13 = (java.util.List) r13\n if (r13 == 0) goto L_0x00ea\n java.lang.Object r13 = r13.get(r5)\n java.lang.String r13 = (java.lang.String) r13\n int r5 = java.lang.Integer.parseInt(r13) // Catch:{ NumberFormatException -> 0x00d8 }\n if (r5 <= 0) goto L_0x00c2\n r3 = r5\n goto L_0x00d5\n L_0x00c2:\n java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ NumberFormatException -> 0x00d7 }\n r4.<init>() // Catch:{ NumberFormatException -> 0x00d7 }\n r4.append(r0) // Catch:{ NumberFormatException -> 0x00d7 }\n r4.append(r13) // Catch:{ NumberFormatException -> 0x00d7 }\n java.lang.String r4 = r4.toString() // Catch:{ NumberFormatException -> 0x00d7 }\n com.google.android.exoplayer2.util.Log.w(r2, r4) // Catch:{ NumberFormatException -> 0x00d7 }\n r4 = r1\n L_0x00d5:\n r1 = r4\n goto L_0x00ea\n L_0x00d7:\n r3 = r5\n L_0x00d8:\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r13)\n java.lang.String r13 = r4.toString()\n com.google.android.exoplayer2.util.Log.w(r2, r13)\n L_0x00ea:\n if (r1 == 0) goto L_0x00f8\n com.google.android.exoplayer2.metadata.icy.IcyHeaders r13 = new com.google.android.exoplayer2.metadata.icy.IcyHeaders\n r6 = r13\n r8 = r9\n r9 = r10\n r10 = r11\n r11 = r12\n r12 = r3\n r6.<init>(r7, r8, r9, r10, r11, r12)\n r8 = r13\n L_0x00f8:\n return r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.metadata.icy.IcyHeaders.parse(java.util.Map):com.google.android.exoplayer2.metadata.icy.IcyHeaders\");\n }", "private static String m33066X(String str, String str2, String str3) {\n String str4;\n int i = 1;\n AppMethodBeat.m2504i(135623);\n C5728b c5728b = new C5728b(str);\n if (!c5728b.exists()) {\n c5728b.mkdirs();\n }\n if (C5046bo.isNullOrNil(str2)) {\n str4 = str + \"da_\" + C5046bo.anU();\n if (!C5046bo.isNullOrNil(str3)) {\n str4 = str4 + \".\" + str3;\n }\n } else {\n if (!(C5046bo.isNullOrNil(str3) || str2.endsWith(str3))) {\n str2 = str2 + \".\" + str3;\n }\n str4 = str + str2;\n if (C5730e.m8628ct(str4)) {\n while (i < 20) {\n if (!C5730e.m8628ct(str + i + \"_\" + str2)) {\n str4 = str + i + \"_\" + str2;\n break;\n }\n i++;\n }\n if (i == 20) {\n str4 = str + \"da_\" + C5046bo.anU();\n if (!C5046bo.isNullOrNil(str3)) {\n str4 = str4 + \".\" + str3;\n }\n }\n }\n }\n try {\n if (!C5736j.m8649w(new C5728b(str4).dMC().dMD()).equalsIgnoreCase(C5736j.m8649w(new C5728b(str).dMD()))) {\n str4 = str + \"da_\" + C5046bo.anU();\n C4990ab.m7421w(\"MicroMsg.AppMsgLogic\", \"maybe DirTraversal attach. %s\", str4);\n }\n } catch (Exception e) {\n C4990ab.printErrStackTrace(\"MicroMsg.AppMsgLogic\", e, \"\", new Object[0]);\n str4 = str + \"da_\" + C5046bo.anU();\n if (!C5046bo.isNullOrNil(str3)) {\n str4 = str4 + \".\" + str3;\n }\n }\n AppMethodBeat.m2505o(135623);\n return str4;\n }", "public static void main(String[] args) {\n\t\tString record =\"px123,kingstone,340,1|3|4|1\";\n\t\tString record1 =\"px125,electronics,storege,pendrive,kingstone,340,1|3|4|1\";\n\t\tString record2 =\"px125,electronics,storege,pendrive,kingstone,340\";\n\t\tString what = \"\\\\d+,(\\\\d\\\\|*)+$\";\n\t\tPattern p=Pattern.compile(what);\n\t\tMatcher m=p.matcher(record);\n\t\tif(m.find())\n\t\t{\n\t\t\tSystem.out.println(\"correct\");\n\t\t\tString str[]=m.group().split(\",\");\n\t\t\tSystem.out.println(str[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"wrong\");\n\t\t}\n\t\t\n\t}", "private static String m61436a(C18846s sVar, StringBuilder sb) {\n if (sVar.f50796f != null) {\n sb.ensureCapacity(sVar.f50796f.length() + 50);\n sb.append(sVar.f50796f);\n } else if (sVar.f50794d != null) {\n String uri = sVar.f50794d.toString();\n sb.ensureCapacity(uri.length() + 50);\n sb.append(uri);\n } else {\n sb.ensureCapacity(50);\n sb.append(sVar.f50795e);\n }\n sb.append(10);\n if (sVar.f50803m != 0.0f) {\n sb.append(\"rotation:\");\n sb.append(sVar.f50803m);\n if (sVar.f50806p) {\n sb.append('@');\n sb.append(sVar.f50804n);\n sb.append('x');\n sb.append(sVar.f50805o);\n }\n sb.append(10);\n }\n if (sVar.mo50072d()) {\n sb.append(\"resize:\");\n sb.append(sVar.f50798h);\n sb.append('x');\n sb.append(sVar.f50799i);\n sb.append(10);\n }\n if (sVar.f50800j) {\n sb.append(\"centerCrop\\n\");\n } else if (sVar.f50801k) {\n sb.append(\"centerInside\\n\");\n }\n if (sVar.f50797g != null) {\n int size = sVar.f50797g.size();\n for (int i = 0; i < size; i++) {\n sb.append(((C18802aa) sVar.f50797g.get(i)).mo50000a());\n sb.append(10);\n }\n }\n return sb.toString();\n }", "private String parseDescrName(String line) {\n\t\t// d1f74a_ 201-209;3-11 DGAIGSTFN LKGIFSALL #7\n\t\t// d1nvra_ 226-253;184-204 IDSAPLALL GIVLTAMLA 0_0:-5_-8 0.477587\n\t\t// GroupName is created as name of domain (remove proceeding 'd') + pdb\n\t\t// number of the first residue\n\t\t// in the second segment (3-11 in the example) increased by 10000 + '_'\n\t\t// + number of cluster (7 in the case)\n\t\t// the residue with fasta number 3 is translated into address A4_ - so\n\t\t// the pdb number is 4\n\t\t// finally the group name will be 1f74a_#10004_7\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tString dom = tokens[0].substring(1);\n\t\tString noClust = \"\";\n\t\t@SuppressWarnings(\"unused\")\n\t\tint shift1 = 0; // segment1 shift\n\t\tint shift2 = 0; // segment2 shift\n\t\ttry {\n\t\t\tif (tokens[4].startsWith(\"#\")) {\n\t\t\t\tnoClust = \"_\" + tokens[4].substring(1);\n\t\t\t} else {\n\t\t\t\tnoClust = \"\";\n\t\t\t}\n\t\t\tif (tokens[4].startsWith(\"0_0\")) {\n\t\t\t\ttokens[4] = tokens[4].replaceFirst(\"0_0:\", \"\");\n\t\t\t\tString[] shifts = tokens[4].split(\"_\");\n\t\t\t\tshift1 = Integer.valueOf(shifts[0]);\n\t\t\t\tshift2 = Integer.valueOf(shifts[1]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// do nothing keep default values\n\t\t}\n\t\t// get the first number of second segment : e.g. 3 from 201-209;3-11\n\t\tString[] tokensA = tokens[1].split(\";\");\n\t\tString[] tokensB = tokensA[1].split(\"-\");\n\t\tInteger fastaNo = (Integer.valueOf(tokensB[0]) - shift2 >= 0 ? Integer\n\t\t\t\t.valueOf(tokensB[0]) - shift2 : Integer.valueOf(tokensB[0]));\n\n\t\t// get pdb address\n\t\tString pdbResAddr = hashResMapInt2Str.get(dom).get(fastaNo);\n\t\tpdbResAddr = pdbResAddr.substring(1, pdbResAddr.length() - 1);\n\t\tint pdbResNo = Integer.valueOf(pdbResAddr);\n\n\t\treturn (dom + \"#\" + (10000 + pdbResNo) + noClust);\n\t}", "void mo8715r(String str, String str2, String str3);", "private static boolean m3404a(int i) {\n boolean z;\n if (100 > i || i >= 200) {\n z = false;\n } else {\n z = true;\n }\n return (z || i == AppLovinErrorCodes.NO_FILL || i == 304) ? false : true;\n }", "java.lang.String getField1515();", "static String m60358a(String str, String str2) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 3 + String.valueOf(str2).length());\n sb.append(str);\n sb.append(\"|S|\");\n sb.append(str2);\n return sb.toString();\n }", "private String[] splitLine (String fileLine){\n String[] ans = new String[5];\n ans[0] = fileLine.substring(0, fileLine.indexOf(\"!\"));\n ans[1] = fileLine.substring(fileLine.indexOf(\"[\") + 1, fileLine.indexOf(\"]\"));\n String dfTf = fileLine.substring(fileLine.indexOf(\"]!\") + 2);\n ans[3] = dfTf;\n ans[2] = dfTf.substring(0, dfTf.indexOf(\"!\"));\n if (dfTf.contains(\"^\")) {\n ans[4] = dfTf.substring(dfTf.length() - 1);\n ans[3] = ans[3].substring(ans[3].indexOf(\"!\") + 1, ans[3].length() - 2);\n } else\n ans[3] = ans[3].substring(dfTf.indexOf(\"!\") + 1);\n\n return ans;\n }", "java.lang.String getField1624();", "java.lang.String getField1408();", "private static String m66046a(byte[] bArr) {\n int i = 0;\n int i2 = 0;\n int i3 = -1;\n int i4 = 0;\n while (i2 < bArr.length) {\n int i5 = i2;\n while (i5 < 16 && bArr[i5] == 0 && bArr[i5 + 1] == 0) {\n i5 += 2;\n }\n int i6 = i5 - i2;\n if (i6 > i4 && i6 >= 4) {\n i3 = i2;\n i4 = i6;\n }\n i2 = i5 + 2;\n }\n C13887c cVar = new C13887c();\n while (i < bArr.length) {\n if (i == i3) {\n cVar.writeByte(58);\n i += i4;\n if (i == 16) {\n cVar.writeByte(58);\n }\n } else {\n if (i > 0) {\n cVar.writeByte(58);\n }\n cVar.m59547e((long) (((bArr[i] & 255) << 8) | (bArr[i + 1] & 255)));\n i += 2;\n }\n }\n return cVar.mo43923w();\n }", "public interface C7878U {\n /* renamed from: Lg */\n public static final int f26781Lg = 1;\n /* renamed from: Mg */\n public static final int f26782Mg = 2;\n public static final int NOERROR = 0;\n /* renamed from: Ng */\n public static final int f26783Ng = 3;\n /* renamed from: Og */\n public static final int f26784Og = 4;\n /* renamed from: Pg */\n public static final int f26785Pg = 5;\n /* renamed from: Qg */\n public static final int f26786Qg = 6;\n}", "java.lang.String getField1636();", "private byte[] parseInsertRecord_lantrix(String s)\n { \n // ASCII Data:\t\n // Example:\n // ------- \t\n\t\t//>RGP190805211932-3457215-058493640000000FFBF0300;ID=8247;#2122;*54<CRLF\n\t\t// R = [ 0, 1] Response \n // GP = [ 1, 3] Global Position \n\t\t// 190805 = [ 3, 9] GPS time-of-day DDMMAA\n\t\t// 211932 = [ 9 , 15] GPS time-of-hours GMT HHMMSS\n\t\t// -3457215 = [ 15, 23] Latitude \n\t\t// -05849364 = [ 23, 32] Longitude\n\t\t// 000 = [ 32, 35] Speed (kph 0...999)\n\t\t// 000 = [ 35, 38] Heading (degrees 0...359)\n\t\t// 0 = [ 38, 39] GPS source 3 = Position 3D, 2 = Position 2D , 0= invalid\n\t\t// FF = [ 39, 41] Age of the data in Hexadecimal\n\t\t// BF = [ 41, 43] I/O Digital \n\t\t// 03 = [ 43, 45] Number of events generated by the report (decimal).\n\t\t// 00 = [ 45, 47] Horizontal Accuracy HDOP (0 .. 50)\n\t\t// ; = Separator\n\t\t// ID=d8247 = Number Device ID \n\t\t// ; = Separator\n\t\t// #2122 = [ 57 , 62] Sentence Number (as generated by the mobile van from # 0000 to # 7FFF and those generated by the base go # 8000 to # FFFF)\n\t\t// ;*54 = Checksum\n\t\t// < = End of message\n\t\t// CRLF = End of line and carriage advance \n\n /* pre-validate */\n if (StringTools.isBlank(s)) {\n Print.logError(\"String is null/blank\");\n return null;\n } else\n if (s.length() < 5) {\n Print.logError(\"String is invalid length\");\n return null;\n } else\n if (!s.startsWith(\">\")) {\n Print.logError(\"String does not start with '>'\");\n return null;\n }\n\n /* ends with \"<\"? */\n int se = s.endsWith(\"<\")? (s.length() - 1) : s.length();\n s = s.substring(1,se);\n\n /* split */\n String T[] = StringTools.split(s,';'); \n\n /* RPG record */\n if (T[0].length() < 33) {\n Print.logError(\"Invalid 'RPG' data length\");\n return null;\n }\n\n /* mobile id */\n String mobileID = null;\n for (int i = 1; i < T.length; i++) {\n if (T[i].startsWith(\"ID=\")) {\n mobileID = T[i].substring(3);\n break;\n }\n }\n\n\t\t/* Sentence Number */\n String Sentence_number = null;\n for (int j = 1; j < T.length; j++) {\n if (T[j].startsWith(\"#\")) {\n Sentence_number = T[j].substring(1);\n break;\n }\n }\n\n //Arming the ACK frame to remove the data sent from the tracker\n\t String tracker_ID = mobileID;\n\t\tString frame_data_checksum = null;\t\t\n\t\tframe_data_checksum = \">ACK;ID=\" + tracker_ID + \";#\" + Sentence_number + \";*\";\n\t\tString chksum = getCheckSum(frame_data_checksum);\n\t\tString frame_data_ACK = null;\t\t\t\n\t\tframe_data_ACK = frame_data_checksum + chksum + \"<\\r\\n\";\n\n\t\t/* parse */ \t\n long dmy = StringTools.parseLong(T[0].substring( 3, 9), 0L);\n long hms = StringTools.parseLong(T[0].substring( 9, 15), 0L); \n long fixtime = this._getUTCSeconds(dmy, hms);\t\t\n double latitude = (double)StringTools.parseLong(T[0].substring( 15,23),0L) / 100000.0;\n double longitude = (double)StringTools.parseLong(T[0].substring(23,32),0L) / 100000.0;\n\t\tdouble KPH = StringTools.parseDouble(T[0].substring(32,35), 0.0);\n double speedKPH = KPH; \n double headingDeg = StringTools.parseDouble(T[0].substring(35,38), 0.0);\n\t\tint age_data = Integer.parseInt(T[0].substring(39,41),16);\n String decimal = Integer.toString(age_data);\n long inout = Long.parseLong(T[0].substring(41,43),16);\n String binary_io = Long.toBinaryString(inout);\n\t\tString srcStr = T[0].substring(38,39);\n String ageStr = decimal;\n double altitudeM = 0.0;\n double odomKM = 0.0;\n long gpioInput = 0L; \n\t\tint statusCode = StatusCodes.STATUS_LOCATION;\n\n /* I/O Digital */\n\t\tgpioInput = inout; \n\n\t\t/* get time */ \n if (fixtime <= 0L) {\n Print.logWarn(\"Invalid date.\");\n fixtime = DateTime.getCurrentTimeSec(); // default to now\n } \n\n /* lat/lon valid? */\n boolean validGPS = true;\n if (!GeoPoint.isValid(latitude,longitude)) {\n Print.logWarn(\"Invalid lat/lon: \" + latitude + \"/\" + longitude);\n validGPS = false;\n latitude = 0.0;\n longitude = 0.0;\n speedKPH = 0.0;\n headingDeg = 0.0;\n }\n GeoPoint geoPoint = new GeoPoint(latitude,longitude);\n\n /* adjustments to received values */\n if (speedKPH < MINIMUM_SPEED_KPH) {\n speedKPH = 0.0;\n headingDeg = 0.0;\n } else\n if (headingDeg < 0.0) { \n headingDeg = 0.0;\n }\n \n /* debug */\t\t\n Print.logInfo(\"MobileID : \" + mobileID);\n\t\tPrint.logInfo(\"Sentence : \" + Sentence_number);\n Print.logInfo(\"Timestamp: \" + fixtime + \" [\" + new DateTime(fixtime) + \"]\");\n Print.logInfo(\"GeoPoint : \" + geoPoint);\n Print.logInfo(\"Speed km/h: \" + speedKPH + \" [\" + headingDeg + \"]\");\n\n /* mobile-id */\n if (StringTools.isBlank(mobileID)) {\n Print.logError(\"Missing MobileID\");\n return null;\n }\n\n /* find Device */\n String accountID = \"\";\n String deviceID = \"\";\n String uniqueID = \"\";\n //Device device = DCServerFactory.loadDeviceByPrefixedModemID(UNIQUEID_PREFIX, mobileID);\n Device device = DCServerConfig.loadDeviceUniqueID(Main.getServerConfig(), mobileID);\n if (device == null) {\n return null; // errors already displayed\n } else {\n accountID = device.getAccountID();\n deviceID = device.getDeviceID();\n uniqueID = device.getUniqueID();\n Print.logInfo(\"UniqueID : \" + uniqueID);\n Print.logInfo(\"DeviceID : \" + accountID + \"/\" + deviceID);\n }\n \n /* check IP address */\n DataTransport dataXPort = device.getDataTransport();\n if ((this.ipAddress != null) && !dataXPort.isValidIPAddress(this.ipAddress)) {\n DTIPAddrList validIPAddr = dataXPort.getIpAddressValid(); // may be null\n Print.logError(\"Invalid IP Address from device: \" + this.ipAddress + \" [expecting \" + validIPAddr + \"]\");\n return null;\n }\n dataXPort.setIpAddressCurrent(this.ipAddress); // FLD_ipAddressCurrent\n dataXPort.setRemotePortCurrent(this.clientPort); // FLD_remotePortCurrent\n dataXPort.setLastTotalConnectTime(DateTime.getCurrentTimeSec()); // FLD_lastTotalConnectTime\n if (!dataXPort.getDeviceCode().equalsIgnoreCase(Constants.DEVICE_CODE)) {\n dataXPort.setDeviceCode(Constants.DEVICE_CODE); // FLD_deviceCode\n }\n\n /* reject invalid GPS fixes? */\n if (!validGPS && (statusCode == StatusCodes.STATUS_LOCATION)) {\n // ignore invalid GPS fixes that have a simple 'STATUS_LOCATION' status code\n Print.logWarn(\"Ignoring event with invalid latitude/longitude\");\n return null;\n }\n\n /* estimate GPS-based odometer */\n if (odomKM <= 0.0) {\n // calculate odometer\n odomKM = (ESTIMATE_ODOMETER && validGPS)? \n device.getNextOdometerKM(geoPoint) : \n device.getLastOdometerKM();\n } else {\n // bounds-check odometer\n odomKM = device.adjustOdometerKM(odomKM);\n }\n Print.logInfo(\"OdometerKM: \" + odomKM);\n\n /* simulate Geozone arrival/departure */\n if (SIMEVENT_GEOZONES && validGPS) {\n java.util.List<Device.GeozoneTransition> zone = device.checkGeozoneTransitions(fixtime, geoPoint);\n if (zone != null) {\n for (Device.GeozoneTransition z : zone) {\n this.insertEventRecord(device, \n z.getTimestamp(), z.getStatusCode(), z.getGeozone(),\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n Print.logInfo(\"Geozone : \" + z);\n if (z.getStatusCode() == statusCode) {\n // suppress 'statusCode' event if we just added it here\n Print.logDebug(\"StatusCode already inserted: 0x\" + StatusCodes.GetHex(statusCode));\n statusCode = StatusCodes.STATUS_IGNORE;\n }\n }\n }\n }\n\n /* insert event */\n if (statusCode == StatusCodes.STATUS_NONE) {\n // ignore this event\n } else\n if ((statusCode != StatusCodes.STATUS_LOCATION) || !validGPS) {\n this.insertEventRecord(device, \n fixtime, statusCode, null/*GeoZone*/,\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n } else\n if (!device.isNearLastValidLocation(geoPoint,MINIMUM_MOVED_METERS)) {\n if ((statusCode == StatusCodes.STATUS_LOCATION) && (speedKPH > 0.0)) {\n statusCode = StatusCodes.STATUS_MOTION_IN_MOTION;\n }\n this.insertEventRecord(device, \n fixtime, statusCode, null/*GeoZone*/,\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n }\n \n /* save device changes */\n try {\n // TODO: check \"this.device\" vs \"this.dataXPort\" \n device.updateChangedEventFields();\n } catch (DBException dbe) {\n Print.logException(\"Unable to update Device: \" + accountID + \"/\" + deviceID, dbe);\n } finally {\n //\n }\n Print.logInfo(\"ACK: \" + frame_data_ACK);\n\t\treturn frame_data_ACK.getBytes();// //return required acknowledgement (ACK) back to the device\n\n }", "void mo8713dV(String str);", "java.lang.String getField1818();", "@SuppressWarnings(\"null\")\n public static void main(String[] args) {\n String num[]= {\n \"회계연도\",\"회계명\",\"(수입)수입계획액(원)\",\"(수입)수납금액(원)\",\"(수입)순액(원)\",\"(수입)증감액(원)\",\"(수입)증감순액(원)\",\"(지출)지출계획현액(원)\",\"(지출)지출금액(원)\",\"(지출)순계(원)\",\"(지출)순액(원)\",\"(지출)증감순액(원)\",\"(지출)다음년도이월액(원)\",\"(지출)불용액(원)\",\n \"2017\",\"고용보험기금\",\"13744326000000\",\"20369391827660\",\"13315997827660\",\"6625065827660\",\"-428328172340\",\"13745562552200\",\"20369391827660\",\"13315997827660\",\"-6623829275460\",\"429564724540\",\"678671000\",\"631486395590\",\n \"2017\",\"공공자금관리기금\",\"189776876000000\",\"404256842999040\",\"183224542999040\",\"214479966999040\",\"-6552333000960\",\"189776876000000\",\"404256842999040\",\"183224542999040\",\"-214479966999040\",\"6552333000960\",\"0\",\"7271019279430\",\n \"2017\",\"공무원연금기금\",\"22538866000000\",\"37382431946845\",\"20630823797150\",\"14843565946845\",\"-1908042202850\",\"22545032000000\",\"37382431946845\",\"20630823797150\",\"-14837399946845\",\"1914208202850\",\"1066488200\",\"610806901939\",\n \"2017\",\"공적자금상환기금\",\"16123501000000\",\"15984076342880\",\"15894376342880\",\"-139424657120\",\"-229124657120\",\"16123501000000\",\"15984076342880\",\"15894376342880\",\"139424657120\",\"229124657120\",\"0\",\"147355105660\",\n \"2017\",\"과학기술진흥기금\",\"180979000000\",\"254739557740\",\"146619600420\",\"73760557740\",\"-34359399580\",\"180979000000\",\"254739557740\",\"146619600420\",\"-73760557740\",\"34359399580\",\"0\",\"40809967520\",\n \"2017\",\"관광진흥개발기금\",\"1493556000000\",\"2260249691260\",\"1588453308630\",\"766693691260\",\"94897308630\",\"1494802809970\",\"2260249691260\",\"1588453308630\",\"-765446881290\",\"-93650498660\",\"2179367690\",\"13371325600\",\n \"2017\",\"국민건강증진기금\",\"3974064000000\",\"6342643502890\",\"3686736329250\",\"2368579502890\",\"-287327670750\",\"4030252122930\",\"6342643502890\",\"3686736329250\",\"-2312391379960\",\"343515793680\",\"16423765880\",\"144716500820\",\n \"2017\",\"국민연금기금\",\"108422755000000\",\"440820974127419\",\"122128978859737\",\"332398219127419\",\"13706223859737\",\"108429730671960\",\"440820974127419\",\"122128978859737\",\"-332391243455459\",\"-13699248187777\",\"1575399980\",\"439377913501\",\n \"2017\",\"국민체육진흥기금\",\"1597810000000\",\"2003568719282\",\"2003568719282\",\"405758719282\",\"405758719282\",\"1602164720150\",\"2003568719282\",\"2003568719282\",\"-401403999132\",\"-401403999132\",\"2128957600\",\"48955211990\",\n \"2017\",\"국유재산관리기금\",\"1227962000000\",\"3110165835830\",\"1268887204949\",\"1882203835830\",\"40925204949\",\"1476165337260\",\"3110165835830\",\"1268887204949\",\"-1634000498570\",\"207278132311\",\"250737379020\",\"126552056950\",\n \"2017\",\"국제교류기금\",\"108471000000\",\"132308781414\",\"132308781414\",\"23837781414\",\"23837781414\",\"108471000000\",\"132308781414\",\"132308781414\",\"-23837781414\",\"-23837781414\",\"1518000000\",\"9244859988\",\n \"2017\",\"국제질병퇴치기금\",\"83129000000\",\"92763940261\",\"92763940261\",\"9634940261\",\"9634940261\",\"83129000000\",\"92763940261\",\"92763940261\",\"-9634940261\",\"-9634940261\",\"276275400\",\"561141097\",\n \"2017\",\"군인복지기금\",\"1318187000000\",\"829479208950\",\"829479208950\",\"-488707791050\",\"-488707791050\",\"1319382699730\",\"829479208950\",\"829479208950\",\"489903490780\",\"489903490780\",\"4562556510\",\"39398198850\",\n \"2017\",\"군인연금기금\",\"3145114000000\",\"5921214590440\",\"3166114590440\",\"2776100590440\",\"21000590440\",\"3145166700000\",\"5921214590440\",\"3166114590440\",\"-2776047890440\",\"-20947890440\",\"0\",\"5963055840\",\n \"2017\",\"근로복지진흥기금\",\"326573000000\",\"1839757038827\",\"287310709194\",\"1513184038827\",\"-39262290806\",\"326573000000\",\"1839757038827\",\"287310709194\",\"-1513184038827\",\"39262290806\",\"0\",\"5396143584\",\n \"2017\",\"금강수계관리기금\",\"115888000000\",\"229111068640\",\"123174068640\",\"113223068640\",\"7286068640\",\"116928194400\",\"229111068640\",\"123174068640\",\"-112182874240\",\"-6245874240\",\"773288078\",\"521939301\",\n \"2017\",\"기술보증기금\",\"2459797000000\",\"2935409356436\",\"2935409356436\",\"475612356436\",\"475612356436\",\"2459797000000\",\"2935409356436\",\"2935409356436\",\"-475612356436\",\"-475612356436\",\"0\",\"22761421796\",\n \"2017\",\"낙동강수계관리기금\",\"242129000000\",\"478207061365\",\"256804061365\",\"236078061365\",\"14675061365\",\"243359738351\",\"478207061365\",\"256804061365\",\"-234847323014\",\"-13444323014\",\"639744122\",\"896338278\",\n \"2017\",\"남북협력기금\",\"1970786000000\",\"1558859976590\",\"1196698745110\",\"-411926023410\",\"-774087254890\",\"1973229136680\",\"1558859976590\",\"1196698745110\",\"414369160090\",\"776530391570\",\"41411647650\",\"872170807440\",\n \"2017\",\"농림수산업자신용보증기금\",\"1007434000000\",\"1339296763232\",\"1339296763232\",\"331862763232\",\"331862763232\",\"1007434000000\",\"1339296763232\",\"1339296763232\",\"-331862763232\",\"-331862763232\",\"0\",\"8785357432\",\n \"2017\",\"농산물가격안정기금\",\"2885008000000\",\"3647638241960\",\"2311260285832\",\"762630241960\",\"-573747714168\",\"2885456767970\",\"3647638241960\",\"2311260285832\",\"-762181473990\",\"574196482138\",\"0\",\"228284718350\",\n \"2017\",\"농어가목돈마련저축장려기금\",\"86563000000\",\"95169395440\",\"83099395440\",\"8606395440\",\"-3463604560\",\"86563000000\",\"95169395440\",\"83099395440\",\"-8606395440\",\"3463604560\",\"0\",\"1761808720\",\n \"2017\",\"농어업재해재보험기금\",\"227055000000\",\"260651485140\",\"196572554347\",\"33596485140\",\"-30482445653\",\"227055000000\",\"260651485140\",\"196572554347\",\"-33596485140\",\"30482445653\",\"0\",\"435067370\",\n \"2017\",\"농업소득보전직접지불기금\",\"1554480000000\",\"2939848719930\",\"1498849373800\",\"1385368719930\",\"-55630626200\",\"1554480000000\",\"2939848719930\",\"1498849373800\",\"-1385368719930\",\"55630626200\",\"0\",\"566470810\",\n \"2017\",\"농지관리기금\",\"2070263000000\",\"3725341147100\",\"3349472868632\",\"1655078147100\",\"1279209868632\",\"2070263000000\",\"3725341147100\",\"3349472868632\",\"-1655078147100\",\"-1279209868632\",\"0\",\"64964907410\",\n \"2017\",\"대외경제협력기금\",\"1019436000000\",\"1796484227980\",\"858358115800\",\"777048227980\",\"-161077884200\",\"1023061207690\",\"1796484227980\",\"858358115800\",\"-773423020290\",\"164703091890\",\"9234011270\",\"207147217650\",\n \"2017\",\"무역보험기금\",\"3372170000000\",\"2924692605628\",\"1684930605628\",\"-447477394372\",\"-1687239394372\",\"3372170000000\",\"2924692605628\",\"1684930605628\",\"447477394372\",\"1687239394372\",\"0\",\"110680394372\",\n \"2017\",\"문화예술진흥기금\",\"540207000000\",\"532127077750\",\"532127077750\",\"-8079922250\",\"-8079922250\",\"540747864270\",\"532127077750\",\"532127077750\",\"8620786520\",\"8620786520\",\"744040000\",\"7876746520\",\n \"2017\",\"문화재보호기금\",\"133463000000\",\"154593134260\",\"152257709000\",\"21130134260\",\"18794709000\",\"138779974790\",\"154593134260\",\"152257709000\",\"-15813159470\",\"-13477734210\",\"3385319100\",\"2940521430\",\n \"2017\",\"방사성폐기물관리기금\",\"4859199000000\",\"4221710900020\",\"3538120620750\",\"-637488099980\",\"-1321078379250\",\"4859199000000\",\"4221710900020\",\"3538120620750\",\"637488099980\",\"1321078379250\",\"0\",\"0\",\n \"2017\",\"방송통신발전기금\",\"983419000000\",\"1666772954670\",\"950674697068\",\"683353954670\",\"-32744302932\",\"984607470000\",\"1666772954670\",\"950674697068\",\"-682165484670\",\"33932772932\",\"0\",\"5368600500\",\n \"2017\",\"범죄피해자보호기금\",\"101869000000\",\"101206599540\",\"101206599540\",\"-662400460\",\"-662400460\",\"101869000000\",\"101206599540\",\"101206599540\",\"662400460\",\"662400460\",\"0\",\"968027770\",\n \"2017\",\"보훈기금\",\"584222000000\",\"356957438690\",\"260757438690\",\"-227264561310\",\"-323464561310\",\"584222000000\",\"356957438690\",\"260757438690\",\"227264561310\",\"323464561310\",\"96600000\",\"12116378770\",\n \"2017\",\"복권기금\",\"5064884000000\",\"5071439013780\",\"5071439013780\",\"6555013780\",\"6555013780\",\"5064884000000\",\"5071439013780\",\"5071439013780\",\"-6555013780\",\"-6555013780\",\"0\",\"18961931090\",\n \"2017\",\"사립학교교직원연금기금\",\"10915394000000\",\"11273959679737\",\"11273959679737\",\"358565679737\",\"358565679737\",\"10915394000000\",\"11273959679737\",\"11273959679737\",\"-358565679737\",\"-358565679737\",\"2432108768\",\"129021189497\",\n \"2017\",\"사법서비스진흥기금\",\"50500000000\",\"54478924050\",\"54478924050\",\"3978924050\",\"3978924050\",\"50618000000\",\"54478924050\",\"54478924050\",\"-3860924050\",\"-3860924050\",\"0\",\"327245090\",\n \"2017\",\"사학진흥기금\",\"443055000000\",\"412317713823\",\"412317713823\",\"-30737286177\",\"-30737286177\",\"443134908629\",\"412317713823\",\"412317713823\",\"30817194806\",\"30817194806\",\"0\",\"35121091324\",\n \"2017\",\"산업기반신용보증기금\",\"376629000000\",\"604834786685\",\"604834786685\",\"228205786685\",\"228205786685\",\"376629000000\",\"604834786685\",\"604834786685\",\"-228205786685\",\"-228205786685\",\"0\",\"18335513615\",\n \"2017\",\"산업기술진흥및사업화촉진기금\",\"208456000000\",\"125940377440\",\"125940377440\",\"-82515622560\",\"-82515622560\",\"208456000000\",\"125940377440\",\"125940377440\",\"82515622560\",\"82515622560\",\"0\",\"50443000000\",\n \"2017\",\"산업재해보상보험및예방기금\",\"12278202000000\",\"16785667051820\",\"11093375051820\",\"4507465051820\",\"-1184826948180\",\"12278202000000\",\"16785667051820\",\"11093375051820\",\"-4507465051820\",\"1184826948180\",\"0\",\"9985509230\",\n \"2017\",\"석면피해구제기금\",\"49867000000\",\"66863753060\",\"66863753060\",\"16996753060\",\"16996753060\",\"49867000000\",\"66863753060\",\"66863753060\",\"-16996753060\",\"-16996753060\",\"151914000\",\"125502400\",\n \"2017\",\"소상공인시장진흥기금\",\"2917318000000\",\"5367206054670\",\"2913316105420\",\"2449888054670\",\"-4001894580\",\"2917318000000\",\"5367206054670\",\"2913316105420\",\"-2449888054670\",\"4001894580\",\"0\",\"4001894580\",\n \"2017\",\"수산발전기금\",\"767731000000\",\"864032957540\",\"707449615812\",\"96301957540\",\"-60281384188\",\"776019900000\",\"864032957540\",\"707449615812\",\"-88013057540\",\"68570284188\",\"431670000\",\"72378302260\",\n \"2017\",\"순국선열애국지사사업기금\",\"65637000000\",\"51873529670\",\"51873529670\",\"-13763470330\",\"-13763470330\",\"80817509190\",\"51873529670\",\"51873529670\",\"28943979520\",\"28943979520\",\"887259540\",\"332279480\",\n \"2017\",\"신용보증기금\",\"5488847000000\",\"8312761498977\",\"8312761498977\",\"2823914498977\",\"2823914498977\",\"5488847000000\",\"8312761498977\",\"8312761498977\",\"-2823914498977\",\"-2823914498977\",\"0\",\"601479196233\",\n \"2017\",\"양곡증권정리기금\",\"1780842000000\",\"1922597393120\",\"1759188932870\",\"141755393120\",\"-21653067130\",\"1780842000000\",\"1922597393120\",\"1759188932870\",\"-141755393120\",\"21653067130\",\"0\",\"18565997900\",\n \"2017\",\"양성평등기금\",\"222381000000\",\"425866527870\",\"227811487804\",\"203485527870\",\"5430487804\",\"222381000000\",\"425866527870\",\"227811487804\",\"-203485527870\",\"-5430487804\",\"0\",\"1119376310\",\n \"2017\",\"언론진흥기금\",\"35736000000\",\"57982723950\",\"26470864930\",\"22246723950\",\"-9265135070\",\"35736000000\",\"57982723950\",\"26470864930\",\"-22246723950\",\"9265135070\",\"0\",\"1008937810\",\n \"2017\",\"영산강·섬진강수계관리기금\",\"89438000000\",\"128405783797\",\"91179783797\",\"38967783797\",\"1741783797\",\"89803321400\",\"128405783797\",\"91179783797\",\"-38602462397\",\"-1376462397\",\"539349140\",\"381719126\",\n \"2017\",\"영화발전기금\",\"327374000000\",\"311602087226\",\"311602087226\",\"-15771912774\",\"-15771912774\",\"328018441430\",\"311602087226\",\"311602087226\",\"16416354204\",\"16416354204\",\"1019214000\",\"3561420751\",\n \"2017\",\"예금보험기금채권상환기금\",\"8991280000000\",\"6980887556371\",\"6980887556371\",\"-2010392443629\",\"-2010392443629\",\"8991280000000\",\"6980887556371\",\"6980887556371\",\"2010392443629\",\"2010392443629\",\"0\",\"34464237709\",\n \"2017\",\"외국환평형기금\",\"90046415000000\",\"338392258255650\",\"97541618666970\",\"248345843255650\",\"7495203666970\",\"90046415000000\",\"338392258255650\",\"97541618666970\",\"-248345843255650\",\"-7495203666970\",\"0\",\"1753953898063\",\n \"2017\",\"원자력기금\",\"353027000000\",\"579170246010\",\"333497587550\",\"226143246010\",\"-19529412450\",\"353336169360\",\"579170246010\",\"333497587550\",\"-225834076650\",\"19838581810\",\"291802000\",\"67808000\",\n \"2017\",\"응급의료기금\",\"291421000000\",\"580732029160\",\"321732029160\",\"289311029160\",\"30311029160\",\"293938948710\",\"580732029160\",\"321732029160\",\"-286793080450\",\"-27793080450\",\"3345239800\",\"19804925600\",\n \"2017\",\"임금채권보장기금\",\"1353970000000\",\"1218862711350\",\"896130711350\",\"-135107288650\",\"-457839288650\",\"1353970000000\",\"1218862711350\",\"896130711350\",\"135107288650\",\"457839288650\",\"0\",\"29944873420\",\n \"2017\",\"자동차사고피해지원기금\",\"243833000000\",\"263883352068\",\"263883352068\",\"20050352068\",\"20050352068\",\"243833000000\",\"263883352068\",\"263883352068\",\"-20050352068\",\"-20050352068\",\"0\",\"15034685000\",\n \"2017\",\"자유무역협정이행지원기금\",\"697382000000\",\"1091012649440\",\"562013979328\",\"393630649440\",\"-135368020672\",\"697382000000\",\"1091012649440\",\"562013979328\",\"-393630649440\",\"135368020672\",\"0\",\"216764815000\",\n \"2017\",\"장애인고용촉진및직업재활기금\",\"1201710000000\",\"1464600902950\",\"833900902950\",\"262890902950\",\"-367809097050\",\"1201710000000\",\"1464600902950\",\"833900902950\",\"-262890902950\",\"367809097050\",\"0\",\"442990560\",\n \"2017\",\"전력산업기반기금\",\"4143938000000\",\"4974493501060\",\"3587918501060\",\"830555501060\",\"-556019498940\",\"4144118000000\",\"4974493501060\",\"3587918501060\",\"-830375501060\",\"556199498940\",\"154000000\",\"4591492090\",\n \"2017\",\"정보통신진흥기금\",\"958104000000\",\"1537780073020\",\"789904301639\",\"579676073020\",\"-168199698361\",\"958104000000\",\"1537780073020\",\"789904301639\",\"-579676073020\",\"168199698361\",\"0\",\"242786650\",\n \"2017\",\"주택금융신용보증기금\",\"3190784000000\",\"4871893331502\",\"4871893331502\",\"1681109331502\",\"1681109331502\",\"3190886520000\",\"4871893331502\",\"4871893331502\",\"-1681006811502\",\"-1681006811502\",\"95600000\",\"201612653812\",\n \"2017\",\"주택도시기금\",\"68893276000000\",\"66529367791652\",\"57729367791652\",\"-2363908208348\",\"-11163908208348\",\"68893376000000\",\"66529367791652\",\"57729367791652\",\"2364008208348\",\"11164008208348\",\"338427270\",\"2018593724366\",\n \"2017\",\"중소기업창업및진흥기금\",\"9920963000000\",\"9897816250203\",\"9897816250203\",\"-23146749797\",\"-23146749797\",\"9920963000000\",\"9897816250203\",\"9897816250203\",\"23146749797\",\"23146749797\",\"0\",\"29449684554\",\n \"2017\",\"지역신문발전기금\",\"9696000000\",\"34956850760\",\"10102959910\",\"25260850760\",\"406959910\",\"9696000000\",\"34956850760\",\"10102959910\",\"-25260850760\",\"-406959910\",\"0\",\"415196920\",\n \"2017\",\"청소년육성기금\",\"129843000000\",\"183750640860\",\"125878041015\",\"53907640860\",\"-3964958985\",\"129910034970\",\"183750640860\",\"125878041015\",\"-53840605890\",\"4031993955\",\"0\",\"588126200\",\n \"2017\",\"축산발전기금\",\"1166039000000\",\"1561452399210\",\"1084283662935\",\"395413399210\",\"-81755337065\",\"1174219800000\",\"1561452399210\",\"1084283662935\",\"-387232599210\",\"89936137065\",\"1551800000\",\"38607531910\",\n \"2017\",\"한강수계관리기금\",\"513433000000\",\"1001920911829\",\"589666806821\",\"488487911829\",\"76233806821\",\"524128039081\",\"1001920911829\",\"589666806821\",\"-477792872748\",\"-65538767740\",\"8155884156\",\"7007904347\"\n };\n \n// System.out.println(num[14]);\n String field_name[] = new String [14];\n for (int i=0;i<14;i++) {\n field_name[i] = num[i];\n }\n \n// for(int i = 0; i<num.length-13;i++) {\n// \n// }\n String field[] = new String[14];\n for (int i = 1 ; i <num.length/14; i++) {\n for(int j=0; j<14;j++) {\n \n field[j]=num[i*14 + j];\n System.out.println(field[j]);\n }\n for(int k=0; k<14;k++) {\n System.out.printf(\"%s : %s\\n\", field_name[k],field[k]);\n \n }\n }\n }", "public boolean validarNif(String nif) {\n boolean flag;\n // comprobamos que tegna 8 numeros y una letra determinada\n Pattern pattern = Pattern.compile(\"(\\\\d{1,8})([TRWAGMYFPDXBNJZSQVHLCKEtrwagmyfpdxbnjzsqvhlcke])\");\n Matcher matcher = pattern.matcher(nif);\n // si el patron coincide\n if (matcher.matches()) {\n String letra = matcher.group(2);\n String letras = \"TRWAGMYFPDXBNJZSQVHLCKE\";\n int index = Integer.parseInt(matcher.group(1));\n index = index % 23;\n String reference = letras.substring(index, index + 1);\n flag = reference.equalsIgnoreCase(letra);\n } else {\n flag = false;\n }\n return flag;\n }", "private static void m17787a(Bitmap bitmap, byte[] bArr) {\n int i;\n int i2 = 0;\n int[] iArr = new int[(bitmap.getWidth() - 2)];\n bitmap.getPixels(iArr, 0, iArr.length, 1, bitmap.getHeight() - 1, iArr.length, 1);\n for (i = 0; i < iArr.length; i++) {\n if (-16777216 == iArr[i]) {\n C5225r.m17789a(bArr, 12, i);\n break;\n }\n }\n for (i = iArr.length - 1; i >= 0; i--) {\n if (-16777216 == iArr[i]) {\n C5225r.m17789a(bArr, 16, (iArr.length - i) - 2);\n break;\n }\n }\n int[] iArr2 = new int[(bitmap.getHeight() - 2)];\n bitmap.getPixels(iArr2, 0, 1, bitmap.getWidth() - 1, 0, 1, iArr2.length);\n while (i2 < iArr2.length) {\n if (-16777216 == iArr2[i2]) {\n C5225r.m17789a(bArr, 20, i2);\n break;\n }\n i2++;\n }\n for (i = iArr2.length - 1; i >= 0; i--) {\n if (-16777216 == iArr2[i]) {\n C5225r.m17789a(bArr, 24, (iArr2.length - i) - 2);\n return;\n }\n }\n }", "java.lang.String getField1824();", "private boolean m81839a(String str) {\n return C6969H.m41409d(\"G738BDC12AA\").equals(str) || C6969H.m41409d(\"G738BDC12AA39A528F61E\").equals(str);\n }", "private String \\u02ca\\u0971() {\n int n2;\n LinkedHashMap linkedHashMap;\n int n3;\n Map<String, String> map;\n try {\n map = this.\\u02ca\\u0971;\n linkedHashMap = new LinkedHashMap();\n n2 = 0;\n }\n catch (Exception exception) {\n o.\\u02ce(exception);\n return \"\";\n }\n do {\n n3 = 0;\n if (n2 >= 8) break;\n StringBuilder stringBuilder = new StringBuilder(\"moatClientLevel\");\n stringBuilder.append(n2);\n String string = stringBuilder.toString();\n if (map.containsKey((Object)string)) {\n linkedHashMap.put((Object)string, map.get((Object)string));\n }\n ++n2;\n } while (true);\n do {\n if (n3 < 8) {\n StringBuilder stringBuilder = new StringBuilder(\"moatClientSlicer\");\n stringBuilder.append(n3);\n String string = stringBuilder.toString();\n if (map.containsKey((Object)string)) {\n linkedHashMap.put((Object)string, map.get((Object)string));\n }\n } else {\n Iterator iterator = map.keySet().iterator();\n do {\n if (!iterator.hasNext()) {\n String string = new JSONObject((Map)linkedHashMap).toString();\n StringBuilder stringBuilder = new StringBuilder(\"Parsed ad ids = \");\n stringBuilder.append(string);\n a.\\u02cf(3, \"NativeDisplayTracker\", this, stringBuilder.toString());\n StringBuilder stringBuilder2 = new StringBuilder(\"{\\\"adIds\\\":\");\n stringBuilder2.append(string);\n stringBuilder2.append(\", \\\"adKey\\\":\\\"\");\n stringBuilder2.append(this.\\u02cb);\n stringBuilder2.append(\"\\\", \\\"adSize\\\":\");\n stringBuilder2.append(this.\\u141d());\n stringBuilder2.append(\"}\");\n return stringBuilder2.toString();\n }\n String string = (String)iterator.next();\n if (linkedHashMap.containsKey((Object)string)) continue;\n linkedHashMap.put((Object)string, (Object)((String)map.get((Object)string)));\n } while (true);\n }\n ++n3;\n } while (true);\n }", "boolean hasI13();", "java.lang.String getField1160();", "private static String m2380a(byte[] bArr, byte[] bArr2) {\n byte[] bArr3 = new byte[(((bArr.length + 2) / 3) * 4)];\n int length = bArr.length - (bArr.length % 3);\n int i = 0;\n for (int i2 = 0; i2 < length; i2 += 3) {\n int i3 = i + 1;\n bArr3[i] = bArr2[(bArr[i2] & 255) >> 2];\n int i4 = i3 + 1;\n int i5 = i2 + 1;\n bArr3[i3] = bArr2[((bArr[i2] & 3) << 4) | ((bArr[i5] & 255) >> 4)];\n int i6 = i4 + 1;\n int i7 = i2 + 2;\n bArr3[i4] = bArr2[((bArr[i5] & 15) << 2) | ((bArr[i7] & 255) >> 6)];\n i = i6 + 1;\n bArr3[i6] = bArr2[bArr[i7] & 63];\n }\n switch (bArr.length % 3) {\n case 1:\n int i8 = i + 1;\n bArr3[i] = bArr2[(bArr[length] & 255) >> 2];\n int i9 = i8 + 1;\n bArr3[i8] = bArr2[(bArr[length] & 3) << 4];\n int i10 = i9 + 1;\n bArr3[i9] = 61;\n bArr3[i10] = 61;\n break;\n case 2:\n int i11 = i + 1;\n bArr3[i] = bArr2[(bArr[length] & 255) >> 2];\n int i12 = i11 + 1;\n int i13 = length + 1;\n bArr3[i11] = bArr2[((bArr[length] & 3) << 4) | ((bArr[i13] & 255) >> 4)];\n int i14 = i12 + 1;\n bArr3[i12] = bArr2[(bArr[i13] & 15) << 2];\n bArr3[i14] = 61;\n break;\n }\n try {\n return new String(bArr3, \"US-ASCII\");\n } catch (UnsupportedEncodingException e) {\n throw new AssertionError(e);\n }\n }", "private static byte[] m24635a(Context context, String str) {\n String f = C6014b.m23956f();\n String string = Secure.getString(context.getContentResolver(), \"android_id\");\n String substring = str.substring(0, Math.min(8, str.length() - 1));\n StringBuilder sb = new StringBuilder();\n sb.append(substring);\n sb.append(f.substring(0, Math.min(8, f.length() - 1)));\n String sb2 = sb.toString();\n StringBuilder sb3 = new StringBuilder();\n sb3.append(sb2);\n sb3.append(string.substring(0, Math.min(8, string.length() - 1)));\n String sb4 = sb3.toString();\n if (sb4.length() != 24) {\n StringBuilder sb5 = new StringBuilder();\n sb5.append(sb4);\n sb5.append(str.substring(8, 24 - sb4.length()));\n sb4 = sb5.toString();\n }\n return sb4.getBytes();\n }", "private byte m1655h() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n char charAt2 = charSequence.charAt(i3);\n this.f2520e = charAt2;\n if (charAt2 == '<') {\n return 12;\n }\n if (charAt2 == '>') {\n break;\n } else if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i4 = this.f2519d;\n if (i4 <= 0) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n int i5 = i4 - 1;\n this.f2519d = i5;\n charAt = charSequence2.charAt(i5);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n }\n this.f2519d = i;\n this.f2520e = '>';\n return 13;\n }", "java.lang.String getField1548();", "public void hitunganRule4(){\n penebaranBibitBanyak = 1900;\r\n hariPanenLama = 110;\r\n \r\n //menentukan niu bibit\r\n nBibit = (penebaranBibitBanyak - 1500) / (3000 - 1500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenLama >=80) && (hariPanenLama <=120)) {\r\n nPanen = (hariPanenLama - 100) / (180 - 100);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a4 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a4 = nPanen;\r\n }\r\n \r\n //tentukan Z3\r\n z4 = (penebaranBibitBanyak + hariPanenLama) * 500;\r\n System.out.println(\"a4 = \" + String.valueOf(a4));\r\n System.out.println(\"z4 = \" + String.valueOf(z4));\r\n }", "public void mo3892b() {\n if (TextUtils.isEmpty(this.f688a)) {\n this.f688a = \"\";\n }\n if (TextUtils.isEmpty(this.f690c)) {\n this.f690c = \"\";\n }\n if (TextUtils.isEmpty(this.f691d)) {\n this.f691d = \"\";\n }\n if (TextUtils.isEmpty(this.f692e)) {\n this.f692e = \"\";\n }\n if (TextUtils.isEmpty(this.f693f)) {\n this.f693f = \"\";\n }\n if (TextUtils.isEmpty(this.f694g)) {\n this.f694g = \"\";\n }\n if (TextUtils.isEmpty(this.f695h)) {\n this.f695h = \"\";\n }\n if (TextUtils.isEmpty(this.f696i)) {\n this.f696i = \"\";\n }\n if (TextUtils.isEmpty(this.f697j)) {\n this.f697j = \"0\";\n } else if (!this.f697j.equals(\"1\") && !this.f697j.equals(\"2\")) {\n this.f697j = \"0\";\n }\n if (TextUtils.isEmpty(this.f698k)) {\n this.f698k = \"0\";\n } else if (!this.f698k.equals(\"0\") && !this.f698k.equals(\"1\")) {\n this.f698k = \"0\";\n }\n if (TextUtils.isEmpty(this.f699l)) {\n this.f699l = \"\";\n }\n if (TextUtils.isEmpty(this.f700m)) {\n this.f700m = \"\";\n }\n if (TextUtils.isEmpty(this.f701n)) {\n this.f701n = \"\";\n }\n if (TextUtils.isEmpty(this.f702o)) {\n this.f702o = \"\";\n }\n if (TextUtils.isEmpty(this.f703p)) {\n this.f703p = \"\";\n }\n if (TextUtils.isEmpty(this.f704q)) {\n this.f704q = \"\";\n }\n if (TextUtils.isEmpty(this.f705r)) {\n this.f705r = \"\";\n }\n if (TextUtils.isEmpty(this.f706s)) {\n this.f706s = \"\";\n }\n if (TextUtils.isEmpty(this.f707t)) {\n this.f707t = \"\";\n }\n if (TextUtils.isEmpty(this.f708u)) {\n this.f708u = \"\";\n }\n if (TextUtils.isEmpty(this.f709v)) {\n this.f709v = \"\";\n }\n if (TextUtils.isEmpty(this.f710w)) {\n this.f710w = \"\";\n }\n if (TextUtils.isEmpty(this.f711x)) {\n this.f711x = \"\";\n }\n if (TextUtils.isEmpty(this.f712y)) {\n this.f712y = \"0\";\n } else if (!this.f712y.equals(\"1\") && !this.f712y.equals(\"2\")) {\n this.f712y = \"0\";\n }\n if (TextUtils.isEmpty(this.f713z)) {\n this.f713z = \"0\";\n } else if (!this.f713z.equals(\"1\") && !this.f713z.equals(\"2\")) {\n this.f713z = \"0\";\n }\n if (TextUtils.isEmpty(this.f681A)) {\n this.f681A = \"\";\n }\n if (TextUtils.isEmpty(this.f682B)) {\n this.f682B = \"\";\n }\n if (TextUtils.isEmpty(this.f683C)) {\n this.f683C = \"\";\n }\n if (TextUtils.isEmpty(this.f684D)) {\n this.f684D = \"\";\n }\n if (TextUtils.isEmpty(this.f685E)) {\n this.f685E = \"\";\n }\n if (TextUtils.isEmpty(this.f686F)) {\n this.f686F = \"\";\n }\n if (this.f687G == null) {\n this.f687G = new byte[0];\n }\n }", "private String create_amplicon_variant_40columns() {\n String outputVariant;\n String hifreq_f = hifreq == 0\n ? \"0\"\n : new DecimalFormat(\"0.0000\").format(hifreq);\n nm = nm > 0 ? nm : 0;\n String nm_f = nm == 0\n ? \"0\"\n : new DecimalFormat(\"0.0\").format(nm);\n\n outputVariant = join(delimiter,\n sample,\n gene,\n chr,\n startPosition,\n endPosition,\n refAllele,\n varAllele,\n\n totalCoverage,\n variantCoverage,\n referenceForwardCount,\n referenceReverseCount,\n variantForwardCount,\n variantReverseCount,\n genotype,\n getRoundedValueToPrint(\"0.0000\", frequency),\n bias,\n getRoundedValueToPrint(\"0.0\", pmean),\n pstd,\n getRoundedValueToPrint(\"0.0\", qual),\n qstd,\n\n getRoundedValueToPrint(\"0.00000\", pvalue),\n oddratio,\n\n getRoundedValueToPrint(\"0.0\", mapq),\n getRoundedValueToPrint(\"0.000\", qratio),\n hifreq_f,\n getRoundedValueToPrint(\"0.0000\", extrafreq),\n\n shift3,\n getRoundedValueToPrint(\"0.000\", msi),\n msint,\n nm_f,\n hicnt,\n hicov,\n leftSequence, rightSequence,\n region,\n varType,\n goodVariantsCount,\n totalVariantsCount,\n noCoverage,\n ampliconFlag\n );\n return outputVariant;\n }", "private String altitudeConversion() {\n int reading = ((record[9] & 255) << 8) + (record[8] & 255);\n if (reading == 60000) {\n return \" \";\n } else {\n return reading + \"\";\n }\n }", "public boolean[] mo1603a(String str) {\n int length = str.length();\n if (length % 2 != 0) {\n throw new IllegalArgumentException(\"The length of the input should be even\");\n } else if (length <= 80) {\n boolean[] zArr = new boolean[((length * 9) + 9)];\n int a = C0809o.m2096a(zArr, 0, f1950a, true);\n for (int i = 0; i < length; i += 2) {\n int digit = Character.digit(str.charAt(i), 10);\n int digit2 = Character.digit(str.charAt(i + 1), 10);\n int[] iArr = new int[18];\n for (int i2 = 0; i2 < 5; i2++) {\n int i3 = i2 * 2;\n int[][] iArr2 = C0912l.f1949d;\n iArr[i3] = iArr2[digit][i2];\n iArr[i3 + 1] = iArr2[digit2][i2];\n }\n a += C0809o.m2096a(zArr, a, iArr, true);\n }\n C0809o.m2096a(zArr, a, f1951b, true);\n return zArr;\n } else {\n StringBuilder stringBuilder = new StringBuilder(\"Requested contents should be less than 80 digits long, but got \");\n stringBuilder.append(length);\n throw new IllegalArgumentException(stringBuilder.toString());\n }\n }", "public static void main(String[] args) {\n\t\tList<String> attributeList = new ArrayList<>();\n\t\tattributeList.add(\"srvac/v-pen/c04-ch02inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch05-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch07-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch09-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch13-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch14-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-ch16inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-pen/c04-sept-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch02inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch04inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch05-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch06-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch07-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch07-2/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch08-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch09-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch09-2/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch12-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch13-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch14-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch15inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch16inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-ch22inj-1/pressure\");\n\t\tattributeList.add(\"srvac/v-ip/c04-sept-1/pressure\");\n\n\t\tList<String> selectionList = new ItemSelectionDialog(\n\t\t\t\t(JFrame) null, \"Attribute Selection\", attributeList, true).showDialog();\n\t\tif (selectionList.isEmpty())\n\t\t\tSystem.out.println(\"No Selection\");\n\t\telse {\n\t\t\tfor (String selection : selectionList)\n\t\t\t\tSystem.out.println(selection);\n\t\t}\n\t}", "private int m3423z(int i, int i2) {\n int i3;\n int i4;\n for (int size = this.f4373c.size() - 1; size >= 0; size--) {\n C0933b bVar = this.f4373c.get(size);\n int i5 = bVar.f4379a;\n if (i5 == 8) {\n int i6 = bVar.f4380b;\n int i7 = bVar.f4382d;\n if (i6 < i7) {\n i4 = i6;\n i3 = i7;\n } else {\n i3 = i6;\n i4 = i7;\n }\n if (i < i4 || i > i3) {\n if (i < i6) {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n bVar.f4382d = i7 - 1;\n }\n }\n } else if (i4 == i6) {\n if (i2 == 1) {\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4382d = i7 - 1;\n }\n i++;\n } else {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n }\n i--;\n }\n } else {\n int i8 = bVar.f4380b;\n if (i8 <= i) {\n if (i5 == 1) {\n i -= bVar.f4382d;\n } else if (i5 == 2) {\n i += bVar.f4382d;\n }\n } else if (i2 == 1) {\n bVar.f4380b = i8 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i8 - 1;\n }\n }\n }\n for (int size2 = this.f4373c.size() - 1; size2 >= 0; size2--) {\n C0933b bVar2 = this.f4373c.get(size2);\n if (bVar2.f4379a == 8) {\n int i9 = bVar2.f4382d;\n if (i9 == bVar2.f4380b || i9 < 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n } else if (bVar2.f4382d <= 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n }\n return i;\n }", "java.lang.String getField1665();", "public static void main(String[] args) {\n String msg1 = \"9F260811223344556677889F2701809F100706010A03A400009F3704112233449F360200A0950500000080009A031712319C01009F02060000000000105F2A02084082025C009F1A0203729F03060000000000009F34030403029F3501229F330360D0C89F41020000\";\n String msg2 = \"707D5F24031012315F25039507015F280208405F300202019F0702FF009F0802008C9F420208408C159F02069F03069F1A0295055F2A029A039C019F37048D178A029F02069F03069F1A0295055F2A029A039C019F37048E0E00000000000000001E0302031F009F0D05F0400088009F0E0500100000009F0F05F040009800\";\n Map<String, String> mp = BerTlvHelper.parseTLV(msg1);\n mp.replace(\"9A\", \"200201\");\n mp.replace(\"9F36\", \"01A0\");\n System.out.println(BerTlvHelper.getTlv(mp));\n }", "public static final String m17015P(String str, String str2) {\n AppMethodBeat.m2504i(114129);\n if (str.contains(VideoMaterialUtil.FRAMES_ID_SEPARATOR_3D) || str.length() <= 0) {\n String[] split = str.split(VideoMaterialUtil.FRAMES_ID_SEPARATOR_3D);\n if (split[0] == null || split[0].length() <= 0) {\n AppMethodBeat.m2505o(114129);\n return str2;\n }\n str = split[0];\n AppMethodBeat.m2505o(114129);\n return str;\n }\n AppMethodBeat.m2505o(114129);\n return str;\n }" ]
[ "0.5669746", "0.5291812", "0.5139543", "0.5132446", "0.512297", "0.5103557", "0.5067434", "0.506652", "0.50336313", "0.50208616", "0.49892548", "0.49778533", "0.49441767", "0.4919187", "0.4908728", "0.4897607", "0.48921788", "0.48855364", "0.4880257", "0.4853423", "0.483657", "0.48353", "0.48308975", "0.4826579", "0.48250484", "0.48194158", "0.48093683", "0.48075306", "0.4789122", "0.47729468", "0.47689122", "0.47640866", "0.4760783", "0.4755782", "0.474246", "0.4735243", "0.47345868", "0.47342315", "0.47253206", "0.471759", "0.4714579", "0.47100556", "0.470634", "0.47033954", "0.47002542", "0.46937206", "0.46846962", "0.4676787", "0.4666588", "0.466517", "0.46609345", "0.4653845", "0.46509114", "0.46454802", "0.46422625", "0.4638094", "0.4635727", "0.46271366", "0.46242213", "0.46200088", "0.46199152", "0.46187732", "0.46180606", "0.4613516", "0.4609187", "0.4608776", "0.46060848", "0.46056226", "0.46020842", "0.46011096", "0.45996743", "0.45993832", "0.4593877", "0.45902616", "0.45856464", "0.45795512", "0.45780838", "0.45738715", "0.45736945", "0.45723265", "0.4563436", "0.4560975", "0.4558713", "0.4557259", "0.45566782", "0.4553568", "0.4553525", "0.45499173", "0.45472214", "0.45376337", "0.45331568", "0.4533009", "0.45319408", "0.45297825", "0.45260203", "0.45252404", "0.4522337", "0.45182487", "0.45173618", "0.45158735", "0.45141232" ]
0.0
-1
~vam6I~//~1am3I~//~va54I~ //~va56I~ from Alert,replyed Yes //~va56I~ //~va56I~
public static void stopFinish() //from Alert by Stop:Yes //~va56I~ { //~va56I~ if (Dump.Y) Dump.println("Utils stopFinish"); //~va56I~ try //~va56I~ { //~va56I~ AG.aMainActivity.finish(); //~va56I~ } //~va56I~ catch (Exception e) //~va56I~ { //~va56I~ Dump.println(e,"stopFinish"); //~va56I~ AG.aMainActivity.finish(); //~va56I~ } //~va56I~ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String bossReject(){\n return \"我覺得你們需要重做,因為跟我想的不一樣\";\n }", "@Test\n void shouldGenerateTheFixMessage()\n {\n assertThat(\n new String(asciiFixBody(\"FIX.4.2\", \"35=5^49=SellSide^56=BuySide^34=3^52=20190606-09:25:34.329^58=Logout acknowledgement^\")))\n .isEqualTo(\"8=FIX.4.2\\u00019=84\\u000135=5\\u000149=SellSide\\u000156=BuySide\\u000134=3\\u000152=20190606-09:25:34.329\\u000158=Logout acknowledgement\\u000110=079\\u0001\");\n }", "public void sendQuestion() {\n/* 55 */ StringBuilder buf = new StringBuilder();\n/* 56 */ buf.append(getBmlHeader());\n/* */ \n/* 58 */ buf.append(\"label{text=\\\"\\\"}\");\n/* 59 */ buf.append(\"label{type=\\\"bold\\\";text=\\\"General\\\"}\");\n/* 60 */ buf.append(\"label{text=\\\" * I've keep some of the ways that HFC was used for skill increases. But no junk food, \\\"}\");\n/* 61 */ buf.append(\"label{text=\\\" e.g. nails are not used as an ingredient and if present in a container, they will stop the \\\"}\");\n/* 62 */ buf.append(\"label{text=\\\" food item being made.\\\"}\");\n/* 63 */ buf.append(\"label{text=\\\" * Meats now have a material, e.g. Meat, Dragon and Meat, Game\\\"}\");\n/* 64 */ buf.append(\"label{text=\\\" o As you can see it does not use the animal type, but a category as we have so \\\"}\");\n/* 65 */ buf.append(\"label{text=\\\" many animal types. Some of the categories are: (there are 16 total)\\\"}\");\n/* 66 */ buf.append(\"label{text=\\\" . Dragon\\\"}\");\n/* 67 */ buf.append(\"label{text=\\\" . Game\\\"}\");\n/* 68 */ buf.append(\"label{text=\\\" . Human\\\"}\");\n/* 69 */ buf.append(\"label{text=\\\" . Humanoid\\\"}\");\n/* 70 */ buf.append(\"label{text=\\\" . Snake\\\"}\");\n/* 71 */ buf.append(\"label{text=\\\" * Meat and fillets can now be put in FSB and Crates.\\\"}\");\n/* 72 */ buf.append(\"label{text=\\\" * Fish and fish fillets can now be put in FSB and Crates.\\\"}\");\n/* 73 */ buf.append(\"label{text=\\\" * Existing Zombified milk will lose its zombie status. New zombie milk should be fine.\\\"}\");\n/* 74 */ buf.append(\"label{text=\\\" * You will be able to seal some containers so long as they only have one liquid in them, \\\"}\");\n/* 75 */ buf.append(\"label{text=\\\" this will stop their decay.\\\"}\");\n/* 76 */ buf.append(\"label{text=\\\" o Small and Large Amphoria.\\\"}\");\n/* 77 */ buf.append(\"label{text=\\\" o Pottery Jar.\\\"}\");\n/* 78 */ buf.append(\"label{text=\\\" o Pottery Flask.\\\"}\");\n/* 79 */ buf.append(\"label{text=\\\" o Water Skin.\\\"}\");\n/* 80 */ buf.append(\"label{text=\\\" o Small Barrel.\\\"}\");\n/* 81 */ buf.append(\"harray{label{text=\\\" * \\\"};label{type=\\\"bold\\\";text=\\\"Bees\\\"};label{text=\\\" have been added.\\\"}}\");\n/* */ \n/* */ \n/* 84 */ buf.append(\"harray{label{text=\\\" * Cooking will now be from \\\"};label{type=\\\"bold\\\";text=\\\"recipes\\\"};label{text=\\\", this does not mean that you cannot continue \\\"}}\");\n/* */ \n/* */ \n/* 87 */ buf.append(\"label{text=\\\" cooking like you used to though, although some recipes will have changed.\\\"}\");\n/* 88 */ buf.append(\"harray{label{text=\\\" * A personal \\\"};label{type=\\\"bold\\\";text=\\\"cookbook\\\"};label{text=\\\" is now available which has the recipes that you know about in.\\\"}}\");\n/* */ \n/* */ \n/* 91 */ buf.append(\"label{text=\\\" * Hens eggs can now be found when foraging on grass tiles. And you will be able to put\\\"}\");\n/* 92 */ buf.append(\"label{text=\\\" in FSB, but that makes them infertile.\\\"}\");\n/* 93 */ buf.append(\"label{text=\\\" * Old containers and tools - now with more use.\\\"}\");\n/* 94 */ buf.append(\"label{text=\\\" o Sauce pan - had to change size of this, but that means some recipes need a \\\"}\");\n/* 95 */ buf.append(\"label{text=\\\" new one which is larger.\\\"}\");\n/* 96 */ buf.append(\"label{text=\\\" o Pottery bowl - can now be used to hold liquids as well, a lot of recipes use this.\\\"}\");\n/* 97 */ buf.append(\"label{text=\\\" o Hand - used to make some mixes, and other things. Note if a recipe says a \\\"}\");\n/* 98 */ buf.append(\"label{text=\\\" hand must be used, actually any active item will work.\\\"}\");\n/* 99 */ buf.append(\"label{text=\\\" o Fork - how else were you going to mix some stuff!\\\"}\");\n/* 100 */ buf.append(\"label{text=\\\" o Knife - used a lot in food preparation.\\\"}\");\n/* 101 */ buf.append(\"label{text=\\\" o Spoon - An alternative way to mix things (so same ingredients can be used in \\\"}\");\n/* 102 */ buf.append(\"label{text=\\\" multiple recipes. Also can be used to scoop.\\\"}\");\n/* 103 */ buf.append(\"label{text=\\\" o Press - can be used to squash something.\\\"}\");\n/* 104 */ buf.append(\"label{text=\\\" o Branch - branching out, could be used as a spit ...\\\"}\");\n/* 105 */ buf.append(\"label{text=\\\" * New containers and tools\\\"}\");\n/* 106 */ buf.append(\"label{text=\\\" o Stoneware. - used to make things like breads, biscuits etc\\\"}\");\n/* 107 */ buf.append(\"label{text=\\\" o Cake tin - used to make cakes\\\"}\");\n/* 108 */ buf.append(\"label{text=\\\" o Pie dish - used to make pies and tarts\\\"}\");\n/* 109 */ buf.append(\"label{text=\\\" o Roasting dish - used to roast food.\\\"}\");\n/* 110 */ buf.append(\"label{text=\\\" o Plate - used to make salads and sandwiches on.\\\"}\");\n/* 111 */ buf.append(\"label{text=\\\" o Mortar+Pestle - used to grind small things (e.g. spices)\\\"}\");\n/* 112 */ buf.append(\"label{text=\\\" o Measuring Jug - used to get a specific amount of liquid, its volume can be \\\"}\");\n/* 113 */ buf.append(\"label{text=\\\" adjusted (volume is same as weight for this).\\\"}\");\n/* 114 */ buf.append(\"label{text=\\\" o Still - used for distilling.\\\"}\");\n/* 115 */ buf.append(\"label{text=\\\" * New crops\\\"}\");\n/* 116 */ buf.append(\"label{text=\\\" o Carrots\\\"}\");\n/* 117 */ buf.append(\"label{text=\\\" o Cabbage\\\"}\");\n/* 118 */ buf.append(\"label{text=\\\" o Tomatos\\\"}\");\n/* 119 */ buf.append(\"label{text=\\\" o Sugar Beet\\\"}\");\n/* 120 */ buf.append(\"label{text=\\\" o Lettuce\\\"}\");\n/* 121 */ buf.append(\"label{text=\\\" o Peas\\\"}\");\n/* 122 */ buf.append(\"label{text=\\\" o Cucumbers\\\"}\");\n/* 123 */ buf.append(\"label{text=\\\" * New Bush\\\"}\");\n/* 124 */ buf.append(\"label{text=\\\" o Hazelnut bush - now you know where the hazelnuts come from.\\\"}\");\n/* 125 */ buf.append(\"label{text=\\\" * New Tree\\\"}\");\n/* 126 */ buf.append(\"label{text=\\\" o Orange tree - because it seemed like a good idea.\\\"}\");\n/* 127 */ buf.append(\"harray{label{text=\\\" * Spices - all can be planted in a \\\"};label{type=\\\"bold\\\";text=\\\"planter\\\"}label{text=\\\", except Nutmeg.\\\"}}\");\n/* */ \n/* */ \n/* 130 */ buf.append(\"label{text=\\\" o Cumin\\\"}\");\n/* 131 */ buf.append(\"label{text=\\\" o Ginger\\\"}\");\n/* 132 */ buf.append(\"label{text=\\\" o Paprika\\\"}\");\n/* 133 */ buf.append(\"label{text=\\\" o Turmeric\\\"}\");\n/* 134 */ buf.append(\"harray{label{text=\\\" * New Herbs - all Herbs can be planted in a \\\"};label{type=\\\"bold\\\";text=\\\"planter\\\"};}\");\n/* */ \n/* 136 */ buf.append(\"label{text=\\\" o Fennel\\\"}\");\n/* 137 */ buf.append(\"label{text=\\\" o Mint\\\"}\");\n/* 138 */ buf.append(\"label{text=\\\" * New items that are only found by forage / botanize. Note all above spices and herbs \\\"}\");\n/* 139 */ buf.append(\"label{text=\\\" and the new vegs can be found this way as well)\\\"}\");\n/* 140 */ buf.append(\"label{text=\\\" o Cocoa bean\\\"}\");\n/* 141 */ buf.append(\"label{text=\\\" o Nutmeg (note this is a spice but cannot be planted in a planter)\\\"}\");\n/* 142 */ buf.append(\"label{text=\\\" o Raspberries\\\"}\");\n/* 143 */ buf.append(\"label{text=\\\" o Hazelnut sprout.\\\"}\");\n/* 144 */ buf.append(\"label{text=\\\" o Orange sprout.\\\"}\");\n/* 145 */ buf.append(\"label{text=\\\" * Rocksalt\\\"}\");\n/* 146 */ buf.append(\"label{text=\\\" o Rock tiles that would of produced salt when mining will now be shown as \\\"}\");\n/* 147 */ buf.append(\"label{text=\\\" Rocksalt veins (this may take a day or two to show), but have a limited life (e.g. \\\"}\");\n/* 148 */ buf.append(\"label{text=\\\" you get 45-50 rocksalt from one).\\\"}\");\n/* 149 */ buf.append(\"label{text=\\\" o The Rocksalt can then be ground into salt using a grindstone. You can get\\\"}\");\n/* 150 */ buf.append(\"label{text=\\\" more than one salt from each Rocksalt bepending on your milling skill.\\\"}\");\n/* 151 */ buf.append(\"label{text=\\\" o Veins that had salt in, will be unaffected, e.g.you will still be able to get the \\\"}\");\n/* 152 */ buf.append(\"label{text=\\\" random salt when mining them.\\\"}\");\n/* 153 */ buf.append(\"label{text=\\\" * Trellis\\\"}\");\n/* 154 */ buf.append(\"label{text=\\\" o A new trellis has been added for hops.\\\"}\");\n/* 155 */ buf.append(\"label{text=\\\" o Trellis can now be harvested when their produce is in season (except ivy ones \\\"}\");\n/* 156 */ buf.append(\"label{text=\\\" don't have a season).\\\"}\");\n/* 157 */ buf.append(\"label{text=\\\" o To help plant your trellis in nice straight lines, you can plant them using a wall, \\\"}\");\n/* 158 */ buf.append(\"label{text=\\\" fence or tile border. And have three options, on left, center and on right.\\\"}\");\n/* 159 */ buf.append(\"label{text=\\\" o There is a limit of 4 planted trellis per tile. Any extras that are currently planted \\\"}\");\n/* 160 */ buf.append(\"label{text=\\\" on same tile will become unplanted.\\\"}\");\n/* 161 */ buf.append(\"label{text=\\\" * Flowers\\\"}\");\n/* 162 */ buf.append(\"label{text=\\\" o Flowers can now be used in some recipes, and therefore will now only go into \\\"}\");\n/* 163 */ buf.append(\"label{text=\\\" a food storage bin. This also applies to rose petals, oleander, lavender and \\\"}\");\n/* 164 */ buf.append(\"label{text=\\\" camellia.\\\"}\");\n/* 165 */ buf.append(\"label{text=\\\" o Any existing flowers in bulk storage bins are fine, you can still take them out,\\\"}\");\n/* 166 */ buf.append(\"label{text=\\\" but will not be able to put them back into the bulk storage bin, but they will go \\\"}\");\n/* 167 */ buf.append(\"label{text=\\\" into the food storage bin.\\\"}\");\n/* 168 */ buf.append(\"label{text=\\\" * The goodness of food\\\"}\");\n/* 169 */ buf.append(\"label{text=\\\" o Each meal made will have a bonus attached to it, so the same ingredients \\\"}\");\n/* 170 */ buf.append(\"label{text=\\\" making the same meal (in same cooker and same container) will end up with \\\"}\");\n/* 171 */ buf.append(\"label{text=\\\" this same bonus.\\\"}\");\n/* 172 */ buf.append(\"label{text=\\\" . This bonus will give a timed affinity to a skill, but can be different per \\\"}\");\n/* 173 */ buf.append(\"label{text=\\\" player, e.g. fish and chips may give a temp weaponsmithing affinity to \\\"}\");\n/* 174 */ buf.append(\"label{text=\\\" Joe, but to Tom it gives carpentry, (also may not give it to any skill).\\\"}\");\n/* 175 */ buf.append(\"label{text=\\\" o Nutrition has not been changed.\\\"}\");\n/* */ \n/* 177 */ buf.append(\"label{type=\\\"bold\\\";text=\\\"Bees\\\"}\");\n/* 178 */ buf.append(\"label{text=\\\" * Wild bee hives will appear in spring at random locations and they will vanish at the end \\\"}\");\n/* 179 */ buf.append(\"label{text=\\\" of the year (in winter). Note they will be in different locations each year.\\\"}\");\n/* 180 */ buf.append(\"label{text=\\\" * As time passes honey will be made in hives together with bees wax, the amount will\\\"}\");\n/* 181 */ buf.append(\"label{text=\\\" depend on nearby flowers, fields and trees.\\\"}\");\n/* 182 */ buf.append(\"label{text=\\\" * Each wild hive will start with one queen bee, this may increase by one every wurm \\\"}\");\n/* 183 */ buf.append(\"label{text=\\\" month, to a maximum of two, so long as the hive has over a certain amount of honey in \\\"}\");\n/* 184 */ buf.append(\"label{text=\\\" it. When there is two queen bees if there is a domestic hive nearby it may migrate to it.\\\"}\");\n/* 185 */ buf.append(\"label{text=\\\" * Domestic hives will be loadable. Even with a queen in it. So you can move it to \\\"}\");\n/* 186 */ buf.append(\"label{text=\\\" somewhere, e.g. your own deed. Watch out bees sting!\\\"}\");\n/* 187 */ buf.append(\"label{text=\\\" * Domestic hives that had a queen in it, will go dormant over the winter period and will \\\"}\");\n/* 188 */ buf.append(\"label{text=\\\" become active again in spring. But it is possible for the queen to die over winter if no \\\"}\");\n/* 189 */ buf.append(\"label{text=\\\" honey is left in the hive (Note can put sugar in hive to keep the queen alive.\\\"}\");\n/* 190 */ buf.append(\"label{text=\\\" * Honey ( and beeswax) will be collectable from hives.. But you may need a bee \\\"}\");\n/* 191 */ buf.append(\"label{text=\\\" smoker.. So bees do not sting you, note that this bee smoker is useful for other times, \\\"}\");\n/* 192 */ buf.append(\"label{text=\\\" like if you want to chop down a tree that has a hive, or load/unload a domestic hive \\\"}\");\n/* 193 */ buf.append(\"label{text=\\\" which has a queen in it.\\\"}\");\n/* */ \n/* 195 */ buf.append(\"label{type=\\\"bold\\\";text=\\\"Recipes\\\"}\");\n/* 196 */ buf.append(\"label{text=\\\" * As well as being able to examine a food container to see what it will make, you can \\\"}\");\n/* 197 */ buf.append(\"harray{label{text=\\\" also use \\\"};label{type=\\\"bold\\\";text=\\\"LORE\\\"};label{text=\\\", to get hints on what ingredient you could add into the container to be \\\"}}\");\n/* */ \n/* */ \n/* 200 */ buf.append(\"label{text=\\\" able to make something.\\\"}\");\n/* 201 */ buf.append(\"label{text=\\\" * Some more specialised recipes will call for a meat of a specific category, or a specific \\\"}\");\n/* 202 */ buf.append(\"label{text=\\\" fish, but most will use any meat or any fish or even any veg.\\\"}\");\n/* 203 */ buf.append(\"label{text=\\\" * Most new recipes only require one of each item, main exception is making sandwiches \\\"}\");\n/* 204 */ buf.append(\"label{text=\\\" which normally requires 2 slices of bread.\\\"}\");\n/* 205 */ buf.append(\"label{text=\\\" * Some recipes are an intermediate step, or some sauce which is used later e.g. there is \\\"}\");\n/* 206 */ buf.append(\"label{text=\\\" cake mix and white sauce.\\\"}\");\n/* 207 */ buf.append(\"label{text=\\\" * Lots of new food category types e.g.\\\"}\");\n/* 208 */ buf.append(\"label{text=\\\" o Curry\\\"}\");\n/* 209 */ buf.append(\"label{text=\\\" o Pizza\\\"}\");\n/* 210 */ buf.append(\"label{text=\\\" o Cookies\\\"}\");\n/* 211 */ buf.append(\"label{text=\\\" o Pie\\\"}\");\n/* 212 */ buf.append(\"label{text=\\\" o Tarts\\\"}\");\n/* 213 */ buf.append(\"label{text=\\\" o Biscuits\\\"}\");\n/* 214 */ buf.append(\"label{text=\\\" o Scones\\\"}\");\n/* 215 */ buf.append(\"label{text=\\\" o Salads\\\"}\");\n/* 216 */ buf.append(\"label{text=\\\" * And some of your old favorites like.\\\"}\");\n/* 217 */ buf.append(\"label{text=\\\" o Cakes\\\"}\");\n/* 218 */ buf.append(\"label{text=\\\" o Sandwiches\\\"}\");\n/* 219 */ buf.append(\"label{text=\\\" o Tea\\\"}\");\n/* 220 */ buf.append(\"label{text=\\\" o Wine\\\"}\");\n/* 221 */ buf.append(\"label{text=\\\" o Meal\\\"}\");\n/* 222 */ buf.append(\"label{text=\\\" * And there are some new drinks which will need distilling.\\\"}\");\n/* 223 */ buf.append(\"label{text=\\\" * Note you will need to experiment to find their recipes, but do note some items need a \\\"}\");\n/* 224 */ buf.append(\"label{text=\\\" mix before adding other items, e.g. you will now need a cake mix to make cakes.\\\"}\");\n/* 225 */ buf.append(\"label{text=\\\" * Some ingredients will only be found doing forage/botanize actions, whilst others, once \\\"}\");\n/* 226 */ buf.append(\"harray{label{text=\\\" found, they may be able to be planted as a \\\"};label{type=\\\"bold\\\";text=\\\"crop\\\"};label{text=\\\" or even in a \\\"};label{type=\\\"bold\\\";text=\\\"planter\\\"};label{text=\\\" (e.g. most spices \\\"}}\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* 231 */ buf.append(\"label{text=\\\" and herbs can be planted in a planter).\\\"}\");\n/* 232 */ buf.append(\"label{text=\\\" o Fresh is an attribute of an item when just found from foraging or picking, if you \\\"}\");\n/* 233 */ buf.append(\"label{text=\\\" put it in a FSB it looses that attribute.\\\"}\");\n/* 234 */ buf.append(\"label{text=\\\" * Some recipes are nameable this means that whoever is the first to make the item for \\\"}\");\n/* 235 */ buf.append(\"label{text=\\\" that recipe, will have their name added to the front of that recipe name, e.g. if Pifa was \\\"}\");\n/* 236 */ buf.append(\"label{text=\\\" first to make a meat curry (assuming that was nameable) then it would show to \\\"}\");\n/* 237 */ buf.append(\"label{text=\\\" everyone, when they discover it, as ''Pifa's meat curry''.\\\"}\");\n/* 238 */ buf.append(\"label{text=\\\" * Note only one recipe can be named per person.\\\"}\");\n/* 239 */ buf.append(\"label{text=\\\" * Some recipes may only be makeable once you have that recipe in your cookbook,\\\"}\");\n/* 240 */ buf.append(\"label{text=\\\" these recipes are only available from killing certain creatures.\\\"}\");\n/* 241 */ buf.append(\"label{text=\\\" * Recipes can be inscribed onto papryus (or paper), to do this you need to be looking at\\\"}\");\n/* 242 */ buf.append(\"label{text=\\\" the recipe in your cookbook, and then use the reed pen on a blank papryus (or paper).\\\"}\");\n/* 243 */ buf.append(\"label{text=\\\" o You can then mail these or trade them to others, where they can add it to their\\\"}\");\n/* 244 */ buf.append(\"label{text=\\\" cookbook, if they don't know it, by either reading the recipe and selecting to add\\\"}\");\n/* 245 */ buf.append(\"label{text=\\\" to their cookbook or activate it and r-click on the cookbook menu option.\\\"}\");\n/* */ \n/* 247 */ buf.append(\"label{type=\\\"bold\\\";text=\\\"Planter\\\"}\");\n/* 248 */ buf.append(\"label{text=\\\" * Items can be planted in a planter, e.g. a herb or a spice (not all spices).\\\"}\");\n/* 249 */ buf.append(\"label{text=\\\" * The planted item will start growing.\\\"}\");\n/* 250 */ buf.append(\"label{text=\\\" * After a while it will be available to be harvested.\\\"}\");\n/* 251 */ buf.append(\"label{text=\\\" * Harvesting will be available daily,\\\"}\");\n/* 252 */ buf.append(\"label{text=\\\" * Each time you harvest it will prolong its life\\\"}\");\n/* 253 */ buf.append(\"label{text=\\\" * Eventually it will get too woody to be harvested, then it is time to start afresh.\\\"}\");\n/* */ \n/* 255 */ buf.append(\"label{type=\\\"bold\\\";text=\\\"LORE\\\"}\");\n/* 256 */ buf.append(\"label{text=\\\"Using LORE on a container, will let you know what could be made, e.g.\\\"}\");\n/* 257 */ buf.append(\"label{text=\\\" * If the contents match a known recipe (known by you that is). You would get a message \\\"}\");\n/* 258 */ buf.append(\"label{text=\\\" like:\\\"}\");\n/* 259 */ buf.append(\"label{text=\\\" o 'The ingredients in the frying pan would make an omlette when cooked'.\\\"}\");\n/* 260 */ buf.append(\"label{text=\\\" * If the contents match an unknown recipe. Message would be like: \\\"}\");\n/* 261 */ buf.append(\"label{text=\\\" o 'You think this may well work when cooked'.\\\"}\");\n/* 262 */ buf.append(\"label{text=\\\" * If the contents would make any recipe but has the incorrect amount of a liquid then \\\"}\");\n/* 263 */ buf.append(\"label{text=\\\" you would get something like:\\\"}\");\n/* 264 */ buf.append(\"label{text=\\\" o 'The ingredients in the saucepan would make tea when cooked, but...'\\\"}\");\n/* 265 */ buf.append(\"label{text=\\\" 'There is too much water, try between 300g and 400g.'\\\"}\");\n/* 266 */ buf.append(\"label{text=\\\" * Partial Matches\\\"}\");\n/* 267 */ buf.append(\"label{text=\\\" o It performs checks in this order \\\"}\");\n/* 268 */ buf.append(\"label{text=\\\" . Unknown recipe that is not nameable.\\\"}\");\n/* 269 */ buf.append(\"label{text=\\\" . Unknown recipe that is nameable.\\\"}\");\n/* 270 */ buf.append(\"label{text=\\\" . Known recipe that is not nameable.\\\"}\");\n/* 271 */ buf.append(\"label{text=\\\" . Known recipe that is nameable.\\\"}\");\n/* 272 */ buf.append(\"label{text=\\\" o If the contents form part of any recipe, it will give a hint as to what to add to \\\"}\");\n/* 273 */ buf.append(\"label{text=\\\" make that recipe. E.g. 'have you tried adding a chopped onion?'.\\\"}\");\n/* 274 */ buf.append(\"label{text=\\\" . Note the recipe is picked at random from a list of possible recipes and \\\"}\");\n/* 275 */ buf.append(\"label{text=\\\" so is the shown ingredient.\\\"}\");\n/* */ \n/* 277 */ buf.append(\"label{type=\\\"bold\\\";text=\\\"Cookbook\\\"}\");\n/* 278 */ buf.append(\"label{text=\\\" * Every person has a cookbook, where your known recipes are shown.\\\"}\");\n/* 279 */ buf.append(\"label{text=\\\" * Some recipes are known by everyone by default, you have to find the others and \\\"}\");\n/* 280 */ buf.append(\"label{text=\\\" make them for them to appear in your cookbook..\\\"}\");\n/* 281 */ buf.append(\"label{text=\\\" * The initial page of your cookbook allows you to select what recipes to view, i.e. \\\"}\");\n/* 282 */ buf.append(\"label{text=\\\" o Target action - these are the ones where you use one item on another, e.g. \\\"}\");\n/* 283 */ buf.append(\"label{text=\\\" grinding cereals to make flour.\\\"}\");\n/* 284 */ buf.append(\"label{text=\\\" o Container action - these ones are when you use a tool of some kind on a \\\"}\");\n/* 285 */ buf.append(\"label{text=\\\" container to change the contents of the container into a different item. E.g. \\\"}\");\n/* 286 */ buf.append(\"label{text=\\\" using your hand on a pottery bowl which containers flour, water, salt and butter \\\"}\");\n/* 287 */ buf.append(\"label{text=\\\" to make pastry.\\\"}\");\n/* 288 */ buf.append(\"label{text=\\\" o Heat - these ones are your basic cooking recipes, where you put ingredients \\\"}\");\n/* 289 */ buf.append(\"label{text=\\\" into a food container, and put in an cooker and after the ingredients get hot the \\\"}\");\n/* 290 */ buf.append(\"label{text=\\\" container items change to the result, e.g. putting maple sap into a saucepan in \\\"}\");\n/* 291 */ buf.append(\"label{text=\\\" a lit oven, will result in maple syrup after sometime. Not all recipes work in all \\\"}\");\n/* 292 */ buf.append(\"label{text=\\\" cookers.\\\"}\");\n/* 293 */ buf.append(\"label{text=\\\" o Time - these ones are used for brewing.\\\"}\");\n/* 294 */ buf.append(\"label{text=\\\" * Also on the initial page you also have links to view recipes (that you know) by\\\"}\");\n/* 295 */ buf.append(\"label{text=\\\" o Tool - this gives a list of the tools that you know are used for cooking, selecting \\\"}\");\n/* 296 */ buf.append(\"label{text=\\\" a tool from that list will give you the known recipes that can be made from it.\\\"}\");\n/* 297 */ buf.append(\"label{text=\\\" o Cooker - this will give a list of cookers, and selecting a cooker from that list will \\\"}\");\n/* 298 */ buf.append(\"label{text=\\\" lead you to a list of known recipes that can be made in it\\\"}\");\n/* 299 */ buf.append(\"label{text=\\\" o Container - this will give you a list of containers that can be used by known \\\"}\");\n/* 300 */ buf.append(\"label{text=\\\" recipes, selecting one will then give a list of the known recipes that use that \\\"}\");\n/* 301 */ buf.append(\"label{text=\\\" container.\\\"}\");\n/* 302 */ buf.append(\"label{text=\\\" o Ingredients - gives a list of all your known ingredients, and again selecting one \\\"}\");\n/* 303 */ buf.append(\"label{text=\\\" of them will then show a list of known recipes that use that ingredient.\\\"}\");\n/* 304 */ buf.append(\"label{text=\\\" * Also you can search your recipes.\\\"}\");\n/* 305 */ buf.append(\"label{text=\\\" * From any list of recipes, you can select one and view what you think is used to make \\\"}\");\n/* 306 */ buf.append(\"label{text=\\\" that item\\\"}\");\n/* 307 */ buf.append(\"label{text=\\\" o Note that there are optional ingredients, and unless you have used them for an \\\"}\");\n/* 308 */ buf.append(\"label{text=\\\" ingredient, then they will not show in your version.\\\"}\");\n/* 309 */ buf.append(\"label{text=\\\" o Note that some recipes may use any type of meat, or fish, or veg, or herb, or \\\"}\");\n/* 310 */ buf.append(\"label{text=\\\" spice, when you attempt the same recipe with a different type, your recipe will \\\"}\");\n/* 311 */ buf.append(\"label{text=\\\" be updated to show that information, e.g. if your recipe says that it uses beef \\\"}\");\n/* 312 */ buf.append(\"label{text=\\\" meat, and you try with canine meat, then if it works, the recipe will update \\\"}\");\n/* 313 */ buf.append(\"label{text=\\\" to show any meat. \\\"}\");\n/* 314 */ buf.append(\"label{text=\\\" o Note that not all recipes can use all types.\\\"}\");\n/* */ \n/* 316 */ buf.append(createAnswerButton2());\n/* 317 */ getResponder().getCommunicator().sendBml(480, 500, true, true, buf.toString(), 200, 200, 200, this.title);\n/* */ }", "private boolean handlePTell(String line){\n if (line.indexOf(\"(your partner) tells you: \") == -1)\n return false;\n \n Matcher matcher = PTELL_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String message = matcher.group(3);\n\n if (!processPTell(username, titles, message))\n processLine(line);\n\n return true;\n }", "@Override\n\tpublic void challenge13() {\n\n\t}", "@Test(timeout = 4000)\n public void test32() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateNewsBulletin(11, 13, \"E{Iw-^%H:1$e/\", \"LW)W-|=b,lie*CW\");\n assertEquals(\"MsgId=11 :: MsgType=13 :: Origin=LW)W-|=b,lie*CW :: Message=E{Iw-^%H:1$e/\", string0);\n }", "@kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000T\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\t\\n\\u0002\\b\\u0007\\n\\u0002\\u0010\\u000b\\n\\u0002\\b\\u0005\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0005\\n\\u0002\\u0010 \\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\n\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\bv\\u0018\\u00002\\u00020\\u0001:\\u0004./01J\\b\\u0010,\\u001a\\u00020\\u000fH&J\\b\\u0010-\\u001a\\u00020\\u000fH&R\\u0014\\u0010\\u0002\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0004\\u0010\\u0005R\\u0012\\u0010\\u0006\\u001a\\u00020\\u0007X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\b\\u0010\\tR\\u0014\\u0010\\n\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000b\\u0010\\u0005R\\u0014\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\r\\u0010\\u0005R\\u0012\\u0010\\u000e\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000e\\u0010\\u0010R\\u0012\\u0010\\u0011\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0011\\u0010\\u0010R\\u0014\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0013\\u0010\\u0005R\\u0014\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0016\\u0010\\u0017R\\u0014\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001a\\u0010\\u001bR\\u0014\\u0010\\u001c\\u001a\\u0004\\u0018\\u00010\\u001dX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001e\\u0010\\u001fR\\u0014\\u0010 \\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b!\\u0010\\u0005R\\u0018\\u0010\\\"\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b$\\u0010%R\\u0014\\u0010&\\u001a\\u0004\\u0018\\u00010\\'X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b(\\u0010)R\\u0018\\u0010*\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b+\\u0010%\\u0082\\u0001\\u000223\\u00a8\\u00064\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent;\", \"Lcom/stripe/android/model/StripeModel;\", \"clientSecret\", \"\", \"getClientSecret\", \"()Ljava/lang/String;\", \"created\", \"\", \"getCreated\", \"()J\", \"description\", \"getDescription\", \"id\", \"getId\", \"isConfirmed\", \"\", \"()Z\", \"isLiveMode\", \"lastErrorMessage\", \"getLastErrorMessage\", \"nextActionData\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"getNextActionData\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"nextActionType\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"getNextActionType\", \"()Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"paymentMethod\", \"Lcom/stripe/android/model/PaymentMethod;\", \"getPaymentMethod\", \"()Lcom/stripe/android/model/PaymentMethod;\", \"paymentMethodId\", \"getPaymentMethodId\", \"paymentMethodTypes\", \"\", \"getPaymentMethodTypes\", \"()Ljava/util/List;\", \"status\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"getStatus\", \"()Lcom/stripe/android/model/StripeIntent$Status;\", \"unactivatedPaymentMethods\", \"getUnactivatedPaymentMethods\", \"requiresAction\", \"requiresConfirmation\", \"NextActionData\", \"NextActionType\", \"Status\", \"Usage\", \"Lcom/stripe/android/model/PaymentIntent;\", \"Lcom/stripe/android/model/SetupIntent;\", \"payments-core_release\"})\npublic abstract interface StripeIntent extends com.stripe.android.model.StripeModel {\n \n /**\n * Unique identifier for the object.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getId();\n \n /**\n * Time at which the object was created. Measured in seconds since the Unix epoch.\n */\n public abstract long getCreated();\n \n /**\n * An arbitrary string attached to the object. Often useful for displaying to users.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getDescription();\n \n /**\n * Has the value true if the object exists in live mode or the value false if the object exists\n * in test mode.\n */\n public abstract boolean isLiveMode();\n \n /**\n * The expanded [PaymentMethod] represented by [paymentMethodId].\n */\n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getPaymentMethodId();\n \n /**\n * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionType getNextActionType();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getClientSecret();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.Status getStatus();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionData getNextActionData();\n \n /**\n * Whether confirmation has succeeded and all required actions have been handled.\n */\n public abstract boolean isConfirmed();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getLastErrorMessage();\n \n /**\n * Payment types that have not been activated in livemode, but have been activated in testmode.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();\n \n public abstract boolean requiresAction();\n \n public abstract boolean requiresConfirmation();\n \n /**\n * Type of the next action to perform.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\f\\b\\u0086\\u0001\\u0018\\u0000 \\u000e2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000eB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\r\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"RedirectToUrl\", \"UseStripeSdk\", \"DisplayOxxoDetails\", \"AlipayRedirect\", \"BlikAuthorize\", \"WeChatPayRedirect\", \"Companion\", \"payments-core_release\"})\n public static enum NextActionType {\n /*public static final*/ RedirectToUrl /* = new RedirectToUrl(null) */,\n /*public static final*/ UseStripeSdk /* = new UseStripeSdk(null) */,\n /*public static final*/ DisplayOxxoDetails /* = new DisplayOxxoDetails(null) */,\n /*public static final*/ AlipayRedirect /* = new AlipayRedirect(null) */,\n /*public static final*/ BlikAuthorize /* = new BlikAuthorize(null) */,\n /*public static final*/ WeChatPayRedirect /* = new WeChatPayRedirect(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionType.Companion Companion = null;\n \n NextActionType(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.NextActionType fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * - [The Intent State Machine - Intent statuses](https://stripe.com/docs/payments/intents#intent-statuses)\n * - [PaymentIntent.status API reference](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status)\n * - [SetupIntent.status API reference](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-status)\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\b\\u0086\\u0001\\u0018\\u0000 \\u000f2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000fB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\rj\\u0002\\b\\u000e\\u00a8\\u0006\\u0010\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"Canceled\", \"Processing\", \"RequiresAction\", \"RequiresConfirmation\", \"RequiresPaymentMethod\", \"Succeeded\", \"RequiresCapture\", \"Companion\", \"payments-core_release\"})\n public static enum Status {\n /*public static final*/ Canceled /* = new Canceled(null) */,\n /*public static final*/ Processing /* = new Processing(null) */,\n /*public static final*/ RequiresAction /* = new RequiresAction(null) */,\n /*public static final*/ RequiresConfirmation /* = new RequiresConfirmation(null) */,\n /*public static final*/ RequiresPaymentMethod /* = new RequiresPaymentMethod(null) */,\n /*public static final*/ Succeeded /* = new Succeeded(null) */,\n /*public static final*/ RequiresCapture /* = new RequiresCapture(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Status.Companion Companion = null;\n \n Status(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Status fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * See [setup_intent.usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) and\n * [Reusing Cards](https://stripe.com/docs/payments/cards/reusing-cards).\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\b\\u0086\\u0001\\u0018\\u0000 \\u000b2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000bB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\n\\u00a8\\u0006\\f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"OnSession\", \"OffSession\", \"OneTime\", \"Companion\", \"payments-core_release\"})\n public static enum Usage {\n /*public static final*/ OnSession /* = new OnSession(null) */,\n /*public static final*/ OffSession /* = new OffSession(null) */,\n /*public static final*/ OneTime /* = new OneTime(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Usage.Companion Companion = null;\n \n Usage(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Usage;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Usage fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000&\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0007\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0006\\u0003\\u0004\\u0005\\u0006\\u0007\\bB\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0006\\t\\n\\u000b\\f\\r\\u000e\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"Lcom/stripe/android/model/StripeModel;\", \"()V\", \"AlipayRedirect\", \"BlikAuthorize\", \"DisplayOxxoDetails\", \"RedirectToUrl\", \"SdkData\", \"WeChatPayRedirect\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"payments-core_release\"})\n public static abstract class NextActionData implements com.stripe.android.model.StripeModel {\n \n private NextActionData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\'\\u0012\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u0012\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0007J\\t\\u0010\\r\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u000e\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u000b\\u0010\\u000f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J+\\u0010\\u0010\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u00052\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0013\\u0010\\u0012\\u001a\\u00020\\u00132\\b\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015H\\u00d6\\u0003J\\t\\u0010\\u0016\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\t\\u0010\\u0017\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u001b2\\u0006\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\b\\u0010\\tR\\u0013\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000b\\u00a8\\u0006\\u001d\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"expiresAfter\", \"\", \"number\", \"\", \"hostedVoucherUrl\", \"(ILjava/lang/String;Ljava/lang/String;)V\", \"getExpiresAfter\", \"()I\", \"getHostedVoucherUrl\", \"()Ljava/lang/String;\", \"getNumber\", \"component1\", \"component2\", \"component3\", \"copy\", \"describeContents\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DisplayOxxoDetails extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The timestamp after which the OXXO expires.\n */\n private final int expiresAfter = 0;\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String number = null;\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String hostedVoucherUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails copy(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DisplayOxxoDetails() {\n super();\n }\n \n public DisplayOxxoDetails(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n super();\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int component1() {\n return 0;\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int getExpiresAfter() {\n return 0;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getNumber() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component3() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getHostedVoucherUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails[] newArray(int size) {\n return null;\n }\n }\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\u0017\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0006J\\t\\u0010\\u000b\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u001f\\u0010\\r\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u000e\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\u0013\\u0010\\u0010\\u001a\\u00020\\u00112\\b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0013H\\u00d6\\u0003J\\t\\u0010\\u0014\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0016\\u001a\\u00020\\u00172\\u0006\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u000fH\\u00d6\\u0001R\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0007\\u0010\\bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\n\\u00a8\\u0006\\u001b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"url\", \"Landroid/net/Uri;\", \"returnUrl\", \"\", \"(Landroid/net/Uri;Ljava/lang/String;)V\", \"getReturnUrl\", \"()Ljava/lang/String;\", \"getUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class RedirectToUrl extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri url = null;\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> CREATOR = null;\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl copy(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public RedirectToUrl(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component1() {\n return null;\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getUrl() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0004\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0081\\b\\u0018\\u0000 \\\"2\\u00020\\u0001:\\u0001\\\"B#\\b\\u0010\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0006B+\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\b\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\tJ\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u0011\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\bH\\u00c6\\u0003J\\u000b\\u0010\\u0013\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J5\\u0010\\u0014\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\b2\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\u0013\\u0010\\u0017\\u001a\\u00020\\u00182\\b\\u0010\\u0019\\u001a\\u0004\\u0018\\u00010\\u001aH\\u00d6\\u0003J\\t\\u0010\\u001b\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\t\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001d\\u001a\\u00020\\u001e2\\u0006\\u0010\\u001f\\u001a\\u00020 2\\u0006\\u0010!\\u001a\\u00020\\u0016H\\u00d6\\u0001R\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000bR\\u0013\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000bR\\u0011\\u0010\\u0004\\u001a\\u00020\\b\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\u000f\\u00a8\\u0006#\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"data\", \"\", \"webViewUrl\", \"returnUrl\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V\", \"authCompleteUrl\", \"Landroid/net/Uri;\", \"(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;)V\", \"getAuthCompleteUrl\", \"()Ljava/lang/String;\", \"getData\", \"getReturnUrl\", \"getWebViewUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"Companion\", \"payments-core_release\"})\n public static final class AlipayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String data = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String authCompleteUrl = null;\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri webViewUrl = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n @org.jetbrains.annotations.NotNull()\n private static final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect.Companion Companion = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect copy(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getAuthCompleteUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getWebViewUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.NotNull()\n java.lang.String webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect[] newArray(int size) {\n return null;\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0014\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0082\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0012\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\u0006\\u0010\\u0005\\u001a\\u00020\\u0004H\\u0002\\u00a8\\u0006\\u0006\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect$Companion;\", \"\", \"()V\", \"extractReturnUrl\", \"\", \"data\", \"payments-core_release\"})\n static final class Companion {\n \n private Companion() {\n super();\n }\n \n /**\n * The alipay data string is formatted as query parameters.\n * When authenticate is complete, we make a request to the\n * return_url param, as a hint to the backend to ping Alipay for\n * the updated state\n */\n private final java.lang.String extractReturnUrl(java.lang.String data) {\n return null;\n }\n }\n }\n \n /**\n * When confirming a [PaymentIntent] or [SetupIntent] with the Stripe SDK, the Stripe SDK\n * depends on this property to invoke authentication flows. The shape of the contents is subject\n * to change and is only intended to be used by the Stripe SDK.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0016\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0002\\u0003\\u0004B\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0002\\u0005\\u0006\\u00a8\\u0006\\u0007\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"Use3DS1\", \"Use3DS2\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"payments-core_release\"})\n public static abstract class SdkData extends com.stripe.android.model.StripeIntent.NextActionData {\n \n private SdkData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u0011\\u001a\\u00020\\u00122\\u0006\\u0010\\u0013\\u001a\\u00020\\u00142\\u0006\\u0010\\u0015\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0016\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"url\", \"\", \"(Ljava/lang/String;)V\", \"getUrl\", \"()Ljava/lang/String;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class Use3DS1 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String url = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS1(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001:\\u0001!B%\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0005\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\u0007H\\u00c6\\u0003J1\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0005\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0006\\u001a\\u00020\\u0007H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\fR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\fR\\u0011\\u0010\\u0005\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\f\\u00a8\\u0006\\\"\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"source\", \"\", \"serverName\", \"transactionId\", \"serverEncryption\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;)V\", \"getServerEncryption\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"getServerName\", \"()Ljava/lang/String;\", \"getSource\", \"getTransactionId\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"DirectoryServerEncryption\", \"payments-core_release\"})\n public static final class Use3DS2 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String source = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String serverName = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String transactionId = null;\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS2(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getSource() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getServerName() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getTransactionId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption component4() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption getServerEncryption() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2[] newArray(int size) {\n return null;\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\n\\u0002\\u0010 \\n\\u0002\\b\\u000e\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B-\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\f\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000f\\u0010\\u0011\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006H\\u00c6\\u0003J\\u000b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J9\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\u000e\\b\\u0002\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u00062\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\nR\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\nR\\u0017\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000e\\u00a8\\u0006!\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"Landroid/os/Parcelable;\", \"directoryServerId\", \"\", \"dsCertificateData\", \"rootCertsData\", \"\", \"keyId\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V\", \"getDirectoryServerId\", \"()Ljava/lang/String;\", \"getDsCertificateData\", \"getKeyId\", \"getRootCertsData\", \"()Ljava/util/List;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DirectoryServerEncryption implements android.os.Parcelable {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String directoryServerId = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String dsCertificateData = null;\n @org.jetbrains.annotations.NotNull()\n private final java.util.List<java.lang.String> rootCertsData = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String keyId = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption copy(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DirectoryServerEncryption(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDirectoryServerId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDsCertificateData() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> getRootCertsData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getKeyId() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption[] newArray(int size) {\n return null;\n }\n }\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000.\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u00c7\\u0002\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\t\\u0010\\u0003\\u001a\\u00020\\u0004H\\u00d6\\u0001J\\u0013\\u0010\\u0005\\u001a\\u00020\\u00062\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\bH\\u0096\\u0002J\\b\\u0010\\t\\u001a\\u00020\\u0004H\\u0016J\\u0019\\u0010\\n\\u001a\\u00020\\u000b2\\u0006\\u0010\\f\\u001a\\u00020\\r2\\u0006\\u0010\\u000e\\u001a\\u00020\\u0004H\\u00d6\\u0001\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class BlikAuthorize extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize INSTANCE = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> CREATOR = null;\n \n private BlikAuthorize() {\n super();\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @androidx.annotation.RestrictTo(value = {androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP})\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0000\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0011H\\u00d6\\u0001J\\u0019\\u0010\\u0012\\u001a\\u00020\\u00132\\u0006\\u0010\\u0014\\u001a\\u00020\\u00152\\u0006\\u0010\\u0016\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0017\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"weChat\", \"Lcom/stripe/android/model/WeChat;\", \"(Lcom/stripe/android/model/WeChat;)V\", \"getWeChat\", \"()Lcom/stripe/android/model/WeChat;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class WeChatPayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.WeChat weChat = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect copy(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public WeChatPayRedirect(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat getWeChat() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect[] newArray(int size) {\n return null;\n }\n }\n }\n }\n}", "private String buildMessage(String message) {\n\t\tif(message != null && message.contains(\"@record\")) {\n\t\t\tmessage = message.replaceAll(\"@record\", answerUser);\n\t\t\trecorded.put(owner.id(), answerUser);\n\t\t}\n\t\t//o sistema substitui o texto !id pelo id do usuário da conversa\n\t\tif(message != null && message.contains(\"!id\")) {\n\t\t\tmessage = message.replaceAll(\"!id\", owner.id() + \"\");\n\t\t}\n\t\t//o sistema verifica se tem alguma gravacao para o código recebido\n\t\tif(message != null && message.contains(\"#find\")) {\n\t\t\tString gravacao = recorded.get(Integer.parseInt(userLatestAnswer.get(owner.id())));\n\t\t\t//se houver gravacao, o sistema informa qual o desejo do amigo secreto\n\t\t\tif(gravacao != null)\n\t\t\t\tmessage = message.replaceAll(\"#find\", gravacao);\n\t\t\t//caso nao haja gravacao, o sistema notifica o usuário da situacao\n\t\t\telse\n\t\t\t\tmessage = \"O código informado não corresponde ao desejo de um amigo secreto... por favor tente novamente\";\n\t\t}\n\n\t\treturn message;\n\t}", "public String invLine()\n {\n return \" > You are carrying a hot cup of COFFEE ~ Just the thing to wake you up!\";}", "public static void main(String[] args) throws Exception {\n\t\tString v25message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v25|T|2.5\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\";\n\n\t\tString v23message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v23|T|2.3\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\";\n\n\t\t/*\n\t\t * The first (and probably better in most ways) technique is as follows. Use a model class\n\t\t * factory called the CanonicalModelClassFactory. This class forces a specific version of\n\t\t * HL7 to be used. Because HL7 v2.x is a backwards compatible standard, you can choose the\n\t\t * highest version you need to support, and the model classes will be compatible with\n\t\t * messages from previous versions.\n\t\t */\n\n\t\tHapiContext context = new DefaultHapiContext();\n\n\t\t// Create the MCF. We want all parsed messages to be for HL7 version 2.5,\n\t\t// despite what MSH-12 says.\n\t\tCanonicalModelClassFactory mcf = new CanonicalModelClassFactory(\"2.5\");\n\t\tcontext.setModelClassFactory(mcf);\n\n\t\t// Pass the MCF to the parser in its constructor\n\t\tPipeParser parser = context.getPipeParser();\n\n\t\t// The parser parses the v2.3 message to a \"v25\" structure\n\t\tca.uhn.hl7v2.model.v25.message.ORU_R01 msg = (ca.uhn.hl7v2.model.v25.message.ORU_R01) parser.parse(v23message);\n\n\t\t// 20169838-v23\n\t\tSystem.out.println(msg.getMSH().getMessageControlID().getValue());\n\n\t\t// The parser also parses the v2.5 message to a \"v25\" structure\n\t\tmsg = (ca.uhn.hl7v2.model.v25.message.ORU_R01) parser.parse(v25message);\n\n\t\t// 20169838-v25\n\t\tSystem.out.println(msg.getMSH().getMessageControlID().getValue());\n\n//\t\t/*\n//\t\t * The second technique is to use the Terser. The Terser allows you\n//\t\t * to access field values using a path-like notation. For more information\n//\t\t * on the Terser, see the example here:\n//\t\t * http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/ExampleUseTerser.html\n//\t\t */\n//\n//\t\t// This time we just use a normal ModelClassFactory, which means we will be\n//\t\t// using the standard version-specific model classes\n//\t\tcontext.setModelClassFactory(new DefaultModelClassFactory());\n//\n//\t\t// 20169838-v23\n//\t\tMessage v23Message = parser.parse(v23message);\n//\t\tTerser t23 = new Terser(v23Message);\n//\t\tSystem.out.println(t23.get(\"/MSH-10\"));\n//\n//\t\t// 20169838-v25\n//\t\tMessage v25Message = parser.parse(v25message);\n//\t\tTerser t25 = new Terser(v25Message);\n//\t\tSystem.out.println(t25.get(\"/MSH-10\"));\n//\n//\t\t/*\n//\t\t * Note that this second technique has one major drawback: Although\n//\t\t * message definitions are backwards compatible, some group names\n//\t\t * change between versions. If you are accessing a group within\n//\t\t * a complex message structure, this can cause issues.\n//\t\t *\n//\t\t * This is less of an issue for some message types where groups are\n//\t\t * not used much (e.g. ADT)\n//\t\t */\n//\n//\t\t// This works and prints \"Test Value\"\n//\t\tSystem.out.println(t23.get(\"/RESPONSE/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n//\n//\t\t// This fails...\n//\t\t// System.out.println(t25.get(\"/RESPONSE/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n//\n//\t\t// ...because this would be required to extract the OBX-5 value from a v2.5 message\n//\t\tSystem.out.println(t25.get(\"/PATIENT_RESULT/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n\n\t\t/*\n\t\t * Another technique which may occasionally be useful is to simply use\n\t\t * a \"Generic\" message structure. Generic message structures can\n\t\t * represent anything within an HL7 message, but they don't actually\n\t\t * model all of the intricacies of the structure within the message,\n\t\t * but rather just model all of the data in an unstructured way.\n\t\t */\n\n\t\t// Create a new context using a Generic Model Class Factory\n\t\tcontext = new DefaultHapiContext();\n\t\tcontext.setModelClassFactory(new GenericModelClassFactory());\n\n\t\tv25message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v25|T|2.5\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\\r\"\n\t\t\t\t+ \"NTE||Note for OBX(1)\\r\"\n\t\t\t\t+ \"OBX|2|ST|||Value number 2\";\n\n\t\t// The parser will always parse this as a \"GenericMessage\"\n\t\tGenericMessage message = (GenericMessage) context.getPipeParser().parse(v25message);\n\n\t\t/*\n\t\t * A generic message has a flat structure, so you can ask for any\n\t\t * field by only its segment name, not a complex path\n\t\t */\n\t\tTerser t = new Terser(message);\n\t\tSystem.out.println(t.get(\"/OBX-5\"));\n\t\t// Prints: Test Value\n\n\t\t/*\n\t\t * This technique isn't great for messages with complex structures. For\n\t\t * example, the second OBX in the message above is a part of the base structure\n\t\t * because GenericMessage has no groups.\n\t\t *\n\t\t * It can be accessed using a new segment name (OBX2 instead of OBX)\n\t\t * but this is error prone, so use with caution.\n\t\t */\n\t\tSystem.out.println(t.get(\"/OBX2-5\"));\n\t\t// Prints: Value number 2\n\n\t}", "@Override\n\tpublic void challenge14() {\n\n\t}", "public final void mo75278h(String str) {\n super.mo75278h(str);\n if (C25352e.m83221d(this.f77546j)) {\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click_source\").mo65283e(str).mo65270a(mo75261ab());\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click\").mo65283e(str).mo65270a(mo75261ab());\n m110463ax();\n }\n }", "public void makeLeet(Player player, String playerMessage, AsyncPlayerChatEvent event) {\n\t\t\r\n\t\t\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bfear\\\\b\",\t\t\t\"phear\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bat\\\\b\",\t\t\t\"@\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\byou\\\\b\", \t\t\t\"yoo\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bhack\\\\b\", \t\t\t\"hax\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bhi|hello\\\\b\", \t\t\"hai der\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bto|two|too\\\\b\", \t\"2\");;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Charactar Map\r\n\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)a\", \t\t\t\"@\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)b\", \t\t\t\"13\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)c\", \t\t\t\"[\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)d\", \t\t\t\"[)\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)e\", \t\t\t\"3\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)f\", \t\t\t\"ph\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)g\", \t\t\t\"6\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)h\",\t\t\t\"|-|\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)i\", \t\t\t\"1\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)j\", \t\t\t\"_/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)k\", \t\t\t\"|<\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)l\", \t\t\t\"|_\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)m\", \t\t\t\"/\\\\\\\\/\\\\\\\\\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)n\",\t\t\t\"/\\\\\\\\/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)o\", \t\t\t\"0\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)p\", \t\t\t\"|>\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)q\", \t\t\t\"(,)\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)r\", \t\t\t\"r\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)s\",\t\t\t\"z\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)t\", \t\t\t\"+\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)u\", \t\t\t\"\\\\\\\\_/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)v\", \t\t\t\"\\\\\\\\/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)w\", \t\t\t\"\\\\\\\\/\\\\\\\\/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)x\", \t\t\t\"><\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)y\", \t\t\t\"¥\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)z\", \t\t\t\"z\");\r\n\r\n\t\t//Here we do l33tish Grammar we do this last to see if we can get any words not in the list above\r\n\t\t//but not to affect the above words\r\n\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)cks\", \t\t\t\t\"x\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)er\", \t\t\t\t\t\"zor\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)or\", \t\t\t\t\t\"xor\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)ur\", \t\t\t\t\t\"x0l0n1u$\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Remove double spaces and Set the new Message\r\n\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\" \", \" \");\r\n\t\t event.setMessage(playerMessage);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public String apavada_prakruti_bhava(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA 3**********\");\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta); // anta\n // is\n // ITRANS\n // equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi); // adi is\n // ITRANS\n // equivalent\n\n String return_me = \"UNAPPLICABLE\";\n // 249\n if (VowelUtil.isPlutanta(X_anta) && X_adi.equals(\"iti\"))\n {// checked:29-6\n\n return_me = prakruti_bhava(X_anta, X_adi) + \", \" + utsarga_sandhi(X_anta, X_adi) + \"**\";\n ;\n /*\n * sandhi_notes = usg1 + sandhi_notes + \"\\nRegular Sandhis which\n * were being blocked by \" + \"pluta-pragRRihyA-aci-nityam(6.1.121)\n * are allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\" + \"\\n\" +\n * usg2 ;\n * \n * sandhi_notes+= Prkr + apavada + depend + sutra +\n * \"pluta-pragRRihyA aci nityam' (6.1.121)\" + \"\\nCondition: Only if\n * String 1 is a Vedic Usage(Arsha-prayoga)\";\n * \n * //This note below goes after the Notes returned fropm\n * utsarga_sandhi above String cond1 = \"\\nRegular Sandhis which were\n * being blocked by \" + \"'pluta-pragRRihyA-aci-nityam'(6.1.121) are\n * allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\";\n * vowel_notes.append_condition(cond1); ;\n */\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"Prakruti Bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pluta-ending word or a pragRRihya followed by any Vowel result in Prakruti bhava sandhi.\\n\" + \"<pluta-ending> || pragRRihya + vowel = prakruti bhava.\";\n comments.setConditions(cond1);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.2.125\");\n comments.setSutraPath(\"apluta-vadupasthite\");\n comments.setSutraProc(\"utsargic Sandhis Unblocked\");\n comments.setSource(Comments.sutra);\n String cond2 = depend + \"According to 6.1.121 plutantas followed by Vowels result in prakruti-bhaava\\n\" + \"However if the word 'iti' used is non-Vedic, then regular sandhis block 6.1.121.\";\n\n comments.setConditions(cond2);\n\n }\n\n // 250\n else if ((X_anta.endsWith(\"I3\") || X_anta.endsWith(\"i3\")) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 250\");\n return_me = utsarga_sandhi(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n /*\n * sandhi_notes += apavada + sutra + \"'I3 cAkravarmaNasya'\n * (6.1.126)\" + \"Blocks 'pluta-pragRRihyA aci nityam' (6.1.121)\";\n */\n // vowel_notes.start_adding_notes();\n // vowel_notes.set_sutra_num(\"6.1.126\") ;\n // vowel_notes.setSutraPath(\"I3 cAkravarmaNasya\") ;\n // vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n // vowel_notes.set_source(tippani.sutra) ;\n String cond1 = \"According to chaakravarman pluta 'i' should be trated as non-plutanta.\\n\" + \"Given in Panini Sutra 'I3 cAkravarmaNasya' (6.1.126). This sutra allows General Sandhis to operate by blocking\" + \"'pluta-pragRRihyA aci nityam' (6.1.121)\";\n comments.append_condition(cond1);\n\n }\n // prakrutibhava starts\n // 233-239 Vedic Usages\n // 243 : error (now fixed) shivA# isAgacha printing as sh-kaar ha-kaar\n // ikaar etc should be shakaar ikaar\n // **********ELSE IF****************//\n else if ((VowelUtil.isPlutanta(X_anta) || this.pragrhya == true) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using Vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 243\");\n return_me = prakruti_bhava(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n // sandhi_notes = Prkr + sutra + \"pluta-pragRRihyA aci nityam'\n // (6.1.121)\";\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"prakruti bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pragRRihyas or plutantas followed by any vowel result in NO SANDHI which is prakruti bhava\"; // Fill\n // Later\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && adi.equals(\"indra\")) // Avan~Na Adesh\n {// checked:29-6\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me = guna_sandhi(avang_adesh, X_adi);\n // We have to remove guna_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.120\");\n comments.setSutraPath(\"indre ca\");\n comments.setSutraProc(\"ava~nga Adesha followed by Guna Sandhi\");\n comments.setSource(Comments.sutra);\n String cond1 = \"Blocks Prakruti Bhava, and Ayadi Sandhi.\\n go + indra = go + ava~N + indra = gava + indra = gavendra.\"; // Fill\n // Later\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 241 242 Vik.\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && VowelUtil.isAjadi(X_adi))\n {// checked:29-6\n\n return_me = utsarga_sandhi(X_anta, X_adi); //\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me += \", \" + utsarga_sandhi(avang_adesh, X_adi);\n\n // We have to remove utsarga_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.119\");\n comments.setSutraPath(\"ava~N sphoTayanasya\");\n comments.setSutraProc(\"ava~nga Adesha followed by Regular Vowel Sandhis\");\n comments.setSource(Comments.sutra);\n String cond1 = padanta + \"View Only Supported by Sphotaayana Acharya.\\n\" + \"padanta 'go' + Vowel gets an avana~N-adesh resulting in gava + Vowel.\"; // Fill\n // Later...filled\n comments.setConditions(cond1);\n\n if (X_adi.startsWith(\"a\"))\n {\n return_me += \", \" + prakruti_bhava(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.118\");\n comments.setSutraPath(\"sarvatra vibhaaSaa goH\");\n comments.setSutraProc(\"Optional Prakruti Bhava for 'go'(cow)implying words ending in 'e' or 'o'.\");\n comments.setSource(Comments.sutra);\n String cond2 = \"Padanta Dependency. Prakruti bhava if 'go' is followed by any other Phoneme.\"; // Fill\n // Later\n comments.setConditions(cond2);\n\n return_me += \", \" + purva_rupa(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.105\");\n comments.setSutraPath(\"e~NaH padAntAdati\");\n comments.setSutraProc(\"purva-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond3 = padanta + \"If a padanta word ending in either 'e' or 'o' is followed by an 'a' purva-rupa ekadesh takes place\" + \"\\npadanta <e~N> 'e/o' + 'a' = purva-rupa ekadesha. Blocks Ayadi Sandhi\";\n comments.setConditions(cond3);\n\n }\n }\n // **********END OF ELSE IF****************//\n\n // 243\n\n // 244\n\n // 246 -250 , 253-260\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA3s**********\");\n\n return return_me; // apavada rules formulated by Panini\n }", "static void m14935e(String str, String str2) {\n if (m14929b() >= C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "private boolean handlePersonalTell(String line){\n if (line.indexOf(\"tells you: \") == -1)\n return false;\n \n Matcher matcher = PERSONAL_TELL_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String message = matcher.group(3);\n\n if (!processPersonalTell(username, titles, message))\n processLine(line);\n\n return true;\n }", "private static String getContent(String sendCode) {\n\t\t\treturn \"【宇鑫科技】登录验证码:\"+sendCode+\",如非本人操作,请忽略此短信。\";\r\n\t\t}", "private static java.lang.String m25224a(java.lang.String r7, java.lang.String r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"\";\n r1 = \"\\\\?\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r2 = 1;\n if (r1 <= r2) goto L_0x0033;\n L_0x000c:\n r7 = r7[r2];\n r1 = \"&\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r3 = 0;\n r4 = r0;\n r0 = 0;\n L_0x0018:\n if (r0 >= r1) goto L_0x0032;\n L_0x001a:\n r5 = r7[r0];\n r6 = \"=\";\n r5 = r5.split(r6);\n r6 = r5.length;\n if (r6 <= r2) goto L_0x002f;\n L_0x0025:\n r6 = r5[r3];\n r6 = r6.equals(r8);\n if (r6 == 0) goto L_0x002f;\n L_0x002d:\n r4 = r5[r2];\n L_0x002f:\n r0 = r0 + 1;\n goto L_0x0018;\n L_0x0032:\n r0 = r4;\n L_0x0033:\n r7 = \"UTF-8\";\t Catch:{ Exception -> 0x003a }\n r7 = java.net.URLDecoder.decode(r0, r7);\t Catch:{ Exception -> 0x003a }\n goto L_0x003b;\n L_0x003a:\n r7 = r0;\n L_0x003b:\n return r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.leanplum.messagetemplates.BaseMessageDialog.a(java.lang.String, java.lang.String):java.lang.String\");\n }", "public void sendQuestion() {\n/* 76 */ Village village = getResponder().getCitizenVillage();\n/* 77 */ if (village != null) {\n/* */ \n/* 79 */ this.allies = village.getAllies();\n/* */ \n/* 81 */ Arrays.sort((Object[])this.allies);\n/* 82 */ StringBuilder buf = new StringBuilder();\n/* 83 */ buf.append(getBmlHeader());\n/* 84 */ PvPAlliance pvpAll = PvPAlliance.getPvPAlliance(village.getAllianceNumber());\n/* 85 */ if (pvpAll != null) {\n/* */ \n/* 87 */ buf.append(\"text{text=\\\"You are in the \" + pvpAll.getName() + \".\\\"}\");\n/* 88 */ if (FocusZone.getHotaZone() != null)\n/* */ {\n/* 90 */ buf.append(\"text{text=\\\"\" + pvpAll.getName() + \" has won the Hunt of the Ancients \" + pvpAll\n/* 91 */ .getNumberOfWins() + \" times.\\\"}\");\n/* */ }\n/* */ \n/* */ \n/* 95 */ if (village.getId() == village.getAllianceNumber()) {\n/* */ \n/* 97 */ if (village.getMayor().getId() == getResponder().getWurmId()) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 102 */ buf.append(\"text{text=\\\"\" + village\n/* 103 */ .getName() + \" is the capital in the alliance which means your diplomats are responsible for ousting other settlements. The mayor may change name, disband or set another village as the alliance capital:\\\"};\");\n/* */ \n/* */ \n/* */ \n/* 107 */ buf.append(\"harray{label{text=\\\"Alliance name:\\\"};input{id=\\\"allName\\\"; text=\\\"\" + pvpAll.getName() + \"\\\";maxchars=\\\"20\\\"}}\");\n/* */ \n/* 109 */ buf.append(\"harray{label{text='Alliance capital:'}dropdown{id=\\\"masterVill\\\";options=\\\"\");\n/* */ \n/* 111 */ for (int x = 0; x < this.allies.length; x++)\n/* */ {\n/* 113 */ buf.append(this.allies[x].getName() + \",\");\n/* */ }\n/* */ \n/* 116 */ buf.append(\"No change\");\n/* 117 */ buf.append(\"\\\";default=\\\"\" + this.allies.length + \"\\\"}}\");\n/* 118 */ buf.append(\"harray{checkbox{text=\\\"Check this if you wish to disband this alliance: \\\";id=\\\"disbandAll\\\"; selected=\\\"false\\\"}}\");\n/* */ } \n/* */ \n/* */ \n/* 122 */ for (Village ally : this.allies)\n/* */ {\n/* 124 */ if (ally != village) {\n/* 125 */ buf.append(\"harray{label{text=\\\"Check to break alliance with \" + ally.getName() + \":\\\"}checkbox{id=\\\"break\" + ally\n/* */ \n/* 127 */ .getId() + \"\\\";text=' '}}\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 177 */ buf.append(\"harray{label{text=\\\"Check to break alliance with \" + pvpAll.getName() + \":\\\"}checkbox{id=\\\"break\" + pvpAll\n/* */ \n/* 179 */ .getId() + \"\\\";text=' '}}\");\n/* */ } \n/* 181 */ buf.append(\"text{type=\\\"bold\\\";text=\\\"Alliance message of the day:\\\"}\");\n/* 182 */ buf.append(\"input{maxchars=\\\"200\\\";id=\\\"motd\\\";text=\\\"\" + pvpAll.getMotd() + \"\\\"}\");\n/* */ } \n/* 184 */ if (this.allies.length == 0)\n/* 185 */ buf.append(\"text{text='You have no allies.'}\"); \n/* 186 */ buf.append(\"text{text=''}\");\n/* 187 */ buf.append(\"text{text=''}\");\n/* 188 */ if (village.warDeclarations != null) {\n/* */ \n/* 190 */ buf.append(\"text{type='bold'; text='The current village war declarations:' }\");\n/* 191 */ for (WarDeclaration declaration : village.warDeclarations.values()) {\n/* */ \n/* 193 */ if (declaration.declarer == village) {\n/* */ \n/* 195 */ if (Servers.isThisAChaosServer() && \n/* 196 */ System.currentTimeMillis() - declaration.time > 86400000L) {\n/* */ \n/* 198 */ declaration.accept();\n/* 199 */ buf.append(\"harray{label{text=\\\"\" + declaration.receiver.getName() + \" has now automatically accepted your declaration.\\\"}}\");\n/* */ \n/* */ continue;\n/* */ } \n/* 203 */ buf.append(\"harray{label{text=\\\"Check to withdraw declaration to \" + declaration.receiver.getName() + \":\\\"}checkbox{id'decl\" + declaration.receiver\n/* 204 */ .getId() + \"';text=' '}}\");\n/* */ \n/* */ continue;\n/* */ } \n/* */ \n/* 209 */ if (Servers.isThisAChaosServer()) {\n/* */ \n/* 211 */ if (System.currentTimeMillis() - declaration.time < 86400000L) {\n/* */ \n/* 213 */ buf.append(\"harray{label{text=\\\"You have \" + \n/* 214 */ Server.getTimeFor(System.currentTimeMillis() - declaration.time) + \" until you automatically accept the declaration of war.\\\"}}\");\n/* */ \n/* */ \n/* 217 */ buf.append(\"harray{label{text=\\\"Check to accept declaration from \" + declaration.declarer\n/* 218 */ .getName() + \":\\\"}checkbox{id='recv\" + declaration.declarer\n/* */ \n/* 220 */ .getId() + \"';text=' '}}\");\n/* */ \n/* */ continue;\n/* */ } \n/* 224 */ declaration.accept();\n/* 225 */ buf.append(\"harray{label{text=\\\"\" + declaration.receiver.getName() + \" has now automatically accepted the war declaration from \" + declaration.declarer\n/* */ \n/* 227 */ .getName() + \".\\\"}}\");\n/* */ \n/* */ continue;\n/* */ } \n/* */ \n/* 232 */ buf.append(\"harray{label{text=\\\"Check to accept declaration from \" + declaration.declarer.getName() + \":\\\"}checkbox{id='recv\" + declaration.declarer\n/* */ \n/* 234 */ .getId() + \"';text=' '}}\");\n/* */ } \n/* */ \n/* 237 */ buf.append(\"text{text=''}\");\n/* 238 */ buf.append(\"text{text=''}\");\n/* */ }\n/* 240 */ else if (Servers.localServer.PVPSERVER) {\n/* 241 */ buf.append(\"text{text='You have no pending war declarations.'}\");\n/* 242 */ } Village[] enemies = village.getEnemies();\n/* 243 */ if (enemies.length > 0) {\n/* */ \n/* 245 */ buf.append(\"harray{text{type='bold'; text='We are at war with: '}text{text=\\\" \");\n/* */ \n/* 247 */ Arrays.sort((Object[])enemies);\n/* */ \n/* 249 */ for (int x = 0; x < enemies.length; x++) {\n/* */ \n/* 251 */ if (x == enemies.length - 1) {\n/* 252 */ buf.append(enemies[x].getName());\n/* 253 */ } else if (x == enemies.length - 2) {\n/* 254 */ buf.append(enemies[x].getName() + \" and \");\n/* */ } else {\n/* 256 */ buf.append(enemies[x].getName() + \", \");\n/* */ } \n/* 258 */ } buf.append(\".\\\"}}\");\n/* */ }\n/* 260 */ else if (Servers.localServer.PVPSERVER) {\n/* 261 */ buf.append(\"text{text='You are not at war with any particular settlement.'}\");\n/* 262 */ } buf.append(createAnswerButton2());\n/* 263 */ getResponder().getCommunicator().sendBml(300, 300, true, true, buf.toString(), 200, 200, 200, this.title);\n/* */ } \n/* */ }", "public static void main(String[] args)\n {\n String [] roles= {\n \"Городничий\",\"Аммос Федорович\",\n \"Артемий Филиппович\",\n \"Лука Лукич\"};\n String [] textLines={\n \"Городничий: Я пригласил вас, господа, с тем, чтобы сообщить вам пренеприятное известие: к нам едет ревизор.\",\n \"Аммос Федорович: Как ревизор?\",\n \"Артемий Филиппович: Как ревизор?\",\n \"Городничий: Ревизор из Петербурга, инкогнито. И еще с секретным предписаньем.\",\n \"Аммос Федорович: Вот те на!\",\n \"Артемий Филиппович: Вот не было заботы, так подай!\",\n \"Лука Лукич: Господи боже! еще и с секретным предписаньем!\"};\n\n StringBuilder res = new StringBuilder(\"\");\n \n for (String role : roles) {\n \n res.append(role + \":\\n\");\n for (int i = 0; i < textLines.length; i++) {\n if ( textLines[i].matches(\"^\"+role+\":.*\") ){\n res.append(String.valueOf(i+1) + \")\" + textLines[i].substring(role.length()+1));\n }\n }\n res.append(\"\\n\");\n }\n System.out.println( res.toString());\n \n }", "private static String getOutputMsg(String line){\n String[] arr = line.split(\" \");\n return arr[0] + \"|\" + arr[3].replace(\"[\",\"\");\n }", "private String message() {\r\n if (markers.size() == 0) return \"\";\r\n String s = \"expecting \";\r\n boolean first = true;\r\n for (Marker m : markers) {\r\n if (! first) s = s + \", \";\r\n first = false;\r\n s = s + m.toString().toLowerCase().replaceAll(\"_\",\" \");\r\n }\r\n return s;\r\n }", "private void inQuyetDinhv4(HttpServletRequest request, HttpServletResponse reponse, GiaHanForm giaHanForm, ApplicationContext appConText) throws Exception {\r\n\t\tString fileIn = request.getRealPath(\"/docin/v4\") + \"\\\\TTNB11.doc\";\r\n\t\tString fileOut = request.getRealPath(\"/docout\") + \"\\\\TTNB11_Out\" + System.currentTimeMillis() + request.getSession().getId() + \".doc\";\r\n\r\n\t\tString fileTemplate = null;\r\n\t\tfileTemplate = \"ttnb11\"; // (ngon, chuan)\r\n\t\tString idCuocTtkt = giaHanForm.getIdCuocTtKt();\r\n\t\tTtktKhCuocTtkt cuocTtkt = CuocTtktService.getCuocTtktWithoutNoiDung(appConText, idCuocTtkt);\r\n\r\n\t\tTtktCbQd cbQd = TtktService.getQuyetDinh(idCuocTtkt, appConText);\r\n\t\tString hinhThuc = (cuocTtkt.getHinhThuc().booleanValue()) ? \"ki\\u1EC3m tra\" : \"thanh tra\";\r\n\t\tStringBuffer sb = new StringBuffer(hinhThuc);\r\n\t\t//giaHanForm.setSoQd(KtnbUtil.getMaNvu(appConText, \"Q\\u0110\"));\r\n\t\t//if (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t//sb.append(\"....../Q\\u0110-.......\");\r\n\t\t//} else {\r\n\t\t\t//sb.append(giaHanForm.getSoQd() + KtnbUtil.getMaNvu(appConText, \"Q\\u0110\") );\r\n\t\t//}\r\n\t\tMsWordUtils word = new MsWordUtils(fileIn, fileOut);\r\n\t\ttry {\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText).toUpperCase());\r\n\t\t\tword.put(\"[cqt_ra_quyet_dinh]\", cuocTtkt.getTenDonViTh().toUpperCase());\r\n\t\t\tif (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t\tword.put(\"[so_qd]\", \"....../Q\\u0110-.......\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[so_qd]\", giaHanForm.getSoQd().toString()+KtnbUtil.getMaNvu1(appConText, \"Q\\u0110\") );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t//word.put(\"[so_qd]\", sb.toString().toUpperCase());\r\n\t\t\tString ngaylap = giaHanForm.getNgayRaQd();\r\n\t\t\tString[] arrngaylap = ngaylap.split(\"/\");\r\n\t\t\tif (giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t}\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toUpperCase());\r\n\t\t\tword.put(\"[luat_so]\", giaHanForm.getCanCuLuat());\r\n\t\t\tif (CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()).equals(\"N/A\")) {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", KtnbUtil.inFieldNull(104) + \";\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()));\r\n\t\t\t}\r\n\t\t\tword.put(\"[qdinh_so]\", giaHanForm.getCanCuQd());\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tString ngayxet = Formater.date2str(cbQd.getNgayRaQuyetDnh());\r\n\t\t\tString[] arrngayxet = ngayxet.split(\"/\");\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\t//word.put(\"[ttkt1]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ngay_lv]\", giaHanForm.getSoNgayRaHan());\r\n\t\t\t// tu ngay\r\n\t\t\tString tungay = giaHanForm.getRaHanTuNgay();\r\n\t\t\tString[] arrtungay = tungay.split(\"/\");\r\n\t\t\tword.put(\"[tu_ngay]\", \"ng\\u00E0y \" + arrtungay[0] + \" th\\u00E1ng \" + arrtungay[1] + \" n\\u0103m \" + arrtungay[2]);\r\n\t\t\t// den ngay\r\n\t\t\tString denngay = giaHanForm.getRaHanDenNgay();\r\n\t\t\tString[] arrdenngay = denngay.split(\"/\");\r\n\t\t\tword.put(\"[den_ngay]\", \"ng\\u00E0y \" + arrdenngay[0] + \" th\\u00E1ng \" + arrdenngay[1] + \" n\\u0103m \" + arrdenngay[2]);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tif (Formater.isNull(giaHanForm.getDvCaNhanLq())) {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \"\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \", \" + giaHanForm.getDvCaNhanLq());\r\n\t\t\t}\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText));\r\n\t\t\tword.put(\"[chuc_danh_thu_truong]\", KtnbUtil.getChucVuThuTruongByMaCqt(appConText.getMaCqt()).toUpperCase());\r\n\t\t\t// if (Formater.isNull(appConText.getTenThuTruong())) {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", \"\");\r\n\t\t\t// } else {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", appConText.getTenThuTruong());\r\n\t\t\t// }\r\n\t\t\tword.saveAndClose();\r\n\t\t\tword.downloadFile(fileOut, \"Mau TTNB11\", \".doc\", reponse);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// ex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Download Error: \" + ex.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tword.saveAndClose();\r\n\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void inQuyetDinhv3(HttpServletRequest request, HttpServletResponse reponse, GiaHanForm giaHanForm, ApplicationContext appConText) throws Exception {\r\n\t\tString fileIn = request.getRealPath(\"/docin\") + \"\\\\TTNB11.doc\";\r\n\t\tString fileOut = request.getRealPath(\"/docout\") + \"\\\\TTNB11_Out\" + System.currentTimeMillis() + request.getSession().getId() + \".doc\";\r\n\r\n\t\tString fileTemplate = null;\r\n\t\tfileTemplate = \"ttnb11\"; // (ngon, chuan)\r\n\t\tString idCuocTtkt = giaHanForm.getIdCuocTtKt();\r\n\t\tTtktKhCuocTtkt cuocTtkt = CuocTtktService.getCuocTtktWithoutNoiDung(appConText, idCuocTtkt);\r\n\r\n\t\tTtktCbQd cbQd = TtktService.getQuyetDinh(idCuocTtkt, appConText);\r\n\t\tString hinhThuc = (cuocTtkt.getHinhThuc().booleanValue()) ? \"ki\\u1EC3m tra\" : \"thanh tra\";\r\n\t\tStringBuffer sb = new StringBuffer(hinhThuc);\r\n\r\n\t\tMsWordUtils word = new MsWordUtils(fileIn, fileOut);\r\n\t\ttry {\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText).toUpperCase());\r\n\t\t\tword.put(\"[cqt_ra_quyet_dinh]\", cuocTtkt.getTenDonViTh().toUpperCase());\r\n\t\t\tif (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t\tword.put(\"[so_qd]\", \"....../Q\\u0110-.......\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[so_qd]\", giaHanForm.getSoQd().toString());\r\n\t\t\t}\r\n\t\t\tString ngaylap = giaHanForm.getNgayRaQd();\r\n\t\t\tString[] arrngaylap = ngaylap.split(\"/\");\r\n\t\t\tif (giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t}\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toUpperCase());\r\n\t\t\tif (CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()).equals(\"N/A\")) {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", KtnbUtil.inFieldNull(104) + \";\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()));\r\n\t\t\t}\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tString ngayxet = Formater.date2str(cbQd.getNgayRaQuyetDnh());\r\n\t\t\tString[] arrngayxet = ngayxet.split(\"/\");\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\tword.put(\"[ttkt1]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ngay_lv]\", giaHanForm.getSoNgayRaHan());\r\n\t\t\t// tu ngay\r\n\t\t\tString tungay = giaHanForm.getRaHanTuNgay();\r\n\t\t\tString[] arrtungay = tungay.split(\"/\");\r\n\t\t\tword.put(\"[tu_ngay]\", \"ng\\u00E0y \" + arrtungay[0] + \" th\\u00E1ng \" + arrtungay[1] + \" n\\u0103m \" + arrtungay[2]);\r\n\t\t\t// den ngay\r\n\t\t\tString denngay = giaHanForm.getRaHanDenNgay();\r\n\t\t\tString[] arrdenngay = denngay.split(\"/\");\r\n\t\t\tword.put(\"[den_ngay]\", \"ng\\u00E0y \" + arrdenngay[0] + \" th\\u00E1ng \" + arrdenngay[1] + \" n\\u0103m \" + arrdenngay[2]);\r\n\t\t\tword.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tif (Formater.isNull(giaHanForm.getDvCaNhanLq())) {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \"\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \", \" + giaHanForm.getDvCaNhanLq());\r\n\t\t\t}\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText));\r\n\t\t\tword.put(\"[chuc_danh_thu_truong]\", KtnbUtil.getChucVuThuTruongByMaCqt(appConText.getMaCqt()).toUpperCase());\r\n\t\t\t// if (Formater.isNull(appConText.getTenThuTruong())) {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", \"\");\r\n\t\t\t// } else {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", appConText.getTenThuTruong());\r\n\t\t\t// }\r\n\t\t\tword.saveAndClose();\r\n\t\t\tword.downloadFile(fileOut, \"Mau TTNB11\", \".doc\", reponse);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// ex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Download Error: \" + ex.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tword.saveAndClose();\r\n\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void mo25815a(String str) {\n C6888i.m12438e(str, \"message\");\n C7976h.C7977a aVar = C7976h.f16015c;\n C7976h.m14586j(C7976h.f16013a, str, 0, (Throwable) null, 6, (Object) null);\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Welcome to the store, Hello, I am Eliza, How may I help you Today ?\");\n System.out.println(\" ================================== \");\n System.out.println(\"Enter your Response here or Enter 'Q' to End the chat?\");\n String s1 = sc.nextLine();\n String message = \"\";\n\n while (!s1.toLowerCase().equals(\"q\")) {\n String[] input = (s1.split(\" \"));\n\n message=\"\";\n\n\n for (int i = 0; i < input.length; i++) {\n String replace = getReplace(input[i]);\n if (input[i].equalsIgnoreCase(\"I\")) {\n input[i] = input[i].replace(\"I\", replace);\n } else if (input[i].equalsIgnoreCase(\"me\")) {\n input[i] = input[i].replace(\"me\", replace);\n } else if (input[i].equalsIgnoreCase(\"my\")) {\n input[i] = input[i].replace(\"my\", replace);\n } else if (input[i].equalsIgnoreCase(\"am\")) {\n input[i] = input[i].replace(\"am\", replace);\n } else if (input[i].equalsIgnoreCase(\"you\")) {\n input[i] = input[i].replace(\"you\", replace);\n } else {\n input[i] = input[i];\n }\n message += (input[i] + \" \");\n }\n //checking if the input contain key words\n if ((s1.contains(\"I\")) || (s1.contains(\"my\")) || (s1.contains(\"me\"))\n || (s1.contains(\"am\")) || (s1.contains(\"you\"))){\n //calling method to get qualifier\n String qu = getQualif();\n //Printing the Qualifier message\n System.out.print(qu + \" \" + message);\n s1 = sc.nextLine();\n }\n else {\n //calling method to get a hedge\n String hed = getHedge();\n //Printing the hedge\n System.out.println(hed);\n s1 = sc.nextLine();\n }\n\n\n }\n System.out.println(\"Thank You\");\n }", "public final void mo7656e(int i, int i2, String str, C1207m c1207m) {\n AppMethodBeat.m2504i(41893);\n if (c46020a.nqx.vYe != null) {\n C4990ab.m7416i(HoneyPayMainUI.this.TAG, \"do realname guide\");\n Bundle bundle = new Bundle();\n bundle.putString(\"realname_verify_process_jump_activity\", \".ui.HoneyPayMainUI\");\n C28289c.m44883a(HoneyPayMainUI.this, bundle, c46020a.nqx.vYe, true);\n AppMethodBeat.m2505o(41893);\n return;\n }\n HoneyPayMainUI.m56321b(HoneyPayMainUI.this, c46020a.nqx.vYf);\n AppMethodBeat.m2505o(41893);\n }", "public final String[] mo24226W(C7620bi c7620bi) {\n int i = 1;\n AppMethodBeat.m2504i(113302);\n String[] strArr = new String[2];\n String str = c7620bi.field_content;\n if (C5046bo.isNullOrNil(str)) {\n strArr[0] = \"\";\n strArr[1] = \"\";\n AppMethodBeat.m2505o(113302);\n return strArr;\n }\n int i2;\n String str2;\n if (c7620bi.field_isSend == 0) {\n i2 = 1;\n } else {\n i2 = 0;\n }\n if (C1855t.m3896kH(c7620bi.field_talker) && i2 != 0) {\n i2 = C1829bf.m3761ox(str);\n if (i2 != -1) {\n str = str.substring(i2 + 1).trim();\n }\n }\n C5136b Ro = ((C6982j) C1720g.m3528K(C6982j.class)).bOr().mo15261Ro(str);\n if (Ro.dua()) {\n str = Ro.label;\n str2 = Ro.eUu;\n strArr[0] = str;\n strArr[1] = str2;\n } else {\n strArr[0] = Ro.label;\n strArr[1] = \"\";\n }\n if (C5046bo.isNullOrNil(strArr[0]) && C5046bo.isNullOrNil(strArr[1])) {\n C4990ab.m7416i(\"MicroMsg.LocationServer\", \"pull from sever\");\n long j = c7620bi.field_msgId;\n if (!(this.nJC == null || this.nJC.contains(Long.valueOf(j)))) {\n str2 = c7620bi.field_content;\n if (c7620bi.field_isSend != 0) {\n i = 0;\n }\n if (C1855t.m3896kH(c7620bi.field_talker) && i != 0) {\n i = C1829bf.m3761ox(str2);\n if (i != -1) {\n str2 = str2.substring(i + 1).trim();\n }\n }\n Ro = C5136b.apD(str2);\n this.nJC.add(Long.valueOf(j));\n C18657c.agw().mo33924a(Ro.nJu, Ro.nJv, this.nJD, Long.valueOf(c7620bi.field_msgId));\n }\n }\n AppMethodBeat.m2505o(113302);\n return strArr;\n }", "static String m8561a(String str) {\n return str.replaceAll(\"\\r\\n\", \"\\n\").replaceAll(\" *\\n *\", \"\\n\").replaceAll(\"\\n\", \" \").replaceAll(\"[ \\t\\\\x0B\\f\\r]+\", \" \");\n }", "public void mo63047b(String str) {\n String str2;\n String str3;\n String str4;\n String str5;\n super.mo63047b(str);\n if (C25352e.m83221d(this.f77546j)) {\n this.f89203a.mo65916c();\n C24961b e = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play_over\").mo65283e(\"video\");\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n e.mo65271b((long) video.getVideoLength()).mo65270a(mo75261ab());\n this.f89214bh++;\n C28418f a = C28418f.m93413a();\n C7573i.m23582a((Object) a, \"FeedSharePlayInfoHelper.inst()\");\n a.f74936f = this.f89214bh;\n if (this.f89214bh >= this.f89215bi) {\n C28418f a2 = C28418f.m93413a();\n C7573i.m23582a((Object) a2, \"FeedSharePlayInfoHelper.inst()\");\n if (!a2.f74934d) {\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme2.getAwemeRawAd();\n if (awemeRawAd != null) {\n str3 = awemeRawAd.getWebUrl();\n } else {\n str3 = null;\n }\n if (TextUtils.isEmpty(str3)) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str4 = \"\";\n } else {\n str4 = \"video\";\n }\n b.mo65283e(str4).mo65270a(mo75261ab());\n return;\n } else if (mo75314al()) {\n mo75311ai();\n return;\n } else {\n this.f89215bi++;\n C24961b b2 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str5 = \"\";\n } else {\n str5 = \"video\";\n }\n b2.mo65283e(str5).mo65270a(mo75261ab());\n return;\n }\n }\n }\n C24961b b3 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str2 = \"\";\n } else {\n str2 = \"video\";\n }\n b3.mo65283e(str2).mo65270a(mo75261ab());\n }\n }", "@Override\n\tpublic void challenge7() {\n\n\t}", "@Override\n\tpublic void challenge12() {\n\n\t}", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n String string0 = SQLUtil.normalize(\"TiI~,Q-Hqtp'@\", true);\n assertEquals(\"TiI ~, Q - Hqtp '@'\", string0);\n }", "static void m14936e(String str, String str2, Throwable th) {\n if (m14929b() >= C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "public final void mo7656e(int i, int i2, String str, C1207m c1207m) {\n AppMethodBeat.m2504i(41892);\n if (c46020a.nqx.vYe != null) {\n C4990ab.m7416i(HoneyPayMainUI.this.TAG, \"do realname guide\");\n Bundle bundle = new Bundle();\n bundle.putString(\"realname_verify_process_jump_activity\", \".ui.HoneyPayMainUI\");\n C28289c.m44883a(HoneyPayMainUI.this, bundle, c46020a.nqx.vYe, true);\n }\n AppMethodBeat.m2505o(41892);\n }", "private String getSplitCapitalPeriodSent(String text) {\n\t\t\r\n\t\tString testString = text;\r\n\t\t\r\n\t\t/*\r\n\t\ttestString = testString.replaceAll(\"\\\\·\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?\\\\·\\\\s?\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t\r\n\t\ttestString = testString.replaceAll(\"–\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?-\\\\s?\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t*/\r\n\t\t\r\n\t\t// System.out.println(\"testString::Before::\" + testString);\r\n\t\t\r\n\t\tString targetPatternString = \"(\\\\s[A-Z]\\\\.\\\\s)\";\r\n\t\tPattern pattern = Pattern.compile(targetPatternString);\r\n\t\tMatcher matcher = pattern.matcher(testString);\r\n\t\t\r\n\t\twhile (matcher.find()) {\r\n\t\t\t// System.out.println(\"Whloe Sent::\" + matcher.group());\r\n\t\t\t// System.out.println(\"Part 1::\" + matcher.group(1));\r\n\t\t\t// System.out.println(\"Part 2::\" + matcher.group(2));\r\n\t\t\t// System.out.println(\"Part 3::\" + matcher.group(3));\r\n\t\t\t\r\n\t\t\tString matchString = matcher.group(1);\r\n\t\t\t\r\n\t\t\tString newMatchString = \"\";\r\n\t\t\tfor ( int j = 0; j < matchString.length(); j++ ) {\r\n\t\t\t\tnewMatchString += matchString.substring(j, j+1) + \" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tSystem.out.println(\"matchString:: \" + matchString);\r\n\t\t\tSystem.out.println(\"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\tlog(LogLevel.INFO, \"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tlog(LogLevel.INFO, \"matchString:: \" + matchString);\r\n\t\t\tlog(LogLevel.INFO, \"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\ttestString = testString.replaceAll(matcher.group(1), newMatchString);\r\n\t\t\t\r\n\t\t\t// String matchResult = matcher.group(1);\r\n\t\t\t// System.out.println(\"matchResult::\" + matchResult);\r\n\t\t}\r\n\t\t\r\n\t\t// System.out.println(\"testString::After::\" + testString);\r\n\t\t\r\n\t\treturn testString;\r\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public final void mo75263ad() {\n String str;\n super.mo75263ad();\n if (C25352e.m83313X(this.f77546j)) {\n if (C6399b.m19944t()) {\n if (!C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) && C25371n.m83443a(mo75261ab())) {\n C25371n.m83471b(mo75261ab(), C25352e.m83305P(this.f77546j));\n }\n } else if (!DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C19535g a = DownloaderManagerHolder.m75524a();\n String x = C25352e.m83241x(this.f77546j);\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n Long adId = awemeRawAd.getAdId();\n C7573i.m23582a((Object) adId, \"mAweme.awemeRawAd!!.adId\");\n long longValue = adId.longValue();\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n C19386b a2 = C22943b.m75512a(\"result_ad\", aweme2.getAwemeRawAd(), false);\n Aweme aweme3 = this.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme3.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n a.mo51670a(x, longValue, 2, a2, C22942a.m75508a(awemeRawAd2));\n }\n }\n m110463ax();\n if (!C25352e.m83313X(this.f77546j) || C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) || DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click\");\n if (C25352e.m83313X(this.f77546j)) {\n str = \"download_button\";\n } else {\n str = \"more_button\";\n }\n b.mo65283e(str).mo65270a(mo75261ab());\n }\n }", "public String reveal() { \n String message = \"\";\n \n if(verifyMessagePresence()){\n for(int ii = 3; ii < terminalLocation(); ii = ii + 1){\n message = message + (char)(getHidden(ii));\n }\n }else{\n return null;\n }\n return message;\n }", "public String[] inquiryResponse(String input)\n\t{\n\t\tinput = tselDecrypt(key,input);\n\t\t\n\t\tinquiryResponseTemp=input.split(\"@~|\");\n\n\t\tinquiryResponse[0]=inquiryResponseTemp[0];\n\t\tinquiryResponse[1]=inquiryResponseTemp[1];\n\t\tinquiryResponse[2]=inquiryResponseTemp[2];\n\t\tinquiryResponse[3]=inquiryResponseTemp[3];\n\n\t\tinquiryResponseTemp2=inquiryResponseTemp[4].split(\"|\");\n\n\t\tfor(int i=0;i<inquiryResponseTemp2.length;i++)\n\t\t{\n\t\t\tinquiryResponse[i+4]=inquiryResponseTemp2[i];\n\t\t}\n\n\t\tinquiryResponse[4+inquiryResponseTemp2.length]=inquiryResponseTemp[5];\n\n\t\treturn inquiryResponse;\n\t}", "@Override\n\tpublic void challenge16() {\n\n\t}", "public void mo75192a() {\n AppMethodBeat.m2504i(65565);\n this.f17955a.setLength(0);\n this.f17956b.setText(\"\");\n this.f17957c.setText(\"\");\n AppMethodBeat.m2505o(65565);\n }", "public static String breakDown(String serverMessage){\n //Copied the server message into a new string, just in case I need the original form of serverMessage.\n String serverMessageCopy = serverMessage;\n serverMessageCopy = serverMessageCopy.substring(serverMessageCopy.indexOf(\":\", 1)+1);\n if (serverMessageCopy.startsWith(\"!\"))\n {\n //Remove \"!WB\" from the string\n serverMessageCopy = serverMessageCopy.substring(serverMessageCopy.indexOf(\"!WB\")+3);\n String cityDataPair = serverMessageCopy.substring(serverMessageCopy.indexOf(\"_\")+1);\n\n String[] parts = new String[2];\n\n //City - remove everything after (and including) the first underscore in the phrase\n parts[0] = cityDataPair.split(\"_\")[0];\n //Data - remove everything before (and including) the first underscore in the phrase\n parts[1] = cityDataPair.substring(cityDataPair.indexOf(\"_\")+1);\n\n\n WeatherReport weatherReport = new WeatherReport(parts);\n\n return weatherReport.feedReport();\n }else\n return \"Incorrect command, please refer to \\u0002 \\u001F \\u0003!WB_help\";\n }", "public void mo9233aH() {\n }", "public String infoline()\n {\n return \" > You see delicious COFFEE being brewed from behind the starbucks counter\";}", "public void verifyThanksMessageTextAfterEndingAboutContentStructure(String text)\r\n\t {\r\n\t\t WebElement element_greetings_message=about_content_structure_end_thank_you_text.get(2);\r\n\t\t textVerification(element_greetings_message, text);\r\n\t }", "private final void m134908d(String str) {\n if (!TextUtils.isEmpty(str)) {\n String str2 = C6969H.m41409d(\"G738BDC12AA7FAF3BE7039107E4B48CDA6C8ED71FAD7F\") + str + '/';\n VideoXOnlineLog.f101073b.mo121420a(C6969H.m41409d(\"G6887D15AAA23AE3BA61A9F58FBE6838D2998C8\"), str2);\n MQTTClient a = MQTTClientManager.m55413a(C6969H.m41409d(\"G4DA6F33B8A1C9F16C522B96DDCD1\"));\n if (a != null) {\n ProtoAdapter<EventMessage> gVar = EventMessage.f96677a;\n C32569u.m150513a((Object) gVar, C6969H.m41409d(\"G4C95D014AB1DAE3AF50F974DBCC4E7F659B7F028\"));\n f97550g = a.mo57249a(str2, new MQTTWirePbConverter(gVar));\n MQTTTopic<EventMessage> oVar = f97550g;\n if (oVar == null) {\n C32569u.m150511a();\n }\n oVar.mo57278a((MQTTTopicListener<EventMessage>) f97552i, true);\n MQTTTopic<EventMessage> oVar2 = f97550g;\n if (oVar2 == null) {\n C32569u.m150511a();\n }\n oVar2.mo57274a(MQTTQosLevel.LEVEL_1, true);\n }\n }\n }", "@Override\n\tpublic void challenge11() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void challenge6() {\n\n\t}", "static zzco m26829a() {\n return new zzco(\"While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either that the input has been truncated or that an embedded message misreported its own length.\");\n }", "private String m48359a(String str) {\n if (TextUtils.isEmpty(str)) {\n return \"\";\n }\n return C8145d.m48410a(str) ? \"xxxxxx\" : str;\n }", "public String apavada_vriddhi(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA UNO**********\");\n Log.info(\"X_adi == \" + X_adi);\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta);\n // x.transform(X_anta); // anta is ITRANS equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi);\n // x.transform(X_adi); // adi is ITRANS equivalent\n\n Log.info(\"adi == \" + adi);\n\n String return_me = \"UNAPPLICABLE\";\n\n boolean bool1 = VowelUtil.isAkaranta(X_anta) && (adi.equals(\"eti\") || adi.equals(\"edhati\"));\n boolean bool2 = VowelUtil.isAkaranta(X_anta) && adi.equals(\"UTh\");\n\n // 203\n // **********IF****************//\n if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"f\")) // watch out!!! must\n // be SLP not ITRANS\n {// checked:29-6\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"f\" + strip2;\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRiti RRi vA vacanam\");\n comments.setSutraProc(\"hrasva RRikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"small RRi followed by small RRi merge to become small RRi.\\n\" + \"RRi + RRi = RRi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 204\n // **********IF****************//\n else if (X_anta.endsWith(\"f\") && X_adi.startsWith(\"x\")) // watch out!!!\n // must be SLP\n // not ITRANS\n { // checked:29-6 // SLP x = ITRANS LLi\n String strip1 = VarnaUtil.stripAntyaVarna(X_anta);\n String strip2 = VarnaUtil.stripAdiVarna(X_adi);\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + strip1 + \"x\" + strip2; // SLP\n // x =\n // ITRANS\n // LLi\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"LLiti LLi vA vacanam\");\n comments.setSutraProc(\"hrasva LLikara ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \" RRi/RRI followed by small LLi merge to become small LLi.\\n RRi/RRI + LLi = LLi\";\n comments.setConditions(cond1);\n\n } // end of main if\n // **********END OF IF****************//\n\n // 207a-b\n // **********ELSE IF****************//\n else if (bool1 || bool2)\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.86\");\n comments.setSutraPath(\"eti-edhati-UThsu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.sutra);\n\n String cond1 = \"akaara followed by declensions of 'iN', 'edha' and 'UTh\" + \"<eti/edhati/UTh> are replaced by their vRRiddhi counterpart.\\n\" + \"a/A/a3 + eti/edhati/UTha = VRRiddhi Counterpart.\\n\" + \"Pls. Note.My Program cannot handle all the declensions of given roots.\" + \"Hence will only work for one instance of Third Person Singular Form\";\n comments.setConditions(cond1);\n\n String cond2 = \"Blocks para-rupa Sandhi given by 'e~ni pararUpam' which had blocked Normal Vriddhi Sandhi\";\n\n if (bool1)\n comments.append_condition(cond2);\n else if (bool2) comments.append_condition(\"Blocks 'Ad guNaH'\");\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 208\n // **********ELSE IF****************//\n else if (anta.equals(\"akSa\") && adi.equals(\"UhinI\"))\n {// checked:29-6\n return_me = \"akzOhiRI\"; // u to have give in SLP..had\n // ITRANS....fixed\n // not sending to vrridhit_sandhi becose of Na-inclusion\n // vriddhi_sandhi(X_anta,X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // ***/vowel_notes.decrement_pointer();/***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"akSAdUhinyAm\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"akSa + UhinI = akshauhiNI.Vartika blocks guna-sandhi ato allow vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // 209\n // **********ELSE IF****************//\n else if (anta.equals(\"pra\") && (adi.equals(\"Uha\") || adi.equals(\"UDha\") || adi.equals(\"UDhi\") || adi.equals(\"eSa\") || adi.equals(\"eSya\")))\n // checked:29-6\n {\n return_me = vriddhi_sandhi(X_anta, X_adi);\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"prAd-Uha-UDha-UDhi-eSa-eSyeSu\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"upasarga 'pra' + <prAd/Uha/UDha/UDhi/eSa/eSya> = vRRiddhi-ekadesha.\" + \"\\nVartika blocks para-rupa Sandhi and/or guna Sandhi to allow vRRidhi-ekadesh.\";\n\n comments.setConditions(cond1);\n\n }\n\n // **********END OF ELSE IF****************//\n\n // 210\n // **********ELSE IF****************//\n else if (anta.equals(\"sva\") && (adi.equals(\"ira\") || adi.equals(\"irin\")))\n {\n // checked:29-6\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"svaadireriNoH\");\n comments.setSutraProc(\"vRRiddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"sva + <ira/irin> = vRRIddhi.\\n Blocks Guna Sandhi.\" + \"\\nPls. note. My program does not cover sandhi with declensions.\";\n comments.setConditions(cond1);\n }\n\n // **********END OF ELSE IF****************//\n\n // 211 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (VowelUtil.isAkaranta(X_anta) && X_adi.equals(\"fta\"))// adi.equals(\"RRita\"))\n {\n // checked:29-6\n // not working for 'a' but working for 'A'. Find out why...fixed\n\n return_me = utsarga_prakruti_bhava(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"RRite ca tRRitIyAsamAse\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If an akaranta ('a/aa/a3'-terminating phoneme) is going to form a Tritiya Samas compound with a RRi-initial word\" + \" vRRiddhi-ekadesha takes place blocking other rules.\\n\" + \"a/A/a3 + RRi -> Tritiya Samaasa Compound -> vRRiddhi-ekadesh\" + depend;\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 212-213\n // **********ELSE IF****************//\n else if ((anta.equals(\"pra\") || anta.equals(\"vatsatara\") || anta.equals(\"kambala\") || anta.equals(\"vasana\") || anta.equals(\"RRiNa\") || anta.equals(\"dasha\")) && adi.equals(\"RRiNa\"))\n\n // checked:29-6\n { // pra condition not working...fixed now . 5 MAR 05\n // return_me = guna_sandhi(X_anta,X_adi) + \", \" +\n // prakruti_bhava(X_anta,X_adi)\n\n return_me = vriddhi_sandhi(X_anta, X_adi);\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n /***/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n // vowel_notes.set_sutra_num(\"\") ;\n comments.setVartikaPath(\"pra-vatsatara-kambala-vasanArNa dashaanAm RRiNe\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = \"If 'pra' etc are followed by the word 'RRiNa',\" + \" vRRiddhi-ekadesh takes place blocking Guna and Prakruti Bhava Sandhis.\" + \"\\n<pra/vatsatara/kambala/vasana/RRiNa/dash> + RRiNa = vRRiddhi\";\n comments.setConditions(cond1);\n }\n // ???? also implement prakruti bhava\n\n /**\n * **YEs ACCORDING TO SWAMI DS but not according to Bhaimi Bhashya else\n * if ( adi.equals(\"RRiNa\") && (anta.equals(\"RRiNa\") ||\n * anta.equals(\"dasha\")) ) { return_me = vriddhi_sandhi(X_anta,X_adi);\n * //*sandhi_notes = VE + apavada + vartika + \"'RRiNa dashAbhyAm ca'.\" +\n * \"\\nBlocks Guna and Prakruti Bhava Sandhi\";\n * \n * vowel_notes.start_adding_notes(); vowel_notes.set_sutra_num(\"\") ;\n * vowel_notes.set_vartika_path(\"RRiNa dashAbhyAm ca\") ;\n * vowel_notes.set_sutra_proc(\"Vriddhi-ekadesh\");\n * vowel_notes.set_source(tippani.vartika) ; String cond1 =depend +\n * \"Blocks Guna and Prakruti Bhava Sandhi\";\n * vowel_notes.set_conditions(cond1);\n * /* return_me = utsarga_prakruti_bhava(X_anta,X_adi) + \", \" +\n * vriddhi_sandhi(X_anta,X_adi) + \"**\"; sandhi_notes = usg1 +\n * sandhi_notes; sandhi_notes+= \"\\n\" + usg2 + VE +apavada + vartika +\n * \"'RRiNa dashAbhyAm ca'.\" + depend; // .... this was when I assumed\n * this niyama is optional with other // ???? also implement prakruti\n * bhava }\n */\n // **********END OF ELSE IF****************//\n // 214 Vik. Semantic Dependency\n // **********ELSE IF****************//\n else if (anta.equals(\"A\") && VowelUtil.isAjadi(X_adi))\n {\n // checked:29-6\n // rules is A + Vowel = VRddhi\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n /*******************************************************************\n * sandhi_notes = usg1 + sandhi_notes + \"\\n\" + usg2 ; // We have to\n * remove vriddhi_sandhi default notes // this is done by /\n ******************************************************************/\n comments.decrementPointer();\n /***/\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.87\");\n comments.setSutraPath(\"ATashca\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"if String 1 equals 'aa' and implies 'AT'-Agama and \" + \"String 2 is a verbal form. E.g. A + IkSata = aikSata not ekSata.\\n\" + \" 'aa' + Verbal Form = vRRiddhi-ekadesh\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n // akaranta uparga mein error....fixed 4 MAR\n // 215 Vik Semantic Dependency\n else if (is_akaranta_upsarga(X_anta) && X_adi.startsWith(\"f\")) // RRi\n // ==\n // SLP\n // 'f'USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n { // according to Vedanga Prakash Sandhi Vishaya RRIkara is being\n // translated\n // but checked with SC Basu Trans. it is RRIta not RRikara\n // checked:29-6\n\n Log.info(\" Rules 215 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + vriddhi_sandhi(X_anta, X_adi) + \"**\";\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n // vowel_notes.decrement_pointer();\n\n // July 14 2005.. I have removed the above line\n // vowel_notes.decrement_pointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.88\");\n comments.setSutraPath(\"upasargAdRRiti dhAtau\");\n comments.setSutraProc(\"Vriddhi-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"akaranta upsarga(preverb) followed by verbal form begining with short RRi.\\n \" + \"preverb ending in <a> + verbal form begining with RRi = vRRiddhi-ekadesha\\n\";\n\n /*\n * \"By 6.1.88 it should block all \" + \"optional forms but by 'vA\n * supyApishaleH' (6.1.89) subantas are \" + \"permitted the Guna\n * option.\";\n */\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA UNO**********\");\n\n if (return_me.equals(\"UNAPPLICABLE\"))\n {\n return_me = apavada_para_rupa(X_anta, X_adi); // search for more\n // apavada rules\n }\n return return_me; // apavada rules formulated by Panini apply\n }", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "@Override\n\tpublic void challenge15() {\n\n\t}", "public void v_Verify_Guest8_Hidden(){\n\t}", "private boolean handleSayTell(String line){\n if (line.indexOf(\"says: \") == -1)\n return false;\n \n Matcher matcher = SAY_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String gameNumberString = matcher.group(4);\n String message = matcher.group(5);\n\n int gameNumber = gameNumberString == null ? -1 : Integer.parseInt(gameNumberString);\n\n if (!processSayTell(username, titles, gameNumber, message))\n processLine(line);\n\n return true;\n }", "static void m14932d(String str, String str2, Throwable th) {\n if (m14929b() > C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "private String cleanString(String data){\n Pattern ptn = Pattern.compile(\"//.*\");\n Matcher mc = ptn.matcher(data);\n while(mc.find())data = data.replace(mc.group(),\"\");\n ptn = Pattern.compile(\"/\\\\*(.|\\n)*?\\\\*/\");\n mc = ptn.matcher(data);\n while(mc.find()) data = data.replace(mc.group(),\"\");\n return data.trim();\n }", "@Override\r\n public void messageReceived(String messageText) {\n Log.e(\"Message\",messageText);\r\n Toast.makeText(StatusScreen.this,\"Message: \"+messageText,Toast.LENGTH_LONG).show();\r\n\r\n // If your OTP is six digits number, you may use the below code\r\n\r\n Pattern pattern = Pattern.compile(OTP_REGEX);\r\n Matcher matcher = pattern.matcher(messageText);\r\n String otp = \"\";\r\n while (matcher.find())\r\n {\r\n otp = matcher.group();\r\n }\r\n\r\n Toast.makeText(StatusScreen.this,\"OTP: \"+ otp ,Toast.LENGTH_LONG).show();\r\n\r\n }", "public final void m53237a(C15813i c15813i) {\n c15813i = new StringBuilder();\n c15813i.append(\"ChatLongPressMessageEvent logged for matchId: \");\n c15813i.append(this.f43555a.m35972a());\n C0001a.b(c15813i.toString(), new Object[0]);\n }", "@Override\n\tpublic void challenge17() {\n\n\t}", "protected boolean processPersonalTell(String username, String titles, String message){return false;}", "@Override\n\tpublic void challenge8() {\n\n\t}", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "public String toFIPAString() {\n String str = \"(\" + type.toUpperCase() + \"\\n\";\n if ( sender != null )\n str += \" :sender ( \" + getSender_As_FIPA_String() + \" )\\n\";\n if ( receivers != null && !receivers.isEmpty() ) {\n str += \" :receiver (set \";\n Enumeration allRec = getFIPAReceivers();\n while (allRec.hasMoreElements()) {\n FIPA_AID_Address addr = (FIPA_AID_Address) allRec.nextElement();\n String current =\"(\" + addr.toFIPAString() +\")\";\n str += current; }\n str += \" )\\n\";\n }\n if ( replyWith != null )\n str += \" :reply-with \" + replyWith + \"\\n\";\n if ( inReplyTo != null )\n str += \" :in-reply-to \" + inReplyTo + \"\\n\";\n if ( replyBy != null )\n str += \" :reply-by \" + replyBy + \"\\n\";\n if ( ontology != null )\n str += \" :ontology \" + ontology + \"\\n\";\n if ( language != null )\n str += \" :language \" + language + \"\\n\";\n if ( content != null )\n // try no \"'s // brackets may be SL specific\n str += \" :content \\\"\" + content + \"\\\"\\n\";//\" :content \\\"( \" +Misc.escape(content) + \")\\\"\\n\";\n if ( protocol != null )\n str += \" :protocol \" + protocol + \"\\n\";\n if ( conversationId != null )\n str += \" :conversation-id \" + conversationId + \"\\n\";\n if ( replyTo != null )\n str += \" :reply-to \" + replyTo + \"\\n\";\n /*\n if ( envelope != null && !envelope.isEmpty() ) {\n str += \" :envelope (\";\n Enumeration enum = envelope.keys();\n String key;\n Object value;\n while( enum.hasMoreElements() ) {\n key = (String)enum.nextElement();\n value = envelope.get(key);\n str += \"(\" + key + \" \\\"\" + Misc.escape(value.toString()) + \"\\\")\";\n }*/\n // str += \")\";\n //}\n \n str += \")\\n\";\n return str;\n }", "public void v_Verify_Guest7_Hidden(){\n\t}", "@androidx.room.Dao()\n@kotlin.Metadata(mv = {1, 4, 0}, bv = {1, 0, 3}, k = 1, d1 = {\"\\u00006\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\t\\bg\\u0018\\u00002\\u00020\\u0001J\\u0013\\u0010\\u0002\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00a7@\\u00f8\\u0001\\u0000\\u00a2\\u0006\\u0002\\u0010\\u0004J\\u001b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u00062\\u0006\\u0010\\u0007\\u001a\\u00020\\bH\\u00a7@\\u00f8\\u0001\\u0000\\u00a2\\u0006\\u0002\\u0010\\tJ\\u001b\\u0010\\n\\u001a\\u0004\\u0018\\u00010\\u00062\\u0006\\u0010\\u000b\\u001a\\u00020\\fH\\u00a7@\\u00f8\\u0001\\u0000\\u00a2\\u0006\\u0002\\u0010\\rJ\\u0019\\u0010\\u000e\\u001a\\u00020\\u000f2\\u0006\\u0010\\u0010\\u001a\\u00020\\u0011H\\u00a7@\\u00f8\\u0001\\u0000\\u00a2\\u0006\\u0002\\u0010\\u0012J\\u0019\\u0010\\u0013\\u001a\\u00020\\u000f2\\u0006\\u0010\\u0014\\u001a\\u00020\\u0003H\\u0097@\\u00f8\\u0001\\u0000\\u00a2\\u0006\\u0002\\u0010\\u0015J\\u0019\\u0010\\u0016\\u001a\\u00020\\u000f2\\u0006\\u0010\\u0017\\u001a\\u00020\\u0006H\\u00a7@\\u00f8\\u0001\\u0000\\u00a2\\u0006\\u0002\\u0010\\u0018J\\u0019\\u0010\\u0019\\u001a\\u00020\\u000f2\\u0006\\u0010\\u0017\\u001a\\u00020\\u0006H\\u00a7@\\u00f8\\u0001\\u0000\\u00a2\\u0006\\u0002\\u0010\\u0018\\u0082\\u0002\\u0004\\n\\u0002\\b\\u0019\\u00a8\\u0006\\u001a\"}, d2 = {\"Lcom/hend/movieschallenge/persistence/MovieDao;\", \"\", \"get\", \"Lcom/hend/movieschallenge/persistence/dbmodels/DBMovie;\", \"(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;\", \"getMovieEntityById\", \"Lcom/hend/movieschallenge/persistence/dbmodels/MovieEntity;\", \"id\", \"\", \"(ILkotlin/coroutines/Continuation;)Ljava/lang/Object;\", \"getMovieEntityByTitle\", \"title\", \"\", \"(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;\", \"insert\", \"\", \"movieData\", \"Lcom/hend/movieschallenge/persistence/dbmodels/MovieData;\", \"(Lcom/hend/movieschallenge/persistence/dbmodels/MovieData;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;\", \"insertDBMovie\", \"dbMovie\", \"(Lcom/hend/movieschallenge/persistence/dbmodels/DBMovie;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;\", \"insertMovie\", \"movieEntity\", \"(Lcom/hend/movieschallenge/persistence/dbmodels/MovieEntity;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;\", \"update\", \"app_debug\"})\npublic abstract interface MovieDao {\n \n @org.jetbrains.annotations.Nullable()\n @androidx.room.Insert(onConflict = androidx.room.OnConflictStrategy.REPLACE)\n public abstract java.lang.Object insert(@org.jetbrains.annotations.NotNull()\n com.hend.movieschallenge.persistence.dbmodels.MovieData movieData, @org.jetbrains.annotations.NotNull()\n kotlin.coroutines.Continuation<? super kotlin.Unit> p1);\n \n @org.jetbrains.annotations.Nullable()\n @androidx.room.Insert(onConflict = androidx.room.OnConflictStrategy.REPLACE)\n public abstract java.lang.Object insertMovie(@org.jetbrains.annotations.NotNull()\n com.hend.movieschallenge.persistence.dbmodels.MovieEntity movieEntity, @org.jetbrains.annotations.NotNull()\n kotlin.coroutines.Continuation<? super kotlin.Unit> p1);\n \n @org.jetbrains.annotations.Nullable()\n @androidx.room.Update(onConflict = androidx.room.OnConflictStrategy.REPLACE)\n public abstract java.lang.Object update(@org.jetbrains.annotations.NotNull()\n com.hend.movieschallenge.persistence.dbmodels.MovieEntity movieEntity, @org.jetbrains.annotations.NotNull()\n kotlin.coroutines.Continuation<? super kotlin.Unit> p1);\n \n @org.jetbrains.annotations.Nullable()\n @androidx.room.Transaction()\n public abstract java.lang.Object insertDBMovie(@org.jetbrains.annotations.NotNull()\n com.hend.movieschallenge.persistence.dbmodels.DBMovie dbMovie, @org.jetbrains.annotations.NotNull()\n kotlin.coroutines.Continuation<? super kotlin.Unit> p1);\n \n @org.jetbrains.annotations.Nullable()\n @androidx.room.Query(value = \"SELECT * FROM MovieData LIMIT 1\")\n @androidx.room.Transaction()\n public abstract java.lang.Object get(@org.jetbrains.annotations.NotNull()\n kotlin.coroutines.Continuation<? super com.hend.movieschallenge.persistence.dbmodels.DBMovie> p0);\n \n @org.jetbrains.annotations.Nullable()\n @androidx.room.Query(value = \"SELECT * FROM MovieEntity WHERE id = :id LIMIT 1\")\n @androidx.room.Transaction()\n public abstract java.lang.Object getMovieEntityById(int id, @org.jetbrains.annotations.NotNull()\n kotlin.coroutines.Continuation<? super com.hend.movieschallenge.persistence.dbmodels.MovieEntity> p1);\n \n @org.jetbrains.annotations.Nullable()\n @androidx.room.Query(value = \"SELECT * FROM MovieEntity WHERE title = :title LIMIT 1\")\n @androidx.room.Transaction()\n public abstract java.lang.Object getMovieEntityByTitle(@org.jetbrains.annotations.NotNull()\n java.lang.String title, @org.jetbrains.annotations.NotNull()\n kotlin.coroutines.Continuation<? super com.hend.movieschallenge.persistence.dbmodels.MovieEntity> p1);\n \n /**\n * Contains all queries required on database\n */\n @kotlin.Metadata(mv = {1, 4, 0}, bv = {1, 0, 3}, k = 3)\n public final class DefaultImpls {\n \n @org.jetbrains.annotations.Nullable()\n @androidx.room.Transaction()\n public static java.lang.Object insertDBMovie(@org.jetbrains.annotations.NotNull()\n com.hend.movieschallenge.persistence.MovieDao $this, @org.jetbrains.annotations.NotNull()\n com.hend.movieschallenge.persistence.dbmodels.DBMovie dbMovie, @org.jetbrains.annotations.NotNull()\n kotlin.coroutines.Continuation<? super kotlin.Unit> p2) {\n return null;\n }\n }\n}", "public final void mo4498a(int i, int i2, int i3, String str, C1929q c1929q, byte[] bArr) {\n AppMethodBeat.m2504i(26085);\n C9649b c9649b = (C9649b) c1929q.mo5618ZS();\n this.elr = c9649b.flZ.wuf;\n C4990ab.m7410d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"onGYNetEnd errType:\" + i2 + \" errCode:\" + i3 + \" mTicket: \" + this.elr);\n if (i2 == 4 && i3 == -301) {\n C7484ax.m12918a(true, c9649b.flZ.vLL, c9649b.flZ.vLM, c9649b.flZ.vLK);\n this.ftx--;\n if (this.ftx <= 0) {\n C4990ab.m7410d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"reach redirect limit, invoke callback\");\n this.ehi.onSceneEnd(3, -1, \"\", this);\n AppMethodBeat.m2505o(26085);\n return;\n }\n C4990ab.m7410d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"redirect IDC\");\n mo4456a(this.ftf, this.ehi);\n AppMethodBeat.m2505o(26085);\n } else if (i2 == 4 && i3 == ZipJNI.UNZ_PARAMERROR) {\n final int i4 = c1929q.acF().vyj.ver;\n C4990ab.m7411d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"summerauth auth MM_ERR_CERT_EXPIRED getcert now old ver:%d\", Integer.valueOf(i4));\n C9638aw.m17180RS().mo10302aa(new Runnable() {\n\n /* renamed from: com.tencent.mm.plugin.voiceprint.model.e$1$1 */\n class C353421 implements C1202f {\n C353421() {\n }\n\n public final void onSceneEnd(int i, int i2, String str, C1207m c1207m) {\n AppMethodBeat.m2504i(26081);\n C4990ab.m7411d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"summerauth dkcert getcert type:%d ret [%d,%d]\", Integer.valueOf(c1207m.getType()), Integer.valueOf(i), Integer.valueOf(i2));\n if (i == 0 && i2 == 0) {\n C35343e.this.mo4456a(C35343e.this.ftf, C35343e.this.ehi);\n AppMethodBeat.m2505o(26081);\n return;\n }\n C35343e.this.ehi.onSceneEnd(i, i2, \"\", C35343e.this);\n AppMethodBeat.m2505o(26081);\n }\n }\n\n public final void run() {\n AppMethodBeat.m2504i(26082);\n new C18674i().mo4456a(C35343e.this.ftf, new C353421());\n AppMethodBeat.m2505o(26082);\n }\n });\n AppMethodBeat.m2505o(26085);\n } else if (i2 == 0 || i3 == 0) {\n this.ehi.onSceneEnd(i2, i3, str, this);\n AppMethodBeat.m2505o(26085);\n } else {\n this.ehi.onSceneEnd(i2, i3, str, this);\n AppMethodBeat.m2505o(26085);\n }\n }", "String notes();", "static void m14931d(String str, String str2) {\n if (m14929b() > C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "void mo8715r(String str, String str2, String str3);", "public void mo12307a(String str, String str2) {\n if (m14929b() > C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "@Override // com.igexin.push.p671g.p673b.AbstractC5937h\n /* renamed from: a */\n public void mo39819a() {\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(C5871f.f24630f.getPackageName());\n sb.append(MqttTopic.MULTI_LEVEL_WILDCARD);\n sb.append(C5792l.m35140a(this.f24367b, (String) this.f24366a.get(PushClientConstants.TAG_PKG_NAME)));\n sb.append(MqttTopic.MULTI_LEVEL_WILDCARD);\n sb.append((String) this.f24366a.get(PushClientConstants.TAG_PKG_NAME));\n sb.append(MqttTopic.TOPIC_LEVEL_SEPARATOR);\n sb.append((String) this.f24366a.get(\"serviceName\"));\n sb.append(MqttTopic.MULTI_LEVEL_WILDCARD);\n sb.append(C5792l.m35148a((String) this.f24366a.get(PushClientConstants.TAG_PKG_NAME), (String) this.f24366a.get(\"serviceName\")) ? \"1\" : \"0\");\n C5792l.m35143a(this.f24367b, \"30026\", sb.toString(), (String) this.f24366a.get(\"messageId\"), (String) this.f24366a.get(\"taskId\"), (String) this.f24366a.get(\"id\"));\n ActivityC5721b.m34806a(\"feedback actionId=30026 result=\" + sb.toString());\n } catch (Throwable unused) {\n }\n }", "protected boolean processSayTell(String username, String titles, int gameNumber, String message){return false;}", "@Override\n\tpublic void xoaDonHang(String ma_kh) {\n\n\t}", "public void mo12312b(String str, String str2, Throwable th) {\n if (m14928a() >= C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "void handleMessage(String message){\n\t\tString[] parts = message.split(\" \");\n\t\tboolean prevFor = false;\n//\t\tSystem.out.println(\"parts0 = \" + parts[0]);\n\t\tswitch(parts[0]){\n\t\t\tcase \"#quit\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#quit\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#stop\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#stop\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#close\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#close\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#setport\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#setport\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + parts[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"#getport\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#getport\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#start\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#start\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#block\":\n\t\t\t\tif(parts.length>1){\n\t\t\t\t\tclient.handleMessageFromClientUI(\"#block\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + \" \");\t//this sends the info to the server to check if it's a valid user_id\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"You haven't specified a user to block!\");\n\t\t\t\tbreak;\n\t\t\tcase \"#unblock\":\n\t\t\t\tif(parts.length>0){\n\t\t\t\t\tclient.handleMessageFromClientUI(\"#unblock\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + \" \");\t//this sends the info to the server to check if it's a valid user_id\n\t\t\t\t\t\t\t//this also needs to be sent to server to send to all consoles to update block lists\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"#whoiblock\":\t\t//simply prints out the arraylist of users that i block\n\t\t\t\tif(blockedList.size()>0){\n\t\t\t\t\tSystem.out.print(\"The list of people you block is: \");\n\t\t\t\t\tfor(int i=0;i<blockedList.size();i++){\n\t\t\t\t\t\tSystem.out.print(blockedList.get(i)+\", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"You are not blocking any users\");\n\t\t\t\tbreak;\n\t\t\tcase \"#whoblocksme\":\t//simply prints out the arraylist of users that block me\n\t\t\t\tif(whoBlocksMe.size()>0){\n\t\t\t\t\tSystem.out.print(\"The list of people who block me is: \");\n\t\t\t\t\tfor(int i=0;i<whoBlocksMe.size();i++){\n\t\t\t\t\t\tSystem.out.print(whoBlocksMe.get(i)+\", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"There are no users that are blocking you\");\n\t\t\t\tbreak;\n\t\t\tcase \"#startforwarding\":\n\t\t\t\tprevFor = false;\n\t\t\t\ttry {\n\t\t\t\t\tif(whoIForward.size()>0) {\n\t\t\t\t\t\tfor(int i=0; i<whoIForward.size(); i++){\n\t\t\t\t\t\t\tif(parts[1].equals(whoIForward.get(i))) prevFor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!prevFor) {\n\t\t\t\t\t\t\twhoIForward.add(parts[1]);\n\t\t\t\t\t\t\tSystem.out.println(\"You are now forwarding to user: \"+parts[1]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse System.out.println(\"You are already forwarding to that user!\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twhoIForward.add(parts[1]);\n\t\t\t\t\t\tSystem.out.println(\"You are now forwarding all messages to user: \"+parts[1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"You need to specify a user to forward to!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"cancelforwarding\":\n\t\t\t\tprevFor = false;\n\t\t\t\ttry {\n\t\t\t\t\tif(whoIForward.size()>0){\n\t\t\t\t\t\tfor(int i=0; i<whoIForward.size(); i++){\n\t\t\t\t\t\t\tif(parts[1].equals(whoIForward.get(i))){\n\t\t\t\t\t\t\t\tprevFor = true;\n\t\t\t\t\t\t\t\twhoIForward.remove(i);\n\t\t\t\t\t\t\t\tSystem.out.println(\"You are no longer forwarding to user: \"+parts[1]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!prevFor){\n\t\t\t\t\t\t\tSystem.out.println(\"You were not forwarding to that user!\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse System.out.println(\"You are not currently forwarding to anyone and connot stop forwarding to this user\");\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"You need to specify a user to stop forwarding to!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"#private\":\n\t\t\t\tString[] messageArray = Arrays.copyOfRange(parts, 2, parts.length);\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tfor (String value : messageArray) {\n\t\t\t\t builder.append(value + \" \");\n\t\t\t\t}\n\t\t\t\tString messageToSend = builder.toString();\n\t\t\t\tclient.handleMessageFromClientUI(\"#private\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + messageToSend);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault: client.handleMessageFromClientUI(\" \" + \"---\" + client.getUID() + \"---\" + \"*\" + \"---\" + message);\n\t\t}\n\t}", "private static void m1853a(Activity activity, String[] strArr) {\n StringBuilder sb = new StringBuilder();\n int i = 0;\n while (i < strArr.length) {\n sb.append(\" \");\n int i2 = i + 1;\n sb.append(i2);\n sb.append('.');\n sb.append(activity.getString(C0517e.f2297k.get(strArr[i]).intValue()));\n sb.append(10);\n i = i2;\n }\n m1852a(activity, activity.getString(C0462R.string.string_permission_request_message, new Object[]{sb.toString()}), (DialogInterface.OnClickListener) new C0535b(activity));\n }", "public String dispaly(String result, String which) {\n String fword=\"\";\n String dump=result;\n Log.i(\"result \"+which,result);\n if(result!=null){\n result=result.replaceAll(\"lang=en\",\"\");\n String ts;\n if(result.contains(\"[[\")||result.contains(\"{{\"))\n {\tdump=dump.replaceAll(\"[^a-zA-Z0-9.\\\\[\\\\]|,;}\\\\s+]\", \"\").trim();\n if(dump.startsWith(\"[[\"))\n {\n int i=result.indexOf(\"[[\");\n int j=result.indexOf(\"]]\");\n fword=result.substring(i,j);\n int k=fword.indexOf('|');\n fword=fword.substring(k+1);\n //System.out.println(\"First Word \"+fword);\n //System.out.println(\"FIND \"+result);\n result=result.substring(j+2);\n //\tSystem.out.println(\"FIND \"+result);\n result=fword.concat(result);\n result=result.replace('|',' ');\n\n }\n else\n {\n System.out.println(\"Esle called \"+result);\n dump=dump.replaceAll(\"[^a-zA-Z0-9.\\\\[\\\\]|,;}\\\\s+]\", \"\").trim();\n String arr[]=dump.split(\" \");\n for(int aa=0;aa<arr.length;aa++)\n {\n\n if(arr[aa].contains(\"[[\")&&arr[aa].contains(\"|\"))\n {\n //System.out.println(arr[aa]);\n String min=arr[aa];\n //System.out.println(\"MINNN \"+min);\n int x=min.indexOf(\"[[\");\n int y=min.indexOf(\"|\");\n min=min.substring(y+1);\n //System.out.println(min);\n result=result.replace(arr[aa], min);\n }\n }\n result=result.replace('|',' ');\n }\n }\n //if(result.matches(\"[[[a-zA-Z|]\"))\n send+=\"<h3>\"+which+\"</h3>\"+\"\\n\";\n // System.out.println(\"Meaning for \"+which);\n if(result.contains(\"}}\"))\n {\n int resultindex=result.indexOf(\"}}\");\n //\t System.out.println(resultindex);\n result=result.substring(resultindex);\n }\n\n result = result.replaceAll(\"[^a-zA-Z0-9.,;\\\\s+]\", \"\");\n result=result.replaceAll(\";\",\".\\n\");\n\n // result.endsWith(\".\");\n // System.out.println(result);\n int newline=0;\n for(int i=0;i<result.length();i++)\n {\n if(result.charAt(i)=='\\n')\n {\n newline++;\n }\n }\n\n // System.out.println(\"New Line \"+newline);\n for(int i=0;i<newline;i++)\n {\n int nn=result.indexOf(\"\\n\");\n // System.out.println(\"First line \"+nn);\n String res=result.substring(0,nn);\n result=result.substring(nn+1);\n // System.out.println(res);\n send+=res+\"\\n\";\n }\n int nn=result.indexOf(\"\\n\");\n\n\n result=result.substring(nn+1);\n send+=result+\"\\n\";\n // System.out.println(result);\n /* fword=fword.trim();\n if(!fword.isEmpty())\n {\n\n fword=fword.concat(\" \");\n // send=fword+send;\n send=fword.concat(send);\n\n // System.out.println(\"Called\");\n return send;\n }*/\n\n\n\n }\n /*else {\n result1.setText(\"Wrorng\");\n send+=\"Enter Correct word\";\n // System.out.println(\"Enter correct word\");\n return \"Wrong\";\n }*/\n\n return send;\n }", "private void challengeHandler() {\n String word = txtWord.getText().toString();\n String nextWord;\n if (word.length() >= 4 && dictionary.isWord(word)){\n endGame(true, word + \" is a valid word\");\n } else {\n nextWord = dictionary.getAnyWordStartingWith(word);\n if (nextWord != null){\n endGame(false, word + \" is a prefix of word \\\"\" + nextWord + \"\\\"\");\n } else {\n endGame(true, word + \" is not a prefix of any word\");\n }\n }\n }", "void mo8713dV(String str);", "public void validateRpd8s16()\n {\n for (Node link : getElements(ELEM_LINK)) {\n String href = getAttributeValue(link, ATTR_HREF);\n if (href != null && href.startsWith(MAILTO)) {\n String email = StringUtils.substringAfter(href, MAILTO);\n if (email.contains(QUERY_STRING_SEPARATOR)) {\n email = StringUtils.substringBefore(email, QUERY_STRING_SEPARATOR);\n }\n assertTrue(Type.ERROR, \"rpd8s16.email\", link.getTextContent().contains(email));\n }\n }\n }", "void submitBug() {\n\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"plain/text\");\n intent.putExtra(Intent.EXTRA_EMAIL, new String[] { \"bryan.walsh.mti@gmail.com\" });\n intent.putExtra(Intent.EXTRA_SUBJECT, \"36-3 Bug Report\");\n intent.putExtra(Intent.EXTRA_TEXT, \"The following question is incorrect: \\n\\n\" + \"Question Number: \" + currentQ.getID() + \"\\n\\n\" + currentQ.getQUESTION() + \"\\n\\n\" + \"Choice A: \"+ currentQ.getOPTA() + \"\\n\\n\" + \"Choice B: \"+ currentQ.getOPTB() + \"\\n\\n\" + \"Choice C: \" + currentQ.getOPTC() + \"\\n\\n\" + \"Choice D: \" + currentQ.getOPTD() + \"\\n\\n Additional Information: \\n\");\n startActivity(Intent.createChooser(intent, \"\"));\n\n\n }", "public final void a(com.tencent.mm.ui.chatting.ad.a r23, int r24, com.tencent.mm.ui.chatting.ChattingUI.a r25, com.tencent.mm.storage.at r26, java.lang.String r27) {\n /*\n r22 = this;\n r19 = r23;\n r19 = (com.tencent.mm.ui.chatting.m) r19;\n r0 = r25;\n r1 = r22;\n r1.onG = r0;\n r25.ay(r26);\n r19.reset();\n r0 = r26;\n r0 = r0.field_content;\n r21 = r0;\n r25.aw(r26);\n r4 = 0;\n if (r21 == 0) goto L_0x1212;\n L_0x001c:\n r0 = r26;\n r4 = r0.field_reserved;\n r0 = r21;\n r4 = com.tencent.mm.q.a.a.B(r0, r4);\n r20 = r4;\n L_0x0028:\n r4 = new com.tencent.mm.ui.chatting.dl;\n r0 = r25;\n r6 = r0.nQK;\n r8 = 0;\n r9 = 0;\n r10 = 0;\n r5 = r26;\n r7 = r24;\n r4.<init>(r5, r6, r7, r8, r9, r10);\n if (r20 == 0) goto L_0x02a4;\n L_0x003a:\n r0 = r20;\n r5 = r0.appId;\n r0 = r20;\n r6 = r0.bpy;\n r7 = com.tencent.mm.pluginsdk.model.app.g.bA(r5, r6);\n r0 = r19;\n r5 = r0.dtY;\n r0 = r20;\n r6 = r0.title;\n r5.setText(r6);\n r0 = r19;\n r5 = r0.dtZ;\n r0 = r20;\n r6 = r0.description;\n r5.setText(r6);\n r0 = r19;\n r5 = r0.okC;\n r6 = 1;\n r5.setMaxLines(r6);\n r0 = r19;\n r5 = r0.dtY;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r8 = 2131689909; // 0x7f0f01b5 float:1.9008847E38 double:1.0531947516E-314;\n r6 = r6.getColor(r8);\n r5.setTextColor(r6);\n r0 = r19;\n r5 = r0.dtZ;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r8 = 2131689792; // 0x7f0f0140 float:1.900861E38 double:1.053194694E-314;\n r6 = r6.getColor(r8);\n r5.setTextColor(r6);\n r0 = r19;\n r5 = r0.okQ;\n r6 = 2130837939; // 0x7f0201b3 float:1.7280846E38 double:1.0527738225E-314;\n r5.setBackgroundResource(r6);\n r0 = r19;\n r5 = r0.okQ;\n r6 = 0;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r8 = r8.getResources();\n r9 = 2131493152; // 0x7f0c0120 float:1.8609776E38 double:1.0530975407E-314;\n r8 = r8.getDimensionPixelSize(r9);\n r9 = 0;\n r10 = 0;\n r5.setPadding(r6, r8, r9, r10);\n r0 = r19;\n r5 = r0.okd;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okO;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.dtZ;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okS;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okT;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okG;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okF;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okD;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okA;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.olb;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okU;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okQ;\n r6 = 0;\n r5.setVisibility(r6);\n if (r7 == 0) goto L_0x0133;\n L_0x0123:\n r5 = r7.field_appName;\n if (r5 == 0) goto L_0x0133;\n L_0x0127:\n r5 = r7.field_appName;\n r5 = r5.trim();\n r5 = r5.length();\n if (r5 > 0) goto L_0x02e5;\n L_0x0133:\n r0 = r20;\n r5 = r0.appName;\n L_0x0137:\n r6 = 1;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r9 = 12;\n com.tencent.mm.bd.a.fromDPToPix(r8, r9);\n r0 = r20;\n r8 = r0.type;\n r9 = 20;\n if (r8 == r9) goto L_0x0158;\n L_0x014b:\n r8 = \"wxaf060266bfa9a35c\";\n r0 = r20;\n r9 = r0.appId;\n r8 = r8.equals(r9);\n if (r8 == 0) goto L_0x0160;\n L_0x0158:\n r6 = com.tencent.mm.pluginsdk.j.a.bmq();\n r6 = r6.aNM();\n L_0x0160:\n if (r6 == 0) goto L_0x02f8;\n L_0x0162:\n r0 = r20;\n r6 = r0.appId;\n if (r6 == 0) goto L_0x02f8;\n L_0x0168:\n r0 = r20;\n r6 = r0.appId;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x02f8;\n L_0x0172:\n r6 = com.tencent.mm.pluginsdk.model.app.g.bo(r5);\n if (r6 == 0) goto L_0x02f8;\n L_0x0178:\n r0 = r19;\n r6 = r0.fSs;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r5 = com.tencent.mm.pluginsdk.model.app.g.a(r8, r7, r5);\n r6.setText(r5);\n r0 = r19;\n r5 = r0.okB;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r8 = 0;\n r9 = 0;\n r10 = 0;\n r5.setCompoundDrawables(r6, r8, r9, r10);\n r0 = r19;\n r5 = r0.okz;\n r6 = 0;\n r5.setVisibility(r6);\n if (r7 == 0) goto L_0x02e9;\n L_0x01ae:\n r5 = r7.bnk();\n if (r5 == 0) goto L_0x02e9;\n L_0x01b4:\n r0 = r19;\n r6 = r0.fSs;\n r9 = r7.field_packageName;\n r0 = r26;\n r10 = r0.field_msgSvrId;\n r5 = r25;\n r7 = r26;\n r8 = r20;\n com.tencent.mm.ui.chatting.ad.a(r5, r6, r7, r8, r9, r10);\n L_0x01c7:\n r0 = r19;\n r5 = r0.okz;\n r0 = r20;\n r6 = r0.appId;\n r0 = r25;\n com.tencent.mm.ui.chatting.ad.a(r0, r5, r6);\n L_0x01d4:\n r5 = 0;\n r0 = r19;\n r6 = r0.okd;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r22;\n r6 = r0.lVu;\n if (r6 == 0) goto L_0x0382;\n L_0x01e3:\n r6 = 0;\n r0 = r20;\n r7 = r0.type;\n r8 = 33;\n if (r7 == r8) goto L_0x0203;\n L_0x01ec:\n r6 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r7 = r0.field_imgPath;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r8 = com.tencent.mm.bd.a.getDensity(r8);\n r9 = 0;\n r6 = r6.a(r7, r8, r9);\n L_0x0203:\n if (r6 == 0) goto L_0x037f;\n L_0x0205:\n r7 = r6.isRecycled();\n if (r7 != 0) goto L_0x037f;\n L_0x020b:\n r0 = r19;\n r7 = r0.okd;\n r7.setImageBitmap(r6);\n L_0x0212:\n r0 = r20;\n r7 = r0.type;\n r8 = 3;\n if (r7 != r8) goto L_0x022f;\n L_0x0219:\n r0 = r19;\n r7 = r0.okQ;\n r7 = r7.getViewTreeObserver();\n r8 = new com.tencent.mm.ui.chatting.aw$1;\n r0 = r22;\n r1 = r19;\n r2 = r25;\n r8.<init>(r0, r1, r2, r6);\n r7.addOnPreDrawListener(r8);\n L_0x022f:\n r0 = r19;\n r6 = r0.okH;\n r7 = 0;\n r6.setOnClickListener(r7);\n r0 = r20;\n r6 = r0.type;\n switch(r6) {\n case 0: goto L_0x0ad2;\n case 1: goto L_0x023e;\n case 2: goto L_0x023e;\n case 3: goto L_0x0396;\n case 4: goto L_0x0559;\n case 5: goto L_0x05e8;\n case 6: goto L_0x04c4;\n case 7: goto L_0x0875;\n case 8: goto L_0x023e;\n case 9: goto L_0x023e;\n case 10: goto L_0x092a;\n case 11: goto L_0x023e;\n case 12: goto L_0x023e;\n case 13: goto L_0x09e5;\n case 14: goto L_0x023e;\n case 15: goto L_0x0b50;\n case 16: goto L_0x0df5;\n case 17: goto L_0x023e;\n case 18: goto L_0x023e;\n case 19: goto L_0x0f62;\n case 20: goto L_0x0a58;\n case 21: goto L_0x023e;\n case 22: goto L_0x023e;\n case 23: goto L_0x023e;\n case 24: goto L_0x0e88;\n case 25: goto L_0x0c06;\n case 26: goto L_0x0cba;\n case 27: goto L_0x0cba;\n case 28: goto L_0x023e;\n case 29: goto L_0x023e;\n case 30: goto L_0x023e;\n case 31: goto L_0x023e;\n case 32: goto L_0x023e;\n case 33: goto L_0x06da;\n case 34: goto L_0x1034;\n default: goto L_0x023e;\n };\n L_0x023e:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x11fb;\n L_0x0244:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x11fb;\n L_0x024e:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x0269:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0274:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x1206;\n L_0x028c:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x1206;\n L_0x0292:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n L_0x0299:\n r0 = r20;\n r5 = r0.cob;\n r0 = r19;\n r1 = r21;\n com.tencent.mm.ui.chatting.m.a(r0, r1, r5);\n L_0x02a4:\n r0 = r19;\n r5 = r0.okP;\n r5.setTag(r4);\n r0 = r19;\n r4 = r0.okP;\n r0 = r25;\n r5 = r0.onh;\n r5 = r5.oqh;\n r4.setOnClickListener(r5);\n r0 = r22;\n r4 = r0.lVu;\n if (r4 == 0) goto L_0x02cb;\n L_0x02be:\n r0 = r19;\n r4 = r0.okP;\n r0 = r25;\n r5 = r0.onh;\n r5 = r5.oqj;\n r4.setOnLongClickListener(r5);\n L_0x02cb:\n r0 = r25;\n r4 = r0.onh;\n r7 = r4.cyO;\n r0 = r25;\n r8 = r0.nQK;\n r0 = r25;\n r4 = r0.onh;\n r9 = r4.oqh;\n r4 = r24;\n r5 = r19;\n r6 = r26;\n com.tencent.mm.ui.chatting.ad.a(r4, r5, r6, r7, r8, r9);\n return;\n L_0x02e5:\n r5 = r7.field_appName;\n goto L_0x0137;\n L_0x02e9:\n r0 = r19;\n r5 = r0.fSs;\n r0 = r20;\n r6 = r0.appId;\n r0 = r25;\n com.tencent.mm.ui.chatting.ad.a(r0, r5, r6);\n goto L_0x01c7;\n L_0x02f8:\n r0 = r20;\n r5 = r0.type;\n r6 = 24;\n if (r5 != r6) goto L_0x032d;\n L_0x0300:\n r0 = r19;\n r5 = r0.fSs;\n r6 = com.tencent.mm.sdk.platformtools.aa.getContext();\n r7 = 2131232638; // 0x7f08077e float:1.808139E38 double:1.0529688297E-314;\n r6 = r6.getString(r7);\n r5.setText(r6);\n r0 = r19;\n r5 = r0.okB;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okz;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x01d4;\n L_0x032d:\n r0 = r20;\n r5 = r0.type;\n r6 = 19;\n if (r5 != r6) goto L_0x0362;\n L_0x0335:\n r0 = r19;\n r5 = r0.fSs;\n r6 = com.tencent.mm.sdk.platformtools.aa.getContext();\n r7 = 2131231816; // 0x7f080448 float:1.8079724E38 double:1.0529684236E-314;\n r6 = r6.getString(r7);\n r5.setText(r6);\n r0 = r19;\n r5 = r0.okB;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okz;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x01d4;\n L_0x0362:\n r0 = r19;\n r5 = r0.okB;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okz;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x01d4;\n L_0x037f:\n r5 = 1;\n goto L_0x0212;\n L_0x0382:\n r0 = r19;\n r6 = r0.okd;\n r7 = r25.getResources();\n r8 = 2130838790; // 0x7f020506 float:1.7282572E38 double:1.052774243E-314;\n r7 = android.graphics.BitmapFactory.decodeResource(r7, r8);\n r6.setImageBitmap(r7);\n goto L_0x022f;\n L_0x0396:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0486;\n L_0x039c:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0486;\n L_0x03a6:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = r7.getResources();\n r8 = 2131690127; // 0x7f0f028f float:1.9009289E38 double:1.0531948593E-314;\n r7 = r7.getColor(r8);\n r6.setTextColor(r7);\n L_0x03c6:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = r7.getResources();\n r8 = 2131690127; // 0x7f0f028f float:1.9009289E38 double:1.0531948593E-314;\n r7 = r7.getColor(r8);\n r6.setTextColor(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r23;\n r6 = r0.onE;\n r0 = r26;\n r8 = r0.field_msgId;\n r6 = (r6 > r8 ? 1 : (r6 == r8 ? 0 : -1));\n if (r6 != 0) goto L_0x0491;\n L_0x0413:\n r0 = r19;\n r6 = r0.okH;\n r7 = 2130838733; // 0x7f0204cd float:1.7282457E38 double:1.052774215E-314;\n r6.setImageResource(r7);\n L_0x041d:\n r6 = new com.tencent.mm.ui.chatting.cp$b;\n r6.<init>();\n r0 = r26;\n r8 = r0.field_msgId;\n r6.bao = r8;\n r0 = r26;\n r7 = r0.field_content;\n r6.blq = r7;\n r0 = r26;\n r7 = r0.field_imgPath;\n r6.bhr = r7;\n r0 = r19;\n r7 = r0.okH;\n r7.setTag(r6);\n r0 = r19;\n r6 = r0.okH;\n r0 = r25;\n r7 = r0.onh;\n r7 = r7.oqp;\n r6.setOnClickListener(r7);\n if (r5 == 0) goto L_0x046f;\n L_0x044a:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 == 0) goto L_0x0465;\n L_0x045f:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x049c;\n L_0x0465:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165232; // 0x7f070030 float:1.7944675E38 double:1.0529355267E-314;\n r5.setImageResource(r6);\n L_0x046f:\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x04a4;\n L_0x0475:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x047b:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0486:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x03c6;\n L_0x0491:\n r0 = r19;\n r6 = r0.okH;\n r7 = 2130838735; // 0x7f0204cf float:1.728246E38 double:1.052774216E-314;\n r6.setImageResource(r7);\n goto L_0x041d;\n L_0x049c:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x046f;\n L_0x04a4:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x04aa:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x04b9:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x04c4:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x054f;\n L_0x04ca:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x054f;\n L_0x04d4:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r7 = 2;\n r6.setMaxLines(r7);\n L_0x04e4:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r0 = r20;\n r7 = r0.cob;\n r8 = (long) r7;\n r7 = com.tencent.mm.sdk.platformtools.be.aw(r8);\n r6.setText(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n r6 = 0;\n r6 = java.lang.Boolean.valueOf(r6);\n r0 = r20;\n r7 = r0.aXa;\n r0 = r20;\n r8 = r0.title;\n r0 = r19;\n r1 = r26;\n com.tencent.mm.ui.chatting.m.a(r0, r6, r1, r7, r8);\n if (r5 == 0) goto L_0x0299;\n L_0x0534:\n r0 = r20;\n r5 = r0.coc;\n r5 = com.tencent.mm.sdk.platformtools.be.KY(r5);\n if (r5 != 0) goto L_0x1206;\n L_0x053e:\n r0 = r19;\n r5 = r0.okd;\n r0 = r20;\n r6 = r0.coc;\n r6 = com.tencent.mm.pluginsdk.model.p.Gt(r6);\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x054f:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x04e4;\n L_0x0559:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x05d6;\n L_0x055f:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x05d6;\n L_0x0569:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n L_0x0571:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 2130839370; // 0x7f02074a float:1.7283749E38 double:1.0527745295E-314;\n r6.setImageResource(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x05a6:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 == 0) goto L_0x05c1;\n L_0x05bb:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x05e0;\n L_0x05c1:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165244; // 0x7f07003c float:1.79447E38 double:1.0529355327E-314;\n r5.setImageResource(r6);\n L_0x05cb:\n r0 = r19;\n r5 = r0.okH;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x05d6:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0571;\n L_0x05e0:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x05cb;\n L_0x05e8:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x068c;\n L_0x05f7:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x068c;\n L_0x0601:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x061c:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 3;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x066a;\n L_0x0637:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 != 0) goto L_0x06a1;\n L_0x064c:\n r5 = new com.tencent.mm.pluginsdk.model.r;\n r0 = r20;\n r6 = r0.thumburl;\n r0 = r26;\n r7 = r0.field_type;\n r8 = \"@S\";\n r9 = 0;\n r5.<init>(r6, r7, r8, r9);\n r5 = com.tencent.mm.platformtools.j.a(r5);\n if (r5 == 0) goto L_0x0696;\n L_0x0663:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n L_0x066a:\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x06ba;\n L_0x0670:\n r0 = r25;\n r5 = r0.onh;\n r0 = r19;\n r1 = r26;\n a(r0, r5, r1);\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0681:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x068c:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x061c;\n L_0x0696:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x066a;\n L_0x06a1:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x06b2;\n L_0x06a7:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x066a;\n L_0x06b2:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x066a;\n L_0x06ba:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x06c0:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x06cf:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x06da:\n r6 = new com.tencent.mm.e.a.m;\n r6.<init>();\n r5 = r6.aWJ;\n r0 = r20;\n r7 = r0.cqp;\n r5.aWH = r7;\n r5 = com.tencent.mm.sdk.c.a.nhr;\n r5.z(r6);\n r5 = r6.aWK;\n r5 = r5.aWL;\n if (r5 == 0) goto L_0x0729;\n L_0x06f2:\n r5 = r6.aWK;\n r5 = r5.appName;\n L_0x06f6:\n r7 = r6.aWK;\n r7 = r7.aWL;\n if (r7 == 0) goto L_0x072e;\n L_0x06fc:\n r6 = r6.aWK;\n r6 = r6.aWM;\n L_0x0700:\n r0 = r20;\n r7 = r0.cqr;\n switch(r7) {\n case 1: goto L_0x0821;\n case 2: goto L_0x0733;\n default: goto L_0x0707;\n };\n L_0x0707:\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x0855;\n L_0x070d:\n r0 = r25;\n r5 = r0.onh;\n r0 = r19;\n r1 = r26;\n a(r0, r5, r1);\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x071e:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0729:\n r0 = r20;\n r5 = r0.bnS;\n goto L_0x06f6;\n L_0x072e:\n r0 = r20;\n r6 = r0.cqv;\n goto L_0x0700;\n L_0x0733:\n r0 = r19;\n r7 = r0.okQ;\n r8 = 8;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.olb;\n r8 = 0;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.okU;\n r8 = 8;\n r7.setVisibility(r8);\n r0 = r19;\n r8 = r0.okX;\n r0 = r20;\n r7 = r0.description;\n r7 = android.text.TextUtils.isEmpty(r7);\n if (r7 == 0) goto L_0x07e3;\n L_0x075b:\n r7 = 8;\n L_0x075d:\n r8.setVisibility(r7);\n r0 = r19;\n r7 = r0.old;\n r0 = r20;\n r8 = r0.title;\n r7.setText(r8);\n r0 = r19;\n r7 = r0.okX;\n r0 = r20;\n r8 = r0.description;\n r7.setText(r8);\n r0 = r19;\n r7 = r0.okZ;\n r7.setText(r5);\n r0 = r20;\n r5 = r0.cqt;\n switch(r5) {\n case 1: goto L_0x07e6;\n case 2: goto L_0x0803;\n default: goto L_0x0784;\n };\n L_0x0784:\n r0 = r19;\n r5 = r0.okY;\n r7 = 0;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.okZ;\n r7 = 0;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.ola;\n r7 = 2131230936; // 0x7f0800d8 float:1.8077939E38 double:1.052967989E-314;\n r5.setText(r7);\n L_0x079e:\n r5 = com.tencent.mm.ae.n.GL();\n r0 = r19;\n r7 = r0.okY;\n r0 = r22;\n r8 = r0.onQ;\n r5.a(r6, r7, r8);\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r7 = 1;\n r7 = r5.x(r6, r7);\n r0 = r19;\n r5 = r0.olc;\n r6 = 0;\n r5.setImageBitmap(r6);\n r5 = com.tencent.mm.t.a.b.AL();\n r0 = r19;\n r6 = r0.olc;\n r8 = new java.lang.StringBuilder;\n r9 = \"file://\";\n r8.<init>(r9);\n r7 = r8.append(r7);\n r7 = r7.toString();\n r8 = 0;\n r9 = 0;\n r10 = com.tencent.mm.ui.chatting.m.a.fVO;\n r5.a(r6, r7, r8, r9, r10);\n goto L_0x0707;\n L_0x07e3:\n r7 = 0;\n goto L_0x075d;\n L_0x07e6:\n r0 = r19;\n r5 = r0.okY;\n r7 = 8;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.okZ;\n r7 = 8;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.ola;\n r7 = 2131230999; // 0x7f080117 float:1.8078067E38 double:1.05296802E-314;\n r5.setText(r7);\n goto L_0x079e;\n L_0x0803:\n r0 = r19;\n r5 = r0.okY;\n r7 = 8;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.okZ;\n r7 = 8;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.ola;\n r7 = 2131230998; // 0x7f080116 float:1.8078065E38 double:1.0529680195E-314;\n r5.setText(r7);\n goto L_0x079e;\n L_0x0821:\n r0 = r19;\n r7 = r0.okQ;\n r8 = 8;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.olb;\n r8 = 8;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.okU;\n r8 = 0;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.okW;\n r7.setText(r5);\n r5 = com.tencent.mm.t.a.b.AL();\n r0 = r19;\n r7 = r0.okV;\n r8 = com.tencent.mm.t.a.a.AK();\n r9 = com.tencent.mm.t.a.c.cxH;\n r5.a(r7, r6, r8, r9);\n goto L_0x0707;\n L_0x0855:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x085b:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x086a:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0875:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x08f8;\n L_0x0884:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x08f8;\n L_0x088e:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x08a1:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 3;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x08e1;\n L_0x08bc:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 == 0) goto L_0x08d7;\n L_0x08d1:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x0902;\n L_0x08d7:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n L_0x08e1:\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x090a;\n L_0x08e7:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x08ed:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x08f8:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x08a1;\n L_0x0902:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x08e1;\n L_0x090a:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0910:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x091f:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x092a:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.cox;\n r7 = 1;\n if (r6 != r7) goto L_0x09a8;\n L_0x0939:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131234775; // 0x7f080fd7 float:1.8085725E38 double:1.0529698855E-314;\n r6.setText(r7);\n L_0x0943:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0966;\n L_0x0949:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0966;\n L_0x0953:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x0966:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0981:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x09d9;\n L_0x0999:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x09d9;\n L_0x099f:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x09a8:\n r0 = r20;\n r6 = r0.cox;\n r7 = 2;\n if (r6 != r7) goto L_0x09ba;\n L_0x09af:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131234777; // 0x7f080fd9 float:1.808573E38 double:1.0529698865E-314;\n r6.setText(r7);\n goto L_0x0943;\n L_0x09ba:\n r0 = r20;\n r6 = r0.cox;\n r7 = 3;\n if (r6 != r7) goto L_0x09cd;\n L_0x09c1:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131234776; // 0x7f080fd8 float:1.8085727E38 double:1.052969886E-314;\n r6.setText(r7);\n goto L_0x0943;\n L_0x09cd:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131234778; // 0x7f080fda float:1.8085731E38 double:1.052969887E-314;\n r6.setText(r7);\n goto L_0x0943;\n L_0x09d9:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x09e5:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131233764; // 0x7f080be4 float:1.8083675E38 double:1.052969386E-314;\n r6.setText(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0a25:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x0a4c;\n L_0x0a3d:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x0a4c;\n L_0x0a43:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x0a4c:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x0a58:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0a84;\n L_0x0a5e:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0a84;\n L_0x0a68:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n L_0x0a84:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0a9f:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x0ac6;\n L_0x0ab7:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x0ac6;\n L_0x0abd:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x0ac6:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x0ad2:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0b3d;\n L_0x0ad8:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0b3d;\n L_0x0ae2:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n L_0x0aea:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 2;\n r6.setMaxLines(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0b16:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 == 0) goto L_0x0b31;\n L_0x0b2b:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x0b47;\n L_0x0b31:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x0b3d:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0aea;\n L_0x0b47:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x0b50:\n r0 = r20;\n r4 = r0.title;\n if (r4 == 0) goto L_0x0bf3;\n L_0x0b56:\n r0 = r20;\n r4 = r0.title;\n r4 = r4.length();\n if (r4 <= 0) goto L_0x0bf3;\n L_0x0b60:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 0;\n r4.setVisibility(r6);\n L_0x0b68:\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 0;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okC;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okH;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okD;\n r6 = 4;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 2;\n r4.setMaxLines(r6);\n if (r5 == 0) goto L_0x0bbc;\n L_0x0b94:\n r4 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r5 = r0.field_imgPath;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = com.tencent.mm.bd.a.getDensity(r6);\n r4 = r4.a(r5, r6);\n if (r4 == 0) goto L_0x0bb2;\n L_0x0bac:\n r5 = r4.isRecycled();\n if (r5 == 0) goto L_0x0bfe;\n L_0x0bb2:\n r0 = r19;\n r4 = r0.okd;\n r5 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r4.setImageResource(r5);\n L_0x0bbc:\n r4 = new com.tencent.mm.ui.chatting.dl;\n r6 = 0;\n r8 = \"\";\n r9 = 8;\n r10 = 0;\n r11 = r25.bFU();\n r0 = r20;\n r12 = r0.bnR;\n r0 = r20;\n r13 = r0.bnS;\n r0 = r20;\n r14 = r0.title;\n r0 = r20;\n r15 = r0.coF;\n r0 = r20;\n r0 = r0.url;\n r16 = r0;\n r17 = 0;\n r18 = 0;\n r5 = r26;\n r7 = r24;\n r4.<init>(r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18);\n r0 = r19;\n r5 = r0.okP;\n r5.setTag(r4);\n goto L_0x0299;\n L_0x0bf3:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 8;\n r4.setVisibility(r6);\n goto L_0x0b68;\n L_0x0bfe:\n r0 = r19;\n r5 = r0.okd;\n r5.setImageBitmap(r4);\n goto L_0x0bbc;\n L_0x0c06:\n r0 = r20;\n r4 = r0.title;\n if (r4 == 0) goto L_0x0ca7;\n L_0x0c0c:\n r0 = r20;\n r4 = r0.title;\n r4 = r4.length();\n if (r4 <= 0) goto L_0x0ca7;\n L_0x0c16:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 0;\n r4.setVisibility(r6);\n L_0x0c1e:\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 0;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okC;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okH;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okD;\n r6 = 4;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 2;\n r4.setMaxLines(r6);\n if (r5 == 0) goto L_0x0c72;\n L_0x0c4a:\n r4 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r5 = r0.field_imgPath;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = com.tencent.mm.bd.a.getDensity(r6);\n r4 = r4.a(r5, r6);\n if (r4 == 0) goto L_0x0c68;\n L_0x0c62:\n r5 = r4.isRecycled();\n if (r5 == 0) goto L_0x0cb2;\n L_0x0c68:\n r0 = r19;\n r4 = r0.okd;\n r5 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r4.setImageResource(r5);\n L_0x0c72:\n r4 = new com.tencent.mm.ui.chatting.dl;\n r7 = \"\";\n r8 = r25.bFU();\n r0 = r20;\n r9 = r0.bnR;\n r0 = r20;\n r10 = r0.bnS;\n r0 = r20;\n r11 = r0.title;\n r0 = r20;\n r12 = r0.cqd;\n r0 = r20;\n r13 = r0.designerName;\n r0 = r20;\n r14 = r0.designerRediretctUrl;\n r0 = r20;\n r15 = r0.url;\n r5 = r26;\n r6 = r24;\n r4.<init>(r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15);\n r0 = r19;\n r5 = r0.okP;\n r5.setTag(r4);\n goto L_0x0299;\n L_0x0ca7:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 8;\n r4.setVisibility(r6);\n goto L_0x0c1e;\n L_0x0cb2:\n r0 = r19;\n r5 = r0.okd;\n r5.setImageBitmap(r4);\n goto L_0x0c72;\n L_0x0cba:\n r0 = r20;\n r4 = r0.title;\n if (r4 == 0) goto L_0x0d7b;\n L_0x0cc0:\n r0 = r20;\n r4 = r0.title;\n r4 = r4.length();\n if (r4 <= 0) goto L_0x0d7b;\n L_0x0cca:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 0;\n r4.setVisibility(r6);\n L_0x0cd2:\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 0;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okC;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okH;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okD;\n r6 = 4;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 2;\n r4.setMaxLines(r6);\n if (r5 == 0) goto L_0x0d17;\n L_0x0cfe:\n r0 = r26;\n r4 = r0.field_imgPath;\n r4 = com.tencent.mm.sdk.platformtools.be.kS(r4);\n if (r4 == 0) goto L_0x0d86;\n L_0x0d08:\n r4 = com.tencent.mm.ae.n.GL();\n r0 = r20;\n r5 = r0.thumburl;\n r0 = r19;\n r6 = r0.okd;\n r4.a(r5, r6);\n L_0x0d17:\n r4 = new com.tencent.mm.ui.chatting.dl;\n r4.<init>();\n r0 = r26;\n r4.bmk = r0;\n r5 = 0;\n r4.nQK = r5;\n r0 = r24;\n r4.position = r0;\n r5 = 0;\n r4.oxP = r5;\n r5 = r25.bFU();\n r4.title = r5;\n r0 = r20;\n r5 = r0.bnR;\n r4.bnR = r5;\n r0 = r20;\n r5 = r0.bnS;\n r4.bnS = r5;\n r0 = r20;\n r5 = r0.title;\n r4.oxQ = r5;\n r0 = r20;\n r5 = r0.type;\n r6 = 26;\n if (r5 != r6) goto L_0x0db9;\n L_0x0d4a:\n r5 = 12;\n r4.eKg = r5;\n r0 = r20;\n r5 = r0.tid;\n r4.tid = r5;\n r0 = r20;\n r5 = r0.cqe;\n r4.cqe = r5;\n r0 = r20;\n r5 = r0.desc;\n r4.desc = r5;\n r0 = r20;\n r5 = r0.iconUrl;\n r4.iconUrl = r5;\n r0 = r20;\n r5 = r0.secondUrl;\n r4.secondUrl = r5;\n r0 = r20;\n r5 = r0.pageType;\n r4.pageType = r5;\n L_0x0d72:\n r0 = r19;\n r5 = r0.okP;\n r5.setTag(r4);\n goto L_0x0299;\n L_0x0d7b:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 8;\n r4.setVisibility(r6);\n goto L_0x0cd2;\n L_0x0d86:\n r4 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r5 = r0.field_imgPath;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = com.tencent.mm.bd.a.getDensity(r6);\n r4 = r4.a(r5, r6);\n if (r4 == 0) goto L_0x0da4;\n L_0x0d9e:\n r5 = r4.isRecycled();\n if (r5 == 0) goto L_0x0db0;\n L_0x0da4:\n r0 = r19;\n r4 = r0.okd;\n r5 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r4.setImageResource(r5);\n goto L_0x0d17;\n L_0x0db0:\n r0 = r19;\n r5 = r0.okd;\n r5.setImageBitmap(r4);\n goto L_0x0d17;\n L_0x0db9:\n r0 = r20;\n r5 = r0.type;\n r6 = 27;\n if (r5 != r6) goto L_0x0dea;\n L_0x0dc1:\n r5 = 13;\n r4.eKg = r5;\n r0 = r20;\n r5 = r0.tid;\n r4.tid = r5;\n r0 = r20;\n r5 = r0.cqe;\n r4.cqe = r5;\n r0 = r20;\n r5 = r0.desc;\n r4.desc = r5;\n r0 = r20;\n r5 = r0.iconUrl;\n r4.iconUrl = r5;\n r0 = r20;\n r5 = r0.secondUrl;\n r4.secondUrl = r5;\n r0 = r20;\n r5 = r0.pageType;\n r4.pageType = r5;\n goto L_0x0d72;\n L_0x0dea:\n r5 = \"MicroMsg.ChattingItemAppMsgTo\";\n r6 = \"unknow view type\";\n com.tencent.mm.sdk.platformtools.v.i(r5, r6);\n goto L_0x0d72;\n L_0x0df5:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r20;\n r7 = r0.description;\n r6.setText(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r0 = r20;\n r7 = r0.cpn;\n r6.setText(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0e72;\n L_0x0e19:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0e72;\n L_0x0e23:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x0e36:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0e51:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x0e7c;\n L_0x0e69:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x0e72:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0e36;\n L_0x0e7c:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x0e88:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0f1a;\n L_0x0e9f:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0f1a;\n L_0x0ea9:\n r0 = r19;\n r6 = r0.okC;\n r0 = r19;\n r7 = r0.okC;\n r7 = r7.getContext();\n r0 = r20;\n r8 = r0.title;\n r0 = r19;\n r9 = r0.okC;\n r9 = r9.getTextSize();\n r9 = (int) r9;\n r7 = com.tencent.mm.pluginsdk.ui.d.e.a(r7, r8, r9);\n r6.setText(r7);\n L_0x0ec9:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 3;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0eed;\n L_0x0ee4:\n r0 = r19;\n r6 = r0.okd;\n r7 = 8;\n r6.setVisibility(r7);\n L_0x0eed:\n r0 = r25;\n r1 = r19;\n r2 = r20;\n r3 = r26;\n com.tencent.mm.ui.chatting.m.a(r0, r1, r2, r3, r5);\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x0f42;\n L_0x0efe:\n r0 = r25;\n r5 = r0.onh;\n r0 = r19;\n r1 = r26;\n a(r0, r5, r1);\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0f0f:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0f1a:\n r0 = r19;\n r6 = r0.okC;\n r0 = r19;\n r7 = r0.okC;\n r7 = r7.getContext();\n r8 = com.tencent.mm.sdk.platformtools.aa.getContext();\n r9 = 2131232755; // 0x7f0807f3 float:1.8081628E38 double:1.0529688875E-314;\n r8 = r8.getString(r9);\n r0 = r19;\n r9 = r0.okC;\n r9 = r9.getTextSize();\n r9 = (int) r9;\n r7 = com.tencent.mm.pluginsdk.ui.d.e.a(r7, r8, r9);\n r6.setText(r7);\n goto L_0x0ec9;\n L_0x0f42:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0f48:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x0f57:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0f62:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x100a;\n L_0x0f71:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x100a;\n L_0x0f7b:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r19;\n r7 = r0.okC;\n r7 = r7.getContext();\n r0 = r20;\n r8 = r0.title;\n r0 = r19;\n r9 = r0.okC;\n r9 = r9.getTextSize();\n r9 = (int) r9;\n r7 = com.tencent.mm.pluginsdk.ui.d.e.a(r7, r8, r9);\n r6.setText(r7);\n L_0x0fab:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0fcf;\n L_0x0fc6:\n r0 = r19;\n r6 = r0.okd;\n r7 = 8;\n r6.setVisibility(r7);\n L_0x0fcf:\n r0 = r19;\n r1 = r20;\n com.tencent.mm.ui.chatting.m.a(r0, r1, r5);\n r0 = r19;\n r5 = r0.okd;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okO;\n r6 = 8;\n r5.setVisibility(r6);\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x1014;\n L_0x0fee:\n r0 = r25;\n r5 = r0.onh;\n r0 = r19;\n r1 = r26;\n a(r0, r5, r1);\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0fff:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x100a:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0fab;\n L_0x1014:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x101a:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x1029:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x1034:\n r0 = r20;\n r5 = r0.title;\n if (r5 == 0) goto L_0x119e;\n L_0x103a:\n r0 = r20;\n r5 = r0.title;\n r5 = r5.length();\n if (r5 <= 0) goto L_0x119e;\n L_0x1044:\n r0 = r19;\n r5 = r0.dtY;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r20;\n r5 = r0.cpw;\n r5 = com.tencent.mm.sdk.platformtools.be.kS(r5);\n if (r5 != 0) goto L_0x1184;\n L_0x1056:\n r0 = r20;\n r5 = r0.cpw;\n r5 = com.tencent.mm.sdk.platformtools.be.kS(r5);\n if (r5 != 0) goto L_0x116a;\n L_0x1060:\n r0 = r19;\n r5 = r0.dtY;\n r0 = r20;\n r6 = r0.cpw;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = r7.getResources();\n r8 = 2131689547; // 0x7f0f004b float:1.9008112E38 double:1.053194573E-314;\n r7 = r7.getColor(r8);\n r6 = com.tencent.mm.sdk.platformtools.be.am(r6, r7);\n r5.setTextColor(r6);\n L_0x1080:\n r0 = r19;\n r5 = r0.dtZ;\n r6 = 2;\n r5.setMaxLines(r6);\n r0 = r19;\n r5 = r0.dtZ;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r20;\n r5 = r0.cpx;\n r5 = com.tencent.mm.sdk.platformtools.be.kS(r5);\n if (r5 != 0) goto L_0x11a9;\n L_0x109a:\n r0 = r19;\n r5 = r0.dtZ;\n r0 = r20;\n r6 = r0.cpx;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = r7.getResources();\n r8 = 2131689769; // 0x7f0f0129 float:1.9008563E38 double:1.0531946825E-314;\n r7 = r7.getColor(r8);\n r6 = com.tencent.mm.sdk.platformtools.be.am(r6, r7);\n r5.setTextColor(r6);\n L_0x10ba:\n r0 = r19;\n r5 = r0.okC;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okD;\n r6 = 4;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okH;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okB;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r20;\n r5 = r0.cps;\n r5 = com.tencent.mm.sdk.platformtools.be.kS(r5);\n if (r5 != 0) goto L_0x11c3;\n L_0x10ee:\n r0 = r19;\n r5 = r0.fSs;\n r0 = r20;\n r6 = r0.cps;\n r5.setText(r6);\n L_0x10f9:\n r0 = r22;\n r5 = r0.lVu;\n if (r5 == 0) goto L_0x11e7;\n L_0x10ff:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r8 = 0;\n r5 = r5.a(r6, r7, r8);\n if (r5 == 0) goto L_0x1131;\n L_0x1118:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x1131;\n L_0x111e:\n r6 = 0;\n r7 = r5.getWidth();\n r7 = r7 / 2;\n r7 = (float) r7;\n r6 = com.tencent.mm.sdk.platformtools.d.a(r5, r6, r7);\n r0 = r19;\n r7 = r0.okd;\n r7.setImageBitmap(r6);\n L_0x1131:\n r0 = r20;\n r6 = r0.cpv;\n r6 = com.tencent.mm.sdk.platformtools.be.kS(r6);\n if (r6 != 0) goto L_0x11cf;\n L_0x113b:\n r5 = com.tencent.mm.ae.n.GL();\n r0 = r20;\n r6 = r0.cpv;\n r7 = new android.widget.ImageView;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r7.<init>(r8);\n r8 = new com.tencent.mm.ae.a.a.c$a;\n r8.<init>();\n r9 = 1;\n r8.cPs = r9;\n r8 = r8.GU();\n r9 = new com.tencent.mm.ui.chatting.aw$2;\n r0 = r22;\n r1 = r19;\n r2 = r25;\n r9.<init>(r0, r1, r2);\n r5.a(r6, r7, r8, r9);\n goto L_0x0299;\n L_0x116a:\n r0 = r19;\n r5 = r0.dtY;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r7 = 2131689547; // 0x7f0f004b float:1.9008112E38 double:1.053194573E-314;\n r6 = r6.getColor(r7);\n r5.setTextColor(r6);\n goto L_0x1080;\n L_0x1184:\n r0 = r19;\n r5 = r0.dtY;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r7 = 2131689547; // 0x7f0f004b float:1.9008112E38 double:1.053194573E-314;\n r6 = r6.getColor(r7);\n r5.setTextColor(r6);\n goto L_0x1080;\n L_0x119e:\n r0 = r19;\n r5 = r0.dtY;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x1080;\n L_0x11a9:\n r0 = r19;\n r5 = r0.dtZ;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r7 = 2131689769; // 0x7f0f0129 float:1.9008563E38 double:1.0531946825E-314;\n r6 = r6.getColor(r7);\n r5.setTextColor(r6);\n goto L_0x10ba;\n L_0x11c3:\n r0 = r19;\n r5 = r0.fSs;\n r6 = 2131231814; // 0x7f080446 float:1.807972E38 double:1.0529684226E-314;\n r5.setText(r6);\n goto L_0x10f9;\n L_0x11cf:\n r0 = r19;\n r6 = r0.okQ;\n r6 = r6.getViewTreeObserver();\n r7 = new com.tencent.mm.ui.chatting.aw$3;\n r0 = r22;\n r1 = r19;\n r2 = r25;\n r7.<init>(r0, r1, r2, r5);\n r6.addOnPreDrawListener(r7);\n goto L_0x0299;\n L_0x11e7:\n r0 = r19;\n r5 = r0.okd;\n r6 = r25.getResources();\n r7 = 2130838790; // 0x7f020506 float:1.7282572E38 double:1.052774243E-314;\n r6 = android.graphics.BitmapFactory.decodeResource(r6, r7);\n r5.setImageBitmap(r6);\n goto L_0x0299;\n L_0x11fb:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0269;\n L_0x1206:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2130837666; // 0x7f0200a2 float:1.7280293E38 double:1.0527736876E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x1212:\n r20 = r4;\n goto L_0x0028;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.ui.chatting.aw.a(com.tencent.mm.ui.chatting.ad$a, int, com.tencent.mm.ui.chatting.ChattingUI$a, com.tencent.mm.storage.at, java.lang.String):void\");\n }", "public void mo12311b(String str, String str2) {\n if (m14928a() >= C3205z0.INFO.mo12550d()) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"CleverTap:\");\n sb.append(str);\n sb.toString();\n }\n }", "private String eliminar_contenido_innecesario(String line) {\n \n \tint index_question = line.indexOf('?');\n\t\tint index_point = line.indexOf('.');\n\t\t\n\t\tline = ( index_question > 0 ) ? line.substring(0, index_question+1) : line;\n\t\tline = ( index_point > 0 ) ? line.substring(0, index_point+1) : line;\n\t\t\n \treturn line;\n }", "public final void mo56353a(String str) {\n C7573i.m23587b(str, \"msg\");\n this.f56252a.mo38740a(str);\n }", "static /* synthetic */ void m64422c(RegByEmailUI regByEmailUI) {\n AppMethodBeat.m2504i(125321);\n regByEmailUI.dtV = regByEmailUI.gFz.getText().toString().trim();\n regByEmailUI.guf = regByEmailUI.gFA.getText().toString();\n if (C5046bo.isNullOrNil(regByEmailUI.dtV)) {\n C30379h.m48467g(regByEmailUI, C25738R.string.dk7, C25738R.string.dk3);\n AppMethodBeat.m2505o(125321);\n } else if (!C5046bo.amW(regByEmailUI.dtV)) {\n C30379h.m48467g(regByEmailUI, C25738R.string.dk6, C25738R.string.dk3);\n AppMethodBeat.m2505o(125321);\n } else if (C5046bo.isNullOrNil(regByEmailUI.guf)) {\n C30379h.m48467g(regByEmailUI, C25738R.string.dk8, C25738R.string.dk3);\n AppMethodBeat.m2505o(125321);\n } else if (C5046bo.amY(regByEmailUI.guf)) {\n regByEmailUI.aqX();\n final C1207m c9881z = new C9881z(regByEmailUI.dtV, regByEmailUI.guf);\n C1720g.m3540Rg().mo14541a(c9881z, 0);\n regByEmailUI.getString(C25738R.string.f9238tz);\n regByEmailUI.ehJ = C30379h.m48458b((Context) regByEmailUI, regByEmailUI.getString(C25738R.string.f9260un), true, new OnCancelListener() {\n public final void onCancel(DialogInterface dialogInterface) {\n AppMethodBeat.m2504i(125303);\n C1720g.m3540Rg().mo14547c(c9881z);\n AppMethodBeat.m2505o(125303);\n }\n });\n AppMethodBeat.m2505o(125321);\n } else {\n C30379h.m48467g(regByEmailUI, C25738R.string.f0t, C25738R.string.dk3);\n AppMethodBeat.m2505o(125321);\n }\n }", "private final void m134909e(String str) {\n if (!TextUtils.isEmpty(str)) {\n String str2 = C6969H.m41409d(\"G738BDC12AA7FAF3BE7039107E4B48CC36186D40EBA22E4\") + str + '/';\n VideoXOnlineLog.f101073b.mo121420a(C6969H.m41409d(\"G6887D15ABC3FA624E900D05CFDF5CAD429D99501A2\"), str2);\n MQTTClient a = MQTTClientManager.m55413a(C6969H.m41409d(\"G4DA6F33B8A1C9F16C522B96DDCD1\"));\n if (a != null) {\n ProtoAdapter<EventMessage> gVar = EventMessage.f96677a;\n C32569u.m150513a((Object) gVar, C6969H.m41409d(\"G4C95D014AB1DAE3AF50F974DBCC4E7F659B7F028\"));\n f97551h = a.mo57249a(str2, new MQTTWirePbConverter(gVar));\n MQTTTopic<EventMessage> oVar = f97551h;\n if (oVar == null) {\n C32569u.m150511a();\n }\n oVar.mo57278a((MQTTTopicListener<EventMessage>) f97552i, true);\n MQTTTopic<EventMessage> oVar2 = f97551h;\n if (oVar2 == null) {\n C32569u.m150511a();\n }\n oVar2.mo57274a(MQTTQosLevel.LEVEL_1, true);\n }\n }\n }", "public void v_Verify_Guest6_Hidden(){\n\t}", "@AutoEscape\n\tpublic String getNguoiThamDu();", "protected String loginIdentifyString() {\r\n return \"hao\";\r\n }", "private void VerifyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VerifyButtonActionPerformed\n\n String email = textArea.getText();\n Pattern pattern = Pattern.compile(\"As seen on|\"\n + \"Buy|Meet singles|Extra income|Million dollars|Save big money|\"\n + \"Opportunity|Cash|No fees|Online degree|Work at home|Additional income|\"\n + \"Eliminate debt|Lower interest rate|Pre-approved|Consolidate your debt|\"\n + \"Avoid bankruptcy|Miracle|Satisfaction|Risk free|Free hosting|\"\n + \"You have been selected|Weekend getaway|You're a Winner!|Offer|\"\n + \"Unlimited|No obligation|Trial|Guarantee|No purchase necessary\");\n Matcher matcher = pattern.matcher(email);\n\n //Count all instances using matcher.find()\n int count = 0;\n while (matcher.find()) {\n count++;\n }\n\n //Message Dialog pop-up\n JOptionPane.showMessageDialog(null, \"The spam score for this massage is:\" + count, null, JOptionPane.INFORMATION_MESSAGE);\n\n //System.out.println(count);// For debug only\n }", "public String breakUp(String m){\n int arrSize = (int)(m.length()/35 + 0.5);\n\n String[] bySpace = m.split(\" \",0);\n String realMessage = \"\";\n int size = 0;\n for(int i = 0; i < bySpace.length;i++){\n size += bySpace[i].length();\n if(size > 35){\n size = 0;\n realMessage += \"\\n\";\n }\n realMessage += bySpace[i];\n }\n return realMessage;\n }" ]
[ "0.54873794", "0.54663295", "0.54036814", "0.53510123", "0.53064847", "0.52827746", "0.51897115", "0.51590115", "0.51569384", "0.50994813", "0.5087073", "0.50627995", "0.50490075", "0.5048477", "0.50372535", "0.4996795", "0.4996174", "0.49942854", "0.49836478", "0.49809152", "0.4979566", "0.49782348", "0.49736455", "0.49688616", "0.49589413", "0.49546713", "0.49545932", "0.49363527", "0.49262795", "0.49211985", "0.4919243", "0.49035132", "0.4901836", "0.48974442", "0.4886969", "0.4886429", "0.48840177", "0.4876549", "0.48755264", "0.48715118", "0.48709422", "0.48528892", "0.48474118", "0.48466182", "0.4842463", "0.48326254", "0.48282835", "0.48212007", "0.48199168", "0.48199168", "0.48199168", "0.48199168", "0.48199168", "0.48199168", "0.48199168", "0.48155695", "0.48123682", "0.48064172", "0.48050144", "0.47890598", "0.47884363", "0.47872558", "0.47851565", "0.478141", "0.4776483", "0.47760412", "0.47727013", "0.47674274", "0.4764493", "0.47639203", "0.47637007", "0.4759688", "0.4759074", "0.47586498", "0.47578725", "0.4755116", "0.47535902", "0.4747392", "0.47417936", "0.47405687", "0.47404554", "0.47371376", "0.47327274", "0.4727851", "0.47260258", "0.47259933", "0.47246823", "0.4719615", "0.47192806", "0.4718397", "0.47174174", "0.4715814", "0.47125635", "0.47111648", "0.47100317", "0.47064385", "0.47052795", "0.4702544", "0.47005278", "0.46937698", "0.46927384" ]
0.0
-1
Test_01 of add method, of class SkillsList.
@Test public void testAdd_01() { System.out.println("add"); Skill s = mock(Skill.class); SkillsList instance = new SkillsList(); instance.add(s); int result = instance.size(); assertTrue(result==1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "private void testAdd(){\n System.out.println(\"------ TESTING: add(int element) -----\");\n try{\n // add values to list, the sequence is 0,1,....,iSize-1\n for(int i = 0; i < iSize; i++) {\n // if the add method returns false the program did not work correctly\n if (!iTestList.add(i))\n throw new RuntimeException(\"FAILED -> failed to add value to list\");\n }\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n }", "@Test\n\tpublic void testAdd1() {\n\n\t\tint[] arr = { 1, 2, 3, 7, 8 }; // this list\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\n\t\tint notadd = 3;\n\n\t\tString expectedObj2 = \"1, 2, 3, 7, 8\";\n\t\tint expectedObj2Size = 5;\n\n\t\tlistObj2.add(notadd);\n\t\tassertEquals(expectedObj2Size, listObj2.getSize());\n\t\tassertEquals(expectedObj2, listObj2.toString());\n\n\t}", "@Test\r\n\tpublic void testAdd() {\r\n\t\tlist.add(new Munitions(23, 24, \"cuprum\"));\r\n\t\tAssert.assertEquals(16, list.size());\r\n\t\tAssert.assertTrue(list.get(15).equals(new Munitions(23, 24, \"cuprum\")));\r\n\t}", "@Test\n\tpublic void addPointsByListTest(){\n\t}", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "public void testAdd() {\r\n assertEquals(0, list.size());\r\n list.add(\"A\");\r\n assertEquals(1, list.size());\r\n list.add(\"B\");\r\n assertEquals(2, list.size());\r\n assertEquals(\"B\", list.get(1));\r\n\r\n }", "@Test\n public void testAddNewRate() {\n System.out.println(\"addNewRate\");\n int rate = 0;\n RateList instance = new RateList();\n Rate expResult = new Rate(0);\n Rate result = instance.addNewRate(rate);\n assertEquals(expResult, result);\n }", "private void add() {\n\n\t}", "public void add() {\n\t\t\n\t}", "public void add() {\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "public void add() {\n\n }", "@Test\n public void testAdd() {\n System.out.println(\"add\");\n al.add(1);\n Integer a = 1;\n assertEquals(a, al.get(0));\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void addToIncreaseCount() {\n testList.add(42);\n assertEquals(1, testList.count());\n }", "@Test\n public void testAddEligibleStudents() {\n System.out.println(\"addEligibleStudents\");\n int[] IDs = new int[2];\n IDs[0] = 98;\n IDs[1] = 99;\n\n instance.addEligibleStudents(IDs);\n\n assertTrue(\"Students not added to eligibility lists\", instance.isStudentEligible(98)\n && instance.isStudentEligible(99));\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n\tpublic void testAddItem() {\n\t\tassertEquals(\"testAddItem(LongTermTest): valid enter failure\", 0, ltsTest.addItem(item4, 10)); //can enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid enter failure\", -1, ltsTest.addItem(item4, 100)); // can't enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\t}", "@Test\r\n\tpublic void testAdd() {\n\t\tint num1=10;int num2=20;\r\n\t\t\r\n\t\t//Test here:\r\n\t\t//assertEquals(30, ClientMain.add(num1,num2));\r\n\t\t\r\n\t\t\r\n\t}", "public void add() {\n\t\tSystem.out.println(\"I am from Add method\");\n\t}", "public void add();", "@Test\n public void testGet_02() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"C\");\n assertTrue(result==null);\n }", "@Test\n public void add() throws Exception {\n CollisionList list = new CollisionList();\n assertEquals(null, list.add(\"key\", \"value\"));\n assertEquals(\"value\", list.add(\"key\", \"value2\"));\n }", "@Test\n public void validAdd1() {\n assertEquals(i3, isl.get(2));\n\n //checks the amount of ingredient 4\n assertEquals(2.39, ((Ingredient) isl.get(3)).amountNeed, 0);\n assertEquals(1.01, ((Ingredient) isl.get(3)).amountHave, 0);\n\n //add an ingredient that is already present in the list\n //the amount should be added to the current amount 2.39 + 0.45 = 2.84\n //ignores the fact that category and unit don't match\n assertFalse(isl.add(new Ingredient(\"vANiLle\", \"niks\", 0.45, 0.69, \"none\")));\n assertEquals(2.84, ((Ingredient) isl.get(3)).amountNeed, 0.00001);\n assertEquals(1.7, ((Ingredient) isl.get(3)).amountHave, 0.00001);\n assertEquals(\"kruiden\", ((Ingredient) isl.get(3)).category);\n assertEquals(Unit.GRAMS, ((Ingredient) isl.get(3)).unit);\n\n //add a new ingredient and check if it's added correctly\n assertTrue(isl.add(new Ingredient(\"cookies\", \"yum\", 3, 4, \"none\")));\n assertEquals(\"cookies\", isl.get(5).name);\n assertEquals(\"yum\", ((Ingredient) isl.get(5)).category);\n assertEquals(3, ((Ingredient) isl.get(5)).amountNeed, 0);\n assertEquals(4, ((Ingredient) isl.get(5)).amountHave, 0);\n assertEquals(Unit.NONE, ((Ingredient) isl.get(5)).unit);\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "public void testAdd() {\r\n Object[] objects = new String[OPERATIONS];\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n objects[i] = new String(\"stress\" + i);\r\n }\r\n\r\n //test add.\r\n long startTime = System.currentTimeMillis();\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n target.add(objects[i]);\r\n }\r\n\r\n long endTime = System.currentTimeMillis();\r\n System.out.println(\"Stress tests ------ \" + \" add(Object) in \" + OPERATIONS + \" times in \" +\r\n Integer.toString((int) (endTime - startTime)) + \" ms\");\r\n\r\n //verify contains.\r\n Collection collection = new ArrayList();\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n assertTrue(\"not contained.\", target.contains(objects[i]));\r\n collection.add(objects[i]);\r\n }\r\n\r\n assertTrue(\"The collection should be contained.\", target.containsAll(collection));\r\n }", "public void testAddTrials() {\n exp = new Experiment(\"10\");\n TrialCount trial1 = new TrialCount(\"109\", new GeoLocation(0.0, 0.0), new Profile());\n TrialCount trial2 = new TrialCount(\"110\", new GeoLocation(1.0, 1.0), new Profile());\n ArrayList<Trial> trials = new ArrayList<>();\n trials.add(trial1);\n trials.add(trial2);\n exp.addTrials(trials);\n\n assertEquals(\"addTrials does not work\", \"109\", exp.getTrial(\"109\").getId());\n assertEquals(\"AddTrials does not work\", \"110\", exp.getTrial(\"110\").getId());\n }", "@Test\n public void testAddAccount() {\n Assert.assertEquals(\"Initial size of reporter list is incorrect\", 1,\n theModel.getAccountList().size());\n try {\n theModel.addAccountInfo(new Account(1, \"mbills2@gmail.com\", \"mbills2\", Credential.MANAGER));\n theModel.addAccountInfo(new Account(2, \"madie\", \"madie\", Credential.USER));\n theModel.addAccountInfo(new Account(3, \"sbills3\", \"sbills3\", Credential.ADMIN));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(\"Should not have thrown exception here\");\n }\n Assert.assertEquals(\"Total account list size wrong after adding\", 4,\n theModel.getAccountList().size());\n }", "@Test(expected = NoSuchElementException.class)\n public void whenAddElementInsertThenElementCouldBeReturnedByGetMethod() {\n testedLLC.add(zero, 0);\n testedLLC.add(insert, 2);\n assertThat(testedLLC.get(0), is(zero));\n assertThat(testedLLC.get(1), is(first));\n assertThat(testedLLC.get(2), is(insert));\n assertThat(testedLLC.get(3), is(second));\n assertThat(testedLLC.get(4), is(third));\n testedLLC.get(5);\n }", "@Test\r\n\tpublic void testAddE() {\r\n\t\tassertEquals(0, ll.size());\r\n\t\tassertTrue(ll.isEmpty());\r\n\t\t\r\n\t\tassertTrue(ll.add(t5));\r\n\t\tassertEquals(1, ll.size());\r\n\t\tassertEquals(t5, ll.get(0));\r\n\t\t\r\n\t\tassertTrue(ll.add(t4));\r\n\t\tassertEquals(2, ll.size());\r\n\t\tassertEquals(t5, ll.get(0));\r\n\t\tassertEquals(t4, ll.get(1));\r\n\t\t\r\n\t\tassertTrue(ll.add(t3));\r\n\t\tassertEquals(3, ll.size());\r\n\t\tassertEquals(t5, ll.get(0));\r\n\t\tassertEquals(t4, ll.get(1));\r\n\t\tassertEquals(t3, ll.get(2));\r\n\t\t\r\n\t\tassertFalse(ll.add(null));\r\n\t\tassertFalse(ll.add(t3));\r\n\t\ttry {\r\n\t\t\tll.get(-1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tll.get(3);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\t}", "private void testAddAtIndex(){\n System.out.println(\"------ TESTING : add(int index, int element) ------\");\n try{\n // The insertion will add values to the front\n // the sequence should be iSize-1....,1,0\n for(int i = 0; i < iSize ; i++){\n if(!iTestList.add(0,i))\n throw new RuntimeException(\"FAILED -> add(index,element) not working correctly\");\n }\n // we should test the out of edge cases\n // if we try the following code and the return value is true or if the\n // program crashes then there is a problem\n if(iTestList.add(iSize+10, 999 )){\n throw new RuntimeException(\"FAILED -> index should not be > SIZE\");\n }\n if(iTestList.add(-2,999 )){\n throw new RuntimeException(\"FAILED -> index should not be < 0\");\n }\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\r\n\tvoid testAdd() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"9 10 7\", output);\r\n\t}", "@Test\r\n\tpublic void testAddByIndex() {\r\n\t\tlist.add(3, new Munitions(3, 4, \"ferrum\"));\r\n\t\tlist.add(5, new Munitions(34, 4, \"iron\"));\r\n\t\tAssert.assertEquals(17, list.size());\r\n\t\tAssert.assertTrue(list.get(3).equals(new Munitions(3, 4, \"ferrum\")));\r\n\t}", "@Test\n public void addExerciseTest() {\n\n actual.addExercise(\"new exercise\");\n\n Assert.assertEquals(Arrays.asList(EXPECTED_EXERCISES), actual.getExercises());\n }", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "@Test\n @DisplayName(\"Test for add employee to employee arrayList if correct\")\n public void testAddEmployeeTrue(){\n assertEquals(\"test\",department.getEmployees().get(0).getFirstName());\n assertEquals(\"test\",department.getEmployees().get(0).getLastName());\n assertEquals(\"test\",department.getEmployees().get(0).getPersonNumber());\n }", "public static void addList() {\n\t}", "@Test\n public void testAddEligibleStudent() {\n System.out.println(\"addEligibleStudent\");\n int ID = 1010101010;\n instance.addEligibleStudent(ID);\n\n assertTrue(\"Student eligibility unchanged\", instance.isStudentEligible(ID));\n\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Test\n void addItem() {\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Test\r\n\tpublic void addFeedbackTest() {\n\t\tassertNotNull(\"Check if there is valid Feedback arraylist to add to\", feedbackList);\r\n\t\t// After feedback is added Feedback list size should increase - normal\r\n\t\tfeedbackList.add(fb1);\r\n\t\tassertEquals(\"Check that Feedback arraylist size is 1\", 1, feedbackList.size());\r\n\t\t// Then check if correct Feedback was added\r\n\t\tassertSame(\"Check that Feedback is added\", fb1, feedbackList.get(0));\r\n\t}", "@Test\n public void testAdd_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.add(3);\n instance.add(9);\n int expResult = 3;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "@Test\n public void testGet_03() {\n System.out.println(\"get\");\n SkillsList instance = new SkillsList();\n Skill result = instance.get(\"Java\");\n assertTrue(result==null);\n }", "public void addCustomerTest() {\n\t\tassertNotNull(\"Test if there is valid Customer arraylist to add to\", CustomerList);\r\n\t\t\r\n\t\t//Given an empty list, after adding 1 item, the size of the list is 1 - normal\r\n\t\t//The item just added is as same as the first item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust1);\t\t\r\n\t\tassertEquals(\"Test that Customer arraylist size is 1\", 1, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust1, CustomerList.get(0));\r\n\t\t\r\n\t\t//Add another item. test The size of the list is 2? - normal\r\n\t\t//The item just added is as same as the second item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust2);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 2\", 2, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust2, CustomerList.get(1));\r\n\t\t\r\n\t\t//Add another item. test The size of the list is 3? - normal\r\n\t\t//The item just added is as same as the second item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust3);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 2\", 3, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust3, CustomerList.get(2));\r\n\t}", "void addList(ShoppingList _ShoppingList);", "@Test\n public void addTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n Integer expected = 1;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }", "@Test\r\n\tpublic void testAddObject() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\tassertEquals(0, testArray.size());\r\n\t\ttestArray.add(\"math\");\r\n\t\ttestArray.add(\"science\");\r\n\t\ttestArray.add(\"cs\");\r\n\t\tassertEquals(\"math\", testArray.get(0));\r\n\t\tassertEquals(\"science\", testArray.get(1));\r\n\t\tassertEquals(\"cs\", testArray.get(2));\r\n\t\ttry {\r\n\t\t\ttestArray.add(null);\r\n\t\t\tfail();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// skip\r\n\t\t}\r\n\t}", "public void add (Object t)\r\n {\r\n }", "@Test\n void addItem() {\n\n }", "@Test\n public void testGetCost_01() {\n System.out.println(\"getCost\");\n SkillsList instance = new SkillsList();\n int result = instance.getCost();\n assertTrue(result==0);\n }", "@Test\n\tpublic void testAdd_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tSimpleRole role = new SimpleRole();\n\n\t\tfixture.add(role);\n\n\t\t// add additional test code here\n\t}", "public void testAddAction() {\n AccuracyMockAddAction addAction = new AccuracyMockAddAction(\n modelElement, classToolUtil, manager, namespace);\n\n assertEquals(\"Should return ModelElement instance.\", modelElement,\n addAction.getModelElement());\n assertEquals(\"Should return ClassToolUtil instance.\", classToolUtil,\n addAction.getClassToolUtil());\n }", "@Test\r\n\tvoid testAddToDoItem() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\t// case 1: insert one ToDoItem\r\n\t\tlist.insert(toDoItem4);\r\n\t\tif (!list.getHead().getName().equals(\"Item 4\")) { // check the head is set correctly\r\n\t\t\tfail(\"Head set incorrectly for: \" + toDoItem4.getName() + \", should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\tif (list.getSize() != 1) { // check that size is incremented\r\n\t\t\tfail(\"List size is incorrect: should be 1\");\r\n\t\t}\r\n\r\n\t\t// case 2: second item is insert\r\n\t\tlist.insert(toDoItem1);\r\n\t\tif (list.getSize() != 2) { // check size incremented correctly\r\n\t\t\tfail(\"Size incorrect: should be 2\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 1\")) { // check the item is in the list\r\n\t\t\tfail(\"Item 1 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check the position of Item 1\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\t// check that the current pointer is in the right location\r\n\t\tif (!list.getCurrent().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Current set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\t// check that tail is set correctly\r\n\t\tif (!list.getTail().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Tail set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\r\n\t\t// case 3: third item is inserted\r\n\t\tlist.insert(toDoItem5);\r\n\t\tif (list.getSize() != 3) {\r\n\t\t\tfail(\"Size incorrect: should be 3\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 5\")) {\r\n\t\t\tfail(\"Item 5 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.getTail().getName().equals(\"Item 5\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 5\\\"\");\r\n\t\t}\r\n\r\n\t\t// insert several more and test to make sure they are ordered correctly\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem6);\r\n\t\tlist.insert(toDoItem3);\r\n\r\n\t\tToDoItem tempHead = list.getHead();\r\n\t\tString currList = \"|\";\r\n\t\tString correctList = \"|Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|\";\r\n\r\n\t\twhile (tempHead != null) {\r\n\t\t\tcurrList += tempHead.getName() + \"|\";\r\n\t\t\ttempHead = tempHead.getNext();\r\n\t\t}\r\n\r\n\t\tif (!currList.equals(correctList)) {\r\n\t\t\tfail(\"The list was ordered incorrectly after inserting all items\");\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testAddAllInt() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.add(new Munitions(10, 5, \"ferrum\"));\r\n\t\tsample.addAll(1, list);\r\n\t\tAssert.assertEquals(17, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(16).equals(new Munitions(10, 5, \"ferrum\")));\r\n\t}", "abstract void add();", "void add(String prompt, UIFormTest test);", "@Test\n\tpublic void testAdd() {\n\t\t\n\t\ttestStructure.add(\"Dog\", 5);\n\t\ttestStructure.add(\"dog\", 1);\n\t\ttestStructure.add(\"dog\", 1);\n\t\ttestStructure.add(\"zebra\", 3);\n\t\ttestStructure.add(\"horse\", 5);\n\n\t\t\n\t\tSystem.out.println(testStructure.showAll());\n\t\tassertEquals(\"[dog: 1, 5\\n, horse: 5\\n, zebra: 3\\n]\", testStructure.showAll().toString());\n\t\t\n\t}", "@Test\n\t public void testAdd() {\n\t\t TestSuite suite = new TestSuite(RecommendationModelTest.class, AnalysisModelTest.class);\n\t\t TestResult result = new TestResult();\n\t\t suite.run(result);\n\t\t System.out.println(\"Number of test cases = \" + result.runCount());\n\n\t }", "public void testAdd() {\n System.out.println(\"add\");\n String key = \"\";\n Object value = null;\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.add(key, value);\n assertEquals(expResult, result);\n }", "public void addList(String name){\n }", "@Test\n public void addClient_addsClientToList_true() {\n Stylist testStylist = new Stylist(\"Xena\");\n Client testClient = new Client(\"Jane\");\n testStylist.addStylist(testClient);\n assertTrue(testStylist.getClients().contains(testClient));\n }", "@Test\n public void testAddPurityReport() {\n Assert.assertEquals(\"incorrect initial purity report list size\", 0,\n theModel.getPurityReportList().size());\n try {\n WaterPurityReport a = new WaterPurityReport(Model.getCurrentAccount(), \"Safe\",\n 400, 300, \"Today\", new Location(40, 30));\n WaterPurityReport b = new WaterPurityReport(Model.getCurrentAccount(), \"Unsafe\",\n 250, 100, \"Today\", new Location(25, 50));\n theModel.addPurityReport(a);\n theModel.addPurityReport(b);\n Assert.assertEquals(\"incorrect size of purity report list after adding\", 2,\n theModel.getPurityReportList().size());\n } catch (Exception e) {\n Assert.fail(\"Adding purity reports shouldn't have failed here\");\n e.printStackTrace();\n }\n }", "@Test\n public void testAddPengguna() {\n System.out.println(\"addPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.addPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private Add() {}", "private Add() {}", "public void TestAccount1() {\n\n AccountCreator account = new AccountCreator();\n account.setFirstName(\"Bob\");\n account.setLastName(\"Smith\");\n account.setAddress(\"5 Rain Road\");\n account.setPIN();\n account.setTestBalance(300);\n accountList.add(account);\n\n }", "@Test\r\n public void testAdd() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n System.out.println(entry1.toString());\r\n // Initial state\r\n assertEquals(0, instance.size());\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test general case (size)\r\n assertEquals(1, instance.size());\r\n\r\n // Test general case (content)\r\n assertTrue(instance.contains(entry1));\r\n\r\n // Test combined quantity case\r\n // Test that matching ignores letter case\r\n// int initialQuantity = entry1.getQuantity();\r\n int diff = 1;\r\n// int newQuantity = initialQuantity + diff;\r\n Grocery duplicate = new Grocery(entry1.getName().toLowerCase(),\r\n entry1.getCategory());\r\n duplicate.setQuantity(diff);\r\n instance.add(duplicate);\r\n System.out.println(instance.toString());\r\n // and ? do we test anything here?\r\n }", "@Test\r\n\tpublic void testAddIntE() {\r\n\t\tassertEquals(0, ll.size());\r\n\t\tassertTrue(ll.isEmpty());\r\n\r\n\t\t// valid additions\r\n\t\tll.add(0, t3);\r\n\t\tassertEquals(1, ll.size());\r\n\t\tll.add(0, t2);\r\n\t\tassertEquals(2, ll.size());\r\n\t\tll.add(2, t4);\r\n\t\tassertEquals(3, ll.size());\r\n\t\tassertFalse(ll.isEmpty());\r\n\r\n\t\t// invalid additions\r\n\t\ttry {\r\n\t\t\tll.add(-1, t1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(4, t5);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(0, t3);\r\n\t\t\tfail();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(0, null);\r\n\t\t\tfail();\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\t}", "@Test(expected = NoSuchElementException.class)\n public void whenAddElementThenElementCouldBeReturnedByGetMethod() {\n assertThat(testedLLC.get(0), is(first));\n assertThat(testedLLC.get(1), is(second));\n assertThat(testedLLC.get(2), is(third));\n testedLLC.get(3);\n }", "@Test\n public void testAdd() {\n }", "@Test\n public void testAdd() {\n }", "@Test\n public void testLinkedList(){\n LinkedListMethods testList = new LinkedListMethods();\n testList.addItem(1);\n testList.addItem(2);\n testList.addItem(3);\n Assertions.assertEquals(3,testList.count());\n\n //Test of deletion of node\n testList.remove( 1);\n Assertions.assertEquals(2,testList.count());\n\n //Test of size lo the list\n Assertions.assertEquals(2,testList.count());\n\n //Test of add node at particular index.\n testList.addItem(1,2);\n testList.addItem(8,3);\n Assertions.assertEquals(3,testList.count());\n }", "public static boolean testAlphabetListAddBadInput1() {\r\n AlphabetList list1 = new AlphabetList(4);\r\n try {\r\n list1.add(null);\r\n } catch (NullPointerException e) {\r\n return true;\r\n }\r\n return false;\r\n }", "@Test\n void addResources() {\n Shelf shelf=new Shelf(3);\n\n shelf.addResources(Resource.SHIELD);\n shelf.addResources(Resource.SHIELD);\n\n assertEquals(2,shelf.getResources().size());\n\n }", "@Test\r\n\tpublic void testAddPurchaseOrder() {\r\n\t\tassertNotNull(\"Test if there is valid purchase order list to add to\", purchaseOrder);\r\n\r\n\t\tpurchaseOrder.add(o1);\r\n\t\tassertEquals(\"Test that if the purchase order list size is 1\", 1, purchaseOrder.size());\r\n\r\n\t\tpurchaseOrder.add(o2);\r\n\t\tassertEquals(\"Test that if purchase order size is 2\", 2, purchaseOrder.size());\r\n\t}", "public void testAddIndex() {\r\n list.add(\"B\");\r\n list.add(0, \"A\");\r\n assertEquals(\"A\", list.get(0));\r\n assertEquals(2, list.size());\r\n list.add(2, \"D\");\r\n assertEquals(\"D\", list.get(2));\r\n list.add(2, \"C\");\r\n assertEquals(\"C\", list.get(2));\r\n }", "@Test\n\tvoid testAdd() {\n\t\tint result = calculator.add(1,3);//act\n\t\tassertEquals(4,result);//assert//customized the failed message \"Test failed\"\n\t}", "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "public void testADDWithData() throws Exception {\n String data =\"Some words about Helen of Troy\";\n doAdd(data, null);\n }", "@Test\n public void testAddMaterialOneMaterial() {\n String material = \"material\";\n planned.addMaterials(material);\n\n assertEquals(planned.getMaterials().size(), 1);\n\n assertTrue(planned.getMaterials().contains(material));\n\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testAdd(){\n DogHouse testDogHouseAdd = new DogHouse();\n Integer expected = 1;\n\n Dog newDog = new Dog (\"Scully\", new Date(), 1);\n testDogHouseAdd.add(newDog);\n\n Integer actual = testDogHouseAdd.getNumberOfDogs();\n\n Assert.assertEquals(expected, actual);\n }", "@Test\n @DisplayName(\"Test for add patient to patient arrayList if correct\")\n public void testAddPatientTrue(){\n assertEquals(\"test\",department.getPatients().get(0).getFirstName());\n assertEquals(\"test\",department.getPatients().get(0).getLastName());\n assertEquals(\"test\",department.getPatients().get(0).getPersonNumber());\n }", "@Test\n\tpublic void testAdd_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(null);\n\t\tSimpleRole role = new SimpleRole();\n\n\t\tfixture.add(role);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void addStudentTest() {\n\t\tint numberOfStudents = student.getNumberOfStudents();\n\n\t\t// add a new student\n\t\tstudent.newStudent();\n\n\t\t// expected number of students after adding a new student\n\t\tint expected = numberOfStudents++;\n\n\t\t// actual number of students\n\t\tint actual = student.getNumberOfStudents();\t\t\n\t\tassertEquals(expected, actual);\n\t}", "public void testAddEntry(){\n }", "@Test\n\tpublic void testAdd(){\n\t\tArrayIntList list = buildList(5);\n\t\tassertEquals(5, list.intCol.size());\n\t}", "abstract int add(String cruise_add, String advice_add);", "@Test\r\n\tpublic void testAddStall() {\n\t\tassertNotNull(\"Test if there is stall arraylist to add to\", stall);\r\n\r\n\t\t// Given an empty list, after adding 1 stall, the size of the list is 1\r\n\t\tC206_CaseStudy.addStall(stall, s1);\r\n\t\tassertEquals(\"Test if that stall arraylist size is 1\", 1, stall.size());\r\n\r\n\t\t// The stall just added is as same as the first stall of the list\r\n\t\tassertSame(\"Test that stall is added same as first item of the list\", s1, stall.get(0));\r\n\r\n\t\t// Add another stall. Test if the size of the list is 2?\r\n\t\tC206_CaseStudy.addStall(stall, s2);\r\n\t\tassertEquals(\"Test that stall arraylist size is 2\", 2, stall.size());\r\n\t\t\r\n\t\t// Test that a repeated stall id cannot be added.\r\n\t\tC206_CaseStudy.addStall(stall, s2);\r\n\t\tassertEquals(\"Test that stall arraylist size is 2\", 2, stall.size());\r\n\t\t\r\n\t\t// The stall just added is as same as the second stall of the list\r\n\t\tassertSame(\"Test that stall is added same as second item of the list\", s2, stall.get(1));\r\n\r\n\t\t//Test if the stall list can add stall 10\r\n\t\tStall_Info s3 = new Stall_Info(3, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\t\tStall_Info s4 = new Stall_Info(4, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\t\tStall_Info s5 = new Stall_Info(5, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\t\tStall_Info s6 = new Stall_Info(6, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\t\tStall_Info s7 = new Stall_Info(7, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\t\tStall_Info s8 = new Stall_Info(8, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\t\tStall_Info s9 = new Stall_Info(9, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\t\tStall_Info s10 = new Stall_Info(10, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\t\tStall_Info s11 = new Stall_Info(10, \"Malay Food\", \"06-09-2021\", \"test\");\r\n\r\n\t\tC206_CaseStudy.addStall(stall, s3);\r\n\t\tC206_CaseStudy.addStall(stall, s4);\r\n\t\tC206_CaseStudy.addStall(stall, s5);\r\n\t\tC206_CaseStudy.addStall(stall, s6);\r\n\t\tC206_CaseStudy.addStall(stall, s7);\r\n\t\tC206_CaseStudy.addStall(stall, s8);\r\n\t\tC206_CaseStudy.addStall(stall, s9);\r\n\t\tC206_CaseStudy.addStall(stall, s10);\r\n\t\tC206_CaseStudy.addStall(stall, s11);\r\n\t\t\r\n\t\t//Test if the stall list can add stall 10\r\n\t\tassertEquals(\"Test that stall arraylist size is 10?\", 10, stall.size());\r\n\t\t\r\n\t\t//Test after stall 11 have been block, the stall list is still 10\r\n\t\tassertEquals(\"Test that stall arraylist size is 10?\", 10, stall.size());\r\n\t\t\r\n\t}", "@Test\n public void testAdd() {\n list1.add(0, 11.25);\n list1.add(1, 12.25);\n list1.add(2, 13.25);\n list1.add(3, 14.25);\n list1.add(4, 15.25);\n list1.add(5, 17.25);\n list1.add(6, 18.25);\n list1.add(7, 19.25);\n list1.add(3, 16.25);\n assertEquals(16.25 , list1.get(3), 0);\n assertEquals(14.25 , list1.get(4), 0);\n assertEquals(15.25, list1.get(5), 0);\n assertEquals(9, list1.size());\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testAddWordsToList() throws Exception {\n System.out.println(\"addWordsToList\");\n String permalink = testList.getPermalink();\n\n WordListApi.addWordsToList(token, permalink, testWordList);\n }" ]
[ "0.7691082", "0.71294206", "0.68071884", "0.6781141", "0.6726471", "0.6598194", "0.65799654", "0.6573495", "0.65201795", "0.6512612", "0.64710623", "0.643548", "0.6413457", "0.6407687", "0.63978136", "0.6328755", "0.6317455", "0.63101983", "0.62990594", "0.6278488", "0.6277972", "0.62188995", "0.6215096", "0.6212467", "0.6176039", "0.61663073", "0.6154571", "0.615034", "0.6148689", "0.614613", "0.6132694", "0.61231184", "0.61137617", "0.61046916", "0.6101514", "0.6079837", "0.60675454", "0.6048038", "0.6044329", "0.60323364", "0.60317326", "0.60200334", "0.60196537", "0.60121006", "0.60038126", "0.59980786", "0.59980786", "0.59980786", "0.59856695", "0.5966594", "0.5948026", "0.59407437", "0.5930805", "0.59303826", "0.5917243", "0.59118354", "0.5903828", "0.5892379", "0.5890931", "0.58853316", "0.5871116", "0.5866941", "0.5843583", "0.5840004", "0.58364564", "0.5834993", "0.5830775", "0.58257836", "0.5817166", "0.5816671", "0.58156985", "0.58103585", "0.58103585", "0.58078074", "0.58015054", "0.5796925", "0.5794893", "0.5788949", "0.5788949", "0.57888985", "0.57794577", "0.5775635", "0.57729065", "0.57711023", "0.57674396", "0.57663494", "0.57612294", "0.5759398", "0.575712", "0.57546043", "0.5754091", "0.5748621", "0.5742936", "0.57308567", "0.5726088", "0.5722501", "0.5721459", "0.5720807", "0.57074213", "0.5699552" ]
0.7661284
1
Test_02 of add method, of class SkillsList.
@Test public void testAdd_02() { System.out.println("add"); Skill s = mock(Skill.class); when(s.getName()).thenReturn("Java"); SkillsList instance = new SkillsList(); instance.add(s); instance.add(s); int result = instance.size(); assertTrue(result==1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testAdd_01() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class); \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "private void testAdd(){\n System.out.println(\"------ TESTING: add(int element) -----\");\n try{\n // add values to list, the sequence is 0,1,....,iSize-1\n for(int i = 0; i < iSize; i++) {\n // if the add method returns false the program did not work correctly\n if (!iTestList.add(i))\n throw new RuntimeException(\"FAILED -> failed to add value to list\");\n }\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n }", "@Test\n\tpublic void testAdd1() {\n\n\t\tint[] arr = { 1, 2, 3, 7, 8 }; // this list\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\n\t\tint notadd = 3;\n\n\t\tString expectedObj2 = \"1, 2, 3, 7, 8\";\n\t\tint expectedObj2Size = 5;\n\n\t\tlistObj2.add(notadd);\n\t\tassertEquals(expectedObj2Size, listObj2.getSize());\n\t\tassertEquals(expectedObj2, listObj2.toString());\n\n\t}", "@Test\r\n\tpublic void testAdd() {\r\n\t\tlist.add(new Munitions(23, 24, \"cuprum\"));\r\n\t\tAssert.assertEquals(16, list.size());\r\n\t\tAssert.assertTrue(list.get(15).equals(new Munitions(23, 24, \"cuprum\")));\r\n\t}", "private void add() {\n\n\t}", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "public void add() {\n\t\t\n\t}", "public void add() {\n }", "public void add() {\n\n }", "@Test\n\tpublic void addPointsByListTest(){\n\t}", "@Test\n public void testAddNewRate() {\n System.out.println(\"addNewRate\");\n int rate = 0;\n RateList instance = new RateList();\n Rate expResult = new Rate(0);\n Rate result = instance.addNewRate(rate);\n assertEquals(expResult, result);\n }", "public void testAdd() {\r\n assertEquals(0, list.size());\r\n list.add(\"A\");\r\n assertEquals(1, list.size());\r\n list.add(\"B\");\r\n assertEquals(2, list.size());\r\n assertEquals(\"B\", list.get(1));\r\n\r\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "public void add();", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void addToIncreaseCount() {\n testList.add(42);\n assertEquals(1, testList.count());\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\n public void testAdd() {\n System.out.println(\"add\");\n al.add(1);\n Integer a = 1;\n assertEquals(a, al.get(0));\n }", "public void add() {\n\t\tSystem.out.println(\"I am from Add method\");\n\t}", "@Test\n\tpublic void testAddItem() {\n\t\tassertEquals(\"testAddItem(LongTermTest): valid enter failure\", 0, ltsTest.addItem(item4, 10)); //can enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid enter failure\", -1, ltsTest.addItem(item4, 100)); // can't enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\t}", "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testGet_02() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"C\");\n assertTrue(result==null);\n }", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "public static void addList() {\n\t}", "@Test\n public void testAddEligibleStudents() {\n System.out.println(\"addEligibleStudents\");\n int[] IDs = new int[2];\n IDs[0] = 98;\n IDs[1] = 99;\n\n instance.addEligibleStudents(IDs);\n\n assertTrue(\"Students not added to eligibility lists\", instance.isStudentEligible(98)\n && instance.isStudentEligible(99));\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Test\n public void validAdd1() {\n assertEquals(i3, isl.get(2));\n\n //checks the amount of ingredient 4\n assertEquals(2.39, ((Ingredient) isl.get(3)).amountNeed, 0);\n assertEquals(1.01, ((Ingredient) isl.get(3)).amountHave, 0);\n\n //add an ingredient that is already present in the list\n //the amount should be added to the current amount 2.39 + 0.45 = 2.84\n //ignores the fact that category and unit don't match\n assertFalse(isl.add(new Ingredient(\"vANiLle\", \"niks\", 0.45, 0.69, \"none\")));\n assertEquals(2.84, ((Ingredient) isl.get(3)).amountNeed, 0.00001);\n assertEquals(1.7, ((Ingredient) isl.get(3)).amountHave, 0.00001);\n assertEquals(\"kruiden\", ((Ingredient) isl.get(3)).category);\n assertEquals(Unit.GRAMS, ((Ingredient) isl.get(3)).unit);\n\n //add a new ingredient and check if it's added correctly\n assertTrue(isl.add(new Ingredient(\"cookies\", \"yum\", 3, 4, \"none\")));\n assertEquals(\"cookies\", isl.get(5).name);\n assertEquals(\"yum\", ((Ingredient) isl.get(5)).category);\n assertEquals(3, ((Ingredient) isl.get(5)).amountNeed, 0);\n assertEquals(4, ((Ingredient) isl.get(5)).amountHave, 0);\n assertEquals(Unit.NONE, ((Ingredient) isl.get(5)).unit);\n }", "void addList(ShoppingList _ShoppingList);", "private void testAddAtIndex(){\n System.out.println(\"------ TESTING : add(int index, int element) ------\");\n try{\n // The insertion will add values to the front\n // the sequence should be iSize-1....,1,0\n for(int i = 0; i < iSize ; i++){\n if(!iTestList.add(0,i))\n throw new RuntimeException(\"FAILED -> add(index,element) not working correctly\");\n }\n // we should test the out of edge cases\n // if we try the following code and the return value is true or if the\n // program crashes then there is a problem\n if(iTestList.add(iSize+10, 999 )){\n throw new RuntimeException(\"FAILED -> index should not be > SIZE\");\n }\n if(iTestList.add(-2,999 )){\n throw new RuntimeException(\"FAILED -> index should not be < 0\");\n }\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "@Test\n public void add() throws Exception {\n CollisionList list = new CollisionList();\n assertEquals(null, list.add(\"key\", \"value\"));\n assertEquals(\"value\", list.add(\"key\", \"value2\"));\n }", "@Test\n public void testAddAccount() {\n Assert.assertEquals(\"Initial size of reporter list is incorrect\", 1,\n theModel.getAccountList().size());\n try {\n theModel.addAccountInfo(new Account(1, \"mbills2@gmail.com\", \"mbills2\", Credential.MANAGER));\n theModel.addAccountInfo(new Account(2, \"madie\", \"madie\", Credential.USER));\n theModel.addAccountInfo(new Account(3, \"sbills3\", \"sbills3\", Credential.ADMIN));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(\"Should not have thrown exception here\");\n }\n Assert.assertEquals(\"Total account list size wrong after adding\", 4,\n theModel.getAccountList().size());\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test(expected = NoSuchElementException.class)\n public void whenAddElementInsertThenElementCouldBeReturnedByGetMethod() {\n testedLLC.add(zero, 0);\n testedLLC.add(insert, 2);\n assertThat(testedLLC.get(0), is(zero));\n assertThat(testedLLC.get(1), is(first));\n assertThat(testedLLC.get(2), is(insert));\n assertThat(testedLLC.get(3), is(second));\n assertThat(testedLLC.get(4), is(third));\n testedLLC.get(5);\n }", "@Test\r\n\tpublic void testAddByIndex() {\r\n\t\tlist.add(3, new Munitions(3, 4, \"ferrum\"));\r\n\t\tlist.add(5, new Munitions(34, 4, \"iron\"));\r\n\t\tAssert.assertEquals(17, list.size());\r\n\t\tAssert.assertTrue(list.get(3).equals(new Munitions(3, 4, \"ferrum\")));\r\n\t}", "public void addList(String name){\n }", "@Test\r\n\tpublic void testAddE() {\r\n\t\tassertEquals(0, ll.size());\r\n\t\tassertTrue(ll.isEmpty());\r\n\t\t\r\n\t\tassertTrue(ll.add(t5));\r\n\t\tassertEquals(1, ll.size());\r\n\t\tassertEquals(t5, ll.get(0));\r\n\t\t\r\n\t\tassertTrue(ll.add(t4));\r\n\t\tassertEquals(2, ll.size());\r\n\t\tassertEquals(t5, ll.get(0));\r\n\t\tassertEquals(t4, ll.get(1));\r\n\t\t\r\n\t\tassertTrue(ll.add(t3));\r\n\t\tassertEquals(3, ll.size());\r\n\t\tassertEquals(t5, ll.get(0));\r\n\t\tassertEquals(t4, ll.get(1));\r\n\t\tassertEquals(t3, ll.get(2));\r\n\t\t\r\n\t\tassertFalse(ll.add(null));\r\n\t\tassertFalse(ll.add(t3));\r\n\t\ttry {\r\n\t\t\tll.get(-1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tll.get(3);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\t}", "@Test\n public void testAdd_After_Add() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.add(3);\n instance.add(9);\n int expResult = 3;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "@Test\r\n\tpublic void testAdd() {\n\t\tint num1=10;int num2=20;\r\n\t\t\r\n\t\t//Test here:\r\n\t\t//assertEquals(30, ClientMain.add(num1,num2));\r\n\t\t\r\n\t\t\r\n\t}", "public void add (Object t)\r\n {\r\n }", "abstract void add();", "@Test\r\n\tvoid testAdd() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\ttest.add(9);\r\n\t\tString output = test.toString();\r\n\t\tassertEquals(\"9 10 7\", output);\r\n\t}", "public void testAdd() {\r\n Object[] objects = new String[OPERATIONS];\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n objects[i] = new String(\"stress\" + i);\r\n }\r\n\r\n //test add.\r\n long startTime = System.currentTimeMillis();\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n target.add(objects[i]);\r\n }\r\n\r\n long endTime = System.currentTimeMillis();\r\n System.out.println(\"Stress tests ------ \" + \" add(Object) in \" + OPERATIONS + \" times in \" +\r\n Integer.toString((int) (endTime - startTime)) + \" ms\");\r\n\r\n //verify contains.\r\n Collection collection = new ArrayList();\r\n\r\n for (int i = 0; i < OPERATIONS; i++) {\r\n assertTrue(\"not contained.\", target.contains(objects[i]));\r\n collection.add(objects[i]);\r\n }\r\n\r\n assertTrue(\"The collection should be contained.\", target.containsAll(collection));\r\n }", "@Test\n public void addExerciseTest() {\n\n actual.addExercise(\"new exercise\");\n\n Assert.assertEquals(Arrays.asList(EXPECTED_EXERCISES), actual.getExercises());\n }", "@Test\r\n\tpublic void addFeedbackTest() {\n\t\tassertNotNull(\"Check if there is valid Feedback arraylist to add to\", feedbackList);\r\n\t\t// After feedback is added Feedback list size should increase - normal\r\n\t\tfeedbackList.add(fb1);\r\n\t\tassertEquals(\"Check that Feedback arraylist size is 1\", 1, feedbackList.size());\r\n\t\t// Then check if correct Feedback was added\r\n\t\tassertSame(\"Check that Feedback is added\", fb1, feedbackList.get(0));\r\n\t}", "@Test\r\n\tvoid testAddToDoItem() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\t// case 1: insert one ToDoItem\r\n\t\tlist.insert(toDoItem4);\r\n\t\tif (!list.getHead().getName().equals(\"Item 4\")) { // check the head is set correctly\r\n\t\t\tfail(\"Head set incorrectly for: \" + toDoItem4.getName() + \", should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\tif (list.getSize() != 1) { // check that size is incremented\r\n\t\t\tfail(\"List size is incorrect: should be 1\");\r\n\t\t}\r\n\r\n\t\t// case 2: second item is insert\r\n\t\tlist.insert(toDoItem1);\r\n\t\tif (list.getSize() != 2) { // check size incremented correctly\r\n\t\t\tfail(\"Size incorrect: should be 2\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 1\")) { // check the item is in the list\r\n\t\t\tfail(\"Item 1 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check the position of Item 1\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\t// check that the current pointer is in the right location\r\n\t\tif (!list.getCurrent().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Current set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\t// check that tail is set correctly\r\n\t\tif (!list.getTail().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Tail set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\r\n\t\t// case 3: third item is inserted\r\n\t\tlist.insert(toDoItem5);\r\n\t\tif (list.getSize() != 3) {\r\n\t\t\tfail(\"Size incorrect: should be 3\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 5\")) {\r\n\t\t\tfail(\"Item 5 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.getTail().getName().equals(\"Item 5\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 5\\\"\");\r\n\t\t}\r\n\r\n\t\t// insert several more and test to make sure they are ordered correctly\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem6);\r\n\t\tlist.insert(toDoItem3);\r\n\r\n\t\tToDoItem tempHead = list.getHead();\r\n\t\tString currList = \"|\";\r\n\t\tString correctList = \"|Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|\";\r\n\r\n\t\twhile (tempHead != null) {\r\n\t\t\tcurrList += tempHead.getName() + \"|\";\r\n\t\t\ttempHead = tempHead.getNext();\r\n\t\t}\r\n\r\n\t\tif (!currList.equals(correctList)) {\r\n\t\t\tfail(\"The list was ordered incorrectly after inserting all items\");\r\n\t\t}\r\n\t}", "@Test\n void addItem() {\n }", "public void addSkill(Skill newskill) {\n skills.addElement(newskill);\n }", "@Test\n public void testGet_03() {\n System.out.println(\"get\");\n SkillsList instance = new SkillsList();\n Skill result = instance.get(\"Java\");\n assertTrue(result==null);\n }", "@Test\n public void testAddEligibleStudent() {\n System.out.println(\"addEligibleStudent\");\n int ID = 1010101010;\n instance.addEligibleStudent(ID);\n\n assertTrue(\"Student eligibility unchanged\", instance.isStudentEligible(ID));\n\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "public void testAddTrials() {\n exp = new Experiment(\"10\");\n TrialCount trial1 = new TrialCount(\"109\", new GeoLocation(0.0, 0.0), new Profile());\n TrialCount trial2 = new TrialCount(\"110\", new GeoLocation(1.0, 1.0), new Profile());\n ArrayList<Trial> trials = new ArrayList<>();\n trials.add(trial1);\n trials.add(trial2);\n exp.addTrials(trials);\n\n assertEquals(\"addTrials does not work\", \"109\", exp.getTrial(\"109\").getId());\n assertEquals(\"AddTrials does not work\", \"110\", exp.getTrial(\"110\").getId());\n }", "@Test\n @DisplayName(\"Test for add employee to employee arrayList if correct\")\n public void testAddEmployeeTrue(){\n assertEquals(\"test\",department.getEmployees().get(0).getFirstName());\n assertEquals(\"test\",department.getEmployees().get(0).getLastName());\n assertEquals(\"test\",department.getEmployees().get(0).getPersonNumber());\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\r\n\tpublic void testAddObject() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\tassertEquals(0, testArray.size());\r\n\t\ttestArray.add(\"math\");\r\n\t\ttestArray.add(\"science\");\r\n\t\ttestArray.add(\"cs\");\r\n\t\tassertEquals(\"math\", testArray.get(0));\r\n\t\tassertEquals(\"science\", testArray.get(1));\r\n\t\tassertEquals(\"cs\", testArray.get(2));\r\n\t\ttry {\r\n\t\t\ttestArray.add(null);\r\n\t\t\tfail();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// skip\r\n\t\t}\r\n\t}", "public void add( IAnswer possibleAnswer );", "@Test\n public void addClient_addsClientToList_true() {\n Stylist testStylist = new Stylist(\"Xena\");\n Client testClient = new Client(\"Jane\");\n testStylist.addStylist(testClient);\n assertTrue(testStylist.getClients().contains(testClient));\n }", "void add(String prompt, UIFormTest test);", "public void addCustomerTest() {\n\t\tassertNotNull(\"Test if there is valid Customer arraylist to add to\", CustomerList);\r\n\t\t\r\n\t\t//Given an empty list, after adding 1 item, the size of the list is 1 - normal\r\n\t\t//The item just added is as same as the first item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust1);\t\t\r\n\t\tassertEquals(\"Test that Customer arraylist size is 1\", 1, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust1, CustomerList.get(0));\r\n\t\t\r\n\t\t//Add another item. test The size of the list is 2? - normal\r\n\t\t//The item just added is as same as the second item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust2);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 2\", 2, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust2, CustomerList.get(1));\r\n\t\t\r\n\t\t//Add another item. test The size of the list is 3? - normal\r\n\t\t//The item just added is as same as the second item of the list\r\n\t\tCustomerMain.addCustomer(CustomerList, cust3);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 2\", 3, CustomerList.size());\r\n\t\tassertSame(\"Test that Customer is added\", cust3, CustomerList.get(2));\r\n\t}", "@Test\n\tpublic void testAdd_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tSimpleRole role = new SimpleRole();\n\n\t\tfixture.add(role);\n\n\t\t// add additional test code here\n\t}", "public void addQuiz(double score){\n quizzes.add(score);\n quizTotal += score;\n}", "@Test\r\n\tpublic void testAddAllInt() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.add(new Munitions(10, 5, \"ferrum\"));\r\n\t\tsample.addAll(1, list);\r\n\t\tAssert.assertEquals(17, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(16).equals(new Munitions(10, 5, \"ferrum\")));\r\n\t}", "@Test\n void addItem() {\n\n }", "private Add() {}", "private Add() {}", "private DefaultListModel<String> addItem(DefaultListModel<String> listModel) {\r\n\t\tString newItem = JOptionPane.showInputDialog(null, \"Name of new exercise:\");\r\n\t\tlistModel.addElement(newItem);\r\n\t\treturn listModel;\r\n\t}", "@Test\n void addResources() {\n Shelf shelf=new Shelf(3);\n\n shelf.addResources(Resource.SHIELD);\n shelf.addResources(Resource.SHIELD);\n\n assertEquals(2,shelf.getResources().size());\n\n }", "public static boolean testAlphabetListAddBadInput1() {\r\n AlphabetList list1 = new AlphabetList(4);\r\n try {\r\n list1.add(null);\r\n } catch (NullPointerException e) {\r\n return true;\r\n }\r\n return false;\r\n }", "@Test\r\n public void testAdd() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n System.out.println(entry1.toString());\r\n // Initial state\r\n assertEquals(0, instance.size());\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test general case (size)\r\n assertEquals(1, instance.size());\r\n\r\n // Test general case (content)\r\n assertTrue(instance.contains(entry1));\r\n\r\n // Test combined quantity case\r\n // Test that matching ignores letter case\r\n// int initialQuantity = entry1.getQuantity();\r\n int diff = 1;\r\n// int newQuantity = initialQuantity + diff;\r\n Grocery duplicate = new Grocery(entry1.getName().toLowerCase(),\r\n entry1.getCategory());\r\n duplicate.setQuantity(diff);\r\n instance.add(duplicate);\r\n System.out.println(instance.toString());\r\n // and ? do we test anything here?\r\n }", "@Test\n public void addTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n Integer expected = 1;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }", "public void testAddIndex() {\r\n list.add(\"B\");\r\n list.add(0, \"A\");\r\n assertEquals(\"A\", list.get(0));\r\n assertEquals(2, list.size());\r\n list.add(2, \"D\");\r\n assertEquals(\"D\", list.get(2));\r\n list.add(2, \"C\");\r\n assertEquals(\"C\", list.get(2));\r\n }", "@Test(expected = NoSuchElementException.class)\n public void whenAddElementThenElementCouldBeReturnedByGetMethod() {\n assertThat(testedLLC.get(0), is(first));\n assertThat(testedLLC.get(1), is(second));\n assertThat(testedLLC.get(2), is(third));\n testedLLC.get(3);\n }", "@Test\n public void testAddPurityReport() {\n Assert.assertEquals(\"incorrect initial purity report list size\", 0,\n theModel.getPurityReportList().size());\n try {\n WaterPurityReport a = new WaterPurityReport(Model.getCurrentAccount(), \"Safe\",\n 400, 300, \"Today\", new Location(40, 30));\n WaterPurityReport b = new WaterPurityReport(Model.getCurrentAccount(), \"Unsafe\",\n 250, 100, \"Today\", new Location(25, 50));\n theModel.addPurityReport(a);\n theModel.addPurityReport(b);\n Assert.assertEquals(\"incorrect size of purity report list after adding\", 2,\n theModel.getPurityReportList().size());\n } catch (Exception e) {\n Assert.fail(\"Adding purity reports shouldn't have failed here\");\n e.printStackTrace();\n }\n }", "@Test\n public void testGetCost_01() {\n System.out.println(\"getCost\");\n SkillsList instance = new SkillsList();\n int result = instance.getCost();\n assertTrue(result==0);\n }", "void add(Item item);", "abstract int add(String cruise_add, String advice_add);", "public void TestAccount1() {\n\n AccountCreator account = new AccountCreator();\n account.setFirstName(\"Bob\");\n account.setLastName(\"Smith\");\n account.setAddress(\"5 Rain Road\");\n account.setPIN();\n account.setTestBalance(300);\n accountList.add(account);\n\n }", "@Test\n public void testAddPengguna() {\n System.out.println(\"addPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.addPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testAddAction() {\n AccuracyMockAddAction addAction = new AccuracyMockAddAction(\n modelElement, classToolUtil, manager, namespace);\n\n assertEquals(\"Should return ModelElement instance.\", modelElement,\n addAction.getModelElement());\n assertEquals(\"Should return ClassToolUtil instance.\", classToolUtil,\n addAction.getClassToolUtil());\n }", "@Test\r\n\tpublic void testAddIntE() {\r\n\t\tassertEquals(0, ll.size());\r\n\t\tassertTrue(ll.isEmpty());\r\n\r\n\t\t// valid additions\r\n\t\tll.add(0, t3);\r\n\t\tassertEquals(1, ll.size());\r\n\t\tll.add(0, t2);\r\n\t\tassertEquals(2, ll.size());\r\n\t\tll.add(2, t4);\r\n\t\tassertEquals(3, ll.size());\r\n\t\tassertFalse(ll.isEmpty());\r\n\r\n\t\t// invalid additions\r\n\t\ttry {\r\n\t\t\tll.add(-1, t1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(4, t5);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(0, t3);\r\n\t\t\tfail();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.add(0, null);\r\n\t\t\tfail();\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\tassertEquals(3, ll.size());\r\n\t\t}\r\n\t}", "@Test\n public void testAddMaterialOneMaterial() {\n String material = \"material\";\n planned.addMaterials(material);\n\n assertEquals(planned.getMaterials().size(), 1);\n\n assertTrue(planned.getMaterials().contains(material));\n\n }", "public static void testAdd(LinkedList list) {\n\t\tNode n1 = new Node(\"1\");\n\t\tNode n2 = new Node(\"2\");\n\t\tNode n3 = new Node(\"3\");\n\t\tNode n4 = new Node(\"4\");\n\t\t\n\t\t// add to empty list\n\t\tlist.add(n2);\n\t\t\n\t\t// add to end of list\n\t\tlist.add(n4);\n\t\t\n\t\t// add in the middle\n\t\tlist.add(n3);\n\t\t\n\t\t// add at the head\n\t\tlist.add(n1);\n\t\t\n\t\tlist.printForward();\n\t\tSystem.out.println(\"Size: \" + list.getSize());\n\t}", "public void testAdd() {\n System.out.println(\"add\");\n String key = \"\";\n Object value = null;\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.add(key, value);\n assertEquals(expResult, result);\n }", "@Test\r\n\tpublic void testAddPurchaseOrder() {\r\n\t\tassertNotNull(\"Test if there is valid purchase order list to add to\", purchaseOrder);\r\n\r\n\t\tpurchaseOrder.add(o1);\r\n\t\tassertEquals(\"Test that if the purchase order list size is 1\", 1, purchaseOrder.size());\r\n\r\n\t\tpurchaseOrder.add(o2);\r\n\t\tassertEquals(\"Test that if purchase order size is 2\", 2, purchaseOrder.size());\r\n\t}", "@Test\r\n\tpublic final void testAddLevel() {\r\n\t\tlevels.add(lostLevel2);\r\n\t\tgameStatisticsLoss.addLevel(lostLevel2);\r\n\t\tassertTrue(gameStatisticsLoss.getLevels().equals(levels));\r\n\t}", "@Test\n public void testLinkedList(){\n LinkedListMethods testList = new LinkedListMethods();\n testList.addItem(1);\n testList.addItem(2);\n testList.addItem(3);\n Assertions.assertEquals(3,testList.count());\n\n //Test of deletion of node\n testList.remove( 1);\n Assertions.assertEquals(2,testList.count());\n\n //Test of size lo the list\n Assertions.assertEquals(2,testList.count());\n\n //Test of add node at particular index.\n testList.addItem(1,2);\n testList.addItem(8,3);\n Assertions.assertEquals(3,testList.count());\n }", "@Test\n public void testAddWordsToList() throws Exception {\n System.out.println(\"addWordsToList\");\n String permalink = testList.getPermalink();\n\n WordListApi.addWordsToList(token, permalink, testWordList);\n }", "public void add(Object o) {\n\t\tTrain train = (Train)o;\n\t\ttrainlist.add(train);\n\t\tSystem.out.println(\"Train \"+train.toString()+\" has been added.\");\n\t\tSystem.out.println(\"Index in list is \"+trainlist.indexOf(train));\n\t}", "@Override\r\n\tpublic void add(Score s) throws IllegalArgumentException {\r\n\t\tif (s == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tscoreList[numItems] = s;\r\n\t\tnumItems++;\r\n\t}", "public com.transerainc.aha.gen.agent.SkillDocument.Skill addNewSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n return target;\n }\n }", "@Test\n\tpublic void testAddList() {\n\t\tarrayList = new ArrayListImplementation<String>();\n\t\tarrayList.addItem(\"1\");\n\t\tarrayList.addItem(\"2\");\n\t\tArrayListImplementation<String> tempArrayList = new ArrayListImplementation<String>();\n\t\ttempArrayList.addItem(\"4\");\n\t\ttempArrayList.addItem(\"5\");\n\t\ttempArrayList.addItem(\"6\");\n\t\tint sizeBeforeListAdded = arrayList.getActualSize();\n\t\tarrayList.addList(tempArrayList);\n\t\tint sizeAfterListAdded = arrayList.getActualSize();\n\t\tassertNotEquals(sizeBeforeListAdded, sizeAfterListAdded);\n\t}", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public int addItem(Itemset i);", "public void addStudent(Student student) {\t\r\n\t\t//Adds student to list of students taking module\r\n\t\tStudentList.add(student);\r\n\t\t\r\n\t\t// adds module to students list of modules\r\n\t\tstudent.AddModuleList(ModuleName);\r\n}", "void addUses(Equipment newUses);" ]
[ "0.7571549", "0.7032429", "0.67149615", "0.6672429", "0.6627458", "0.66052884", "0.65997046", "0.65398884", "0.65054864", "0.6471284", "0.6429158", "0.6409688", "0.6392767", "0.63477266", "0.628126", "0.62703055", "0.62527245", "0.6249835", "0.6235531", "0.62075526", "0.61918616", "0.6181754", "0.61640555", "0.6140684", "0.61288047", "0.61016923", "0.61007994", "0.609474", "0.6091343", "0.60631454", "0.60631454", "0.60631454", "0.6055757", "0.60557324", "0.60490257", "0.60457426", "0.6015071", "0.60114557", "0.5992355", "0.5981533", "0.59574103", "0.5946164", "0.59444255", "0.5934338", "0.59069866", "0.5901413", "0.5895713", "0.5889179", "0.5865503", "0.5863058", "0.5851206", "0.5843217", "0.58373606", "0.58309907", "0.58285093", "0.582457", "0.58199525", "0.58106667", "0.5801741", "0.5788813", "0.57795686", "0.5772483", "0.57699513", "0.5763738", "0.5754629", "0.5730007", "0.57252944", "0.572524", "0.5724037", "0.5724037", "0.5723725", "0.5711903", "0.5710958", "0.57021487", "0.5690103", "0.56855047", "0.56794345", "0.56784534", "0.5676623", "0.5669813", "0.5667662", "0.56573623", "0.5650567", "0.56457645", "0.5643452", "0.5640543", "0.5633483", "0.5631332", "0.5629328", "0.56276643", "0.5626612", "0.5618718", "0.5615731", "0.5615634", "0.5615277", "0.56112045", "0.5602211", "0.5598374", "0.5597376", "0.5593339" ]
0.76313275
0
Test_01 of get method, of class SkillsList.
@Test public void testGet_01() { System.out.println("get"); Skill s = mock(Skill.class); when(s.getName()).thenReturn("Java"); when(s.getType()).thenReturn("Technical"); when(s.getCost()).thenReturn(2); when(s.getLevel()).thenReturn(4); when(s.getCostFormula()).thenReturn(Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s); Skill result = instance.get("Java"); assertTrue(result.getName().equals("Java")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGet_03() {\n System.out.println(\"get\");\n SkillsList instance = new SkillsList();\n Skill result = instance.get(\"Java\");\n assertTrue(result==null);\n }", "@Test\n public void testGet_02() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"C\");\n assertTrue(result==null);\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "@Test\n public void testGetCost_01() {\n System.out.println(\"getCost\");\n SkillsList instance = new SkillsList();\n int result = instance.getCost();\n assertTrue(result==0);\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "void testCanGetList();", "public Skills getChosenSkill();", "@Test\r\n\tpublic void testGet() {\r\n\t\tAssert.assertTrue(list.get(2).equals(new Munitions(2, 3, \"iron\")));\r\n\t}", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "String getSkills();", "@Test\n public void testRetrieve() {\n System.out.println(\"---retrieve---\");\n //Test1: Method returns -1 if the list is empty\n ADTList instance = ADTList.create();\n int expResult = -1;\n int result = instance.retrieve(3);\n assertEquals(expResult, result);\n System.out.println(\"Test1 OK\");\n \n //Test2: Method returns -1 if the specified position is not valid\n ADTList instance2 = createTestADTListIns(3);\n int expResult2 = -1;\n int result2 = instance2.retrieve(4);\n assertEquals(expResult2, result2);\n System.out.println(\"Test2 OK\");\n \n //Test3: Method returns the element at the specified position\n ADTList instance3 = createTestADTListIns(3);\n int expResult3 = 2;\n int result3 = instance3.retrieve(2);\n assertEquals(expResult3, result3);\n System.out.println(\"Test3 OK\");\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "public Skills chooseSkill();", "public ResponseEntity<List<Skill>> getAllSkills() {\n \tList<Skill> skillist=skillService.getAllSkills();\n\t\t\n//\t\tLOGGER.debug(\" Trying to Fetch list of Skills\");\n\t\t\n\t\tif(skillist==null) {\n\t\t\t\n//\t\t\tLOGGER.error(\" No Skill Found\");\n\t\t\tthrow new ResourceNotFoundException(\"No Skill Details found\");\n\t\t}\n//\t\tLOGGER.info(\"Successfully Retrieved\");\n\t\treturn new ResponseEntity<>(skillist,HttpStatus.OK);\n }", "@Test\r\n public void test_getTermsOfUse_2() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res = instance.getTermsOfUse(1, 2, new int[] {2, 3});\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 1, res.size());\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 1, res.get(1).size());\r\n }", "@Test\r\n public void test_getTermsOfUse_1() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res = instance.getTermsOfUse(1, 1, null);\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 3, res.get(0).size());\r\n }", "private void testGet() {\n System.out.println(\"------ TESTING: get(int index) ------\");\n System.out.println(\"Expected: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 \");\n System.out.print(\"Returned: \");\n try{\n for(int i = 0; i < iSize; i++) {\n if (iTestList.get(i) != i)\n throw new RuntimeException(\"FAILED -> get value is not working correctly\");\n else\n System.out.print(iTestList.get(i) + \" \");\n }\n // test to see if we can get values out of bounds\n iTestList.get(-9);\n iTestList.get(iSize+10);\n }catch (RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }", "@Test\n public void testGetListItems() {\n System.out.println(\"getListItems\");\n DataModel instance = new DataModel();\n List expResult = null;\n List result = instance.getListItems();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tvoid testGet() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tlist.insert(toDoItem1);\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem3);\r\n\t\tlist.insert(toDoItem4);\r\n\r\n\t\tif (!list.get(\"Item 1\").getName().equals(\"Item 1\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 2\").getName().equals(\"Item 2\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 2\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 3\").getName().equals(\"Item 3\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 3\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 4\").getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 4\\\"\");\r\n\t\t}\r\n\t}", "public void testListClaim(){\n\t}", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testGetRateList() {\n System.out.println(\"getRateList\");\n RateList instance = new RateList();\n List<Rate> expResult = new ArrayList<>();\n List<Rate> result = instance.getRateList();\n assertEquals(expResult, result);\n }", "@Test \n\tpublic void GetTrustTest(){\n\t\tlogger.info(\"--------------------start---GetTrustTest--------------------------------------------------------------------------------------------------\");\n\t\tList<Trust> list=trustManagementService.GetTrust();\n\t\tfor (Trust trust : list) {\n\t\t\tlogger.info(\"查找结果\" + trust.getTrustName()); \n\t\t}\n\t\t\n\n\t\tlogger.info(\"--------------------end---GetTrustTest--------------------------------------------------------------------------------------------------\");\n\t}", "public Skills getSkillPrediction();", "@Test \n public void GetTrustInfoFromWizardTest(){\n\tlogger.info(\"--------------------start--GetTrustInfoFromWizardTest---------------------------------------------------------------------------------------------------\");\n// \tList<District> list=districtService.GetCityListByProvinceCode(\"110000\");\n\tList<TrustInfo> list=trustManagementService.GetTrustInfoFromWizard(\"9\");\n\tfor (TrustInfo trustInfo : list) {\n\t\tlogger.info(\"查找结果getItemValue:\" + trustInfo.getItemValue()); \n\t\tlogger.info(\"查找结果getItemAliasValue:\" + trustInfo.getItemAliasValue()); \n\t}\n logger.info(\"--------------------end----GetTrustInfoFromWizardTest-------------------------------------------------------------------------------------------------\");\n }", "@Test\n public void get() throws Exception {\n CollisionList list = new CollisionList();\n list.add(\"key\", \"value\");\n assertEquals(\"value\", list.get(\"key\"));\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Test\n public void getterTest() {\n int shields2 = stack.getResource(ResourceType.SHIELDS);\n int servants2 = stack.getResource(ResourceType.SERVANTS);\n int coins2 = stack.getResource(ResourceType.COINS);\n int stones2 = stack.getResource(ResourceType.STONES);\n\n assertEquals(1, shields2);\n assertEquals(2, servants2);\n assertEquals(3, coins2);\n assertEquals(4, stones2);\n }", "@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}", "@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Test public void shouldReturnTheToolIntTheListWhenSearchedByItsName() {\n\t\tgiven.imInTheMainPage();\n\t\twhen.searchByAToolName(TOOLS.ADPWEB.toolName());\n\t\tthen.mySearchWillReturnTheTools(TOOLS.ADPWEB);\n\t}", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n public void test_get_2() throws Exception {\n User user1 = createUser(1, true);\n\n User res = instance.get(user1.getId());\n\n assertNull(\"'get' should be correct.\", res);\n }", "@Test\n public void getListTest() throws SQLException, IDAO.DALException {\n User[] userList = userDAO.getList();\n assertEquals(\"Simon\", userList[0].getNavn());\n assertEquals(\"Silas\", userList[1].getNavn());\n assertEquals(\"Peter\", userList[2].getNavn());\n }", "@Test\n public void test_get_3() throws Exception {\n User user1 = createUser(1, false);\n\n User res = instance.get(user1.getId());\n\n assertEquals(\"'get' should be correct.\", user1.getUsername(), res.getUsername());\n assertEquals(\"'get' should be correct.\", user1.getDefaultTab(), res.getDefaultTab());\n assertEquals(\"'get' should be correct.\", user1.getNetworkId(), res.getNetworkId());\n assertEquals(\"'get' should be correct.\", user1.getRole().getId(), res.getRole().getId());\n assertEquals(\"'get' should be correct.\", user1.getFirstName(), res.getFirstName());\n assertEquals(\"'get' should be correct.\", user1.getLastName(), res.getLastName());\n assertEquals(\"'get' should be correct.\", user1.getEmail(), res.getEmail());\n assertEquals(\"'get' should be correct.\", user1.getTelephone(), res.getTelephone());\n assertEquals(\"'get' should be correct.\", user1.getStatus().getId(), res.getStatus().getId());\n }", "@Test\n public void getBills() throws Exception {\n int id = 1;\n\n Bills rm = bl.getBills(id);\n logger.info(rm);\n assertTrue(rm.getBill_name().length() > 0);\n\n }", "private static void getListTest() {\n\t\tList<CartVo> list=new CartDao().getList();\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "public ArrayList<Integer> getLuckyReward() {\n/* 40 */ return this.luckyReward;\n/* */ }", "@Test\n\tpublic void testGetLista() throws Exception {\n\t\tSystem.out.println(\"getLista\");\n\t\tso.execute(entity);\n\t\tList<IGeneralEntity> expResult = ((TakeTrucksOperation) so).getLista();\n\t\tList<IGeneralEntity> result = so.db.vratiSve(entity);\n\n\t\tassertEquals(expResult.size(), result.size());\n\t}", "@Test\n\tpublic void testGetSchoolByID(){\n\t\t\n\t List<School> list=schoolService.getSchoolbyId(2);\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tSchool s=(School) list.get(i);\n\t\t\t\tSystem.out.println(\"id: \"+s.getSchId());\n\t\t\t\tSystem.out.println(\"name: \"+s.getSchName());\n\t\t\t\tSystem.out.println(\"zip: \"+s.getSchZip());\n\t\t\t\tSystem.out.println(\"state: \"+s.getSchState());\n\t\t\t}\n\t}", "String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }", "@Test\r\n public void UserServiceTest_Retrieve()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getUserList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@Test\r\n public void UserServiceTest_RetrieveProducer()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getProducerList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@Test\n public void testGetSETTINGS() {\n System.out.println(\"getSETTINGS\");\n List<Setting> expResult = null;\n List<Setting> result = Setting.getSETTINGS();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testGet() {\r\n System.out.println(\"get\");\r\n int index = 1;\r\n Number n3 = nc1.get(index);\r\n assertEquals(n1.getNumber(), n3.getNumber());\r\n \r\n }", "@Test\n public void testGetCustomerList() {\n System.out.println(\"getCustomerList\");\n CustomerCtr instance = new CustomerCtr();\n// instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"85352010\");\n ArrayList<Customer> result = instance.getCustomerList();\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@Test\n void testGetReturnsRightValueAfterMultiplePuts() {\n MyList l = new MyList();\n for (int i = 0; i < 10; i++)\n l.put(\"key\" + i, \"value\" + i);\n\n assertEquals(\"value4\", l.get(\"key4\"));\n }", "private void testGet() {\n init();\n assertTrue(\"FListInteger.get(l1, 0)\", FListInteger.get(l1, 0) == 5);\n assertTrue(\"FListInteger.get(l2, 0)\", FListInteger.get(l2, 0) == 4);\n assertTrue(\"FListInteger.get(l3, 0)\", FListInteger.get(l3, 0) == 7);\n }", "@Test\n public void employeeRetrieveTest() {\n Mockito.when(this.rolService.getRoles()).thenReturn(Arrays.asList(new Rol()));\n Assert.assertNotNull(this.rolController.retrieve(new HttpHeaders()));\n }", "public void testGetTrial() {\n exp = new Experiment(\"10\");\n ArrayList<Trial> toSet = this.createTrials();\n exp.setTrials(toSet);\n assertEquals(\"getTrial incorrect\", \"id1\", exp.getTrial(\"1\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", \"id2\", exp.getTrial(\"5\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", \"id3\", exp.getTrial(\"11\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", null, exp.getTrial(\"-1\"));\n }", "@Test public void getListTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n \n Assert.assertArrayEquals(pArray, pList.getList());\n }", "@Test\n public void testGetClassListByTeacher() {\n System.out.println(\"getClassListByTeacher\");\n\n given()\n .contentType(\"application/json\")\n .when()\n .get(\"/generel/teacher/\" + t1.getName()).then()\n .statusCode(200)\n .assertThat()\n .body(\"courseName\", hasSize(1), \"courseName\", hasItems(\"Programming\"), \"semester\", hasItems(\"fall2018\"));\n\n }", "public List queryTest() {\n\t\tList list = null;\n\t\tthis.init();\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"getAllTest\");\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn list;\n\t\t\n\t}", "@Test\r\n\tpublic void testGetCheckList() {\n\t\tthis.checklist.setGuid(guid);\r\n\t\tthis.checklist.setName(name);\r\n\t\tthis.checklist.setDescription(description);\r\n\r\n\t\t// Save the checklist into the database.\r\n\t\tthis.checklistDAO.saveOrUpdateCheckList(this.checklist);\r\n\t\tString id = checklist.getId();\r\n\r\n\t\t// Test the method getCheckList with an existing checklist.\r\n\t\tCheckList checklistTmp = this.checklistDAO.getCheckList(id);\r\n\t\tassertNotNull(checklistTmp);\r\n\t\tassertEquals(\"GUID\", checklistTmp.getGuid(), guid);\r\n\t\tassertEquals(\"Name\", checklistTmp.getName(), name);\r\n\t\tassertEquals(\"Name\", checklistTmp.getDescription(), description);\r\n\r\n\t\t// Test the method getCheckList with an unexisting checklist.\r\n\t\tthis.checklistDAO.deleteCheckList(this.checklist);\r\n\t\tchecklistTmp = this.checklistDAO.getCheckList(id);\r\n\t\tassertNull(checklistTmp);\r\n\t}", "@Test\r\n public void testGet() {\r\n System.out.println(\"get\");\r\n Long codigoCliente = null;\r\n ClienteDAO instance = new ClienteDAO();\r\n ClienteEmpresa expResult = null;\r\n ClienteEmpresa result = instance.get(codigoCliente);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public static void main(String[] args) {\n ListTest lt = new ListTest();\n lt.testAdd();\n// lt.testGet();\n lt.testIterator();\n lt.testListContains();\n }", "Skill getSkill(String name);", "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n void getByIdSuccess() {\n UserRoles retrievedRole = (UserRoles)genericDAO.getByID(1);\n assertEquals(\"administrator\", retrievedRole.getRoleName());\n assertEquals(1, retrievedRole.getUserRoleId());\n assertEquals(\"admin\", retrievedRole.getUserName());\n }", "@Test\r\n public void testGetListCheque() {\r\n System.out.println(\"getListCheque\");\r\n chequeBeans instance = new chequeBeans();\r\n List<Cheque> expResult = null;\r\n List<Cheque> result = instance.getListCheque();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "public void testGet() {\n System.out.println(\"get\");\n String key = \"\";\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.get(key);\n assertEquals(expResult, result);\n }", "@Test\n public void getByIndex(){\n List <String> list = new ArrayList<>();\n list.add(\"hola\");\n list.add(\"tdd\");\n list.add(\"test\");\n\n assertEquals(\"tdd\",list.get(1));\n }", "@Test\r\n public void testA0Get_0args() {\r\n System.out.println(\"get all\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> expResult = new ArrayList<>();\r\n List<Usuario> result = instance.get();\r\n \r\n assertEquals(expResult, result);\r\n }", "public void doGet( )\n {\n \n }", "@Test\n void getByPropertyLikeSuccess() {\n List<UserRoles> usersRoles = genericDao.getPropertyByName(\"roleName\", \"user\");\n assertEquals(2, usersRoles.size());\n }", "@Override\n\tpublic List<Skill> getSkills() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//create a query\n\t\tQuery<Skill> theQuery = currentSession.createQuery(\"from Skill\", Skill.class);\n\t\t\n\t\t//execute query and get result list\n\t\tList<Skill> skills = theQuery.getResultList();\n\t\t\n\t\t//return the results\n\t\treturn skills;\n\t}", "@Test\n public void testGetSelectedBooks() {\n System.out.println(\"getSelectedBooks\");\n List expResult = new ArrayList();\n List result = testLibraryTable.getSelectedBooks();\n assertEquals(expResult, result);\n\n }", "@Test\n public void shouldGetLoveAll() {\n \n String expResult = \"Love - ALL \" ;\n String result = scoreService.get(nadale, federer) ;\n assertThat( expResult, is(result) ) ;\n }", "@Test\r\n public void testGetListBanque() {\r\n System.out.println(\"getListBanque\");\r\n chequeBeans instance = new chequeBeans();\r\n List<Banque> expResult = null;\r\n List<Banque> result = instance.getListBanque();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "public List<Loan> getLoan();", "private static void getListTest(int no) {\n\t\tList<CartVo> list=new CartDao().getList(no);\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testLister() {\n\t\tList<Professeur> list = new ArrayList<Professeur>();\n\t\tlist = professeurServiceEmp.lister();\n\t\tAssert.assertNotNull(list);\n\n\t}", "@GetMapping(\"/list\")\n\tpublic String listSkills(Model theModel) {\n\t\tList<Skill> theSkills = skillService.getSkills();\n\t\t\n\t\t//add the customers to the model\n\t\ttheModel.addAttribute(\"skills\", theSkills);\n\t\t\n\t\treturn \"list-skills\";\n\t}", "@Test\n\tpublic void get01() {\n\t\tResponse response = given().\n\t\t\t\t spec(spec02).\n\t\t\t\t when().\n\t\t\t\t get();\n\t\tresponse.prettyPrint();\n\t\t\n\t\tresponse.\n\t\t then().\n\t\t assertThat()\n\t\t .statusCode(200);\n\t\t\n\t\tJsonPath json = response.jsonPath();\n\t\tSoftAssert softAssert = new SoftAssert();\n\t\t\n\t//10 dan buyuk tum id leri console a yazdir.\n\t\tList<String> idList = json.getList(\"data.findAll{Integer.valueOf(it.id)>10}.id\");\n\t\tSystem.out.println(idList);\n\t\t\n\t//verify\n\t\tsoftAssert.assertEquals(idList.size(), 14, \"Eleman sayisi istenen gibi degil\");\n\t\t\n\t\n\t//30 dan kucuk tum yaslari console a yazdir\n\t\tList<String> ageList = json.getList(\"data.findAll{Integer.valueOf(it.employee_age)<30}.employee_age\");\n\t\tSystem.out.println(ageList);\n\t\t\n\t\t\n\t// Assert that maximum age is 23\n\t\tCollections.sort(ageList);\n\t\tsoftAssert.assertTrue(ageList.get(ageList.size()-1).equals(\"23\"), \"Yas istenen gibi degil\");\n\t\t\n\t\t\n\t//Print all employee names whose salaries are greater than 350000\n\t\tList<String> nameList = json.getList(\"data.findAll{Integer.valueOf(it.employee_salary)>350000}.employee_name\");\n\t\tSystem.out.println(nameList);\n\t\t\n\t\t\n\t//Assert that Charde Marshall is one of the employees whose salary is greater than 350000\t\n\t\tsoftAssert.assertTrue(nameList.contains(\"Charde Marshall\"));\n\t\t\n\t\t\n\t\t\n\t\tsoftAssert.assertAll();\n\t}", "@Test\n public void testGet() {\n testAdd();\n assertEquals(list1.get(0), 11.25, 0);\n }", "@Test\n public void testGetLrs() {\n System.out.println(\"getLrs\");\n Set<LineaDeReceta> aux = new HashSet();\n aux.add(new LineaDeReceta(new Alimento(\"nom1\", \"inst1\", \"tempC1\"), \"u1\", 3.0F));\n Receta instance = new Receta();\n instance.getLrs().add(new LineaDeReceta(new Alimento(\"nom1\", \"inst1\", \"tempC1\"), \"u1\", 3.0F));\n Set<LineaDeReceta> expResult = aux;\n Set<LineaDeReceta> result = instance.getLrs();\n assertEquals(expResult, result);\n }", "@Test\n public void testGetIndex() {\n System.out.println(\"getIndex\");\n Data instance = null;\n ArrayList<IndexKey> expResult = null;\n ArrayList<IndexKey> result = instance.getIndex();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@org.junit.Test\n public void get() throws Exception {\n assertEquals(null, hashTable.get(\"savon\"));\n assertEquals(\"camp\", hashTable.get(\"math\"));\n hashTable.put(\"math\", \"club\");\n assertEquals(\"club\", hashTable.get(\"math\"));\n }", "@Test\r\n public void test_getTermsOfUse_3() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res= instance.getTermsOfUse(Integer.MAX_VALUE, 1, null);\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 0, res.size());\r\n\r\n }", "@Test\n void get() {\n }", "@Test\n public void testAdd_01() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class); \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n\tpublic void testGetPolicy() throws Exception {\n\t\tfail(\"testGetPolicy not implemented\");\n\t}", "@Test\r\n\tpublic void testGet() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\ttestArray.add(\"Hola\");\r\n\t\ttestArray.add(\"Como Estas\");\r\n\t\tassertEquals(\"Hola\", testArray.get(0));\r\n\t\tassertEquals(\"Como Estas\", testArray.get(1));\r\n\t\ttry {\r\n\t\t\ttestArray.get(-1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(e.getMessage(), null);\r\n\t\t}\r\n\t}", "@Test\r\n public void testGetList() throws Exception {\r\n LOG.info(\"getList\");\r\n String listId = \"509ec17b19c2950a0600050d\";\r\n MovieDbList result = tmdb.getList(listId);\r\n assertFalse(\"List not found\", result.getItems().isEmpty());\r\n }", "public void MockForRetrieveCollectionList(){\n try {\n Mockito.when(clsProperties.getPropertyByPlatform(CLSInterfaceProperties.COMMON_TIMEOUT)).thenReturn(\"30000\");\n HashMap credentialsMap = new HashMap();\n credentialsMap.put(\"sAppID\", \"paperlessNAR\");\n credentialsMap.put(\"sPassword\", \"95fs6521fa\");\n \n PowerMockito.doReturn(credentialsMap).when(clsFacade, \"getCredentials\", CLSInterfaceProperties.APP_PAPERLESS_COLLECTION_RETRIEVAL);\n URL url = new URL(\"http://ixservice.ete.cathaypacific.com:80/ixClsNARPortal/PaperlessCollectionRetrievalServlet\");\n PowerMockito.doReturn(url).when(clsFacade, \"getURLForApp\", CLSInterfaceProperties.APP_PAPERLESS_COLLECTION_RETRIEVAL);\n \n } catch (CLSException e) {\n System.out.println(\"Retrieve Collection List take CLSException: \" + e);\n } catch (MalformedURLException e) {\n System.out.println(\"Retrieve Collection List take MalformedURLException: \" + e);\n } catch (Exception e) {\n System.out.println(\"Retrieve Collection List take Exception: \" + e);\n }\n }", "@Test\n\tpublic void retrieveTodosRelatedToSpring_usingWithList() {\n\t\tTodoService todoServiceMock = mock(TodoService.class);\n\t\tList<String> todos = Arrays.asList(\"Learn to dance\",\"Learn Spring\",\"Learn Spring boot\");\n\t\t\n\t\t/* Define the behaviour of mock object here */\n\t\twhen(todoServiceMock.retrieveTodos(\"Dummy\")).thenReturn(todos);\n\t\t\n\t\tTodoBusinessImpl todoBusinessImpl = new TodoBusinessImpl(todoServiceMock);\n\t\tList<String> filteredTodos = todoBusinessImpl.retrieveTodosRelatedToSpring(\"Dummy\");\n\t\tassertEquals(2, filteredTodos.size());\n\t}", "@Test\n public void test010() {\n List<String> storeServices = response.extract().path(\"data.services[9].storeservices\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"get storeservices of the store where service name = Sony Experience:\" + storeServices);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Override\n\tpublic List<TestDTO> getTest() {\n\t\t\n\t\t\n\t\treturn sessionTemplate.selectList(\"get_test\");\n\t}", "@Test\n public void testGetListOfPurchases() {\n System.out.println(\"getListOfPurchases\");\n //CashRegister instance = new CashRegister();\n List<Double> expResult;\n expResult = new LinkedList<>();\n assertEquals(expResult, instance.getListOfPurchases());\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n \n expResult.add(0.55);\n expResult.add(1.27);\n \n List<Double> result = instance.getListOfPurchases();\n assertEquals(expResult, result);\n }", "@Test\n public void testGet() {\n System.out.println(\"get\");\n PubMedInitialCollection result = PubMedInitialCollection.get();\n assertNotNull(result);\n }", "@Test\n public void testGetCourseList() {\n System.out.println(\"getCourseList\");\n\n given()\n .contentType(\"application/json\")\n .when()\n .get(\"/generel/courselist\").then()\n .statusCode(200)\n .assertThat()\n .body(\"description\", hasSize(2), \"courseName\", hasItems(\"Programming\", \"System Development\"));\n\n }", "List<Student> getStudent();", "@Test\n public void testGetShoppinglistsAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getShoppinglistsAction(-1, -1);\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseShoppingList\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "@Test\n public void testGetRentList() {\n System.out.println(\"getRentList\");\n ReserveInfo reserveInfo = new ReserveInfo();\n reserveInfo.setGuestName(\"test\");\n BookingController instance = new BookingController();\n boolean expResult=true;\n boolean result=false;\n if(instance.getRentList(reserveInfo).size()>0) result=true;\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }" ]
[ "0.8169378", "0.7375386", "0.70633894", "0.6795932", "0.6729304", "0.64537317", "0.6411266", "0.6214523", "0.6211125", "0.6188439", "0.6038391", "0.601314", "0.5912766", "0.58996004", "0.5858453", "0.58518696", "0.5847869", "0.5800638", "0.57932657", "0.5767446", "0.57650393", "0.576177", "0.57553977", "0.5744324", "0.5743265", "0.5739269", "0.57047975", "0.5627936", "0.56208336", "0.56103", "0.5605081", "0.5550319", "0.5501611", "0.5499232", "0.5485154", "0.54849917", "0.5481312", "0.5469822", "0.5453829", "0.5448092", "0.5444948", "0.54440796", "0.5429477", "0.542906", "0.5421725", "0.5421393", "0.54203993", "0.54158026", "0.54133034", "0.54002464", "0.53835475", "0.5378793", "0.53752315", "0.536924", "0.5364023", "0.5358534", "0.53421456", "0.5336747", "0.5323156", "0.5317277", "0.531568", "0.5314965", "0.5312841", "0.531187", "0.5310331", "0.5303882", "0.5300331", "0.529055", "0.5282792", "0.52814853", "0.5280491", "0.5267562", "0.52645165", "0.52495706", "0.52450943", "0.5242097", "0.5241358", "0.52318734", "0.5225472", "0.52193105", "0.52182066", "0.5214882", "0.521115", "0.5211047", "0.5206723", "0.5200489", "0.52001595", "0.51970506", "0.519417", "0.51934326", "0.5193359", "0.5191646", "0.5187562", "0.5181029", "0.5178296", "0.5164803", "0.51502883", "0.51501125", "0.51482666", "0.5136956" ]
0.7385354
1
Test_02 of get method, of class SkillsList.
@Test public void testGet_02() { System.out.println("get"); Skill s = mock(Skill.class); when(s.getName()).thenReturn("Java"); when(s.getType()).thenReturn("Technical"); when(s.getCost()).thenReturn(2); when(s.getLevel()).thenReturn(4); when(s.getCostFormula()).thenReturn(Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s); Skill result = instance.get("C"); assertTrue(result==null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGet_03() {\n System.out.println(\"get\");\n SkillsList instance = new SkillsList();\n Skill result = instance.get(\"Java\");\n assertTrue(result==null);\n }", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Test\n public void testGetCost_01() {\n System.out.println(\"getCost\");\n SkillsList instance = new SkillsList();\n int result = instance.getCost();\n assertTrue(result==0);\n }", "public Skills getChosenSkill();", "void testCanGetList();", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\r\n\tpublic void testGet() {\r\n\t\tAssert.assertTrue(list.get(2).equals(new Munitions(2, 3, \"iron\")));\r\n\t}", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "String getSkills();", "@Test\n public void testRetrieve() {\n System.out.println(\"---retrieve---\");\n //Test1: Method returns -1 if the list is empty\n ADTList instance = ADTList.create();\n int expResult = -1;\n int result = instance.retrieve(3);\n assertEquals(expResult, result);\n System.out.println(\"Test1 OK\");\n \n //Test2: Method returns -1 if the specified position is not valid\n ADTList instance2 = createTestADTListIns(3);\n int expResult2 = -1;\n int result2 = instance2.retrieve(4);\n assertEquals(expResult2, result2);\n System.out.println(\"Test2 OK\");\n \n //Test3: Method returns the element at the specified position\n ADTList instance3 = createTestADTListIns(3);\n int expResult3 = 2;\n int result3 = instance3.retrieve(2);\n assertEquals(expResult3, result3);\n System.out.println(\"Test3 OK\");\n }", "public ResponseEntity<List<Skill>> getAllSkills() {\n \tList<Skill> skillist=skillService.getAllSkills();\n\t\t\n//\t\tLOGGER.debug(\" Trying to Fetch list of Skills\");\n\t\t\n\t\tif(skillist==null) {\n\t\t\t\n//\t\t\tLOGGER.error(\" No Skill Found\");\n\t\t\tthrow new ResourceNotFoundException(\"No Skill Details found\");\n\t\t}\n//\t\tLOGGER.info(\"Successfully Retrieved\");\n\t\treturn new ResponseEntity<>(skillist,HttpStatus.OK);\n }", "public Skills chooseSkill();", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\r\n public void test_getTermsOfUse_2() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res = instance.getTermsOfUse(1, 2, new int[] {2, 3});\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 1, res.size());\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 1, res.get(1).size());\r\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "private void testGet() {\n System.out.println(\"------ TESTING: get(int index) ------\");\n System.out.println(\"Expected: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 \");\n System.out.print(\"Returned: \");\n try{\n for(int i = 0; i < iSize; i++) {\n if (iTestList.get(i) != i)\n throw new RuntimeException(\"FAILED -> get value is not working correctly\");\n else\n System.out.print(iTestList.get(i) + \" \");\n }\n // test to see if we can get values out of bounds\n iTestList.get(-9);\n iTestList.get(iSize+10);\n }catch (RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }", "@Test\r\n public void test_getTermsOfUse_1() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res = instance.getTermsOfUse(1, 1, null);\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 3, res.get(0).size());\r\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\r\n\tvoid testGet() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tlist.insert(toDoItem1);\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem3);\r\n\t\tlist.insert(toDoItem4);\r\n\r\n\t\tif (!list.get(\"Item 1\").getName().equals(\"Item 1\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 2\").getName().equals(\"Item 2\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 2\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 3\").getName().equals(\"Item 3\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 3\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 4\").getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 4\\\"\");\r\n\t\t}\r\n\t}", "@Test\n public void testGetRateList() {\n System.out.println(\"getRateList\");\n RateList instance = new RateList();\n List<Rate> expResult = new ArrayList<>();\n List<Rate> result = instance.getRateList();\n assertEquals(expResult, result);\n }", "public Skills getSkillPrediction();", "@Test\n public void testGetListItems() {\n System.out.println(\"getListItems\");\n DataModel instance = new DataModel();\n List expResult = null;\n List result = instance.getListItems();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void get() throws Exception {\n CollisionList list = new CollisionList();\n list.add(\"key\", \"value\");\n assertEquals(\"value\", list.get(\"key\"));\n }", "String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }", "public void testListClaim(){\n\t}", "@Test\n public void getterTest() {\n int shields2 = stack.getResource(ResourceType.SHIELDS);\n int servants2 = stack.getResource(ResourceType.SERVANTS);\n int coins2 = stack.getResource(ResourceType.COINS);\n int stones2 = stack.getResource(ResourceType.STONES);\n\n assertEquals(1, shields2);\n assertEquals(2, servants2);\n assertEquals(3, coins2);\n assertEquals(4, stones2);\n }", "public ArrayList<Integer> getLuckyReward() {\n/* 40 */ return this.luckyReward;\n/* */ }", "@Test \n\tpublic void GetTrustTest(){\n\t\tlogger.info(\"--------------------start---GetTrustTest--------------------------------------------------------------------------------------------------\");\n\t\tList<Trust> list=trustManagementService.GetTrust();\n\t\tfor (Trust trust : list) {\n\t\t\tlogger.info(\"查找结果\" + trust.getTrustName()); \n\t\t}\n\t\t\n\n\t\tlogger.info(\"--------------------end---GetTrustTest--------------------------------------------------------------------------------------------------\");\n\t}", "Skill getSkill(String name);", "private static void getListTest() {\n\t\tList<CartVo> list=new CartDao().getList();\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "@Test\n public void test_get_2() throws Exception {\n User user1 = createUser(1, true);\n\n User res = instance.get(user1.getId());\n\n assertNull(\"'get' should be correct.\", res);\n }", "@Test\n public void getListTest() throws SQLException, IDAO.DALException {\n User[] userList = userDAO.getList();\n assertEquals(\"Simon\", userList[0].getNavn());\n assertEquals(\"Silas\", userList[1].getNavn());\n assertEquals(\"Peter\", userList[2].getNavn());\n }", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "public List<Loan> getLoan();", "@Test\n public void getBills() throws Exception {\n int id = 1;\n\n Bills rm = bl.getBills(id);\n logger.info(rm);\n assertTrue(rm.getBill_name().length() > 0);\n\n }", "@Override\n\tpublic List<Skill> getSkills() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//create a query\n\t\tQuery<Skill> theQuery = currentSession.createQuery(\"from Skill\", Skill.class);\n\t\t\n\t\t//execute query and get result list\n\t\tList<Skill> skills = theQuery.getResultList();\n\t\t\n\t\t//return the results\n\t\treturn skills;\n\t}", "@Test public void shouldReturnTheToolIntTheListWhenSearchedByItsName() {\n\t\tgiven.imInTheMainPage();\n\t\twhen.searchByAToolName(TOOLS.ADPWEB.toolName());\n\t\tthen.mySearchWillReturnTheTools(TOOLS.ADPWEB);\n\t}", "@Test\n void testGetReturnsRightValueAfterMultiplePuts() {\n MyList l = new MyList();\n for (int i = 0; i < 10; i++)\n l.put(\"key\" + i, \"value\" + i);\n\n assertEquals(\"value4\", l.get(\"key4\"));\n }", "@Test\n public void test_get_3() throws Exception {\n User user1 = createUser(1, false);\n\n User res = instance.get(user1.getId());\n\n assertEquals(\"'get' should be correct.\", user1.getUsername(), res.getUsername());\n assertEquals(\"'get' should be correct.\", user1.getDefaultTab(), res.getDefaultTab());\n assertEquals(\"'get' should be correct.\", user1.getNetworkId(), res.getNetworkId());\n assertEquals(\"'get' should be correct.\", user1.getRole().getId(), res.getRole().getId());\n assertEquals(\"'get' should be correct.\", user1.getFirstName(), res.getFirstName());\n assertEquals(\"'get' should be correct.\", user1.getLastName(), res.getLastName());\n assertEquals(\"'get' should be correct.\", user1.getEmail(), res.getEmail());\n assertEquals(\"'get' should be correct.\", user1.getTelephone(), res.getTelephone());\n assertEquals(\"'get' should be correct.\", user1.getStatus().getId(), res.getStatus().getId());\n }", "@Test \n public void GetTrustInfoFromWizardTest(){\n\tlogger.info(\"--------------------start--GetTrustInfoFromWizardTest---------------------------------------------------------------------------------------------------\");\n// \tList<District> list=districtService.GetCityListByProvinceCode(\"110000\");\n\tList<TrustInfo> list=trustManagementService.GetTrustInfoFromWizard(\"9\");\n\tfor (TrustInfo trustInfo : list) {\n\t\tlogger.info(\"查找结果getItemValue:\" + trustInfo.getItemValue()); \n\t\tlogger.info(\"查找结果getItemAliasValue:\" + trustInfo.getItemAliasValue()); \n\t}\n logger.info(\"--------------------end----GetTrustInfoFromWizardTest-------------------------------------------------------------------------------------------------\");\n }", "@Test\r\n public void UserServiceTest_RetrieveProducer()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getProducerList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@Test\r\n public void UserServiceTest_Retrieve()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getUserList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }", "@Test\n\tpublic void testGetSchoolByID(){\n\t\t\n\t List<School> list=schoolService.getSchoolbyId(2);\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tSchool s=(School) list.get(i);\n\t\t\t\tSystem.out.println(\"id: \"+s.getSchId());\n\t\t\t\tSystem.out.println(\"name: \"+s.getSchName());\n\t\t\t\tSystem.out.println(\"zip: \"+s.getSchZip());\n\t\t\t\tSystem.out.println(\"state: \"+s.getSchState());\n\t\t\t}\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "List<Student> getStudent();", "private static void getListTest(int no) {\n\t\tList<CartVo> list=new CartDao().getList(no);\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public Object get(ListField list, int index) {\nif ( list == _lfBoys ) {\nreturn _listBoys.elementAt(index);\n} else {\nreturn _listGirls.elementAt(index);\n}\n}", "@Test\n\tpublic void testGetLista() throws Exception {\n\t\tSystem.out.println(\"getLista\");\n\t\tso.execute(entity);\n\t\tList<IGeneralEntity> expResult = ((TakeTrucksOperation) so).getLista();\n\t\tList<IGeneralEntity> result = so.db.vratiSve(entity);\n\n\t\tassertEquals(expResult.size(), result.size());\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Test\n void getByPropertyLikeSuccess() {\n List<UserRoles> usersRoles = genericDao.getPropertyByName(\"roleName\", \"user\");\n assertEquals(2, usersRoles.size());\n }", "@Test\n public void getByIndex(){\n List <String> list = new ArrayList<>();\n list.add(\"hola\");\n list.add(\"tdd\");\n list.add(\"test\");\n\n assertEquals(\"tdd\",list.get(1));\n }", "@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}", "@Test public void getListTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n \n Assert.assertArrayEquals(pArray, pList.getList());\n }", "@Test\n public void employeeRetrieveTest() {\n Mockito.when(this.rolService.getRoles()).thenReturn(Arrays.asList(new Rol()));\n Assert.assertNotNull(this.rolController.retrieve(new HttpHeaders()));\n }", "@Test\r\n public void testGet() {\r\n System.out.println(\"get\");\r\n int index = 1;\r\n Number n3 = nc1.get(index);\r\n assertEquals(n1.getNumber(), n3.getNumber());\r\n \r\n }", "@GetMapping(\"/list\")\n\tpublic String listSkills(Model theModel) {\n\t\tList<Skill> theSkills = skillService.getSkills();\n\t\t\n\t\t//add the customers to the model\n\t\ttheModel.addAttribute(\"skills\", theSkills);\n\t\t\n\t\treturn \"list-skills\";\n\t}", "@Test\n void getByIdSuccess() {\n UserRoles retrievedRole = (UserRoles)genericDAO.getByID(1);\n assertEquals(\"administrator\", retrievedRole.getRoleName());\n assertEquals(1, retrievedRole.getUserRoleId());\n assertEquals(\"admin\", retrievedRole.getUserName());\n }", "public void doGet( )\n {\n \n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\r\n public void testGet() {\r\n System.out.println(\"get\");\r\n Long codigoCliente = null;\r\n ClienteDAO instance = new ClienteDAO();\r\n ClienteEmpresa expResult = null;\r\n ClienteEmpresa result = instance.get(codigoCliente);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testGetListCheque() {\r\n System.out.println(\"getListCheque\");\r\n chequeBeans instance = new chequeBeans();\r\n List<Cheque> expResult = null;\r\n List<Cheque> result = instance.getListCheque();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testGetSETTINGS() {\n System.out.println(\"getSETTINGS\");\n List<Setting> expResult = null;\n List<Setting> result = Setting.getSETTINGS();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void test_getTermsOfUse_3() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res= instance.getTermsOfUse(Integer.MAX_VALUE, 1, null);\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 0, res.size());\r\n\r\n }", "@org.junit.Test\n public void get() throws Exception {\n assertEquals(null, hashTable.get(\"savon\"));\n assertEquals(\"camp\", hashTable.get(\"math\"));\n hashTable.put(\"math\", \"club\");\n assertEquals(\"club\", hashTable.get(\"math\"));\n }", "@Test\n public void testGetCustomerList() {\n System.out.println(\"getCustomerList\");\n CustomerCtr instance = new CustomerCtr();\n// instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"85352010\");\n ArrayList<Customer> result = instance.getCustomerList();\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void retrieveTodosRelatedToSpring_usingWithList() {\n\t\tTodoService todoServiceMock = mock(TodoService.class);\n\t\tList<String> todos = Arrays.asList(\"Learn to dance\",\"Learn Spring\",\"Learn Spring boot\");\n\t\t\n\t\t/* Define the behaviour of mock object here */\n\t\twhen(todoServiceMock.retrieveTodos(\"Dummy\")).thenReturn(todos);\n\t\t\n\t\tTodoBusinessImpl todoBusinessImpl = new TodoBusinessImpl(todoServiceMock);\n\t\tList<String> filteredTodos = todoBusinessImpl.retrieveTodosRelatedToSpring(\"Dummy\");\n\t\tassertEquals(2, filteredTodos.size());\n\t}", "public List queryTest() {\n\t\tList list = null;\n\t\tthis.init();\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"getAllTest\");\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn list;\n\t\t\n\t}", "@Test\r\n\tpublic void testGetCheckList() {\n\t\tthis.checklist.setGuid(guid);\r\n\t\tthis.checklist.setName(name);\r\n\t\tthis.checklist.setDescription(description);\r\n\r\n\t\t// Save the checklist into the database.\r\n\t\tthis.checklistDAO.saveOrUpdateCheckList(this.checklist);\r\n\t\tString id = checklist.getId();\r\n\r\n\t\t// Test the method getCheckList with an existing checklist.\r\n\t\tCheckList checklistTmp = this.checklistDAO.getCheckList(id);\r\n\t\tassertNotNull(checklistTmp);\r\n\t\tassertEquals(\"GUID\", checklistTmp.getGuid(), guid);\r\n\t\tassertEquals(\"Name\", checklistTmp.getName(), name);\r\n\t\tassertEquals(\"Name\", checklistTmp.getDescription(), description);\r\n\r\n\t\t// Test the method getCheckList with an unexisting checklist.\r\n\t\tthis.checklistDAO.deleteCheckList(this.checklist);\r\n\t\tchecklistTmp = this.checklistDAO.getCheckList(id);\r\n\t\tassertNull(checklistTmp);\r\n\t}", "public abstract String getListItem (Object obj, int i, String itemProp) \n throws SAFSException;", "@Test\r\n public void testGetListBanque() {\r\n System.out.println(\"getListBanque\");\r\n chequeBeans instance = new chequeBeans();\r\n List<Banque> expResult = null;\r\n List<Banque> result = instance.getListBanque();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n void getSlots(){\n Shelf shelf=new Shelf(3);\n\n shelf.addResources(Resource.SHIELD);\n shelf.addResources(Resource.SHIELD);\n\n assertEquals(Resource.SHIELD,shelf.getResources().get(0));\n assertEquals(Resource.SHIELD,shelf.getResources().get(1));\n\n }", "@Test(expected = IllegalArgumentException.class)\n public void test_get_userIdNegative() throws Exception {\n instance.get(-1);\n }", "List<TModuleLo> selectSkillToLo();", "public int getListSelection() {\n/* 515 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n\tpublic void readPlayerBlackListUsingGETTest() throws ApiException {\n\t\tString gameId = \"mockGameId\";\n\t\tString playerId = \"mockPlayerId\";\n\t\tString otherPlayerId = \"mockOtherPlayerId\";\n\t\tApiClient client = new ApiClient();\n\t\tclient.setBasePath(\"http://localhost:\" + PORT);\n\t\tConfiguration.setDefaultApiClient(client);\n\n\t\tPlayerControllerApi api = new PlayerControllerApi();\n\n\t\tString mResponse = \"{ \\\"blockedPlayers\\\": [ \\\"mockOtherPlayerId\\\" ], \\\"gameId\\\": \\\"mockGameId\\\", \\\"id\\\": \\\"string\\\", \\\"playerId\\\": \\\"mockPlayerId\\\"}\";\n\n\t\tstubFor(get(urlEqualTo(\"/data/game/\" + gameId + \"/player/\" + playerId + \"/blacklist\"))\n\t\t\t\t.willReturn(aResponse().withHeader(\"Content-Type\", \"application/json\").withBody(mResponse)));\n\n\t\tPlayerBlackList response = api.readPlayerBlackListUsingGET(gameId, playerId);\n\n\t\tassertEquals(response.getBlockedPlayers().get(0), otherPlayerId);\n\n\t}", "@Test\r\n public void testA0Get_0args() {\r\n System.out.println(\"get all\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> expResult = new ArrayList<>();\r\n List<Usuario> result = instance.get();\r\n \r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testGetSelectedBooks() {\n System.out.println(\"getSelectedBooks\");\n List expResult = new ArrayList();\n List result = testLibraryTable.getSelectedBooks();\n assertEquals(expResult, result);\n\n }", "public void MockForRetrieveCollectionList(){\n try {\n Mockito.when(clsProperties.getPropertyByPlatform(CLSInterfaceProperties.COMMON_TIMEOUT)).thenReturn(\"30000\");\n HashMap credentialsMap = new HashMap();\n credentialsMap.put(\"sAppID\", \"paperlessNAR\");\n credentialsMap.put(\"sPassword\", \"95fs6521fa\");\n \n PowerMockito.doReturn(credentialsMap).when(clsFacade, \"getCredentials\", CLSInterfaceProperties.APP_PAPERLESS_COLLECTION_RETRIEVAL);\n URL url = new URL(\"http://ixservice.ete.cathaypacific.com:80/ixClsNARPortal/PaperlessCollectionRetrievalServlet\");\n PowerMockito.doReturn(url).when(clsFacade, \"getURLForApp\", CLSInterfaceProperties.APP_PAPERLESS_COLLECTION_RETRIEVAL);\n \n } catch (CLSException e) {\n System.out.println(\"Retrieve Collection List take CLSException: \" + e);\n } catch (MalformedURLException e) {\n System.out.println(\"Retrieve Collection List take MalformedURLException: \" + e);\n } catch (Exception e) {\n System.out.println(\"Retrieve Collection List take Exception: \" + e);\n }\n }", "@Test\n public void testGetClassListByTeacher() {\n System.out.println(\"getClassListByTeacher\");\n\n given()\n .contentType(\"application/json\")\n .when()\n .get(\"/generel/teacher/\" + t1.getName()).then()\n .statusCode(200)\n .assertThat()\n .body(\"courseName\", hasSize(1), \"courseName\", hasItems(\"Programming\"), \"semester\", hasItems(\"fall2018\"));\n\n }", "public void testGet() {\n System.out.println(\"get\");\n String key = \"\";\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.get(key);\n assertEquals(expResult, result);\n }", "@Test\n public void testGetLrs() {\n System.out.println(\"getLrs\");\n Set<LineaDeReceta> aux = new HashSet();\n aux.add(new LineaDeReceta(new Alimento(\"nom1\", \"inst1\", \"tempC1\"), \"u1\", 3.0F));\n Receta instance = new Receta();\n instance.getLrs().add(new LineaDeReceta(new Alimento(\"nom1\", \"inst1\", \"tempC1\"), \"u1\", 3.0F));\n Set<LineaDeReceta> expResult = aux;\n Set<LineaDeReceta> result = instance.getLrs();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testGetList() throws Exception {\r\n LOG.info(\"getList\");\r\n String listId = \"509ec17b19c2950a0600050d\";\r\n MovieDbList result = tmdb.getList(listId);\r\n assertFalse(\"List not found\", result.getItems().isEmpty());\r\n }", "@Test\n\tvoid testGetDepartmentsByCrit() {\n\t\tDepartmentDAO ddao = new DepartmentDAO();\n\t\tList<Department> ls = ddao.getDepartmentsByCrit();\n\t\tIterator<Department> it = ls.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tDepartment dpt = it.next();\n\t\t\tSystem.out.println(dpt.getDepartment_name() + \" \" + dpt.getLocation_id() + \" \" + dpt.getManager_id());\n\t\t}\n\t\t// assertEquals(203, ls.get(0).getManager_id());\n\t}", "@Test\n public void shouldGetLoveAll() {\n \n String expResult = \"Love - ALL \" ;\n String result = scoreService.get(nadale, federer) ;\n assertThat( expResult, is(result) ) ;\n }", "@GET\n @Path(\"list\")\n public String ScoresList() {\n System.out.println(\"Invoked Scores.ScoresList()\"); //Displays in console log\n JSONArray response = new JSONArray(); //Creates a new JSONArray containing response\n try {\n PreparedStatement ps = Main.db.prepareStatement(\"SELECT Users.Username, Scores.Score FROM Scores JOIN Users ON Scores.UserID=Users.UserID ORDER BY Score DESC\");\n //Prepared statement selecting username and corresponding score using a join between the Scores and Users table.\n ResultSet results = ps.executeQuery();\n while (results.next() == true) {\n JSONObject row = new JSONObject();\n row.put(\"Username\", results.getString(1));\n row.put(\"Score\", results.getInt(2));\n response.add(row);\n }\n //Adds a new object for each user and corresponding score until the end of the results array.\n return response.toString(); //Returns the response as a string.\n } catch (Exception exception) {\n System.out.println(\"Database error: \" + exception.getMessage());\n return \"{\\\"Error\\\": \\\"Unable to list items. Error code xx.\\\"}\"; // Error Message.\n }\n }", "List<Question> getQuestions();", "@Test\n\tpublic void testLister() {\n\t\tList<Professeur> list = new ArrayList<Professeur>();\n\t\tlist = professeurServiceEmp.lister();\n\t\tAssert.assertNotNull(list);\n\n\t}", "@Test\n public void testAdd_01() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class); \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "public Skill get(SkillType type) {\r\n\t\treturn this.skills.get(type);\r\n\t}", "public void testGetTrial() {\n exp = new Experiment(\"10\");\n ArrayList<Trial> toSet = this.createTrials();\n exp.setTrials(toSet);\n assertEquals(\"getTrial incorrect\", \"id1\", exp.getTrial(\"1\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", \"id2\", exp.getTrial(\"5\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", \"id3\", exp.getTrial(\"11\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", null, exp.getTrial(\"-1\"));\n }", "@VTID(38)\n boolean getList();", "@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}", "public static void main(String[] args) {\n ListTest lt = new ListTest();\n lt.testAdd();\n// lt.testGet();\n lt.testIterator();\n lt.testListContains();\n }", "@Test\r\n\tpublic void testGet() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\ttestArray.add(\"Hola\");\r\n\t\ttestArray.add(\"Como Estas\");\r\n\t\tassertEquals(\"Hola\", testArray.get(0));\r\n\t\tassertEquals(\"Como Estas\", testArray.get(1));\r\n\t\ttry {\r\n\t\t\ttestArray.get(-1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(e.getMessage(), null);\r\n\t\t}\r\n\t}" ]
[ "0.80457336", "0.72523147", "0.6935762", "0.6583128", "0.65598947", "0.64658314", "0.6191414", "0.6133369", "0.60977215", "0.60848284", "0.6046925", "0.59096557", "0.5848701", "0.5818533", "0.5802221", "0.5789287", "0.57585007", "0.57184345", "0.5708374", "0.56486565", "0.564631", "0.5644171", "0.5611352", "0.55827564", "0.5568809", "0.5557845", "0.5554759", "0.5513782", "0.5508666", "0.54817885", "0.54680717", "0.54293376", "0.5416023", "0.5400813", "0.5373222", "0.5372328", "0.5367653", "0.5354909", "0.5353201", "0.5351842", "0.5343792", "0.53382057", "0.5326085", "0.5311244", "0.53078884", "0.53040516", "0.52988625", "0.52943766", "0.52894515", "0.5278237", "0.5268773", "0.5259246", "0.5258256", "0.52538276", "0.52401954", "0.5237111", "0.5236936", "0.5235822", "0.523267", "0.522341", "0.52230895", "0.5221002", "0.52077377", "0.51939374", "0.51880836", "0.5170953", "0.516806", "0.5164774", "0.5162216", "0.5160991", "0.5156459", "0.51500046", "0.5144579", "0.51394784", "0.51377016", "0.51324654", "0.5120936", "0.51183623", "0.5107536", "0.51035285", "0.50982183", "0.5096371", "0.50946474", "0.5082706", "0.5078062", "0.507752", "0.5073233", "0.5073149", "0.50677633", "0.50645524", "0.5063097", "0.5059233", "0.505215", "0.505", "0.5045388", "0.50413996", "0.5024333", "0.50210446", "0.50201666", "0.5019494" ]
0.73117447
1
Test_03 of get method, of class SkillsList.
@Test public void testGet_03() { System.out.println("get"); SkillsList instance = new SkillsList(); Skill result = instance.get("Java"); assertTrue(result==null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGet_02() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"C\");\n assertTrue(result==null);\n }", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Test\n public void testGetCost_01() {\n System.out.println(\"getCost\");\n SkillsList instance = new SkillsList();\n int result = instance.getCost();\n assertTrue(result==0);\n }", "public Skills getChosenSkill();", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\r\n\tpublic void testGet() {\r\n\t\tAssert.assertTrue(list.get(2).equals(new Munitions(2, 3, \"iron\")));\r\n\t}", "void testCanGetList();", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "String getSkills();", "@Test\n public void testRetrieve() {\n System.out.println(\"---retrieve---\");\n //Test1: Method returns -1 if the list is empty\n ADTList instance = ADTList.create();\n int expResult = -1;\n int result = instance.retrieve(3);\n assertEquals(expResult, result);\n System.out.println(\"Test1 OK\");\n \n //Test2: Method returns -1 if the specified position is not valid\n ADTList instance2 = createTestADTListIns(3);\n int expResult2 = -1;\n int result2 = instance2.retrieve(4);\n assertEquals(expResult2, result2);\n System.out.println(\"Test2 OK\");\n \n //Test3: Method returns the element at the specified position\n ADTList instance3 = createTestADTListIns(3);\n int expResult3 = 2;\n int result3 = instance3.retrieve(2);\n assertEquals(expResult3, result3);\n System.out.println(\"Test3 OK\");\n }", "public Skills chooseSkill();", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "public ResponseEntity<List<Skill>> getAllSkills() {\n \tList<Skill> skillist=skillService.getAllSkills();\n\t\t\n//\t\tLOGGER.debug(\" Trying to Fetch list of Skills\");\n\t\t\n\t\tif(skillist==null) {\n\t\t\t\n//\t\t\tLOGGER.error(\" No Skill Found\");\n\t\t\tthrow new ResourceNotFoundException(\"No Skill Details found\");\n\t\t}\n//\t\tLOGGER.info(\"Successfully Retrieved\");\n\t\treturn new ResponseEntity<>(skillist,HttpStatus.OK);\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "private void testGet() {\n System.out.println(\"------ TESTING: get(int index) ------\");\n System.out.println(\"Expected: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 \");\n System.out.print(\"Returned: \");\n try{\n for(int i = 0; i < iSize; i++) {\n if (iTestList.get(i) != i)\n throw new RuntimeException(\"FAILED -> get value is not working correctly\");\n else\n System.out.print(iTestList.get(i) + \" \");\n }\n // test to see if we can get values out of bounds\n iTestList.get(-9);\n iTestList.get(iSize+10);\n }catch (RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\r\n public void test_getTermsOfUse_2() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res = instance.getTermsOfUse(1, 2, new int[] {2, 3});\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 1, res.size());\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 1, res.get(1).size());\r\n }", "@Test\r\n public void test_getTermsOfUse_1() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res = instance.getTermsOfUse(1, 1, null);\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 3, res.get(0).size());\r\n }", "@Test\r\n\tvoid testGet() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tlist.insert(toDoItem1);\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem3);\r\n\t\tlist.insert(toDoItem4);\r\n\r\n\t\tif (!list.get(\"Item 1\").getName().equals(\"Item 1\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 2\").getName().equals(\"Item 2\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 2\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 3\").getName().equals(\"Item 3\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 3\\\"\");\r\n\t\t}\r\n\t\tif (!list.get(\"Item 4\").getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Failed to find \\\"Item 4\\\"\");\r\n\t\t}\r\n\t}", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "public Skills getSkillPrediction();", "@Test\n public void get() throws Exception {\n CollisionList list = new CollisionList();\n list.add(\"key\", \"value\");\n assertEquals(\"value\", list.get(\"key\"));\n }", "@Test\n public void testGetListItems() {\n System.out.println(\"getListItems\");\n DataModel instance = new DataModel();\n List expResult = null;\n List result = instance.getListItems();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetRateList() {\n System.out.println(\"getRateList\");\n RateList instance = new RateList();\n List<Rate> expResult = new ArrayList<>();\n List<Rate> result = instance.getRateList();\n assertEquals(expResult, result);\n }", "String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }", "public ArrayList<Integer> getLuckyReward() {\n/* 40 */ return this.luckyReward;\n/* */ }", "@Test\n public void getterTest() {\n int shields2 = stack.getResource(ResourceType.SHIELDS);\n int servants2 = stack.getResource(ResourceType.SERVANTS);\n int coins2 = stack.getResource(ResourceType.COINS);\n int stones2 = stack.getResource(ResourceType.STONES);\n\n assertEquals(1, shields2);\n assertEquals(2, servants2);\n assertEquals(3, coins2);\n assertEquals(4, stones2);\n }", "Skill getSkill(String name);", "public void testListClaim(){\n\t}", "@Test \n\tpublic void GetTrustTest(){\n\t\tlogger.info(\"--------------------start---GetTrustTest--------------------------------------------------------------------------------------------------\");\n\t\tList<Trust> list=trustManagementService.GetTrust();\n\t\tfor (Trust trust : list) {\n\t\t\tlogger.info(\"查找结果\" + trust.getTrustName()); \n\t\t}\n\t\t\n\n\t\tlogger.info(\"--------------------end---GetTrustTest--------------------------------------------------------------------------------------------------\");\n\t}", "@Test\n void testGetReturnsRightValueAfterMultiplePuts() {\n MyList l = new MyList();\n for (int i = 0; i < 10; i++)\n l.put(\"key\" + i, \"value\" + i);\n\n assertEquals(\"value4\", l.get(\"key4\"));\n }", "@Test\n public void test_get_2() throws Exception {\n User user1 = createUser(1, true);\n\n User res = instance.get(user1.getId());\n\n assertNull(\"'get' should be correct.\", res);\n }", "@Override\n\tpublic List<Skill> getSkills() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//create a query\n\t\tQuery<Skill> theQuery = currentSession.createQuery(\"from Skill\", Skill.class);\n\t\t\n\t\t//execute query and get result list\n\t\tList<Skill> skills = theQuery.getResultList();\n\t\t\n\t\t//return the results\n\t\treturn skills;\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Test\n public void test_get_3() throws Exception {\n User user1 = createUser(1, false);\n\n User res = instance.get(user1.getId());\n\n assertEquals(\"'get' should be correct.\", user1.getUsername(), res.getUsername());\n assertEquals(\"'get' should be correct.\", user1.getDefaultTab(), res.getDefaultTab());\n assertEquals(\"'get' should be correct.\", user1.getNetworkId(), res.getNetworkId());\n assertEquals(\"'get' should be correct.\", user1.getRole().getId(), res.getRole().getId());\n assertEquals(\"'get' should be correct.\", user1.getFirstName(), res.getFirstName());\n assertEquals(\"'get' should be correct.\", user1.getLastName(), res.getLastName());\n assertEquals(\"'get' should be correct.\", user1.getEmail(), res.getEmail());\n assertEquals(\"'get' should be correct.\", user1.getTelephone(), res.getTelephone());\n assertEquals(\"'get' should be correct.\", user1.getStatus().getId(), res.getStatus().getId());\n }", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "private static void getListTest() {\n\t\tList<CartVo> list=new CartDao().getList();\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "@Test\n public void getListTest() throws SQLException, IDAO.DALException {\n User[] userList = userDAO.getList();\n assertEquals(\"Simon\", userList[0].getNavn());\n assertEquals(\"Silas\", userList[1].getNavn());\n assertEquals(\"Peter\", userList[2].getNavn());\n }", "@Test\n public void getBills() throws Exception {\n int id = 1;\n\n Bills rm = bl.getBills(id);\n logger.info(rm);\n assertTrue(rm.getBill_name().length() > 0);\n\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Test\n public void testGetWordList() throws Exception {\n System.out.println(\"getWordList\");\n String permalink = testList.getPermalink();\n WordList expResult = null;\n WordList result = WordListApi.getWordList(token, permalink);\n\n assertNotNull(result);\n assertEquals(username, result.getUsername());\n assertEquals(token.getUserId(), result.getUserId());\n assertEquals(testListName, result.getName());\n assertEquals(testListDescription, result.getDescription());\n }", "@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}", "public List<Loan> getLoan();", "@Test\r\n public void testGet() {\r\n System.out.println(\"get\");\r\n int index = 1;\r\n Number n3 = nc1.get(index);\r\n assertEquals(n1.getNumber(), n3.getNumber());\r\n \r\n }", "@Test\r\n public void UserServiceTest_RetrieveProducer()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getProducerList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@Test public void shouldReturnTheToolIntTheListWhenSearchedByItsName() {\n\t\tgiven.imInTheMainPage();\n\t\twhen.searchByAToolName(TOOLS.ADPWEB.toolName());\n\t\tthen.mySearchWillReturnTheTools(TOOLS.ADPWEB);\n\t}", "@Test \n public void GetTrustInfoFromWizardTest(){\n\tlogger.info(\"--------------------start--GetTrustInfoFromWizardTest---------------------------------------------------------------------------------------------------\");\n// \tList<District> list=districtService.GetCityListByProvinceCode(\"110000\");\n\tList<TrustInfo> list=trustManagementService.GetTrustInfoFromWizard(\"9\");\n\tfor (TrustInfo trustInfo : list) {\n\t\tlogger.info(\"查找结果getItemValue:\" + trustInfo.getItemValue()); \n\t\tlogger.info(\"查找结果getItemAliasValue:\" + trustInfo.getItemAliasValue()); \n\t}\n logger.info(\"--------------------end----GetTrustInfoFromWizardTest-------------------------------------------------------------------------------------------------\");\n }", "@Test\n void getByPropertyLikeSuccess() {\n List<UserRoles> usersRoles = genericDao.getPropertyByName(\"roleName\", \"user\");\n assertEquals(2, usersRoles.size());\n }", "@Test\n public void getByIndex(){\n List <String> list = new ArrayList<>();\n list.add(\"hola\");\n list.add(\"tdd\");\n list.add(\"test\");\n\n assertEquals(\"tdd\",list.get(1));\n }", "@Test\n\tpublic void testGetSchoolByID(){\n\t\t\n\t List<School> list=schoolService.getSchoolbyId(2);\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tSchool s=(School) list.get(i);\n\t\t\t\tSystem.out.println(\"id: \"+s.getSchId());\n\t\t\t\tSystem.out.println(\"name: \"+s.getSchName());\n\t\t\t\tSystem.out.println(\"zip: \"+s.getSchZip());\n\t\t\t\tSystem.out.println(\"state: \"+s.getSchState());\n\t\t\t}\n\t}", "public Object get(ListField list, int index) {\nif ( list == _lfBoys ) {\nreturn _listBoys.elementAt(index);\n} else {\nreturn _listGirls.elementAt(index);\n}\n}", "@Test\r\n public void UserServiceTest_Retrieve()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getUserList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@org.junit.Test\n public void get() throws Exception {\n assertEquals(null, hashTable.get(\"savon\"));\n assertEquals(\"camp\", hashTable.get(\"math\"));\n hashTable.put(\"math\", \"club\");\n assertEquals(\"club\", hashTable.get(\"math\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n\tpublic void testGetLista() throws Exception {\n\t\tSystem.out.println(\"getLista\");\n\t\tso.execute(entity);\n\t\tList<IGeneralEntity> expResult = ((TakeTrucksOperation) so).getLista();\n\t\tList<IGeneralEntity> result = so.db.vratiSve(entity);\n\n\t\tassertEquals(expResult.size(), result.size());\n\t}", "@Test\n public void testGetSETTINGS() {\n System.out.println(\"getSETTINGS\");\n List<Setting> expResult = null;\n List<Setting> result = Setting.getSETTINGS();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void getListTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n \n Assert.assertArrayEquals(pArray, pList.getList());\n }", "@Test\r\n public void testGetListCheque() {\r\n System.out.println(\"getListCheque\");\r\n chequeBeans instance = new chequeBeans();\r\n List<Cheque> expResult = null;\r\n List<Cheque> result = instance.getListCheque();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "private static void getListTest(int no) {\n\t\tList<CartVo> list=new CartDao().getList(no);\r\n\t\t\r\n\t\tfor(CartVo cartVo : list) {\r\n\t\t\tSystem.out.println(cartVo);\r\n\t\t}\r\n\t}", "@Test\r\n public void testGet() {\r\n System.out.println(\"get\");\r\n Long codigoCliente = null;\r\n ClienteDAO instance = new ClienteDAO();\r\n ClienteEmpresa expResult = null;\r\n ClienteEmpresa result = instance.get(codigoCliente);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n void getByIdSuccess() {\n UserRoles retrievedRole = (UserRoles)genericDAO.getByID(1);\n assertEquals(\"administrator\", retrievedRole.getRoleName());\n assertEquals(1, retrievedRole.getUserRoleId());\n assertEquals(\"admin\", retrievedRole.getUserName());\n }", "@Test\r\n public void test_getTermsOfUse_3() throws Exception {\r\n Map<Integer, List<TermsOfUse>> res= instance.getTermsOfUse(Integer.MAX_VALUE, 1, null);\r\n\r\n assertEquals(\"'getTermsOfUse' should be correct.\", 0, res.size());\r\n\r\n }", "List<Student> getStudent();", "@Test\r\n\tpublic void testGetCheckList() {\n\t\tthis.checklist.setGuid(guid);\r\n\t\tthis.checklist.setName(name);\r\n\t\tthis.checklist.setDescription(description);\r\n\r\n\t\t// Save the checklist into the database.\r\n\t\tthis.checklistDAO.saveOrUpdateCheckList(this.checklist);\r\n\t\tString id = checklist.getId();\r\n\r\n\t\t// Test the method getCheckList with an existing checklist.\r\n\t\tCheckList checklistTmp = this.checklistDAO.getCheckList(id);\r\n\t\tassertNotNull(checklistTmp);\r\n\t\tassertEquals(\"GUID\", checklistTmp.getGuid(), guid);\r\n\t\tassertEquals(\"Name\", checklistTmp.getName(), name);\r\n\t\tassertEquals(\"Name\", checklistTmp.getDescription(), description);\r\n\r\n\t\t// Test the method getCheckList with an unexisting checklist.\r\n\t\tthis.checklistDAO.deleteCheckList(this.checklist);\r\n\t\tchecklistTmp = this.checklistDAO.getCheckList(id);\r\n\t\tassertNull(checklistTmp);\r\n\t}", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void employeeRetrieveTest() {\n Mockito.when(this.rolService.getRoles()).thenReturn(Arrays.asList(new Rol()));\n Assert.assertNotNull(this.rolController.retrieve(new HttpHeaders()));\n }", "@Test(expected = IllegalArgumentException.class)\n public void test_get_userIdNegative() throws Exception {\n instance.get(-1);\n }", "@GetMapping(\"/list\")\n\tpublic String listSkills(Model theModel) {\n\t\tList<Skill> theSkills = skillService.getSkills();\n\t\t\n\t\t//add the customers to the model\n\t\ttheModel.addAttribute(\"skills\", theSkills);\n\t\t\n\t\treturn \"list-skills\";\n\t}", "public abstract String getListItem (Object obj, int i, String itemProp) \n throws SAFSException;", "@Test\r\n public void testGetListBanque() {\r\n System.out.println(\"getListBanque\");\r\n chequeBeans instance = new chequeBeans();\r\n List<Banque> expResult = null;\r\n List<Banque> result = instance.getListBanque();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void testGetTrial() {\n exp = new Experiment(\"10\");\n ArrayList<Trial> toSet = this.createTrials();\n exp.setTrials(toSet);\n assertEquals(\"getTrial incorrect\", \"id1\", exp.getTrial(\"1\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", \"id2\", exp.getTrial(\"5\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", \"id3\", exp.getTrial(\"11\").getProfile().getId());\n assertEquals(\"getTrial incorrect\", null, exp.getTrial(\"-1\"));\n }", "@Test\n public void testGetCustomerList() {\n System.out.println(\"getCustomerList\");\n CustomerCtr instance = new CustomerCtr();\n// instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"85352010\");\n ArrayList<Customer> result = instance.getCustomerList();\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "public List queryTest() {\n\t\tList list = null;\n\t\tthis.init();\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"getAllTest\");\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn list;\n\t\t\n\t}", "public void doGet( )\n {\n \n }", "@Test\n void getSlots(){\n Shelf shelf=new Shelf(3);\n\n shelf.addResources(Resource.SHIELD);\n shelf.addResources(Resource.SHIELD);\n\n assertEquals(Resource.SHIELD,shelf.getResources().get(0));\n assertEquals(Resource.SHIELD,shelf.getResources().get(1));\n\n }", "public Skill get(SkillType type) {\r\n\t\treturn this.skills.get(type);\r\n\t}", "public int getListSelection() {\n/* 515 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void testGet() {\n System.out.println(\"get\");\n String key = \"\";\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.get(key);\n assertEquals(expResult, result);\n }", "@Test\n public void testGetLrs() {\n System.out.println(\"getLrs\");\n Set<LineaDeReceta> aux = new HashSet();\n aux.add(new LineaDeReceta(new Alimento(\"nom1\", \"inst1\", \"tempC1\"), \"u1\", 3.0F));\n Receta instance = new Receta();\n instance.getLrs().add(new LineaDeReceta(new Alimento(\"nom1\", \"inst1\", \"tempC1\"), \"u1\", 3.0F));\n Set<LineaDeReceta> expResult = aux;\n Set<LineaDeReceta> result = instance.getLrs();\n assertEquals(expResult, result);\n }", "@Test\n public void shouldGetLoveAll() {\n \n String expResult = \"Love - ALL \" ;\n String result = scoreService.get(nadale, federer) ;\n assertThat( expResult, is(result) ) ;\n }", "private void testGet() {\n init();\n assertTrue(\"FListInteger.get(l1, 0)\", FListInteger.get(l1, 0) == 5);\n assertTrue(\"FListInteger.get(l2, 0)\", FListInteger.get(l2, 0) == 4);\n assertTrue(\"FListInteger.get(l3, 0)\", FListInteger.get(l3, 0) == 7);\n }", "@Test\n\tpublic void retrieveTodosRelatedToSpring_usingWithList() {\n\t\tTodoService todoServiceMock = mock(TodoService.class);\n\t\tList<String> todos = Arrays.asList(\"Learn to dance\",\"Learn Spring\",\"Learn Spring boot\");\n\t\t\n\t\t/* Define the behaviour of mock object here */\n\t\twhen(todoServiceMock.retrieveTodos(\"Dummy\")).thenReturn(todos);\n\t\t\n\t\tTodoBusinessImpl todoBusinessImpl = new TodoBusinessImpl(todoServiceMock);\n\t\tList<String> filteredTodos = todoBusinessImpl.retrieveTodosRelatedToSpring(\"Dummy\");\n\t\tassertEquals(2, filteredTodos.size());\n\t}", "@Test\n public void testGetSelectedBooks() {\n System.out.println(\"getSelectedBooks\");\n List expResult = new ArrayList();\n List result = testLibraryTable.getSelectedBooks();\n assertEquals(expResult, result);\n\n }", "@Test\r\n public void testA0Get_0args() {\r\n System.out.println(\"get all\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> expResult = new ArrayList<>();\r\n List<Usuario> result = instance.get();\r\n \r\n assertEquals(expResult, result);\r\n }", "@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}", "@Test\r\n public void testGetList() throws Exception {\r\n LOG.info(\"getList\");\r\n String listId = \"509ec17b19c2950a0600050d\";\r\n MovieDbList result = tmdb.getList(listId);\r\n assertFalse(\"List not found\", result.getItems().isEmpty());\r\n }", "@Test\n public void testAdd_01() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class); \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n\tvoid testGetDepartmentsByCrit() {\n\t\tDepartmentDAO ddao = new DepartmentDAO();\n\t\tList<Department> ls = ddao.getDepartmentsByCrit();\n\t\tIterator<Department> it = ls.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tDepartment dpt = it.next();\n\t\t\tSystem.out.println(dpt.getDepartment_name() + \" \" + dpt.getLocation_id() + \" \" + dpt.getManager_id());\n\t\t}\n\t\t// assertEquals(203, ls.get(0).getManager_id());\n\t}", "public void MockForRetrieveCollectionList(){\n try {\n Mockito.when(clsProperties.getPropertyByPlatform(CLSInterfaceProperties.COMMON_TIMEOUT)).thenReturn(\"30000\");\n HashMap credentialsMap = new HashMap();\n credentialsMap.put(\"sAppID\", \"paperlessNAR\");\n credentialsMap.put(\"sPassword\", \"95fs6521fa\");\n \n PowerMockito.doReturn(credentialsMap).when(clsFacade, \"getCredentials\", CLSInterfaceProperties.APP_PAPERLESS_COLLECTION_RETRIEVAL);\n URL url = new URL(\"http://ixservice.ete.cathaypacific.com:80/ixClsNARPortal/PaperlessCollectionRetrievalServlet\");\n PowerMockito.doReturn(url).when(clsFacade, \"getURLForApp\", CLSInterfaceProperties.APP_PAPERLESS_COLLECTION_RETRIEVAL);\n \n } catch (CLSException e) {\n System.out.println(\"Retrieve Collection List take CLSException: \" + e);\n } catch (MalformedURLException e) {\n System.out.println(\"Retrieve Collection List take MalformedURLException: \" + e);\n } catch (Exception e) {\n System.out.println(\"Retrieve Collection List take Exception: \" + e);\n }\n }", "List<Question> getQuestions();", "@Test\n public void testGet() {\n System.out.println(\"get\");\n PubMedInitialCollection result = PubMedInitialCollection.get();\n assertNotNull(result);\n }", "@Test\r\n\tpublic void testGet() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\ttestArray.add(\"Hola\");\r\n\t\ttestArray.add(\"Como Estas\");\r\n\t\tassertEquals(\"Hola\", testArray.get(0));\r\n\t\tassertEquals(\"Como Estas\", testArray.get(1));\r\n\t\ttry {\r\n\t\t\ttestArray.get(-1);\r\n\t\t\tfail();\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tassertEquals(e.getMessage(), null);\r\n\t\t}\r\n\t}", "@Test\n public void testGetIndex() {\n System.out.println(\"getIndex\");\n Data instance = null;\n ArrayList<IndexKey> expResult = null;\n ArrayList<IndexKey> result = instance.getIndex();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "List<TModuleLo> selectSkillToLo();", "@Test\n public void test_get_1() throws Exception {\n clearDB();\n\n User res = instance.get(Long.MAX_VALUE);\n\n assertNull(\"'get' should be correct.\", res);\n }", "@Override\n\tpublic Skills chooseSkill() {\n\t\t\n\t\treturn null;\n\t}", "@Test\n public void testGetClassListByTeacher() {\n System.out.println(\"getClassListByTeacher\");\n\n given()\n .contentType(\"application/json\")\n .when()\n .get(\"/generel/teacher/\" + t1.getName()).then()\n .statusCode(200)\n .assertThat()\n .body(\"courseName\", hasSize(1), \"courseName\", hasItems(\"Programming\"), \"semester\", hasItems(\"fall2018\"));\n\n }" ]
[ "0.73296833", "0.7284381", "0.6960391", "0.6623924", "0.6598413", "0.64905566", "0.6183575", "0.61432296", "0.61430734", "0.6125548", "0.60754097", "0.5910492", "0.5836165", "0.58128476", "0.5805371", "0.57918656", "0.5789484", "0.56889606", "0.5684166", "0.56787694", "0.5642737", "0.5641915", "0.56343865", "0.56211334", "0.56077504", "0.55601656", "0.5559813", "0.55209553", "0.54889154", "0.5477445", "0.5450609", "0.54481494", "0.5433438", "0.53845596", "0.5381443", "0.5362481", "0.53547645", "0.5351361", "0.5349667", "0.5339577", "0.5317507", "0.53145975", "0.52989703", "0.5296226", "0.528511", "0.5282347", "0.5279743", "0.5276447", "0.52703935", "0.5262011", "0.52607495", "0.52531517", "0.52461433", "0.52451897", "0.5244945", "0.5244114", "0.52396107", "0.5222028", "0.5199536", "0.5190846", "0.51861155", "0.5184063", "0.5180026", "0.51789916", "0.5174868", "0.51714593", "0.51698124", "0.51618767", "0.51511544", "0.5147376", "0.51309717", "0.51261204", "0.5124772", "0.51236475", "0.51221526", "0.5117267", "0.5115916", "0.51017964", "0.5092353", "0.50880563", "0.50853693", "0.5084951", "0.5070024", "0.5068414", "0.50672543", "0.50669986", "0.50651616", "0.5059467", "0.50587404", "0.50562435", "0.5053018", "0.50494564", "0.5047713", "0.5044331", "0.50428843", "0.50420475", "0.5028013", "0.5023168", "0.5021337", "0.5020308" ]
0.81083816
0
Test_01 of getLowest method, of class SkillsList.
@Test public void testGetLowest_01() { System.out.println("getLowest"); Skill s1 = mock(Skill.class); when(s1.getName()).thenReturn("Java"); when(s1.getType()).thenReturn("Technical"); when(s1.getCost()).thenReturn(2); when(s1.getLevel()).thenReturn(4); when(s1.getCostFormula()).thenReturn(Skill.PLUS_2); Skill s2 = mock(Skill.class); when(s2.getName()).thenReturn("C"); when(s2.getType()).thenReturn("Technical"); when(s2.getCost()).thenReturn(2); when(s2.getLevel()).thenReturn(5); when(s2.getCostFormula()).thenReturn(Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s1); instance.add(s2); String result = instance.getLowest().getName(); assertTrue(result.equals("Java")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }", "public Score lowestScore()\n {\n Score lowest = new Score();\n int smallSoFar = 201;\n if(scores[0] == null)\n {\n return null;\n }\n else\n {\n for(int i = 0; i < scores.length; i++)\n {\n lowest = scores[0];\n if(scores[i] == null)\n {\n break;\n }\n if(scores[i].getScore() < lowest.getScore())\n {\n lowest = scores[i];\n }\n \n }\n return lowest;\n } \n }", "@Test\n\tpublic void testMin() {\n\t\tList<Integer> tempList = new ArrayList<Integer>();\n\t\ttempList.add(50);\n\t\ttempList.add(20);\n\t\ttempList.add(60);\n\t\tInteger result = SWE619A.min(tempList);\n\t\tassertEquals(new Integer(20), result);\n\t\t\n\t}", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "public static int CalculateLowest(int[] LowestArray){\n LowestInArray l1 = new LowestInArray();\n l1.LowestNumber = LowestArray[0];\n if (LowestArray.length>1){\n System.out.println(\"Many Elements in Array\");\n for (int i=0; i<LowestArray.length;i++){\n if (LowestArray[i]< l1.LowestNumber){\n l1.LowestNumber = LowestArray[i];\n }\n }\n }\n return l1.LowestNumber;\n }", "@Test\r\n public void testSmallest() {\r\n int[] numbers = {16, 3, 9, 85};\r\n int expResult = numbers[1];\r\n int result = Main.smallest(numbers);\r\n \r\n assertEquals(expResult, result);\r\n }", "public T findMin();", "int min();", "public Staff findLowestEarningLabour() {\n Staff lowest = new Labourer(null,0,null,1000,0); //??###################@@@@@@@@@@@@@@@@@@\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() <= ((Labourer)lowest).getWage()){\n lowest = staffList[i];\n }\n }\n }\n return lowest;\n }", "public double getLowestGrade(){\n double lowestGrade = 100;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()< lowestGrade)\n lowestGrade = students.get(i).getGrades();\n } // end for\n return lowestGrade;\n }", "public int getMinimumScore(){\n\n /*\n * creating variable of type int name it lowestScore go in to index 0 and sub 0\n * and lowestScore is refering to instance variable scores\n */\n int lowestScore = scores[0][0]; // assume this value is the smallest score value\n\n /* enhanced for loop with array of type int named gameScores and it will go trough scores array*/\n for (int[] gameScores : scores){\n\n /*\n * and another enhanced for loop inside first for loop\n * int variable, name score and it will iterate(go/repeat) through array gameScores\n *\n */\n for (int score : gameScores){\n if (score < lowestScore){\n lowestScore = score;\n }\n }\n }\n return lowestScore;\n }", "@Test\n public void min() {\n assertEquals(2103, SuggestionUtil.min(2103, 2103, 2103));\n\n // EP: two numbers same and one different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2103));\n\n // EP: all three numbers different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2105));\n }", "public double min() {\n/* 305 */ Preconditions.checkState((this.count != 0L));\n/* 306 */ return this.min;\n/* */ }", "double getMin();", "double getMin();", "public void testFindMin() {\r\n assertNull(tree.findMin());\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n assertEquals(\"act\", tree.findMin());\r\n tree.remove(\"act\");\r\n assertEquals(\"apple\", tree.findMin());\r\n }", "int min() {\n return min;\r\n }", "int getMin( int min );", "@Test\n\tpublic void testGetMin() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\theap.build(testArrayList);\n\t\tassertEquals(3, heap.getMin().key);\n\t\tassertEquals(15, heap.getSize());\n\t}", "int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }", "@Override\n public Note getLowest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n Note currentLow = new Note(this.low.getDuration(), this.low.getOctave(),\n this.low.getStartMeasure(), this.low.getPitch(), this.low\n .getIsHead(), this.low.getInstrument(), this.low.getVolume());\n for (int i = 0; i < this.sheet.size(); i++) {\n for (Note n : this.sheet.get(i)) {\n if (currentLow.compareTo(n) == 1) {\n currentLow = n;\n }\n }\n }\n return currentLow;\n }", "protected static Marker getLowestPoint(List<Marker> points) {\n\n Marker lowest = points.get(0);\n\n for(int i = 1; i < points.size(); i++) {\n\n Marker temp = points.get(i);\n\n if(temp.getPosition().latitude < lowest.getPosition().latitude || (temp.getPosition().latitude == lowest.getPosition().latitude && temp.getPosition().longitude < lowest.getPosition().longitude)) {\n lowest = temp;\n }\n }\n\n return lowest;\n }", "@Test\n public void testMin()\n {\n example.insert(6);\n example.insert(12);\n example.insert(3);\n example.insert(0);\n example.insert(10);\n assertEquals(\"0\", example.findMin().toString());\n }", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "public int getMin() {\n int length = minList.size();\n int returnValue = 0;\n if (length > 0) {\n returnValue = minList.get(length - 1);\n }\n return returnValue;\n \n }", "public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }", "public T min();", "int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public K min();", "private static Vertex lowestFInOpen(List<Vertex> openList) {\n\t\tVertex cheapest = openList.get(0);\n\t\tfor (int i = 0; i < openList.size(); i++) {\n\t\t\tif (openList.get(i).getF() < cheapest.getF()) {\n\t\t\t\tcheapest = openList.get(i);\n\t\t\t}\n\t\t}\n\t\treturn cheapest;\n\t}", "private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }", "public static Unit getLowestHealth(VecUnit units, Predicate<Unit> shouldPrioritize) {\n if (units == null) return null;\n int numUnits = (int) units.size();\n if (numUnits == 0) return null;\n Unit weakest = null;\n Unit weakestLowPrio = null;\n int weakestHealth = Integer.MAX_VALUE;\n int weakestHealthLowPrio = Integer.MAX_VALUE;\n for (int i = 0; i < numUnits; ++i) {\n Unit unit = units.get(i);\n assert gc.canSenseUnit(unit.id());\n int health = (int) unit.health();\n if (shouldPrioritize != null && shouldPrioritize.test(unit)) {\n if (health < weakestHealth) {\n weakest = unit;\n weakestHealth = health;\n }\n } else {\n if (health < weakestHealthLowPrio) {\n weakestLowPrio = unit;\n weakestHealthLowPrio = health;\n }\n }\n }\n return (weakest == null) ? weakestLowPrio : weakest;\n }", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}", "private static PizzaModel getCheapest(ArrayList<PizzaModel> pizzaGroup){\n\t\tPizzaModel cheapestPizza = pizzaGroup.get(0);\n\t\tfor(PizzaModel p : pizzaGroup){\n\t\t\tif(p.getPrice()<= cheapestPizza.getPrice())\n\t\t\t\tcheapestPizza = p;\n\t\t}\n\t\treturn cheapestPizza;\n\t}", "public int getMinScore() {\r\n return minScore;\r\n\t}", "@Test\n public void test_kmin_Integer_Collection1() {\n populate_i1();\n int actual = Selector.kmin(i1, 1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"1st minimum not found\", expected, actual);\n }", "public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}", "public Double getLowestMainScore() {\n return lowestMainScore;\n }", "int Smallest()throws EmptyException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyException();\n\t\t}\n\t\tNode curr = head;\n\t\tint min = curr.data;\n\t\twhile (curr.next != null) {\n\t\t\tif (curr.next.data < min) {\n\t\t\t\tmin = curr.next.data;\n\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn min;\n\t}", "protected IExpressionValue min()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MIN FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2<ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,false);\r\n\t\t\r\n\t}", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "int getMin() \n\t{ \n\t\tint x = min.pop(); \n\t\tmin.push(x); \n\t\treturn x; \n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "protected static Point2D.Float getLowestPoint(List<Point2D.Float> points) {\n\n\t\tPoint2D.Float lowest = points.get(0);\n\n\t\tfor (int i = 1; i < points.size(); i++) {\n\n\t\t\tPoint2D.Float temp = points.get(i);\n\n\t\t\tif (temp.y < lowest.y || (temp.y == lowest.y && temp.x < lowest.x)) {\n\t\t\t\tlowest = temp;\n\t\t\t}\n\t\t}\n\n\t\treturn lowest;\n\t}", "private void regularMinDemo() {\n int min = numbers[0];\n for(int i = 1; i < numbers.length; i++) {\n if (numbers[i] < min) min = numbers[i];\n }\n System.out.println(min);\n }", "public Point getMin () {\r\n\r\n\treturn getA();\r\n }", "protected final int getMin() {\n\treturn(this.min);\n }", "public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}", "@Test\n public void test_kmin_Integer_Collection3() {\n populate_i3();\n int actual = Selector.kmin(i3, 3, new CompareIntegerAscending());\n int expected = 6;\n Assert.assertEquals(\"3rd minimum not found\", expected, actual);\n }", "public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the minimum val\r\n\t\treturn min;\r\n\t}", "public double min() {\n\t\tif (count() > 0) {\n\t\t\treturn _min.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "@Test\n public void test_kmin_Integer_Collection4() {\n List<Integer> i4 = new ArrayList<Integer>();\n i4.add(2);\n i4.add(2);\n int actual = Selector.kmin(i4, 1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"Failed in duplicate, size 2 list\", expected, actual);\n }", "public double getMinRating() {\n return min;\n }", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();", "public double minXp(){\n\t\tmin = xp[0];\n\t\tfor(int i=1;i<xp.length;i++){\n\t\t\tif(xp[i]<min){\n\t\t\t\tmin=xp[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "@Test\n public void test_min_Integer_Collection3() {\n populate_i3();\n int actual = Selector.min(i3, new CompareIntegerAscending());\n int expected = 4;\n Assert.assertEquals(\"Minimum not found\", expected, actual);\n }", "public static void main(String[] args) {\n int array[] = new int[]{110, 99, 34, 67, 89, 67, 456, 321, 456, 78, 90, 45, 32, 56, 78, 90, 54, 32, 123, 67, 5, 679, 54, 32, 65};\n System.out.println(FindTheLowestNumber(array));\n }", "public static void lowestPrice(DeluxePizza todaysPizza[])\n\t{\n\t\tboolean empty = true;\n\t\tfor(DeluxePizza x:todaysPizza)\n\t\t{\n\t\t\tif(x != null)\n\t\t\t\tempty = false;\n\t\t}\n\t\tif(!empty){\n\t\tdouble cheapest = todaysPizza[0].calcCost();\n\t\tint index = 0;\n\t\tfor(int i = 0; i <= todaysPizza.length - 1; ++i)\n\t\t{\n\t\t\tif(todaysPizza[i] == null)\n\t\t\t{\n\t\t\t\tcheapest += 0;\n\t\t\t}\n\t\t\telse if(todaysPizza[i].calcCost() < cheapest)\n\t\t\t{\n\t\t\t\tcheapest = todaysPizza[i].calcCost();\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The cheapest pizza is pizza # \" + (index + 1) + \" at $\" + cheapest);\n\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"You haven't made any pizzas yet!\");\n\t\t\treturn;\n\t\t}\n\t}", "public int min(ArrayList<Integer> list) {\r\n int minValue = Integer.MAX_VALUE;\r\n\r\n for (int i : list) {\r\n if (i < minValue) {\r\n minValue = i;\r\n\r\n }\r\n\r\n }\r\n return minValue;\r\n }", "public static rk getBestSolutionMin(ArrayList<rk> Sched) {\n\n rk best = Sched.get(0).copyOf();\n for (int i = 1; i < Sched.size(); i++) {\n rk S = Sched.get(i).copyOf();\n if (S.getFitness() < best.getFitness()) {\n\n best = S;\n }\n }\n return best;\n }", "public int findMin()\n {\n if(isEmpty())\n {\n throw new NoSuchElementException(\"Underflow Exeption\");\n }\n return heap[0];\n }", "public BinaryNode getMinNode(BinaryNode current, int min) throws Exception {\n getMinNodeHelper(current, min);\n if (getMinNodeFromSeq() == null) {\n throw new Exception(\"Alle Knoten sind kleiner als der angegebene Wert!\");\n }\n return getMinNodeFromSeq();\n }", "void getMin() {\n if (s.isEmpty()) {\n System.out.println(\"Stack is empty\");\n } else {\n System.out.println(\"minEle is: \" + minEle);\n }\n }", "@Override\r\n public Integer minLowerBound() {\r\n return this.getImpl().minLowerBound();\r\n }", "public int getMinimum() {\r\n return min;\r\n }", "public abstract int getMinimumValue();", "public int getMin()\n\t{\n\t\treturn min;\n\t}", "public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}", "private double getMin() {\n return min;\n }", "public int getMinIntValue();", "private double getMin() {\n return Collections.min(values.values());\n }", "@Test\n\tpublic void testMinimumNumber() {\n\t\tdouble tmpRndVal = 0.0;\n\t\tdouble tmpRndVal2 = 0.0;\n\t\tdouble tmpResult = 0.0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomNegativeNumbers();\n\t\t\ttmpRndVal2 = doubleRandomNegativeNumbers();\n\t\t\ttmpResult = Math.min(tmpRndVal, tmpRndVal2);\n\t\t\tassertTrue( (tmpResult == ac.minimumNumber(tmpRndVal, tmpRndVal2))\n\t\t\t\t\t|| (0.0 == ac.minimumNumber(tmpRndVal, tmpRndVal2)) );\n\t\t}\n\t\t\n\t\t//testing with positive numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomPositiveNumbers();\n\t\t\ttmpRndVal2 = doubleRandomPositiveNumbers();\n\t\t\ttmpResult = Math.min(tmpRndVal, tmpRndVal2);\n\t\t\tassertTrue((tmpResult == ac.minimumNumber(tmpRndVal, tmpRndVal2))\n\t\t\t|| (0.0 == ac.minimumNumber(tmpRndVal, tmpRndVal2)) \n\t\t\t|| (-0.123456789 == ac.minimumNumber(tmpRndVal, tmpRndVal2)));\n\t\t}\n\t\t\n\t\t//testing with zero\n\t\tdouble zero = 0.0;\n\t\tdouble inpResult = 0.0;\n\t\t\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tinpResult = Math.min(zero, zero);\n\t\t\t//System.out.println(inpResult + \" ############\");\n\t\t\tassertTrue( (inpResult == ac.minimumNumber(zero, zero)) );\n\t\t}\n\t\t\n\t}", "public static int getMin(int[] inputArray){\n int minValue = inputArray[0];\n for(int i=1; i<inputArray.length;i++){\n if(inputArray[i] < minValue){\n minValue=inputArray[i];\n }\n }\n return minValue;\n }", "int min() {\n\t\t// added my sort method in the beginning to sort our array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the first term in the array --> first term should be min if\n\t\t// sorted\n\t\tint x = array[0];\n\t\treturn x;\n\t}", "int getXMin();", "public long min() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] < result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find min of empty array\");\n\t\t}\n\t}", "static BigDecimal FindMinPrice(String productname){\n\t\tLong prdname=Long.parseLong(productname);\n\t\tBigDecimal returnVal=new BigDecimal(0);\n\t\tif(productListOnNames.containsKey(prdname)){\n\t\t\tTreeMap<Long,BigDecimal> existingSet=productListOnNames.get(prdname);\n\n\t\t\treturnVal=Collections.min(existingSet.values());\n\n\t\t}\n\n\t\treturn returnVal;\n\n\t}", "@Test\n\tpublic void testExtractMin() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\tdouble[] expected = new double[] { 5, 7, 24, 36, 15, 48, 32, 47, 93, 27, 38, 70, 53, 33, 93 };\n\t\theap.build(testArrayList);\n\t\tassertEquals(3, heap.extractMin().key);\n\t\tassertArrayEquals(expected, heap.getKeyArray());\n\t\tassertEquals(14, heap.getSize());\n\t}", "static double getMinScoreForScholarship(List<Student> studentsWithScholarship) {\n return studentsWithScholarship.stream()\n .mapToDouble(Student::getAverageScore)\n .min()\n .orElseThrow(() -> new RuntimeException(\"No students eligible for scholarship\"));\n }", "public T getMin ();", "@Test\n public void test_min_Integer_Collection1() {\n populate_i1();\n int actual = Selector.min(i1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"Minimum not found\", expected, actual);\n }", "public int getMin(){\n\t\treturn min;\n\t}", "public double getTotalExcludingLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else if (currentSize == 1)\n {\n return scores[0];\n }\n else\n {\n double sum = 0;\n for (int i = 0; i < currentSize; i++)\n {\n sum = sum + scores[i];\n }\n return sum - getLowest();\n }\n }", "public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }", "public int GetMinVal();", "Object getMinimumValue(Object elementID) throws Exception;", "private static int searchSmallest(List<Integer> input) {\n\t\tint left = 0;\n\t\tint right = input.size()-1;\n\t\t\n\t\twhile(left < right) {\n\t\t\tint mid = left + (right-left)/2 + 1; System.out.println(\"mid=\" + mid);\n\t\t\t\n\t\t\tif(input.get(left) > input.get(mid)) {//smallest in left half\n\t\t\t\tright = mid-1;\n\t\t\t}else {\n\t\t\t\tleft = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn left;//left=right now\n\t}", "public double getMinimum() {\n return (min);\n }", "Double getMinimumValue();", "public int getMin() {\n return min;\n }", "public int getMin() {\n return min;\n }", "public int getMin() {\n return min;\n }", "public static float waveDataGetLowestValue(ArrayList<Float> wave){\r\n float lowestWaveValue = Collections.min(wave);\r\n return lowestWaveValue;\r\n\r\n }", "private double getMinNumber(ArrayList<Double> provinceValues)\n {\n Double min = 999999999.0;\n\n for (Double type : provinceValues)\n {\n if (type < min)\n {\n min = type;\n }\n }\n return min;\n }", "public PropertyCard findCheapest() {\r\n\t\t\r\n\t\t\r\n\t\tif(this.properties.size() == 0) {\r\n\t\t\t//System.out.println(\"returning null\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tPropertyCard lowestCard = this.properties.get(0).getLowest();\r\n\t\tint lowest = lowestCard.getValue();\r\n\t\t\r\n\t\tfor(CardStack c: this.properties) {\r\n\t\t\tif(c.getLowest().getValue() < lowest) {\r\n\t\t\t\tlowestCard = c.getLowest();\r\n\t\t\t\tlowest = c.getLowest().getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn lowestCard;\r\n\t}", "public Integer getMin() { \n\t\treturn getMinElement().getValue();\n\t}" ]
[ "0.79450285", "0.7553918", "0.7209631", "0.70765907", "0.69211245", "0.6767791", "0.67488056", "0.66109264", "0.65337896", "0.652504", "0.6522958", "0.6519085", "0.65015644", "0.64878", "0.64861", "0.6451677", "0.6451677", "0.6442962", "0.6417185", "0.6398303", "0.6313171", "0.62923396", "0.6287364", "0.62768453", "0.6268613", "0.62038666", "0.6181569", "0.6162892", "0.6162224", "0.61563903", "0.6142637", "0.6139805", "0.6137004", "0.61344266", "0.6118347", "0.6106229", "0.6103097", "0.6085379", "0.607412", "0.60726476", "0.6065782", "0.6051737", "0.6049125", "0.6041987", "0.60336983", "0.6029177", "0.60269994", "0.6021867", "0.6005399", "0.5992785", "0.5991923", "0.5988841", "0.59853905", "0.59785044", "0.5976475", "0.59762514", "0.5969398", "0.5966053", "0.596386", "0.59571695", "0.5950033", "0.5949396", "0.59491616", "0.59461325", "0.59411", "0.5940558", "0.5940432", "0.5938477", "0.593545", "0.59349364", "0.5931102", "0.59272206", "0.59236354", "0.59227496", "0.5909708", "0.59045386", "0.59027797", "0.58991784", "0.58987796", "0.5880241", "0.58739024", "0.5868923", "0.5867947", "0.58630365", "0.5853917", "0.5846407", "0.5841936", "0.5841616", "0.58411044", "0.58407235", "0.58381647", "0.5837486", "0.5834578", "0.5825827", "0.5825827", "0.5825827", "0.5825723", "0.58124965", "0.58050144", "0.5804074" ]
0.76817083
1
Test_02 of getLowest method, of class SkillsList.
@Test public void testGetLowest_02() { System.out.println("getLowest");; SkillsList instance = new SkillsList(); Skill result = instance.getLowest(); assertTrue(result==null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }", "public Score lowestScore()\n {\n Score lowest = new Score();\n int smallSoFar = 201;\n if(scores[0] == null)\n {\n return null;\n }\n else\n {\n for(int i = 0; i < scores.length; i++)\n {\n lowest = scores[0];\n if(scores[i] == null)\n {\n break;\n }\n if(scores[i].getScore() < lowest.getScore())\n {\n lowest = scores[i];\n }\n \n }\n return lowest;\n } \n }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "public static int CalculateLowest(int[] LowestArray){\n LowestInArray l1 = new LowestInArray();\n l1.LowestNumber = LowestArray[0];\n if (LowestArray.length>1){\n System.out.println(\"Many Elements in Array\");\n for (int i=0; i<LowestArray.length;i++){\n if (LowestArray[i]< l1.LowestNumber){\n l1.LowestNumber = LowestArray[i];\n }\n }\n }\n return l1.LowestNumber;\n }", "@Test\n\tpublic void testMin() {\n\t\tList<Integer> tempList = new ArrayList<Integer>();\n\t\ttempList.add(50);\n\t\ttempList.add(20);\n\t\ttempList.add(60);\n\t\tInteger result = SWE619A.min(tempList);\n\t\tassertEquals(new Integer(20), result);\n\t\t\n\t}", "public int getMinimumScore(){\n\n /*\n * creating variable of type int name it lowestScore go in to index 0 and sub 0\n * and lowestScore is refering to instance variable scores\n */\n int lowestScore = scores[0][0]; // assume this value is the smallest score value\n\n /* enhanced for loop with array of type int named gameScores and it will go trough scores array*/\n for (int[] gameScores : scores){\n\n /*\n * and another enhanced for loop inside first for loop\n * int variable, name score and it will iterate(go/repeat) through array gameScores\n *\n */\n for (int score : gameScores){\n if (score < lowestScore){\n lowestScore = score;\n }\n }\n }\n return lowestScore;\n }", "public double getLowestGrade(){\n double lowestGrade = 100;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()< lowestGrade)\n lowestGrade = students.get(i).getGrades();\n } // end for\n return lowestGrade;\n }", "public Staff findLowestEarningLabour() {\n Staff lowest = new Labourer(null,0,null,1000,0); //??###################@@@@@@@@@@@@@@@@@@\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() <= ((Labourer)lowest).getWage()){\n lowest = staffList[i];\n }\n }\n }\n return lowest;\n }", "int min();", "public T findMin();", "int getMin( int min );", "double getMin();", "double getMin();", "int min() {\n return min;\r\n }", "public double min() {\n/* 305 */ Preconditions.checkState((this.count != 0L));\n/* 306 */ return this.min;\n/* */ }", "@Test\n public void min() {\n assertEquals(2103, SuggestionUtil.min(2103, 2103, 2103));\n\n // EP: two numbers same and one different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2103));\n\n // EP: all three numbers different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2105));\n }", "@Test\r\n public void testSmallest() {\r\n int[] numbers = {16, 3, 9, 85};\r\n int expResult = numbers[1];\r\n int result = Main.smallest(numbers);\r\n \r\n assertEquals(expResult, result);\r\n }", "int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }", "public void testFindMin() {\r\n assertNull(tree.findMin());\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n assertEquals(\"act\", tree.findMin());\r\n tree.remove(\"act\");\r\n assertEquals(\"apple\", tree.findMin());\r\n }", "protected static Marker getLowestPoint(List<Marker> points) {\n\n Marker lowest = points.get(0);\n\n for(int i = 1; i < points.size(); i++) {\n\n Marker temp = points.get(i);\n\n if(temp.getPosition().latitude < lowest.getPosition().latitude || (temp.getPosition().latitude == lowest.getPosition().latitude && temp.getPosition().longitude < lowest.getPosition().longitude)) {\n lowest = temp;\n }\n }\n\n return lowest;\n }", "@Override\n public Note getLowest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n Note currentLow = new Note(this.low.getDuration(), this.low.getOctave(),\n this.low.getStartMeasure(), this.low.getPitch(), this.low\n .getIsHead(), this.low.getInstrument(), this.low.getVolume());\n for (int i = 0; i < this.sheet.size(); i++) {\n for (Note n : this.sheet.get(i)) {\n if (currentLow.compareTo(n) == 1) {\n currentLow = n;\n }\n }\n }\n return currentLow;\n }", "public int getMin() {\n int length = minList.size();\n int returnValue = 0;\n if (length > 0) {\n returnValue = minList.get(length - 1);\n }\n return returnValue;\n \n }", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "private static Vertex lowestFInOpen(List<Vertex> openList) {\n\t\tVertex cheapest = openList.get(0);\n\t\tfor (int i = 0; i < openList.size(); i++) {\n\t\t\tif (openList.get(i).getF() < cheapest.getF()) {\n\t\t\t\tcheapest = openList.get(i);\n\t\t\t}\n\t\t}\n\t\treturn cheapest;\n\t}", "private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}", "int getMin() \n\t{ \n\t\tint x = min.pop(); \n\t\tmin.push(x); \n\t\treturn x; \n\t}", "public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }", "private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }", "private static PizzaModel getCheapest(ArrayList<PizzaModel> pizzaGroup){\n\t\tPizzaModel cheapestPizza = pizzaGroup.get(0);\n\t\tfor(PizzaModel p : pizzaGroup){\n\t\t\tif(p.getPrice()<= cheapestPizza.getPrice())\n\t\t\t\tcheapestPizza = p;\n\t\t}\n\t\treturn cheapestPizza;\n\t}", "public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}", "@Test\n public void testMin()\n {\n example.insert(6);\n example.insert(12);\n example.insert(3);\n example.insert(0);\n example.insert(10);\n assertEquals(\"0\", example.findMin().toString());\n }", "public K min();", "public T min();", "public static Unit getLowestHealth(VecUnit units, Predicate<Unit> shouldPrioritize) {\n if (units == null) return null;\n int numUnits = (int) units.size();\n if (numUnits == 0) return null;\n Unit weakest = null;\n Unit weakestLowPrio = null;\n int weakestHealth = Integer.MAX_VALUE;\n int weakestHealthLowPrio = Integer.MAX_VALUE;\n for (int i = 0; i < numUnits; ++i) {\n Unit unit = units.get(i);\n assert gc.canSenseUnit(unit.id());\n int health = (int) unit.health();\n if (shouldPrioritize != null && shouldPrioritize.test(unit)) {\n if (health < weakestHealth) {\n weakest = unit;\n weakestHealth = health;\n }\n } else {\n if (health < weakestHealthLowPrio) {\n weakestLowPrio = unit;\n weakestHealthLowPrio = health;\n }\n }\n }\n return (weakest == null) ? weakestLowPrio : weakest;\n }", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "public int getMinScore() {\r\n return minScore;\r\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "@Test\n\tpublic void testGetMin() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\theap.build(testArrayList);\n\t\tassertEquals(3, heap.getMin().key);\n\t\tassertEquals(15, heap.getSize());\n\t}", "protected static Point2D.Float getLowestPoint(List<Point2D.Float> points) {\n\n\t\tPoint2D.Float lowest = points.get(0);\n\n\t\tfor (int i = 1; i < points.size(); i++) {\n\n\t\t\tPoint2D.Float temp = points.get(i);\n\n\t\t\tif (temp.y < lowest.y || (temp.y == lowest.y && temp.x < lowest.x)) {\n\t\t\t\tlowest = temp;\n\t\t\t}\n\t\t}\n\n\t\treturn lowest;\n\t}", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "public Double getLowestMainScore() {\n return lowestMainScore;\n }", "public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}", "protected final int getMin() {\n\treturn(this.min);\n }", "public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the minimum val\r\n\t\treturn min;\r\n\t}", "int Smallest()throws EmptyException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyException();\n\t\t}\n\t\tNode curr = head;\n\t\tint min = curr.data;\n\t\twhile (curr.next != null) {\n\t\t\tif (curr.next.data < min) {\n\t\t\t\tmin = curr.next.data;\n\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn min;\n\t}", "public int findMin()\n {\n if(isEmpty())\n {\n throw new NoSuchElementException(\"Underflow Exeption\");\n }\n return heap[0];\n }", "public Point getMin () {\r\n\r\n\treturn getA();\r\n }", "private void regularMinDemo() {\n int min = numbers[0];\n for(int i = 1; i < numbers.length; i++) {\n if (numbers[i] < min) min = numbers[i];\n }\n System.out.println(min);\n }", "public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();", "public double getMinRating() {\n return min;\n }", "public double min() {\n\t\tif (count() > 0) {\n\t\t\treturn _min.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public static rk getBestSolutionMin(ArrayList<rk> Sched) {\n\n rk best = Sched.get(0).copyOf();\n for (int i = 1; i < Sched.size(); i++) {\n rk S = Sched.get(i).copyOf();\n if (S.getFitness() < best.getFitness()) {\n\n best = S;\n }\n }\n return best;\n }", "int min() {\n\t\t// added my sort method in the beginning to sort our array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the first term in the array --> first term should be min if\n\t\t// sorted\n\t\tint x = array[0];\n\t\treturn x;\n\t}", "public BinaryNode getMinNode(BinaryNode current, int min) throws Exception {\n getMinNodeHelper(current, min);\n if (getMinNodeFromSeq() == null) {\n throw new Exception(\"Alle Knoten sind kleiner als der angegebene Wert!\");\n }\n return getMinNodeFromSeq();\n }", "public double minXp(){\n\t\tmin = xp[0];\n\t\tfor(int i=1;i<xp.length;i++){\n\t\t\tif(xp[i]<min){\n\t\t\t\tmin=xp[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public static int getMin(int[] inputArray){\n int minValue = inputArray[0];\n for(int i=1; i<inputArray.length;i++){\n if(inputArray[i] < minValue){\n minValue=inputArray[i];\n }\n }\n return minValue;\n }", "public int getMinimum() {\r\n return min;\r\n }", "static BigDecimal FindMinPrice(String productname){\n\t\tLong prdname=Long.parseLong(productname);\n\t\tBigDecimal returnVal=new BigDecimal(0);\n\t\tif(productListOnNames.containsKey(prdname)){\n\t\t\tTreeMap<Long,BigDecimal> existingSet=productListOnNames.get(prdname);\n\n\t\t\treturnVal=Collections.min(existingSet.values());\n\n\t\t}\n\n\t\treturn returnVal;\n\n\t}", "static double getMinScoreForScholarship(List<Student> studentsWithScholarship) {\n return studentsWithScholarship.stream()\n .mapToDouble(Student::getAverageScore)\n .min()\n .orElseThrow(() -> new RuntimeException(\"No students eligible for scholarship\"));\n }", "public int getMin()\n\t{\n\t\treturn min;\n\t}", "public int min(ArrayList<Integer> list) {\r\n int minValue = Integer.MAX_VALUE;\r\n\r\n for (int i : list) {\r\n if (i < minValue) {\r\n minValue = i;\r\n\r\n }\r\n\r\n }\r\n return minValue;\r\n }", "protected IExpressionValue min()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MIN FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2<ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,false);\r\n\t\t\r\n\t}", "private double getMin() {\n return Collections.min(values.values());\n }", "public static void lowestPrice(DeluxePizza todaysPizza[])\n\t{\n\t\tboolean empty = true;\n\t\tfor(DeluxePizza x:todaysPizza)\n\t\t{\n\t\t\tif(x != null)\n\t\t\t\tempty = false;\n\t\t}\n\t\tif(!empty){\n\t\tdouble cheapest = todaysPizza[0].calcCost();\n\t\tint index = 0;\n\t\tfor(int i = 0; i <= todaysPizza.length - 1; ++i)\n\t\t{\n\t\t\tif(todaysPizza[i] == null)\n\t\t\t{\n\t\t\t\tcheapest += 0;\n\t\t\t}\n\t\t\telse if(todaysPizza[i].calcCost() < cheapest)\n\t\t\t{\n\t\t\t\tcheapest = todaysPizza[i].calcCost();\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The cheapest pizza is pizza # \" + (index + 1) + \" at $\" + cheapest);\n\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"You haven't made any pizzas yet!\");\n\t\t\treturn;\n\t\t}\n\t}", "public abstract int getMinimumValue();", "public int getMinIntValue();", "private double getMin() {\n return min;\n }", "public static void main(String[] args) {\n int array[] = new int[]{110, 99, 34, 67, 89, 67, 456, 321, 456, 78, 90, 45, 32, 56, 78, 90, 54, 32, 123, 67, 5, 679, 54, 32, 65};\n System.out.println(FindTheLowestNumber(array));\n }", "public double getTotalExcludingLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else if (currentSize == 1)\n {\n return scores[0];\n }\n else\n {\n double sum = 0;\n for (int i = 0; i < currentSize; i++)\n {\n sum = sum + scores[i];\n }\n return sum - getLowest();\n }\n }", "int getXMin();", "void getMin() {\n if (s.isEmpty()) {\n System.out.println(\"Stack is empty\");\n } else {\n System.out.println(\"minEle is: \" + minEle);\n }\n }", "public int getMinimun(){\n int lowGrade = grades[0]; //assume que grades[0] é a menor nota\n \n //faz um loop pelo array de notas\n for(int grade: grades){\n //se nota for mais baixa que lowGrade, essa note é atribuida a lowGrade\n if(grade < lowGrade){\n lowGrade = grade;\n }\n }\n \n return lowGrade;\n }", "private static int searchSmallest(List<Integer> input) {\n\t\tint left = 0;\n\t\tint right = input.size()-1;\n\t\t\n\t\twhile(left < right) {\n\t\t\tint mid = left + (right-left)/2 + 1; System.out.println(\"mid=\" + mid);\n\t\t\t\n\t\t\tif(input.get(left) > input.get(mid)) {//smallest in left half\n\t\t\t\tright = mid-1;\n\t\t\t}else {\n\t\t\t\tleft = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn left;//left=right now\n\t}", "@Override\r\n public Integer minLowerBound() {\r\n return this.getImpl().minLowerBound();\r\n }", "public PropertyCard findCheapest() {\r\n\t\t\r\n\t\t\r\n\t\tif(this.properties.size() == 0) {\r\n\t\t\t//System.out.println(\"returning null\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tPropertyCard lowestCard = this.properties.get(0).getLowest();\r\n\t\tint lowest = lowestCard.getValue();\r\n\t\t\r\n\t\tfor(CardStack c: this.properties) {\r\n\t\t\tif(c.getLowest().getValue() < lowest) {\r\n\t\t\t\tlowestCard = c.getLowest();\r\n\t\t\t\tlowest = c.getLowest().getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn lowestCard;\r\n\t}", "public long min() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] < result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find min of empty array\");\n\t\t}\n\t}", "public int getMin(){\n\t\treturn min;\n\t}", "public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }", "public int getMin() {\n return min;\n }", "public int getMin() {\n return min;\n }", "public int getMin() {\n return min;\n }", "private static int getLowestCostUnprocessedNode(int[] costs, boolean[] doneWithNode) {\n int result = UNKNOWN;\n int lowestCost = 0;\n\n for (int i=0; i<doneWithNode.length; i++) {\n // We can't pick the node if we've already done it or\n // we don't know how much it costs to get to the node.\n if (doneWithNode[i] || costs[i] == UNKNOWN)\n continue;\n\n if (result == UNKNOWN || costs[i] < lowestCost) {\n lowestCost = costs[i];\n result = i;\n }\n }\n\n return result;\n }", "public T getMin ();", "Double getMinimumValue();", "@Test\n public void test_kmin_Integer_Collection1() {\n populate_i1();\n int actual = Selector.kmin(i1, 1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"1st minimum not found\", expected, actual);\n }", "public int getMin() {\r\n // get root\r\n RedBlackTree.Node<Grade> min = rbt.root;\r\n // loop to left of tree\r\n while (min.leftChild != null) {\r\n min = min.leftChild;\r\n }\r\n\r\n return min.data.getGrade();\r\n }", "private double getMinNumber(ArrayList<Double> provinceValues)\n {\n Double min = 999999999.0;\n\n for (Double type : provinceValues)\n {\n if (type < min)\n {\n min = type;\n }\n }\n return min;\n }", "public double getMinimum() {\n return (min);\n }", "private Enemy enemyWithLowestHealth(java.util.List<Enemy> enemies){\n Enemy enemyWithLowestHealth = null;\n\n for (Enemy enemy : enemies){\n if (enemyWithLowestHealth == null || enemyWithLowestHealth.getHealth() > enemy.getHealth()){\n enemyWithLowestHealth = enemy;\n }\n }\n\n return enemyWithLowestHealth;\n }", "public Integer getMin() { \n\t\treturn getMinElement().getValue();\n\t}", "public int GetMinVal();", "@Test\n public void test_kmin_Integer_Collection4() {\n List<Integer> i4 = new ArrayList<Integer>();\n i4.add(2);\n i4.add(2);\n int actual = Selector.kmin(i4, 1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"Failed in duplicate, size 2 list\", expected, actual);\n }", "Object getMinimumValue(Object elementID) throws Exception;", "public static float waveDataGetLowestValue(ArrayList<Float> wave){\r\n float lowestWaveValue = Collections.min(wave);\r\n return lowestWaveValue;\r\n\r\n }", "public static void minEl1(List<Integer> list){\n int min = list.stream().reduce(Integer.MAX_VALUE, (x,y)->x<y ? x : y);\n System.out.println(min);\n }" ]
[ "0.7555072", "0.7450093", "0.74026835", "0.7263658", "0.6887569", "0.68764704", "0.6848917", "0.67010206", "0.66736466", "0.66681886", "0.66484207", "0.6629689", "0.6589296", "0.6560621", "0.6560621", "0.6551957", "0.65497804", "0.651677", "0.6507232", "0.6478821", "0.64276254", "0.64056057", "0.64002734", "0.635949", "0.63416517", "0.6338206", "0.63303447", "0.63174593", "0.63016963", "0.6299047", "0.6283888", "0.62732404", "0.6231329", "0.6229427", "0.62118405", "0.62071013", "0.62049866", "0.6198646", "0.6198393", "0.6184449", "0.6180308", "0.6179755", "0.6152924", "0.61497897", "0.6147401", "0.61453754", "0.6141373", "0.61203086", "0.61164826", "0.61160165", "0.6106539", "0.61029774", "0.61010045", "0.60880786", "0.6078959", "0.6077357", "0.6074114", "0.6071322", "0.6069406", "0.60673434", "0.6061304", "0.6060949", "0.6057278", "0.6051407", "0.6050526", "0.60472643", "0.60458404", "0.6038742", "0.6036393", "0.6031289", "0.6030187", "0.60166705", "0.6007762", "0.60050374", "0.60023135", "0.5997942", "0.5989104", "0.5985321", "0.59837085", "0.59800684", "0.597705", "0.5967721", "0.59600955", "0.5954052", "0.5954052", "0.5954052", "0.59453195", "0.59405607", "0.59397125", "0.59364396", "0.5934945", "0.59340847", "0.5932394", "0.59263134", "0.592395", "0.5922249", "0.5920056", "0.59034675", "0.58995706", "0.5892927" ]
0.7800465
0
Test_03 of getLowest method, of class SkillsList.
@Test public void testGetLowest_03() { System.out.println("getLowest"); Skill s1 = mock(Skill.class); when(s1.getName()).thenReturn("Java"); when(s1.getType()).thenReturn("Technical"); when(s1.getCost()).thenReturn(2); when(s1.getLevel()).thenReturn(4); when(s1.getCostFormula()).thenReturn(Skill.PLUS_2); Skill s2 = mock(Skill.class); when(s2.getName()).thenReturn("C"); when(s2.getType()).thenReturn("Technical"); when(s2.getCost()).thenReturn(2); when(s2.getLevel()).thenReturn(5); when(s2.getCostFormula()).thenReturn(Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s2); instance.add(s1); String result = instance.getLowest().getName(); assertTrue(result.equals("Java")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }", "public Score lowestScore()\n {\n Score lowest = new Score();\n int smallSoFar = 201;\n if(scores[0] == null)\n {\n return null;\n }\n else\n {\n for(int i = 0; i < scores.length; i++)\n {\n lowest = scores[0];\n if(scores[i] == null)\n {\n break;\n }\n if(scores[i].getScore() < lowest.getScore())\n {\n lowest = scores[i];\n }\n \n }\n return lowest;\n } \n }", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "@Test\n\tpublic void testMin() {\n\t\tList<Integer> tempList = new ArrayList<Integer>();\n\t\ttempList.add(50);\n\t\ttempList.add(20);\n\t\ttempList.add(60);\n\t\tInteger result = SWE619A.min(tempList);\n\t\tassertEquals(new Integer(20), result);\n\t\t\n\t}", "public static int CalculateLowest(int[] LowestArray){\n LowestInArray l1 = new LowestInArray();\n l1.LowestNumber = LowestArray[0];\n if (LowestArray.length>1){\n System.out.println(\"Many Elements in Array\");\n for (int i=0; i<LowestArray.length;i++){\n if (LowestArray[i]< l1.LowestNumber){\n l1.LowestNumber = LowestArray[i];\n }\n }\n }\n return l1.LowestNumber;\n }", "public int getMinimumScore(){\n\n /*\n * creating variable of type int name it lowestScore go in to index 0 and sub 0\n * and lowestScore is refering to instance variable scores\n */\n int lowestScore = scores[0][0]; // assume this value is the smallest score value\n\n /* enhanced for loop with array of type int named gameScores and it will go trough scores array*/\n for (int[] gameScores : scores){\n\n /*\n * and another enhanced for loop inside first for loop\n * int variable, name score and it will iterate(go/repeat) through array gameScores\n *\n */\n for (int score : gameScores){\n if (score < lowestScore){\n lowestScore = score;\n }\n }\n }\n return lowestScore;\n }", "public Staff findLowestEarningLabour() {\n Staff lowest = new Labourer(null,0,null,1000,0); //??###################@@@@@@@@@@@@@@@@@@\n \n for (int i = 0; i < staffList.length; i++) { \n if (staffList[i] instanceof Labourer) {\n if (((Labourer)staffList[i]).getWage() <= ((Labourer)lowest).getWage()){\n lowest = staffList[i];\n }\n }\n }\n return lowest;\n }", "public double getLowestGrade(){\n double lowestGrade = 100;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()< lowestGrade)\n lowestGrade = students.get(i).getGrades();\n } // end for\n return lowestGrade;\n }", "int min();", "public T findMin();", "int getMin( int min );", "public double min() {\n/* 305 */ Preconditions.checkState((this.count != 0L));\n/* 306 */ return this.min;\n/* */ }", "double getMin();", "double getMin();", "@Test\r\n public void testSmallest() {\r\n int[] numbers = {16, 3, 9, 85};\r\n int expResult = numbers[1];\r\n int result = Main.smallest(numbers);\r\n \r\n assertEquals(expResult, result);\r\n }", "int min() {\n return min;\r\n }", "@Test\n public void min() {\n assertEquals(2103, SuggestionUtil.min(2103, 2103, 2103));\n\n // EP: two numbers same and one different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2103));\n\n // EP: all three numbers different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2105));\n }", "int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }", "public void testFindMin() {\r\n assertNull(tree.findMin());\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n assertEquals(\"act\", tree.findMin());\r\n tree.remove(\"act\");\r\n assertEquals(\"apple\", tree.findMin());\r\n }", "@Override\n public Note getLowest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n Note currentLow = new Note(this.low.getDuration(), this.low.getOctave(),\n this.low.getStartMeasure(), this.low.getPitch(), this.low\n .getIsHead(), this.low.getInstrument(), this.low.getVolume());\n for (int i = 0; i < this.sheet.size(); i++) {\n for (Note n : this.sheet.get(i)) {\n if (currentLow.compareTo(n) == 1) {\n currentLow = n;\n }\n }\n }\n return currentLow;\n }", "protected static Marker getLowestPoint(List<Marker> points) {\n\n Marker lowest = points.get(0);\n\n for(int i = 1; i < points.size(); i++) {\n\n Marker temp = points.get(i);\n\n if(temp.getPosition().latitude < lowest.getPosition().latitude || (temp.getPosition().latitude == lowest.getPosition().latitude && temp.getPosition().longitude < lowest.getPosition().longitude)) {\n lowest = temp;\n }\n }\n\n return lowest;\n }", "public int getMin() {\n int length = minList.size();\n int returnValue = 0;\n if (length > 0) {\n returnValue = minList.get(length - 1);\n }\n return returnValue;\n \n }", "int getMin() {\n\t\tif (stack.size() > 0) {\n\t\t\treturn minEle;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "private static Vertex lowestFInOpen(List<Vertex> openList) {\n\t\tVertex cheapest = openList.get(0);\n\t\tfor (int i = 0; i < openList.size(); i++) {\n\t\t\tif (openList.get(i).getF() < cheapest.getF()) {\n\t\t\t\tcheapest = openList.get(i);\n\t\t\t}\n\t\t}\n\t\treturn cheapest;\n\t}", "private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }", "private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}", "public E findMin() {\n // TODO: YOUR CODE HERE\n return getElement(1);\n }", "private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }", "int getMin() \n\t{ \n\t\tint x = min.pop(); \n\t\tmin.push(x); \n\t\treturn x; \n\t}", "@Test\n public void testMin()\n {\n example.insert(6);\n example.insert(12);\n example.insert(3);\n example.insert(0);\n example.insert(10);\n assertEquals(\"0\", example.findMin().toString());\n }", "public static Unit getLowestHealth(VecUnit units, Predicate<Unit> shouldPrioritize) {\n if (units == null) return null;\n int numUnits = (int) units.size();\n if (numUnits == 0) return null;\n Unit weakest = null;\n Unit weakestLowPrio = null;\n int weakestHealth = Integer.MAX_VALUE;\n int weakestHealthLowPrio = Integer.MAX_VALUE;\n for (int i = 0; i < numUnits; ++i) {\n Unit unit = units.get(i);\n assert gc.canSenseUnit(unit.id());\n int health = (int) unit.health();\n if (shouldPrioritize != null && shouldPrioritize.test(unit)) {\n if (health < weakestHealth) {\n weakest = unit;\n weakestHealth = health;\n }\n } else {\n if (health < weakestHealthLowPrio) {\n weakestLowPrio = unit;\n weakestHealthLowPrio = health;\n }\n }\n }\n return (weakest == null) ? weakestLowPrio : weakest;\n }", "private static PizzaModel getCheapest(ArrayList<PizzaModel> pizzaGroup){\n\t\tPizzaModel cheapestPizza = pizzaGroup.get(0);\n\t\tfor(PizzaModel p : pizzaGroup){\n\t\t\tif(p.getPrice()<= cheapestPizza.getPrice())\n\t\t\t\tcheapestPizza = p;\n\t\t}\n\t\treturn cheapestPizza;\n\t}", "@Test\n\tpublic void testGetMin() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\theap.build(testArrayList);\n\t\tassertEquals(3, heap.getMin().key);\n\t\tassertEquals(15, heap.getSize());\n\t}", "public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}", "public T min();", "public K min();", "public int getMinScore() {\r\n return minScore;\r\n\t}", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "public Double getLowestMainScore() {\n return lowestMainScore;\n }", "protected static Point2D.Float getLowestPoint(List<Point2D.Float> points) {\n\n\t\tPoint2D.Float lowest = points.get(0);\n\n\t\tfor (int i = 1; i < points.size(); i++) {\n\n\t\t\tPoint2D.Float temp = points.get(i);\n\n\t\t\tif (temp.y < lowest.y || (temp.y == lowest.y && temp.x < lowest.x)) {\n\t\t\t\tlowest = temp;\n\t\t\t}\n\t\t}\n\n\t\treturn lowest;\n\t}", "public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}", "protected final int getMin() {\n\treturn(this.min);\n }", "public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "int Smallest()throws EmptyException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyException();\n\t\t}\n\t\tNode curr = head;\n\t\tint min = curr.data;\n\t\twhile (curr.next != null) {\n\t\t\tif (curr.next.data < min) {\n\t\t\t\tmin = curr.next.data;\n\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn min;\n\t}", "public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the minimum val\r\n\t\treturn min;\r\n\t}", "public int findMin()\n {\n if(isEmpty())\n {\n throw new NoSuchElementException(\"Underflow Exeption\");\n }\n return heap[0];\n }", "public double min() {\n\t\tif (count() > 0) {\n\t\t\treturn _min.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();", "private void regularMinDemo() {\n int min = numbers[0];\n for(int i = 1; i < numbers.length; i++) {\n if (numbers[i] < min) min = numbers[i];\n }\n System.out.println(min);\n }", "public double getMinRating() {\n return min;\n }", "public Point getMin () {\r\n\r\n\treturn getA();\r\n }", "public static int findMin(){\n int min = array[0];\n for(int x = 1; x<array.length; x++ ){\n if(array[x]<min){\n min=array[x];\n }\n }\n return min;\n}", "public double minXp(){\n\t\tmin = xp[0];\n\t\tfor(int i=1;i<xp.length;i++){\n\t\t\tif(xp[i]<min){\n\t\t\t\tmin=xp[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public static rk getBestSolutionMin(ArrayList<rk> Sched) {\n\n rk best = Sched.get(0).copyOf();\n for (int i = 1; i < Sched.size(); i++) {\n rk S = Sched.get(i).copyOf();\n if (S.getFitness() < best.getFitness()) {\n\n best = S;\n }\n }\n return best;\n }", "protected IExpressionValue min()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MIN FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2<ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,false);\r\n\t\t\r\n\t}", "public int getMinimum() {\r\n return min;\r\n }", "public int min(ArrayList<Integer> list) {\r\n int minValue = Integer.MAX_VALUE;\r\n\r\n for (int i : list) {\r\n if (i < minValue) {\r\n minValue = i;\r\n\r\n }\r\n\r\n }\r\n return minValue;\r\n }", "public BinaryNode getMinNode(BinaryNode current, int min) throws Exception {\n getMinNodeHelper(current, min);\n if (getMinNodeFromSeq() == null) {\n throw new Exception(\"Alle Knoten sind kleiner als der angegebene Wert!\");\n }\n return getMinNodeFromSeq();\n }", "public int getMin()\n\t{\n\t\treturn min;\n\t}", "public static void lowestPrice(DeluxePizza todaysPizza[])\n\t{\n\t\tboolean empty = true;\n\t\tfor(DeluxePizza x:todaysPizza)\n\t\t{\n\t\t\tif(x != null)\n\t\t\t\tempty = false;\n\t\t}\n\t\tif(!empty){\n\t\tdouble cheapest = todaysPizza[0].calcCost();\n\t\tint index = 0;\n\t\tfor(int i = 0; i <= todaysPizza.length - 1; ++i)\n\t\t{\n\t\t\tif(todaysPizza[i] == null)\n\t\t\t{\n\t\t\t\tcheapest += 0;\n\t\t\t}\n\t\t\telse if(todaysPizza[i].calcCost() < cheapest)\n\t\t\t{\n\t\t\t\tcheapest = todaysPizza[i].calcCost();\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The cheapest pizza is pizza # \" + (index + 1) + \" at $\" + cheapest);\n\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"You haven't made any pizzas yet!\");\n\t\t\treturn;\n\t\t}\n\t}", "public static int getMin(int[] inputArray){\n int minValue = inputArray[0];\n for(int i=1; i<inputArray.length;i++){\n if(inputArray[i] < minValue){\n minValue=inputArray[i];\n }\n }\n return minValue;\n }", "private double getMin() {\n return Collections.min(values.values());\n }", "public int getMinIntValue();", "public abstract int getMinimumValue();", "static double getMinScoreForScholarship(List<Student> studentsWithScholarship) {\n return studentsWithScholarship.stream()\n .mapToDouble(Student::getAverageScore)\n .min()\n .orElseThrow(() -> new RuntimeException(\"No students eligible for scholarship\"));\n }", "int min() {\n\t\t// added my sort method in the beginning to sort our array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the first term in the array --> first term should be min if\n\t\t// sorted\n\t\tint x = array[0];\n\t\treturn x;\n\t}", "static BigDecimal FindMinPrice(String productname){\n\t\tLong prdname=Long.parseLong(productname);\n\t\tBigDecimal returnVal=new BigDecimal(0);\n\t\tif(productListOnNames.containsKey(prdname)){\n\t\t\tTreeMap<Long,BigDecimal> existingSet=productListOnNames.get(prdname);\n\n\t\t\treturnVal=Collections.min(existingSet.values());\n\n\t\t}\n\n\t\treturn returnVal;\n\n\t}", "private double getMin() {\n return min;\n }", "@Override\r\n public Integer minLowerBound() {\r\n return this.getImpl().minLowerBound();\r\n }", "public double getTotalExcludingLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else if (currentSize == 1)\n {\n return scores[0];\n }\n else\n {\n double sum = 0;\n for (int i = 0; i < currentSize; i++)\n {\n sum = sum + scores[i];\n }\n return sum - getLowest();\n }\n }", "int getXMin();", "void getMin() {\n if (s.isEmpty()) {\n System.out.println(\"Stack is empty\");\n } else {\n System.out.println(\"minEle is: \" + minEle);\n }\n }", "public long min() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] < result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find min of empty array\");\n\t\t}\n\t}", "public static void main(String[] args) {\n int array[] = new int[]{110, 99, 34, 67, 89, 67, 456, 321, 456, 78, 90, 45, 32, 56, 78, 90, 54, 32, 123, 67, 5, 679, 54, 32, 65};\n System.out.println(FindTheLowestNumber(array));\n }", "public PropertyCard findCheapest() {\r\n\t\t\r\n\t\t\r\n\t\tif(this.properties.size() == 0) {\r\n\t\t\t//System.out.println(\"returning null\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tPropertyCard lowestCard = this.properties.get(0).getLowest();\r\n\t\tint lowest = lowestCard.getValue();\r\n\t\t\r\n\t\tfor(CardStack c: this.properties) {\r\n\t\t\tif(c.getLowest().getValue() < lowest) {\r\n\t\t\t\tlowestCard = c.getLowest();\r\n\t\t\t\tlowest = c.getLowest().getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn lowestCard;\r\n\t}", "@Test\n public void test_kmin_Integer_Collection1() {\n populate_i1();\n int actual = Selector.kmin(i1, 1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"1st minimum not found\", expected, actual);\n }", "@Test\n public void test_kmin_Integer_Collection3() {\n populate_i3();\n int actual = Selector.kmin(i3, 3, new CompareIntegerAscending());\n int expected = 6;\n Assert.assertEquals(\"3rd minimum not found\", expected, actual);\n }", "public int getMinimun(){\n int lowGrade = grades[0]; //assume que grades[0] é a menor nota\n \n //faz um loop pelo array de notas\n for(int grade: grades){\n //se nota for mais baixa que lowGrade, essa note é atribuida a lowGrade\n if(grade < lowGrade){\n lowGrade = grade;\n }\n }\n \n return lowGrade;\n }", "public int getMin(){\n\t\treturn min;\n\t}", "public E returnMinElement(){\r\n if (theData.size() <= 0) return null;\r\n\r\n E min = theData.get(0).getData();\r\n\r\n for (int i = 0; i< theData.size() ; i++){\r\n if (min.compareTo(theData.get(i).getData()) > 0 ){\r\n min = theData.get(i).getData();\r\n }\r\n }\r\n return min;\r\n }", "@Test\n public void test_min_Integer_Collection3() {\n populate_i3();\n int actual = Selector.min(i3, new CompareIntegerAscending());\n int expected = 4;\n Assert.assertEquals(\"Minimum not found\", expected, actual);\n }", "public T getMin ();", "public int getMin() {\n return min;\n }", "public int getMin() {\n return min;\n }", "public int getMin() {\n return min;\n }", "private static int getLowestCostUnprocessedNode(int[] costs, boolean[] doneWithNode) {\n int result = UNKNOWN;\n int lowestCost = 0;\n\n for (int i=0; i<doneWithNode.length; i++) {\n // We can't pick the node if we've already done it or\n // we don't know how much it costs to get to the node.\n if (doneWithNode[i] || costs[i] == UNKNOWN)\n continue;\n\n if (result == UNKNOWN || costs[i] < lowestCost) {\n lowestCost = costs[i];\n result = i;\n }\n }\n\n return result;\n }", "Double getMinimumValue();", "@Test\n public void test_kmin_Integer_Collection4() {\n List<Integer> i4 = new ArrayList<Integer>();\n i4.add(2);\n i4.add(2);\n int actual = Selector.kmin(i4, 1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"Failed in duplicate, size 2 list\", expected, actual);\n }", "public double getMinimum() {\n return (min);\n }", "public int GetMinVal();", "private static int searchSmallest(List<Integer> input) {\n\t\tint left = 0;\n\t\tint right = input.size()-1;\n\t\t\n\t\twhile(left < right) {\n\t\t\tint mid = left + (right-left)/2 + 1; System.out.println(\"mid=\" + mid);\n\t\t\t\n\t\t\tif(input.get(left) > input.get(mid)) {//smallest in left half\n\t\t\t\tright = mid-1;\n\t\t\t}else {\n\t\t\t\tleft = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn left;//left=right now\n\t}", "public static float waveDataGetLowestValue(ArrayList<Float> wave){\r\n float lowestWaveValue = Collections.min(wave);\r\n return lowestWaveValue;\r\n\r\n }", "public int getMin() {\r\n // get root\r\n RedBlackTree.Node<Grade> min = rbt.root;\r\n // loop to left of tree\r\n while (min.leftChild != null) {\r\n min = min.leftChild;\r\n }\r\n\r\n return min.data.getGrade();\r\n }", "public Integer getMin() { \n\t\treturn getMinElement().getValue();\n\t}", "@Override\n public Note getLowestNote() {\n List<Note> currentNotes = this.getNotes();\n int size = currentNotes.size();\n Note lowestNote = null;\n\n for (int i = 0; i < size; i++) {\n Note currentNote = currentNotes.get(i);\n\n if (currentNote.isLower(lowestNote)) {\n lowestNote = currentNote;\n }\n }\n if (lowestNote == null) {\n throw new IllegalArgumentException(\"No Notes To Compare\");\n }\n return lowestNote;\n }", "private double getMinNumber(ArrayList<Double> provinceValues)\n {\n Double min = 999999999.0;\n\n for (Double type : provinceValues)\n {\n if (type < min)\n {\n min = type;\n }\n }\n return min;\n }" ]
[ "0.78362805", "0.758991", "0.73704535", "0.72479486", "0.68907434", "0.68638635", "0.6846268", "0.66644967", "0.66614634", "0.66540444", "0.6616811", "0.6610821", "0.6570864", "0.65619886", "0.6543636", "0.6543636", "0.6541909", "0.6525028", "0.6500835", "0.6458094", "0.64330107", "0.642112", "0.6381322", "0.6343263", "0.63075554", "0.6305691", "0.6295306", "0.62865704", "0.6265894", "0.62568116", "0.6252722", "0.62447315", "0.62268645", "0.6224836", "0.6224023", "0.62190676", "0.6205778", "0.6203182", "0.6187192", "0.61808735", "0.61451435", "0.6140893", "0.61323917", "0.6129974", "0.6129474", "0.6121463", "0.61122614", "0.6095646", "0.60955805", "0.60910285", "0.60810757", "0.607805", "0.6073184", "0.6070019", "0.6066136", "0.6065154", "0.60597396", "0.6048266", "0.6047915", "0.6043045", "0.6039198", "0.6036158", "0.60354936", "0.6029853", "0.60275257", "0.6026114", "0.60260797", "0.60215616", "0.6017154", "0.6016712", "0.6010607", "0.60084605", "0.5996819", "0.598082", "0.5978759", "0.5974181", "0.5970056", "0.5966906", "0.59650964", "0.5957162", "0.59561026", "0.59552145", "0.59489363", "0.59431535", "0.5942492", "0.5938916", "0.5935697", "0.5935697", "0.5935697", "0.5931191", "0.59297186", "0.5928471", "0.59239304", "0.5921626", "0.5921181", "0.5920874", "0.5913471", "0.59119374", "0.59115", "0.59030795" ]
0.7492309
2
Test_01 of upgradeSkill method, of class SkillsList.
@Test public void testUpgradeSkill_01() { System.out.println("upgradeSkill"); // Skill s = mock(Skill.class); // when(s.getName()).thenReturn("Java"); // when(s.getType()).thenReturn("Technical"); // when(s.getCost()).thenReturn(2); // when(s.getLevel()).thenReturn(4); // when(s.getCostFormula()).thenReturn(Skill.PLUS_2); Skill s = new Skill("Java","Technical",2,4,Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s); instance.upgradeSkill("Java"); int result = instance.get("Java").getLevel(); assertTrue(result==5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "void updateSkill(Skill skill);", "@Test\r\n\tvoid testUpdateSkillRecordShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\r\n\t}", "@Test\r\n\tvoid testUpdateSkillRecordShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\t\r\n\t}", "void changeSkill(Long pokemonId, int newSkill);", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "public static int attemptSkillUp(int skillId, Player player){ \n\t\ttry{\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == -1){return -2;}\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == 30){return -2;}\n\t\t\tint[] skillCost;\n\t\t\tskillCost = new int[8];\n\t\t\tint newSkillLevel = DwarfCraftPlayerSkills.getSkillLevel(skillId, player);\n\t\t\t/* Dan thinks skillId could be removed from the arguments in this function\n\t\t\t getSkillTrainingCost */\n\t\t\tskillCost = Skills.values()[skillId].getSkillTrainingCost(skillId, newSkillLevel, player);\n\t\t\tfor (int i = 0; i < skillCost[0];i++){\n\t\t\t\t//check inventory quantity for needed items\n\t\t\t\tif (DwarfCraftInventory.countInventoryItems(skillCost[1+2*i], player) < skillCost[2+2*i]){return -1;}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\t\tcatch(NumberFormatException f) {return 0;}\n\t}", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "public Skills chooseSkill();", "@Test\n public void updateShiftList(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertTrue(shiftListResource.updateShiftlist(new ShiftList(\"dummy3\", 1, true, new Date(2015-01-02), 50, false)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 1, \"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.LEER);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.EMBER)));\n levelUpSkills.put(8, new ArrayList<Integer>(Arrays.asList(SkillFactory.WORK_UP)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.HEADBUTT)));\n levelUpSkills.put(15, new ArrayList<Integer>(Arrays.asList(SkillFactory.NOBLE_ROAR)));\n levelUpSkills.put(20, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAKE_DOWN)));\n levelUpSkills.put(23, new ArrayList<Integer>(Arrays.asList(SkillFactory.FIRE_FANG)));\n levelUpSkills.put(28, new ArrayList<Integer>(Arrays.asList(SkillFactory.ENDEAVOR)));\n levelUpSkills.put(33, new ArrayList<Integer>(Arrays.asList(SkillFactory.ECHOED_VOICE)));\n levelUpSkills.put(36, new ArrayList<Integer>(Arrays.asList(SkillFactory.FLAMETHROWER)));\n levelUpSkills.put(39, new ArrayList<Integer>(Arrays.asList(SkillFactory.CRUNCH)));\n levelUpSkills.put(43, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYPER_VOICE)));\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.INCINERATE)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.OVERHEAT)));\n }", "@Test\n public void testAdd_01() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class); \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "public void transformedSkills()\r\n\t{\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5659, 1), false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(SKILLS);\r\n\t}", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n //TODO: CONVERSION 2\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.CONVERSION);\n beginnerSkills.add(SkillFactory.SHARPEN);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.PSYBEAM)));\n levelUpSkills.put(12, new ArrayList<Integer>(Arrays.asList(SkillFactory.AGILITY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RECOVER)));\n //TODO: MAGNET RISE 23\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.SIGNAL_BEAM)));\n //TODO: RECYCLE 34\n levelUpSkills.put(40, new ArrayList<Integer>(Arrays.asList(SkillFactory.DISCHARGE)));\n levelUpSkills.put(45, new ArrayList<Integer>(Arrays.asList(SkillFactory.LOCK_ON)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.TRI_ATTACK)));\n //TODO: MAGIC COAT 56\n levelUpSkills.put(62, new ArrayList<Integer>(Arrays.asList(SkillFactory.ZAP_CANNON)));\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.MEGAHORN);\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.TAIL_WHIP);\n beginnerSkills.add(SkillFactory.WATER_GUN);\n beginnerSkills.add(SkillFactory.WATER_SPORT);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAIL_WHIP)));\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_GUN)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_SPORT)));\n levelUpSkills.put(13, new ArrayList<Integer>(Arrays.asList(SkillFactory.FOCUS_ENERGY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RAZOR_SHELL)));\n levelUpSkills.put(21, new ArrayList<Integer>(Arrays.asList(SkillFactory.FURY_CUTTER)));\n levelUpSkills.put(26, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_PULSE)));\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.REVENGE)));\n levelUpSkills.put(34, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_JET)));\n //39 ENCORE\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_TAIL)));\n //51 RETALIATE\n levelUpSkills.put(58, new ArrayList<Integer>(Arrays.asList(SkillFactory.SWORDS_DANCE)));\n levelUpSkills.put(63, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYDRO_PUMP)));\n initEvolutionSkills();\n }", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n\tpublic void testHealthIncrease4() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "public void unlockSkill() {\n int i = 0;\n while (skills.get(i).isUnlocked()) {\n i = i + 1;\n }\n skills.get(i).unlock();\n }", "private void adminGiveAllSkills(Player activeChar)\r\n\t{\r\n\t\tGameObject target = activeChar.getTarget();\r\n\t\tPlayer player = null;\r\n\t\tif(target != null && target.isPlayer())\r\n\t\t\tplayer = (Player) target;\r\n\t\telse\r\n\t\t{\r\n\t\t\tactiveChar.sendPacket(SystemMsg.INVALID_TARGET);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint unLearnable = 0;\r\n\t\tint skillCounter = 0;\r\n\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\twhile(skills.size() > unLearnable)\r\n\t\t{\r\n\t\t\tunLearnable = 0;\r\n\t\t\tfor(SkillLearn s : skills)\r\n\t\t\t{\r\n\t\t\t\tSkill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());\r\n\t\t\t\tif(sk == null || !sk.getCanLearn(player.getClassId()))\r\n\t\t\t\t{\r\n\t\t\t\t\tunLearnable++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(player.getSkillLevel(sk.getId()) == -1)\r\n\t\t\t\t\tskillCounter++;\r\n\t\t\t\tplayer.addSkill(sk, true);\r\n\t\t\t}\r\n\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\t}\r\n\r\n\t\tplayer.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message22\", player, skillCounter));\r\n\t\tplayer.sendPacket(new SkillList(player));\r\n\t\tactiveChar.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message23\", activeChar, skillCounter, player.getName()));\r\n\t}", "@Test\n public void updateShiftListCatch(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertFalse(shiftListResource.updateShiftlist(new ShiftList(\"notdummy3\", 1, true, new Date(2015-01-01), 50, false)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 1, \"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@Test(priority=3)\n\t\tpublic void addToWishlist() throws Exception{\n\t\t\t\n//'**********************************************************\n//Calling method to click on 'Add to Wishlist' link and verify success toast is displayed\n//'**********************************************************\n\t\t\tThread.sleep(1500);\n\t\t\tgalaxyPage.clickOnAddToWishlist();\n\t\t\tThread.sleep(1500);\n\t\t\tAssert.assertTrue(galaxyPage.getSuccessMessage().contains(\"Success\"), \"Product is not added to Wishlist\");\n\t\t\textentTest.log(LogStatus.PASS,\"Success: You have added Samsung Galaxy Tab 10.1 to your wish list!\");\n//'**********************************************************\n//Calling method to close the success toast\n//'**********************************************************\n\t\t\tgalaxyPage.closeSuccesstoast();\n//'**********************************************************\n//Calling method to click on 'Wishlist' link and check user is redirected to 'My Wishlist' page\n//'**********************************************************\n\t\t\tmyWishlistPage = galaxyPage.clickOnWishlist();\n\t\t\t\n\t\t\tAssert.assertTrue(myWishlistPage.getTitle().equals(\"My Wish List\"), \"User is not redirected to wishlist page\");\n\t\t\textentTest.log(LogStatus.PASS,\"User is redirected to My Wishlist Page\");\n\t\t\t\n//'**********************************************************\n//Verifying count in 'Wishlist' link is equal to number of products in the page\n//'**********************************************************\n\t\t\tAssert.assertEquals(myWishlistPage.valueInWishlistLink(), myWishlistPage.numOfProductsInTable(), \"Value shown in wishlist link is different from number of records in the table\");\n\t\t\textentTest.log(LogStatus.PASS,\"Product added: Value shown in wishlist link is equal to number of records in the table\");\n\t\t\t\n\t\t\t}", "public Skill update(Skill skill)\r\n {\r\n name = skill.getName();\r\n shortName = skill.getShortName();\r\n selectable = skill.isSelectable();\r\n baseCost = skill.getBaseCost();\r\n levelCost = skill.getLevelCost();\r\n \r\n return this;\r\n }", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "public abstract void Upgrade(Tower t);", "@Ignore\n @Test public void modifySecretSeries_success() throws Exception {\n }", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "@Test\n public void testUpdateWordList() throws Exception {\n System.out.println(\"updateWordList\");\n\n String newDescription = \"Changed the description.\";\n String newName = \"TEST LIST NEW NAME\";\n\n testList.setDescription(newDescription);\n testList.setName(newName);\n testList.setType(ListType.PRIVATE);\n WordListApi.updateWordList(token, testList);\n\n // check that the list has 2 items\n WordList result = WordListApi.getWordList(token, testList.getPermalink());\n assertEquals(result.getDescription(), newDescription);\n assertEquals(result.getName(), newName);\n assertEquals(result.getType(), ListType.PRIVATE);\n assertEquals(result.getId(), testList.getId());\n assertEquals(result.getNumberWordsInList(), testList.getNumberWordsInList());\n assertEquals(result.getPermalink(), testList.getPermalink());\n assertEquals(result.getUserId(), testList.getUserId());\n assertEquals(result.getUsername(), testList.getUsername());\n assertFalse(result.getUpdatedAt().equals(testList.getUpdatedAt()));\n }", "@Test\n void testUpdateGoalie() {\n\n }", "@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}", "@Test\n public void playerWinDoublonsBySellingHisProductionTest(){\n player.playRole(new Craftman(stockGlobal));\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(1,player.getInventory().getDoublons());\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock-1);\n\n ArrayList<Plantation> plantationsCorn = new ArrayList<>();\n plantationsCorn.add(new CornPlantation());\n player.playRole(new Trader(stockGlobal,1));\n player.playRole(new Farmer(plantationsCorn,stockGlobal));\n\n assertEquals(true,player.getInventory().getDoublons()==1);\n assertEquals(true,stockGlobal.getStockResource(TypeWare.CORN)==initialCornStock);\n\n\n\n }", "@Test\n public void updateTimeList(){\n userDAO.createUser(new User(\"dummy2\", \"dummy2\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy2\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.updateTimeList(new TimeList(\"dummy2\", 1990, 0, 65, 1, 1)));\n\n //clean up\n timeListDAO.removeTimeList(1990, 0, \"dummy2\");\n userDAO.removeUser(\"dummy2\");\n }", "@Test\n\tpublic void testHealthIncrease3() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n public void testGet_02() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"C\");\n assertTrue(result==null);\n }", "public Skills getChosenSkill();", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentAddSku() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tproductSku.setGuid(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(beanFactory).getBean(INVENTORY_JOURNAL);\n\t\t\t\twill(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(orderSku, AllocationEventType.ORDER_ADJUSTMENT_ADDSKU,\tEVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\t}", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentChangeQty() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tfinal long warehouseUid = WAREHOUSE_UID;\n\t\tinventory.setWarehouseUid(warehouseUid);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tfinal String skuCode = SKU_CODE;\n\t\tproductSku.setSkuCode(skuCode);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(skuCode, warehouseUid); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t}\n\t\t});\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao2).getInventory(skuCode, warehouseUid); will(returnValue(inventory2));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(\n\t\t\t\torderSku, AllocationEventType.ORDER_ADJUSTMENT_CHANGEQTY, EVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10 - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10 + QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\t}", "@Test\n public void update() {\n }", "static public void adjustRewardForSelect(ArrayList<RewardItem> rewardList) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (toChangeCard != null) {\n if (item.type == RewardItem.RewardType.CARD) {\n boolean isExist = false;\n for (AbstractCard card : item.cards) {\n if (card.cardID.equals(toChangeCard.cardID)) {\n isExist = true;\n if (card.canUpgrade()) {\n card.upgrade();\n }\n break;\n }\n }\n if (!isExist) {\n boolean isChanged = false;\n // check same rarity\n for (AbstractCard card : item.cards) {\n if (card.rarity == toChangeCard.rarity) {\n if (card.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.remove(card);\n item.cards.add(toChangeCard);\n isChanged = true;\n break;\n }\n }\n if (!isChanged) {\n AbstractCard removed = item.cards.remove(0);\n if (removed.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.add(toChangeCard);\n }\n }\n }\n }\n }\n\n if (selectRelic != null) {\n if (AbstractDungeon.player.hasRelic(selectRelic)) {\n selectRelic = null;\n } else {\n boolean isExist = false;\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n if (item.relic.relicId.equals(selectRelic)) {\n isExist = true;\n }\n }\n\n }\n if (!isExist) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n rewardList.set(i, new RewardItem(RelicLibrary.getRelic(selectRelic)));\n }\n }\n }\n }\n clearHasRelicInPool();\n }\n }", "@Test(dependsOnMethods = \"testUpdateCertificate\")\n public void testUpdateCertificateVersion() {\n throw new SkipException(\"bug in requirements for function\");\n }", "public void addSkill(Skill newskill) {\n skills.addElement(newskill);\n }", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentRemoveSku() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER,\tQUANTITY_10, order, null);\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\t\tfinal InventoryJournalRollupImpl ijRollup2 = new InventoryJournalRollupImpl();\n\t\tijRollup2.setAllocatedQuantityDelta(QUANTITY_NEG_10);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\t\tfinal InventoryJournalDao inventoryJournalDao2 = context.mock(InventoryJournalDao.class, INVENTORY_JOURNAL_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(inventoryDao2).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory2));\n\t\t\t\tallowing(inventoryJournalDao2).getRollup(inventoryKey); will(returnValue(ijRollup2));\n\t\t\t\toneOf(inventoryJournalDao2).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, WAREHOUSE_UID,\tInventoryEventType.STOCK_DEALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory2.getSkuCode(), inventory2.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_0, inventoryDto.getAllocatedQuantity());\n\t}", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }", "public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n\tpublic void upgradeTest() throws PassengerException {\n\t\tFirst myPassenger = new First(10,100);\n\t\tassertEquals(myPassenger, myPassenger.upgrade());\n\t}", "@Test\n\n public void updateWebHook() {\n }", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "void skill( String key, String value ){\n developer.skills.add( value );\n }", "public void testLizard(){\n }", "@Test\n void modifyGrade()\n throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n Result result = ClassMgmtSysUtils.getCourseResult(db.S_JACKY_JUNIOR, db.C_NUMERICAL);\n assert (result != null);\n assertEquals(\"3\", result.getGrade());\n ModifyGradeController mgc = new ModifyGradeController();\n Method modifyGrade = ModifyGradeController.class\n .getDeclaredMethod(\"changeGrade\", EntityManager.class, String.class, Result.class);\n modifyGrade.setAccessible(true);\n modifyGrade.invoke(mgc, TestMain.entityManager, \"5\", result);\n result = ClassMgmtSysUtils.getCourseResult(db.S_JACKY_JUNIOR, db.C_NUMERICAL);\n assert (result != null);\n assertEquals(\"5\", result.getGrade());\n }", "private void upgrade() {\n String[] upgradeOptions = currentPlayer.getLocation().getUpgradeStrings(currentPlayer.getRank());\n // String[] upgradeTypes = {\"credits\", \"dollars\"}; // credits come before dollars for each rank in getUpgradeStrings()\n // String upgradeCostChosen;\n // String upgradeTypeChosen;\n String upgradeChoice;\n\n // choose upgrade\n if (currentPlayer.isComputer()) {\n // get next rank above player's rank\n // String upgradeRankChosen = Integer.toString(currentPlayer.getRank()+1);\n \n // randomly choose between the credit option or the dollar option for the next rank 1 above the player's current rank\n Random rand = new Random();\n int randInt = rand.nextInt(2); \n upgradeChoice = upgradeOptions[randInt];\n }\n else { // if current player is human\n // choose upgrade manually\n upgradeChoice = view.showUpgradePopUp(upgradeOptions);\n }\n\n // parse upgradeChosen and do upgrade\n String[] upgradesSplit = upgradeChoice.split(\"\\\\s+\");\n if(upgradesSplit[4].equals(\"dollars\")){ // upgrade in dollars\n if(Integer.valueOf(upgradesSplit[3]) > currentPlayer.getDollars()){ // upgrade fails\n view.showPopUp(currentPlayer.isComputer(), \"You don't have enough dollars for this upgrade\");\n }\n else{ // upgrade succeeds\n currentPlayer.incDollars(-1*(Integer.valueOf(upgradesSplit[3])));\n currentPlayer.setRank(Integer.valueOf(upgradesSplit[1]));\n view.showPopUp(currentPlayer.isComputer(), \"You are now level \" + upgradesSplit[1]);\n }\n }\n else { // upgrade in credits\n if(Integer.valueOf(upgradesSplit[3]) > currentPlayer.getCredits()){ // upgrade fails\n view.showPopUp(currentPlayer.isComputer(), \"You don't have enough credits for this upgrade\");\n }\n else{ // upgrade succeeds\n currentPlayer.incCredits(-1*(Integer.valueOf(upgradesSplit[3])));\n currentPlayer.setRank(Integer.valueOf(upgradesSplit[1]));\n view.showPopUp(currentPlayer.isComputer(), \"You are now level \" + upgradesSplit[1]);\n \n }\n }\n }", "@Test\n public void testUpdateApartmentStatus() {\n System.out.println(\"updateApartmentStatus\");\n String status = \"Unavailable\";\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n instance.updateApartmentStatus(status, apartmentid);\n }", "@Test\r\n public void testUpdate() {\r\n }", "@Test\n\tvoid purchaseTest() {\n\t\ttestCrew.setMoney(10000);\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tint currentMoney = testCrew.getMoney();\n\t\t\titem.purchase(testCrew);\n\t\t\tassertEquals(testCrew.getMoney(), currentMoney - item.getPrice());\n\t\t\tassertTrue(testCrew.getMedicalItems().get(0).getClass().isAssignableFrom(item.getClass()));\n\t\t\ttestCrew.removeFromMedicalItems(testCrew.getMedicalItems().get(0));\n\t\t}\n\t}", "@Test\npublic void testUpdateAStudentInformation() {\n//TODO: Test goes here...\n System.out.println(StudentDao.updateAStudentInformation(1006, \"6\", 99, 99, 99));\n}", "@Test\n public void updateDecline() throws Exception {\n }", "void skillsFound( String key ) {\n developer.skills = new ArrayList<>();\n }", "@Test\n\tpublic void testTHealthIncrease1() {\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "@Test\n public void testUpdate() {\n\n }", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "Test update(TestData testData, Test test);", "@Test\n\tpublic void testHealthIncrease2() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "public void initSkills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tskills.setLocation(500,300);\n\t\tskills.setSize(400,300);\n\t\t\t\n\t\tt1 = new JButton(\"Dicker Brecher (benötigt 2 Skillpunkte)\");\n\t\tt1.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tt3 = new JButton(\"Kanten-Paule (benötigt 4 Skillpunkte und Dicker Brecher)\");\n\t\tt3.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tt2 = new JButton(\"Brutaler Prügelknabe (benötigt 2 Skillpunkte)\");\n\t\tt2.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 20);\n\t\t\t\t\tplayer.setSkillStrength1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tt4 = new JButton(\"Mega-Mörder brutaler Prügelknabe (benötigt 4 Skillpunkte und Brutaler Prügelknabe)\");\n\t\tt4.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 30);\n\t\t\t\t\tplayer.setSkillStrength2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tt5 = new JButton(\"Ich will nix - danke\");\n\t\tt5.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tskills.setLayout(new GridLayout(3,2));\n\t\tskills.add(t1);\n\t\tskills.add(t2);\n\t\tskills.add(t3);\n\t\tskills.add(t4);\n\t\tskills.add(t5);\n\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\t\n\t\tskills.pack();\n\t\t\n\t}", "@Test\n public void getWantSwap() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy\", 2, true, new Date(2017-01-01), 0, true));\n\n assertNotNull(shiftListResource.getWantSwap(true));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 2, \"dummy\");\n userDAO.removeUser((\"dummy\"));\n }", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "@Test\n public void testAlterExpectTableName1() throws Exception {\n assertFailure(\"alter system lock writer\", 24, \"table name expected\");\n }", "@Test\n void saveOrUpdateSuccess() {\n String newRoleName = \"readOnly\";\n UserRoles toUpdate = (UserRoles) genericDao.getById(3);\n toUpdate.setRoleName(newRoleName);\n genericDao.saveOrUpdate(toUpdate);\n UserRoles retrievedRole = (UserRoles) genericDao.getById(3);\n assertEquals(newRoleName, retrievedRole.getRoleName());\n log.info(\"update role success test\");\n\n }", "@Test\n public void testGet_03() {\n System.out.println(\"get\");\n SkillsList instance = new SkillsList();\n Skill result = instance.get(\"Java\");\n assertTrue(result==null);\n }", "@Test\n public void testUpdateSnack() throws Exception {\n\n Snack testSnack = new Snack(\"3333\");\n testSnack.setName(\"Bananas\");\n testSnack.setPrice(new BigDecimal(\"9.99\"));\n testSnack.setQuantity(89);\n\n dao.addSnack(testSnack.getSnackId(), testSnack);\n\n int qtyBeforeUpdate = testSnack.getQuantity();\n dao.updateSnack(testSnack.getSnackId());\n\n int qtyAfterUpdate = testSnack.getQuantity();\n assertEquals(qtyBeforeUpdate, (qtyAfterUpdate + 1));\n\n dao.removeSnack(testSnack.getSnackId());\n\n }", "public void resetSkills()\r\n\t{\r\n\t\t// TODO Keep Skill List upto date\r\n\t\tfarming = 0;\r\n\t}", "@Test\n void equipWeaponTest() {\n\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(axeTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(swordTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(bowTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(knifeTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(staffTest);\n assertEquals(characterEquipWeaponTest.getEquippedWeapon(), staffTest);\n\n characterEquipWeaponTest0.equipWeapon(staffTest);\n assertNull(characterEquipWeaponTest0.getEquippedWeapon());\n\n }", "private void addSkill(Skill skill) {\n Species.Characteristic att = skill.getGoverningAtt();\n int ability = character.getSpecies().getCharacteristicValue(att);\n skill.setAbility(ability);\n\n skillList.add(skill);\n }", "@Test\n public void testPermitUpgradeUberNew() {\n assertFalse(underTest.permitCmAndStackUpgrade(\"2.2.0\", \"3.2.0\"));\n\n assertFalse(underTest.permitExtensionUpgrade(\"2.2.0\", \"3.2.0\"));\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n String doc = \"\";\r\n String xml = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.update(doc, xml);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "protected void beforeUpdateSkillType(\n RetailscmUserContext userContext,\n SkillType existed,\n String retailStoreCountryCenterId,\n String skillTypeId,\n int skillTypeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "public void runDemo()\n {\n demoAddProduct(); // test we can add items to the list (test printing all the list)\n demoRemoveProduct(); // this will delete the product in the list, the list now has 0 items\n demoRenameProduct(); // this will add a product to the list and rename it, the list now has 1 items\n demoLowStock(); // this test finds a product which is low on stock\n demoFindId(); // this test does not add any products to the list, the \"findProduct\" method will search through all the list of products\n demoGetMatchingName(); // this test does not add any products to the list, the \"getMatchingName\" method will search through all the list of products\n demoDeliver(); // this test does not add any products to the list, its using the product added in the rename test \n demoSellProducts(); // this test does not add any products to the list, its using the product added in the rename test \n demoAddProductWhenTheresAlreadyOne(); // this test attempts to add a product which is already listed\n demoSellProductsWhensStocksTooLow(); // this test is to sell a product when there isn't enough stock\n demoRemoveProductWhichDoesNotExist(); // this test is to remove a product that doesn't exist\n }", "Skill saveSkill(Skill skill);", "@Test\n public void testSaltUpgrade() {\n assertTrue(underTest.permitSaltUpgrade(\"2017.7.5\", \"2017.7.5\"));\n assertTrue(underTest.permitSaltUpgrade(\"2017.7.5\", \"2017.7.7\"));\n assertTrue(underTest.permitSaltUpgrade(\"2017.7.7\", \"2017.7.5\"));\n\n assertTrue(underTest.permitSaltUpgrade(\"2017.7.7\", \"2017.8.0\"));\n assertFalse(underTest.permitSaltUpgrade(\"2017.7.7\", \"2019.7.0\"));\n\n // Allow upgrade between 3000.*, according to new Salt versioning scheme (since then, version numbers are in the format MAJOR.PATCH)\n assertTrue(underTest.permitSaltUpgrade(\"3000.2\", \"3000.2\"));\n assertTrue(underTest.permitSaltUpgrade(\"3000.2\", \"3000.3\"));\n assertFalse(underTest.permitSaltUpgrade(\"3000.2\", \"3001.3\"));\n assertFalse(underTest.permitSaltUpgrade(\"3000\", \"3001\"));\n\n // Do not allow if no Salt version\n assertFalse(underTest.permitSaltUpgrade(\"2017.7.7\", null));\n }" ]
[ "0.7818895", "0.77841914", "0.77663124", "0.77653044", "0.76071966", "0.7368165", "0.71487623", "0.66510063", "0.66028214", "0.63887084", "0.63213307", "0.58576477", "0.5831383", "0.5727263", "0.56551856", "0.5629441", "0.56234205", "0.55996954", "0.5593716", "0.55742687", "0.5529141", "0.5522215", "0.5491118", "0.5456981", "0.54415923", "0.54165334", "0.54058105", "0.5403119", "0.5399284", "0.53629977", "0.5352635", "0.52855146", "0.5282572", "0.5278713", "0.5267883", "0.52643913", "0.52627087", "0.5223446", "0.5222866", "0.52054733", "0.5194928", "0.5183236", "0.5179316", "0.5176901", "0.51709306", "0.51393515", "0.51300913", "0.5127209", "0.51240546", "0.5105074", "0.51020354", "0.50984955", "0.5095711", "0.5059789", "0.5058493", "0.5058371", "0.50582427", "0.50561285", "0.505471", "0.5052974", "0.5046676", "0.50455296", "0.5043377", "0.5037973", "0.50328517", "0.50155205", "0.501171", "0.5006408", "0.50059515", "0.5004905", "0.50018275", "0.4994306", "0.4990346", "0.49843946", "0.49838293", "0.4982555", "0.49789345", "0.49698156", "0.49696404", "0.49665084", "0.49613965", "0.49578694", "0.49572617", "0.49467644", "0.4944104", "0.49291316", "0.49255994", "0.4921655", "0.49170795", "0.48942655", "0.4889086", "0.48828945", "0.48813075", "0.48806322", "0.48799068", "0.4879211", "0.4877476", "0.48724216", "0.4870689", "0.48691863" ]
0.77403843
4
Test_02 of upgradeSkill method, of class SkillsList.
@Test public void testUpgradeSkill_02() { System.out.println("upgradeSkill"); SkillsList instance = new SkillsList(); instance.upgradeSkill("Java"); int result = instance.size(); assertTrue(result==0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "void updateSkill(Skill skill);", "void changeSkill(Long pokemonId, int newSkill);", "@Test\r\n\tvoid testUpdateSkillRecordShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\r\n\t}", "@Test\r\n\tvoid testUpdateSkillRecordShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\t\r\n\t}", "public static int attemptSkillUp(int skillId, Player player){ \n\t\ttry{\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == -1){return -2;}\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == 30){return -2;}\n\t\t\tint[] skillCost;\n\t\t\tskillCost = new int[8];\n\t\t\tint newSkillLevel = DwarfCraftPlayerSkills.getSkillLevel(skillId, player);\n\t\t\t/* Dan thinks skillId could be removed from the arguments in this function\n\t\t\t getSkillTrainingCost */\n\t\t\tskillCost = Skills.values()[skillId].getSkillTrainingCost(skillId, newSkillLevel, player);\n\t\t\tfor (int i = 0; i < skillCost[0];i++){\n\t\t\t\t//check inventory quantity for needed items\n\t\t\t\tif (DwarfCraftInventory.countInventoryItems(skillCost[1+2*i], player) < skillCost[2+2*i]){return -1;}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\t\tcatch(NumberFormatException f) {return 0;}\n\t}", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "public Skills chooseSkill();", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "public void transformedSkills()\r\n\t{\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5659, 1), false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(SKILLS);\r\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "public void unlockSkill() {\n int i = 0;\n while (skills.get(i).isUnlocked()) {\n i = i + 1;\n }\n skills.get(i).unlock();\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.LEER);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.EMBER)));\n levelUpSkills.put(8, new ArrayList<Integer>(Arrays.asList(SkillFactory.WORK_UP)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.HEADBUTT)));\n levelUpSkills.put(15, new ArrayList<Integer>(Arrays.asList(SkillFactory.NOBLE_ROAR)));\n levelUpSkills.put(20, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAKE_DOWN)));\n levelUpSkills.put(23, new ArrayList<Integer>(Arrays.asList(SkillFactory.FIRE_FANG)));\n levelUpSkills.put(28, new ArrayList<Integer>(Arrays.asList(SkillFactory.ENDEAVOR)));\n levelUpSkills.put(33, new ArrayList<Integer>(Arrays.asList(SkillFactory.ECHOED_VOICE)));\n levelUpSkills.put(36, new ArrayList<Integer>(Arrays.asList(SkillFactory.FLAMETHROWER)));\n levelUpSkills.put(39, new ArrayList<Integer>(Arrays.asList(SkillFactory.CRUNCH)));\n levelUpSkills.put(43, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYPER_VOICE)));\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.INCINERATE)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.OVERHEAT)));\n }", "public Skill update(Skill skill)\r\n {\r\n name = skill.getName();\r\n shortName = skill.getShortName();\r\n selectable = skill.isSelectable();\r\n baseCost = skill.getBaseCost();\r\n levelCost = skill.getLevelCost();\r\n \r\n return this;\r\n }", "@Test\n public void updateShiftList(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertTrue(shiftListResource.updateShiftlist(new ShiftList(\"dummy3\", 1, true, new Date(2015-01-02), 50, false)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 1, \"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n }", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.MEGAHORN);\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.TAIL_WHIP);\n beginnerSkills.add(SkillFactory.WATER_GUN);\n beginnerSkills.add(SkillFactory.WATER_SPORT);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAIL_WHIP)));\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_GUN)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_SPORT)));\n levelUpSkills.put(13, new ArrayList<Integer>(Arrays.asList(SkillFactory.FOCUS_ENERGY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RAZOR_SHELL)));\n levelUpSkills.put(21, new ArrayList<Integer>(Arrays.asList(SkillFactory.FURY_CUTTER)));\n levelUpSkills.put(26, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_PULSE)));\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.REVENGE)));\n levelUpSkills.put(34, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_JET)));\n //39 ENCORE\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_TAIL)));\n //51 RETALIATE\n levelUpSkills.put(58, new ArrayList<Integer>(Arrays.asList(SkillFactory.SWORDS_DANCE)));\n levelUpSkills.put(63, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYDRO_PUMP)));\n initEvolutionSkills();\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n //TODO: CONVERSION 2\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.CONVERSION);\n beginnerSkills.add(SkillFactory.SHARPEN);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.PSYBEAM)));\n levelUpSkills.put(12, new ArrayList<Integer>(Arrays.asList(SkillFactory.AGILITY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RECOVER)));\n //TODO: MAGNET RISE 23\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.SIGNAL_BEAM)));\n //TODO: RECYCLE 34\n levelUpSkills.put(40, new ArrayList<Integer>(Arrays.asList(SkillFactory.DISCHARGE)));\n levelUpSkills.put(45, new ArrayList<Integer>(Arrays.asList(SkillFactory.LOCK_ON)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.TRI_ATTACK)));\n //TODO: MAGIC COAT 56\n levelUpSkills.put(62, new ArrayList<Integer>(Arrays.asList(SkillFactory.ZAP_CANNON)));\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "private void adminGiveAllSkills(Player activeChar)\r\n\t{\r\n\t\tGameObject target = activeChar.getTarget();\r\n\t\tPlayer player = null;\r\n\t\tif(target != null && target.isPlayer())\r\n\t\t\tplayer = (Player) target;\r\n\t\telse\r\n\t\t{\r\n\t\t\tactiveChar.sendPacket(SystemMsg.INVALID_TARGET);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint unLearnable = 0;\r\n\t\tint skillCounter = 0;\r\n\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\twhile(skills.size() > unLearnable)\r\n\t\t{\r\n\t\t\tunLearnable = 0;\r\n\t\t\tfor(SkillLearn s : skills)\r\n\t\t\t{\r\n\t\t\t\tSkill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());\r\n\t\t\t\tif(sk == null || !sk.getCanLearn(player.getClassId()))\r\n\t\t\t\t{\r\n\t\t\t\t\tunLearnable++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(player.getSkillLevel(sk.getId()) == -1)\r\n\t\t\t\t\tskillCounter++;\r\n\t\t\t\tplayer.addSkill(sk, true);\r\n\t\t\t}\r\n\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\t}\r\n\r\n\t\tplayer.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message22\", player, skillCounter));\r\n\t\tplayer.sendPacket(new SkillList(player));\r\n\t\tactiveChar.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message23\", activeChar, skillCounter, player.getName()));\r\n\t}", "@Test\n public void testAdd_01() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class); \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "public abstract void Upgrade(Tower t);", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "static public void adjustRewardForSelect(ArrayList<RewardItem> rewardList) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (toChangeCard != null) {\n if (item.type == RewardItem.RewardType.CARD) {\n boolean isExist = false;\n for (AbstractCard card : item.cards) {\n if (card.cardID.equals(toChangeCard.cardID)) {\n isExist = true;\n if (card.canUpgrade()) {\n card.upgrade();\n }\n break;\n }\n }\n if (!isExist) {\n boolean isChanged = false;\n // check same rarity\n for (AbstractCard card : item.cards) {\n if (card.rarity == toChangeCard.rarity) {\n if (card.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.remove(card);\n item.cards.add(toChangeCard);\n isChanged = true;\n break;\n }\n }\n if (!isChanged) {\n AbstractCard removed = item.cards.remove(0);\n if (removed.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.add(toChangeCard);\n }\n }\n }\n }\n }\n\n if (selectRelic != null) {\n if (AbstractDungeon.player.hasRelic(selectRelic)) {\n selectRelic = null;\n } else {\n boolean isExist = false;\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n if (item.relic.relicId.equals(selectRelic)) {\n isExist = true;\n }\n }\n\n }\n if (!isExist) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n rewardList.set(i, new RewardItem(RelicLibrary.getRelic(selectRelic)));\n }\n }\n }\n }\n clearHasRelicInPool();\n }\n }", "@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }", "public Skills getChosenSkill();", "public void addSkill(Skill newskill) {\n skills.addElement(newskill);\n }", "@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}", "public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "void skill( String key, String value ){\n developer.skills.add( value );\n }", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void updateShiftListCatch(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertFalse(shiftListResource.updateShiftlist(new ShiftList(\"notdummy3\", 1, true, new Date(2015-01-01), 50, false)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 1, \"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n }", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "private void upgrade() {\n String[] upgradeOptions = currentPlayer.getLocation().getUpgradeStrings(currentPlayer.getRank());\n // String[] upgradeTypes = {\"credits\", \"dollars\"}; // credits come before dollars for each rank in getUpgradeStrings()\n // String upgradeCostChosen;\n // String upgradeTypeChosen;\n String upgradeChoice;\n\n // choose upgrade\n if (currentPlayer.isComputer()) {\n // get next rank above player's rank\n // String upgradeRankChosen = Integer.toString(currentPlayer.getRank()+1);\n \n // randomly choose between the credit option or the dollar option for the next rank 1 above the player's current rank\n Random rand = new Random();\n int randInt = rand.nextInt(2); \n upgradeChoice = upgradeOptions[randInt];\n }\n else { // if current player is human\n // choose upgrade manually\n upgradeChoice = view.showUpgradePopUp(upgradeOptions);\n }\n\n // parse upgradeChosen and do upgrade\n String[] upgradesSplit = upgradeChoice.split(\"\\\\s+\");\n if(upgradesSplit[4].equals(\"dollars\")){ // upgrade in dollars\n if(Integer.valueOf(upgradesSplit[3]) > currentPlayer.getDollars()){ // upgrade fails\n view.showPopUp(currentPlayer.isComputer(), \"You don't have enough dollars for this upgrade\");\n }\n else{ // upgrade succeeds\n currentPlayer.incDollars(-1*(Integer.valueOf(upgradesSplit[3])));\n currentPlayer.setRank(Integer.valueOf(upgradesSplit[1]));\n view.showPopUp(currentPlayer.isComputer(), \"You are now level \" + upgradesSplit[1]);\n }\n }\n else { // upgrade in credits\n if(Integer.valueOf(upgradesSplit[3]) > currentPlayer.getCredits()){ // upgrade fails\n view.showPopUp(currentPlayer.isComputer(), \"You don't have enough credits for this upgrade\");\n }\n else{ // upgrade succeeds\n currentPlayer.incCredits(-1*(Integer.valueOf(upgradesSplit[3])));\n currentPlayer.setRank(Integer.valueOf(upgradesSplit[1]));\n view.showPopUp(currentPlayer.isComputer(), \"You are now level \" + upgradesSplit[1]);\n \n }\n }\n }", "void skillsFound( String key ) {\n developer.skills = new ArrayList<>();\n }", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Test\n public void testUpdateWordList() throws Exception {\n System.out.println(\"updateWordList\");\n\n String newDescription = \"Changed the description.\";\n String newName = \"TEST LIST NEW NAME\";\n\n testList.setDescription(newDescription);\n testList.setName(newName);\n testList.setType(ListType.PRIVATE);\n WordListApi.updateWordList(token, testList);\n\n // check that the list has 2 items\n WordList result = WordListApi.getWordList(token, testList.getPermalink());\n assertEquals(result.getDescription(), newDescription);\n assertEquals(result.getName(), newName);\n assertEquals(result.getType(), ListType.PRIVATE);\n assertEquals(result.getId(), testList.getId());\n assertEquals(result.getNumberWordsInList(), testList.getNumberWordsInList());\n assertEquals(result.getPermalink(), testList.getPermalink());\n assertEquals(result.getUserId(), testList.getUserId());\n assertEquals(result.getUsername(), testList.getUsername());\n assertFalse(result.getUpdatedAt().equals(testList.getUpdatedAt()));\n }", "Skill saveSkill(Skill skill);", "@Test\n\tpublic void testHealthIncrease4() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "private void addSkill(Skill skill) {\n Species.Characteristic att = skill.getGoverningAtt();\n int ability = character.getSpecies().getCharacteristicValue(att);\n skill.setAbility(ability);\n\n skillList.add(skill);\n }", "@Ignore\n @Test public void modifySecretSeries_success() throws Exception {\n }", "@Test\n public void updateTimeList(){\n userDAO.createUser(new User(\"dummy2\", \"dummy2\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy2\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.updateTimeList(new TimeList(\"dummy2\", 1990, 0, 65, 1, 1)));\n\n //clean up\n timeListDAO.removeTimeList(1990, 0, \"dummy2\");\n userDAO.removeUser(\"dummy2\");\n }", "public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "@Test\n public void playerWinDoublonsBySellingHisProductionTest(){\n player.playRole(new Craftman(stockGlobal));\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(1,player.getInventory().getDoublons());\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock-1);\n\n ArrayList<Plantation> plantationsCorn = new ArrayList<>();\n plantationsCorn.add(new CornPlantation());\n player.playRole(new Trader(stockGlobal,1));\n player.playRole(new Farmer(plantationsCorn,stockGlobal));\n\n assertEquals(true,player.getInventory().getDoublons()==1);\n assertEquals(true,stockGlobal.getStockResource(TypeWare.CORN)==initialCornStock);\n\n\n\n }", "protected void beforeUpdateSkillType(\n RetailscmUserContext userContext,\n SkillType existed,\n String retailStoreCountryCenterId,\n String skillTypeId,\n int skillTypeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "@Test\n void testUpdateGoalie() {\n\n }", "public void updatAttackArmies(){\n\t\t\n\t\tfinal String s = attackToComboBox.getSelectedItem().toString();\n\t\tCountry country = MainPlayScreen.this.game.getBoard().getCountryByName(s);\n\t\t\t\n\t\tfinal int armies = MainPlayScreen.this.game.countryArmies.get(country);\n\t\tSystem.out.println(s + \" Defender Armies: \" + armies);\n\t\t\n\t\tif( armies == 1){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t}// end of if statement\n\t\t\n\t\telse if( armies == 2){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\t\n\t\t} // end of else if statement\n\t\t\n\t\telse{\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\tnumberOfArmies[5].addItem(3);\n\t\t\t\n\t\t}// end of else statement\n\t\tnumberOfArmies[5].repaint();\n\t}", "public void initSkills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tskills.setLocation(500,300);\n\t\tskills.setSize(400,300);\n\t\t\t\n\t\tt1 = new JButton(\"Dicker Brecher (benötigt 2 Skillpunkte)\");\n\t\tt1.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tt3 = new JButton(\"Kanten-Paule (benötigt 4 Skillpunkte und Dicker Brecher)\");\n\t\tt3.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tt2 = new JButton(\"Brutaler Prügelknabe (benötigt 2 Skillpunkte)\");\n\t\tt2.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 20);\n\t\t\t\t\tplayer.setSkillStrength1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tt4 = new JButton(\"Mega-Mörder brutaler Prügelknabe (benötigt 4 Skillpunkte und Brutaler Prügelknabe)\");\n\t\tt4.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 30);\n\t\t\t\t\tplayer.setSkillStrength2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tt5 = new JButton(\"Ich will nix - danke\");\n\t\tt5.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tskills.setLayout(new GridLayout(3,2));\n\t\tskills.add(t1);\n\t\tskills.add(t2);\n\t\tskills.add(t3);\n\t\tskills.add(t4);\n\t\tskills.add(t5);\n\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\t\n\t\tskills.pack();\n\t\t\n\t}", "public void resetSkills()\r\n\t{\r\n\t\t// TODO Keep Skill List upto date\r\n\t\tfarming = 0;\r\n\t}", "@Test\n public void testGet_02() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"C\");\n assertTrue(result==null);\n }", "@Test\n public void updateDecline() throws Exception {\n }", "public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}", "@Test\n void modifyGrade()\n throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n Result result = ClassMgmtSysUtils.getCourseResult(db.S_JACKY_JUNIOR, db.C_NUMERICAL);\n assert (result != null);\n assertEquals(\"3\", result.getGrade());\n ModifyGradeController mgc = new ModifyGradeController();\n Method modifyGrade = ModifyGradeController.class\n .getDeclaredMethod(\"changeGrade\", EntityManager.class, String.class, Result.class);\n modifyGrade.setAccessible(true);\n modifyGrade.invoke(mgc, TestMain.entityManager, \"5\", result);\n result = ClassMgmtSysUtils.getCourseResult(db.S_JACKY_JUNIOR, db.C_NUMERICAL);\n assert (result != null);\n assertEquals(\"5\", result.getGrade());\n }", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentRemoveSku() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER,\tQUANTITY_10, order, null);\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\t\tfinal InventoryJournalRollupImpl ijRollup2 = new InventoryJournalRollupImpl();\n\t\tijRollup2.setAllocatedQuantityDelta(QUANTITY_NEG_10);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\t\tfinal InventoryJournalDao inventoryJournalDao2 = context.mock(InventoryJournalDao.class, INVENTORY_JOURNAL_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(inventoryDao2).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory2));\n\t\t\t\tallowing(inventoryJournalDao2).getRollup(inventoryKey); will(returnValue(ijRollup2));\n\t\t\t\toneOf(inventoryJournalDao2).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, WAREHOUSE_UID,\tInventoryEventType.STOCK_DEALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory2.getSkuCode(), inventory2.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_0, inventoryDto.getAllocatedQuantity());\n\t}", "protected void addSkill(String name) {\r\n\t\tthis.skills.add(name.toLowerCase());\r\n\t}", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "void updateLeaderSlot(String username, ArrayList<LightLeaderCard> leaderSlot);", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "public void setSkillPrediction(Skills skill);", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentChangeQty() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tfinal long warehouseUid = WAREHOUSE_UID;\n\t\tinventory.setWarehouseUid(warehouseUid);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tfinal String skuCode = SKU_CODE;\n\t\tproductSku.setSkuCode(skuCode);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(skuCode, warehouseUid); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t}\n\t\t});\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao2).getInventory(skuCode, warehouseUid); will(returnValue(inventory2));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(\n\t\t\t\torderSku, AllocationEventType.ORDER_ADJUSTMENT_CHANGEQTY, EVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10 - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10 + QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\t}", "public abstract void doUpgrade();", "public abstract boolean modifyRole(int game_id, int numberOfWerewolves, boolean hasWitch, boolean hasFortuneTeller, boolean hasLittleGirl, boolean hasCupid, boolean hasHunter) throws SQLException;", "public void addSkills(final Characters player, final Characters enemy)\r\n\t{\r\n\t\tskillOne = new JButton(\"Skill 1\");\r\n\t\tadd(skillOne);\r\n\t\tskillOne.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tcombatLog = combatLog + \"\\n\" + player.attack(enemy);\r\n\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\tstate.setWaiting(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillTwo = new JButton(\"Skill 2\");\r\n\t\tadd(skillTwo);\r\n\t\tskillTwo.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(0, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillThree = new JButton(\"Skill 3\");\r\n\t\tadd(skillThree);\r\n\t\tskillThree.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(1, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillFour = new JButton(\"Skill 4\");\r\n\t\tadd(skillFour);\r\n\t\tskillFour.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(2, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillFive = new JButton(\"Skill 5\");\r\n\t\tadd(skillFive);\r\n\t\tskillFive.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(3, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "@Test(priority=3)\n\t\tpublic void addToWishlist() throws Exception{\n\t\t\t\n//'**********************************************************\n//Calling method to click on 'Add to Wishlist' link and verify success toast is displayed\n//'**********************************************************\n\t\t\tThread.sleep(1500);\n\t\t\tgalaxyPage.clickOnAddToWishlist();\n\t\t\tThread.sleep(1500);\n\t\t\tAssert.assertTrue(galaxyPage.getSuccessMessage().contains(\"Success\"), \"Product is not added to Wishlist\");\n\t\t\textentTest.log(LogStatus.PASS,\"Success: You have added Samsung Galaxy Tab 10.1 to your wish list!\");\n//'**********************************************************\n//Calling method to close the success toast\n//'**********************************************************\n\t\t\tgalaxyPage.closeSuccesstoast();\n//'**********************************************************\n//Calling method to click on 'Wishlist' link and check user is redirected to 'My Wishlist' page\n//'**********************************************************\n\t\t\tmyWishlistPage = galaxyPage.clickOnWishlist();\n\t\t\t\n\t\t\tAssert.assertTrue(myWishlistPage.getTitle().equals(\"My Wish List\"), \"User is not redirected to wishlist page\");\n\t\t\textentTest.log(LogStatus.PASS,\"User is redirected to My Wishlist Page\");\n\t\t\t\n//'**********************************************************\n//Verifying count in 'Wishlist' link is equal to number of products in the page\n//'**********************************************************\n\t\t\tAssert.assertEquals(myWishlistPage.valueInWishlistLink(), myWishlistPage.numOfProductsInTable(), \"Value shown in wishlist link is different from number of records in the table\");\n\t\t\textentTest.log(LogStatus.PASS,\"Product added: Value shown in wishlist link is equal to number of records in the table\");\n\t\t\t\n\t\t\t}", "@Override\n\tpublic void addSkill(Skill theSkill) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//add/update the skill\n\t\tcurrentSession.saveOrUpdate(theSkill);\n\t}", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentAddSku() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tproductSku.setGuid(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(beanFactory).getBean(INVENTORY_JOURNAL);\n\t\t\t\twill(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(orderSku, AllocationEventType.ORDER_ADJUSTMENT_ADDSKU,\tEVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\t}", "@Test\n public void update() {\n }", "@Test\n\tpublic void testHealthIncrease3() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "Test update(TestData testData, Test test);", "public void setRechargeTime(Skills skill, int time);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tskillUpdown(skill.getSid());\n\t\t\t}", "public int updateLevel(int skill, int amount, int maximum) {\r\n if (amount > 0 && dynamicLevels[skill] > maximum) {\r\n return -amount;\r\n }\r\n int left = (dynamicLevels[skill] + amount) - maximum;\r\n int level = dynamicLevels[skill] += amount;\r\n if (level < 0) {\r\n dynamicLevels[skill] = 0;\r\n } else if (amount < 0 && level < maximum) {\r\n dynamicLevels[skill] = maximum;\r\n } else if (amount > 0 && level > maximum) {\r\n dynamicLevels[skill] = maximum;\r\n }\r\n if (restoration[skill] != null) {\r\n int ticks = 100;\r\n if (entity instanceof Player) {\r\n if (((Player) entity).getPrayer().get(PrayerType.BERSERKER)) {\r\n ticks = 75;\r\n }\r\n }\r\n restoration[skill].restart(ticks);\r\n }\r\n if (entity instanceof Player) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, skill));\r\n }\r\n return left;\r\n }", "public abstract void upgrade();", "@Test\n void saveOrUpdateSuccess() {\n String newRoleName = \"readOnly\";\n UserRoles toUpdate = (UserRoles) genericDao.getById(3);\n toUpdate.setRoleName(newRoleName);\n genericDao.saveOrUpdate(toUpdate);\n UserRoles retrievedRole = (UserRoles) genericDao.getById(3);\n assertEquals(newRoleName, retrievedRole.getRoleName());\n log.info(\"update role success test\");\n\n }", "@Test(dependsOnMethods = \"testUpdateCertificate\")\n public void testUpdateCertificateVersion() {\n throw new SkipException(\"bug in requirements for function\");\n }", "public void modify(User user, Student student, String[] skills){\r\n\t\tMySQLConnector.executeMySQL(\"update\", \"UPDATE users SET \"\r\n\t\t\t\t+ \"contact_num = '\" + user.getContactNum() + \"',\"\r\n\t\t\t\t+ \"email = '\" + user.getEmail() + \"'\"\r\n\t\t\t\t+ \"WHERE id = \" + user.getID());\r\n\t\t\r\n\t\tMySQLConnector.executeMySQL(\"update\", \"UPDATE students SET \"\r\n\t\t\t\t+ \"second_major = '\" + student.getSecondMajor() + \"' \"\r\n\t\t\t\t+ \"WHERE id = \" + user.getID());\r\n\t\t\r\n\t\t//CLEAR ALL USER_SKILL DATA IN DB\r\n\t\tMySQLConnector.executeMySQL(\"delete\", \"DELETE FROM user_skills WHERE user_id = \" + user.getID());\r\n\t\t\r\n\t\tUserDataManager udm = new UserDataManager();\r\n\t\tudm.addSkills(skills, user.getID());\r\n\t\t\r\n\t}", "Update withSku(Sku sku);", "@Test\r\n public void testUpdate() {\r\n }", "@Test\n public void testUpdateApartmentStatus() {\n System.out.println(\"updateApartmentStatus\");\n String status = \"Unavailable\";\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n instance.updateApartmentStatus(status, apartmentid);\n }", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "@Test\n public void getWantSwap() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy\", 2, true, new Date(2017-01-01), 0, true));\n\n assertNotNull(shiftListResource.getWantSwap(true));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 2, \"dummy\");\n userDAO.removeUser((\"dummy\"));\n }" ]
[ "0.78573734", "0.77199054", "0.76980525", "0.76486987", "0.76297516", "0.7405251", "0.714032", "0.69346267", "0.6559804", "0.63939875", "0.6204124", "0.5850409", "0.58382595", "0.5825235", "0.57135016", "0.5673692", "0.5555077", "0.55545306", "0.55447453", "0.553368", "0.5496496", "0.5486672", "0.547427", "0.5461938", "0.5453234", "0.54214907", "0.5391864", "0.53864324", "0.53740484", "0.53445435", "0.53151953", "0.5275003", "0.52716786", "0.52670205", "0.52460194", "0.5241809", "0.52331376", "0.5226681", "0.52243006", "0.52117336", "0.5183924", "0.5159442", "0.5158831", "0.5149358", "0.5144925", "0.51428187", "0.5120238", "0.51120996", "0.5110069", "0.5089151", "0.5072849", "0.50707036", "0.5056597", "0.50473815", "0.50459486", "0.5022557", "0.5020321", "0.50171113", "0.5011855", "0.50070566", "0.5005045", "0.49865395", "0.49791887", "0.49695858", "0.49693665", "0.4966873", "0.49666724", "0.496191", "0.49605387", "0.49583778", "0.49579817", "0.49577966", "0.49482042", "0.4944664", "0.4938016", "0.49375427", "0.49366", "0.4922509", "0.491503", "0.4897014", "0.4896373", "0.48959908", "0.48948345", "0.48942348", "0.48818713", "0.48815605", "0.4880851", "0.4879122", "0.48743317", "0.48721388", "0.48711058", "0.4865846", "0.48643526", "0.4862129", "0.4855416", "0.484953", "0.48491323", "0.48477063", "0.48442984", "0.48349276" ]
0.75690943
5
Test_03 of upgradeSkill method, of class SkillsList.
@Test public void testUpgradeSkill_03() { System.out.println("upgradeSkill"); Skill s = mock(Skill.class); when(s.getName()).thenReturn("Java"); when(s.getType()).thenReturn("Technical"); when(s.getCost()).thenReturn(2); when(s.getLevel()).thenReturn(4); when(s.getCostFormula()).thenReturn(Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s); instance.upgradeSkill("C"); int result = instance.get("Java").getLevel(); assertTrue(result==4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "void updateSkill(Skill skill);", "void changeSkill(Long pokemonId, int newSkill);", "@Test\r\n\tvoid testUpdateSkillRecordShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\r\n\t}", "@Test\r\n\tvoid testUpdateSkillRecordShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\t\r\n\t}", "public static int attemptSkillUp(int skillId, Player player){ \n\t\ttry{\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == -1){return -2;}\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == 30){return -2;}\n\t\t\tint[] skillCost;\n\t\t\tskillCost = new int[8];\n\t\t\tint newSkillLevel = DwarfCraftPlayerSkills.getSkillLevel(skillId, player);\n\t\t\t/* Dan thinks skillId could be removed from the arguments in this function\n\t\t\t getSkillTrainingCost */\n\t\t\tskillCost = Skills.values()[skillId].getSkillTrainingCost(skillId, newSkillLevel, player);\n\t\t\tfor (int i = 0; i < skillCost[0];i++){\n\t\t\t\t//check inventory quantity for needed items\n\t\t\t\tif (DwarfCraftInventory.countInventoryItems(skillCost[1+2*i], player) < skillCost[2+2*i]){return -1;}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\t\tcatch(NumberFormatException f) {return 0;}\n\t}", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "public Skills chooseSkill();", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "public void transformedSkills()\r\n\t{\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5659, 1), false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(SKILLS);\r\n\t}", "public Skill update(Skill skill)\r\n {\r\n name = skill.getName();\r\n shortName = skill.getShortName();\r\n selectable = skill.isSelectable();\r\n baseCost = skill.getBaseCost();\r\n levelCost = skill.getLevelCost();\r\n \r\n return this;\r\n }", "@Test\n public void updateShiftList(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertTrue(shiftListResource.updateShiftlist(new ShiftList(\"dummy3\", 1, true, new Date(2015-01-02), 50, false)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 1, \"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.LEER);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.EMBER)));\n levelUpSkills.put(8, new ArrayList<Integer>(Arrays.asList(SkillFactory.WORK_UP)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.HEADBUTT)));\n levelUpSkills.put(15, new ArrayList<Integer>(Arrays.asList(SkillFactory.NOBLE_ROAR)));\n levelUpSkills.put(20, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAKE_DOWN)));\n levelUpSkills.put(23, new ArrayList<Integer>(Arrays.asList(SkillFactory.FIRE_FANG)));\n levelUpSkills.put(28, new ArrayList<Integer>(Arrays.asList(SkillFactory.ENDEAVOR)));\n levelUpSkills.put(33, new ArrayList<Integer>(Arrays.asList(SkillFactory.ECHOED_VOICE)));\n levelUpSkills.put(36, new ArrayList<Integer>(Arrays.asList(SkillFactory.FLAMETHROWER)));\n levelUpSkills.put(39, new ArrayList<Integer>(Arrays.asList(SkillFactory.CRUNCH)));\n levelUpSkills.put(43, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYPER_VOICE)));\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.INCINERATE)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.OVERHEAT)));\n }", "public void unlockSkill() {\n int i = 0;\n while (skills.get(i).isUnlocked()) {\n i = i + 1;\n }\n skills.get(i).unlock();\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.MEGAHORN);\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.TAIL_WHIP);\n beginnerSkills.add(SkillFactory.WATER_GUN);\n beginnerSkills.add(SkillFactory.WATER_SPORT);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAIL_WHIP)));\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_GUN)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_SPORT)));\n levelUpSkills.put(13, new ArrayList<Integer>(Arrays.asList(SkillFactory.FOCUS_ENERGY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RAZOR_SHELL)));\n levelUpSkills.put(21, new ArrayList<Integer>(Arrays.asList(SkillFactory.FURY_CUTTER)));\n levelUpSkills.put(26, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_PULSE)));\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.REVENGE)));\n levelUpSkills.put(34, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_JET)));\n //39 ENCORE\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_TAIL)));\n //51 RETALIATE\n levelUpSkills.put(58, new ArrayList<Integer>(Arrays.asList(SkillFactory.SWORDS_DANCE)));\n levelUpSkills.put(63, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYDRO_PUMP)));\n initEvolutionSkills();\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n //TODO: CONVERSION 2\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.CONVERSION);\n beginnerSkills.add(SkillFactory.SHARPEN);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.PSYBEAM)));\n levelUpSkills.put(12, new ArrayList<Integer>(Arrays.asList(SkillFactory.AGILITY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RECOVER)));\n //TODO: MAGNET RISE 23\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.SIGNAL_BEAM)));\n //TODO: RECYCLE 34\n levelUpSkills.put(40, new ArrayList<Integer>(Arrays.asList(SkillFactory.DISCHARGE)));\n levelUpSkills.put(45, new ArrayList<Integer>(Arrays.asList(SkillFactory.LOCK_ON)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.TRI_ATTACK)));\n //TODO: MAGIC COAT 56\n levelUpSkills.put(62, new ArrayList<Integer>(Arrays.asList(SkillFactory.ZAP_CANNON)));\n }", "@Test\n public void testAdd_01() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class); \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "private void adminGiveAllSkills(Player activeChar)\r\n\t{\r\n\t\tGameObject target = activeChar.getTarget();\r\n\t\tPlayer player = null;\r\n\t\tif(target != null && target.isPlayer())\r\n\t\t\tplayer = (Player) target;\r\n\t\telse\r\n\t\t{\r\n\t\t\tactiveChar.sendPacket(SystemMsg.INVALID_TARGET);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint unLearnable = 0;\r\n\t\tint skillCounter = 0;\r\n\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\twhile(skills.size() > unLearnable)\r\n\t\t{\r\n\t\t\tunLearnable = 0;\r\n\t\t\tfor(SkillLearn s : skills)\r\n\t\t\t{\r\n\t\t\t\tSkill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());\r\n\t\t\t\tif(sk == null || !sk.getCanLearn(player.getClassId()))\r\n\t\t\t\t{\r\n\t\t\t\t\tunLearnable++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(player.getSkillLevel(sk.getId()) == -1)\r\n\t\t\t\t\tskillCounter++;\r\n\t\t\t\tplayer.addSkill(sk, true);\r\n\t\t\t}\r\n\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\t}\r\n\r\n\t\tplayer.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message22\", player, skillCounter));\r\n\t\tplayer.sendPacket(new SkillList(player));\r\n\t\tactiveChar.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message23\", activeChar, skillCounter, player.getName()));\r\n\t}", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public void addSkill(Skill newskill) {\n skills.addElement(newskill);\n }", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }", "@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "static public void adjustRewardForSelect(ArrayList<RewardItem> rewardList) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (toChangeCard != null) {\n if (item.type == RewardItem.RewardType.CARD) {\n boolean isExist = false;\n for (AbstractCard card : item.cards) {\n if (card.cardID.equals(toChangeCard.cardID)) {\n isExist = true;\n if (card.canUpgrade()) {\n card.upgrade();\n }\n break;\n }\n }\n if (!isExist) {\n boolean isChanged = false;\n // check same rarity\n for (AbstractCard card : item.cards) {\n if (card.rarity == toChangeCard.rarity) {\n if (card.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.remove(card);\n item.cards.add(toChangeCard);\n isChanged = true;\n break;\n }\n }\n if (!isChanged) {\n AbstractCard removed = item.cards.remove(0);\n if (removed.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.add(toChangeCard);\n }\n }\n }\n }\n }\n\n if (selectRelic != null) {\n if (AbstractDungeon.player.hasRelic(selectRelic)) {\n selectRelic = null;\n } else {\n boolean isExist = false;\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n if (item.relic.relicId.equals(selectRelic)) {\n isExist = true;\n }\n }\n\n }\n if (!isExist) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n rewardList.set(i, new RewardItem(RelicLibrary.getRelic(selectRelic)));\n }\n }\n }\n }\n clearHasRelicInPool();\n }\n }", "public abstract void Upgrade(Tower t);", "@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public Skills getChosenSkill();", "@Test\n public void updateShiftListCatch(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertFalse(shiftListResource.updateShiftlist(new ShiftList(\"notdummy3\", 1, true, new Date(2015-01-01), 50, false)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 1, \"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n }", "public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testHealthIncrease4() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "void skill( String key, String value ){\n developer.skills.add( value );\n }", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "Skill saveSkill(Skill skill);", "private void upgrade() {\n String[] upgradeOptions = currentPlayer.getLocation().getUpgradeStrings(currentPlayer.getRank());\n // String[] upgradeTypes = {\"credits\", \"dollars\"}; // credits come before dollars for each rank in getUpgradeStrings()\n // String upgradeCostChosen;\n // String upgradeTypeChosen;\n String upgradeChoice;\n\n // choose upgrade\n if (currentPlayer.isComputer()) {\n // get next rank above player's rank\n // String upgradeRankChosen = Integer.toString(currentPlayer.getRank()+1);\n \n // randomly choose between the credit option or the dollar option for the next rank 1 above the player's current rank\n Random rand = new Random();\n int randInt = rand.nextInt(2); \n upgradeChoice = upgradeOptions[randInt];\n }\n else { // if current player is human\n // choose upgrade manually\n upgradeChoice = view.showUpgradePopUp(upgradeOptions);\n }\n\n // parse upgradeChosen and do upgrade\n String[] upgradesSplit = upgradeChoice.split(\"\\\\s+\");\n if(upgradesSplit[4].equals(\"dollars\")){ // upgrade in dollars\n if(Integer.valueOf(upgradesSplit[3]) > currentPlayer.getDollars()){ // upgrade fails\n view.showPopUp(currentPlayer.isComputer(), \"You don't have enough dollars for this upgrade\");\n }\n else{ // upgrade succeeds\n currentPlayer.incDollars(-1*(Integer.valueOf(upgradesSplit[3])));\n currentPlayer.setRank(Integer.valueOf(upgradesSplit[1]));\n view.showPopUp(currentPlayer.isComputer(), \"You are now level \" + upgradesSplit[1]);\n }\n }\n else { // upgrade in credits\n if(Integer.valueOf(upgradesSplit[3]) > currentPlayer.getCredits()){ // upgrade fails\n view.showPopUp(currentPlayer.isComputer(), \"You don't have enough credits for this upgrade\");\n }\n else{ // upgrade succeeds\n currentPlayer.incCredits(-1*(Integer.valueOf(upgradesSplit[3])));\n currentPlayer.setRank(Integer.valueOf(upgradesSplit[1]));\n view.showPopUp(currentPlayer.isComputer(), \"You are now level \" + upgradesSplit[1]);\n \n }\n }\n }", "private void addSkill(Skill skill) {\n Species.Characteristic att = skill.getGoverningAtt();\n int ability = character.getSpecies().getCharacteristicValue(att);\n skill.setAbility(ability);\n\n skillList.add(skill);\n }", "@Test\n public void updateTimeList(){\n userDAO.createUser(new User(\"dummy2\", \"dummy2\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy2\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.updateTimeList(new TimeList(\"dummy2\", 1990, 0, 65, 1, 1)));\n\n //clean up\n timeListDAO.removeTimeList(1990, 0, \"dummy2\");\n userDAO.removeUser(\"dummy2\");\n }", "void skillsFound( String key ) {\n developer.skills = new ArrayList<>();\n }", "protected void beforeUpdateSkillType(\n RetailscmUserContext userContext,\n SkillType existed,\n String retailStoreCountryCenterId,\n String skillTypeId,\n int skillTypeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "@Test\n public void testUpdateWordList() throws Exception {\n System.out.println(\"updateWordList\");\n\n String newDescription = \"Changed the description.\";\n String newName = \"TEST LIST NEW NAME\";\n\n testList.setDescription(newDescription);\n testList.setName(newName);\n testList.setType(ListType.PRIVATE);\n WordListApi.updateWordList(token, testList);\n\n // check that the list has 2 items\n WordList result = WordListApi.getWordList(token, testList.getPermalink());\n assertEquals(result.getDescription(), newDescription);\n assertEquals(result.getName(), newName);\n assertEquals(result.getType(), ListType.PRIVATE);\n assertEquals(result.getId(), testList.getId());\n assertEquals(result.getNumberWordsInList(), testList.getNumberWordsInList());\n assertEquals(result.getPermalink(), testList.getPermalink());\n assertEquals(result.getUserId(), testList.getUserId());\n assertEquals(result.getUsername(), testList.getUsername());\n assertFalse(result.getUpdatedAt().equals(testList.getUpdatedAt()));\n }", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentRemoveSku() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER,\tQUANTITY_10, order, null);\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\t\tfinal InventoryJournalRollupImpl ijRollup2 = new InventoryJournalRollupImpl();\n\t\tijRollup2.setAllocatedQuantityDelta(QUANTITY_NEG_10);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\t\tfinal InventoryJournalDao inventoryJournalDao2 = context.mock(InventoryJournalDao.class, INVENTORY_JOURNAL_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(inventoryDao2).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory2));\n\t\t\t\tallowing(inventoryJournalDao2).getRollup(inventoryKey); will(returnValue(ijRollup2));\n\t\t\t\toneOf(inventoryJournalDao2).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, WAREHOUSE_UID,\tInventoryEventType.STOCK_DEALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory2.getSkuCode(), inventory2.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_0, inventoryDto.getAllocatedQuantity());\n\t}", "@Test\n\tpublic void testHealthIncrease3() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n public void playerWinDoublonsBySellingHisProductionTest(){\n player.playRole(new Craftman(stockGlobal));\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(1,player.getInventory().getDoublons());\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock-1);\n\n ArrayList<Plantation> plantationsCorn = new ArrayList<>();\n plantationsCorn.add(new CornPlantation());\n player.playRole(new Trader(stockGlobal,1));\n player.playRole(new Farmer(plantationsCorn,stockGlobal));\n\n assertEquals(true,player.getInventory().getDoublons()==1);\n assertEquals(true,stockGlobal.getStockResource(TypeWare.CORN)==initialCornStock);\n\n\n\n }", "public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentChangeQty() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tfinal long warehouseUid = WAREHOUSE_UID;\n\t\tinventory.setWarehouseUid(warehouseUid);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tfinal String skuCode = SKU_CODE;\n\t\tproductSku.setSkuCode(skuCode);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(skuCode, warehouseUid); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t}\n\t\t});\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao2).getInventory(skuCode, warehouseUid); will(returnValue(inventory2));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(\n\t\t\t\torderSku, AllocationEventType.ORDER_ADJUSTMENT_CHANGEQTY, EVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10 - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10 + QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\t}", "public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "protected void addSkill(String name) {\r\n\t\tthis.skills.add(name.toLowerCase());\r\n\t}", "public void setSkillPrediction(Skills skill);", "@Test\n public void testGet_02() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"C\");\n assertTrue(result==null);\n }", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentAddSku() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tproductSku.setGuid(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(beanFactory).getBean(INVENTORY_JOURNAL);\n\t\t\t\twill(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(orderSku, AllocationEventType.ORDER_ADJUSTMENT_ADDSKU,\tEVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\t}", "public void resetSkills()\r\n\t{\r\n\t\t// TODO Keep Skill List upto date\r\n\t\tfarming = 0;\r\n\t}", "@Ignore\n @Test public void modifySecretSeries_success() throws Exception {\n }", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "@Test\n void modifyGrade()\n throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n Result result = ClassMgmtSysUtils.getCourseResult(db.S_JACKY_JUNIOR, db.C_NUMERICAL);\n assert (result != null);\n assertEquals(\"3\", result.getGrade());\n ModifyGradeController mgc = new ModifyGradeController();\n Method modifyGrade = ModifyGradeController.class\n .getDeclaredMethod(\"changeGrade\", EntityManager.class, String.class, Result.class);\n modifyGrade.setAccessible(true);\n modifyGrade.invoke(mgc, TestMain.entityManager, \"5\", result);\n result = ClassMgmtSysUtils.getCourseResult(db.S_JACKY_JUNIOR, db.C_NUMERICAL);\n assert (result != null);\n assertEquals(\"5\", result.getGrade());\n }", "@Override\n\tpublic void addSkill(Skill theSkill) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//add/update the skill\n\t\tcurrentSession.saveOrUpdate(theSkill);\n\t}", "@Test\n void testUpdateGoalie() {\n\n }", "public void initSkills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tskills.setLocation(500,300);\n\t\tskills.setSize(400,300);\n\t\t\t\n\t\tt1 = new JButton(\"Dicker Brecher (benötigt 2 Skillpunkte)\");\n\t\tt1.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tt3 = new JButton(\"Kanten-Paule (benötigt 4 Skillpunkte und Dicker Brecher)\");\n\t\tt3.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tt2 = new JButton(\"Brutaler Prügelknabe (benötigt 2 Skillpunkte)\");\n\t\tt2.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 20);\n\t\t\t\t\tplayer.setSkillStrength1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tt4 = new JButton(\"Mega-Mörder brutaler Prügelknabe (benötigt 4 Skillpunkte und Brutaler Prügelknabe)\");\n\t\tt4.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 30);\n\t\t\t\t\tplayer.setSkillStrength2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tt5 = new JButton(\"Ich will nix - danke\");\n\t\tt5.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tskills.setLayout(new GridLayout(3,2));\n\t\tskills.add(t1);\n\t\tskills.add(t2);\n\t\tskills.add(t3);\n\t\tskills.add(t4);\n\t\tskills.add(t5);\n\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\t\n\t\tskills.pack();\n\t\t\n\t}", "public abstract boolean modifyRole(int game_id, int numberOfWerewolves, boolean hasWitch, boolean hasFortuneTeller, boolean hasLittleGirl, boolean hasCupid, boolean hasHunter) throws SQLException;", "@Test(priority=3)\n\t\tpublic void addToWishlist() throws Exception{\n\t\t\t\n//'**********************************************************\n//Calling method to click on 'Add to Wishlist' link and verify success toast is displayed\n//'**********************************************************\n\t\t\tThread.sleep(1500);\n\t\t\tgalaxyPage.clickOnAddToWishlist();\n\t\t\tThread.sleep(1500);\n\t\t\tAssert.assertTrue(galaxyPage.getSuccessMessage().contains(\"Success\"), \"Product is not added to Wishlist\");\n\t\t\textentTest.log(LogStatus.PASS,\"Success: You have added Samsung Galaxy Tab 10.1 to your wish list!\");\n//'**********************************************************\n//Calling method to close the success toast\n//'**********************************************************\n\t\t\tgalaxyPage.closeSuccesstoast();\n//'**********************************************************\n//Calling method to click on 'Wishlist' link and check user is redirected to 'My Wishlist' page\n//'**********************************************************\n\t\t\tmyWishlistPage = galaxyPage.clickOnWishlist();\n\t\t\t\n\t\t\tAssert.assertTrue(myWishlistPage.getTitle().equals(\"My Wish List\"), \"User is not redirected to wishlist page\");\n\t\t\textentTest.log(LogStatus.PASS,\"User is redirected to My Wishlist Page\");\n\t\t\t\n//'**********************************************************\n//Verifying count in 'Wishlist' link is equal to number of products in the page\n//'**********************************************************\n\t\t\tAssert.assertEquals(myWishlistPage.valueInWishlistLink(), myWishlistPage.numOfProductsInTable(), \"Value shown in wishlist link is different from number of records in the table\");\n\t\t\textentTest.log(LogStatus.PASS,\"Product added: Value shown in wishlist link is equal to number of records in the table\");\n\t\t\t\n\t\t\t}", "public void updatAttackArmies(){\n\t\t\n\t\tfinal String s = attackToComboBox.getSelectedItem().toString();\n\t\tCountry country = MainPlayScreen.this.game.getBoard().getCountryByName(s);\n\t\t\t\n\t\tfinal int armies = MainPlayScreen.this.game.countryArmies.get(country);\n\t\tSystem.out.println(s + \" Defender Armies: \" + armies);\n\t\t\n\t\tif( armies == 1){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t}// end of if statement\n\t\t\n\t\telse if( armies == 2){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\t\n\t\t} // end of else if statement\n\t\t\n\t\telse{\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\tnumberOfArmies[5].addItem(3);\n\t\t\t\n\t\t}// end of else statement\n\t\tnumberOfArmies[5].repaint();\n\t}", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "@Test\n void saveOrUpdateSuccess() {\n String newRoleName = \"readOnly\";\n UserRoles toUpdate = (UserRoles) genericDao.getById(3);\n toUpdate.setRoleName(newRoleName);\n genericDao.saveOrUpdate(toUpdate);\n UserRoles retrievedRole = (UserRoles) genericDao.getById(3);\n assertEquals(newRoleName, retrievedRole.getRoleName());\n log.info(\"update role success test\");\n\n }", "public abstract void doUpgrade();", "@Test\n public void updateDecline() throws Exception {\n }", "public void setRechargeTime(Skills skill, int time);", "void updateLeaderSlot(String username, ArrayList<LightLeaderCard> leaderSlot);", "Test update(TestData testData, Test test);", "@Test\n\tvoid purchaseTest() {\n\t\ttestCrew.setMoney(10000);\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tint currentMoney = testCrew.getMoney();\n\t\t\titem.purchase(testCrew);\n\t\t\tassertEquals(testCrew.getMoney(), currentMoney - item.getPrice());\n\t\t\tassertTrue(testCrew.getMedicalItems().get(0).getClass().isAssignableFrom(item.getClass()));\n\t\t\ttestCrew.removeFromMedicalItems(testCrew.getMedicalItems().get(0));\n\t\t}\n\t}", "@Test\n public void testUpdateSnack() throws Exception {\n\n Snack testSnack = new Snack(\"3333\");\n testSnack.setName(\"Bananas\");\n testSnack.setPrice(new BigDecimal(\"9.99\"));\n testSnack.setQuantity(89);\n\n dao.addSnack(testSnack.getSnackId(), testSnack);\n\n int qtyBeforeUpdate = testSnack.getQuantity();\n dao.updateSnack(testSnack.getSnackId());\n\n int qtyAfterUpdate = testSnack.getQuantity();\n assertEquals(qtyBeforeUpdate, (qtyAfterUpdate + 1));\n\n dao.removeSnack(testSnack.getSnackId());\n\n }", "@Test(dependsOnMethods = \"testUpdateCertificate\")\n public void testUpdateCertificateVersion() {\n throw new SkipException(\"bug in requirements for function\");\n }", "@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}", "@Test\n public void update() {\n }", "public void addSkills(final Characters player, final Characters enemy)\r\n\t{\r\n\t\tskillOne = new JButton(\"Skill 1\");\r\n\t\tadd(skillOne);\r\n\t\tskillOne.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tcombatLog = combatLog + \"\\n\" + player.attack(enemy);\r\n\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\tstate.setWaiting(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillTwo = new JButton(\"Skill 2\");\r\n\t\tadd(skillTwo);\r\n\t\tskillTwo.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(0, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillThree = new JButton(\"Skill 3\");\r\n\t\tadd(skillThree);\r\n\t\tskillThree.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(1, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillFour = new JButton(\"Skill 4\");\r\n\t\tadd(skillFour);\r\n\t\tskillFour.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(2, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillFive = new JButton(\"Skill 5\");\r\n\t\tadd(skillFive);\r\n\t\tskillFive.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(3, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "public abstract void upgrade();", "Update withSku(Sku sku);", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "@Test\r\n public void testUpdate() {\r\n }", "public int updateLevel(int skill, int amount, int maximum) {\r\n if (amount > 0 && dynamicLevels[skill] > maximum) {\r\n return -amount;\r\n }\r\n int left = (dynamicLevels[skill] + amount) - maximum;\r\n int level = dynamicLevels[skill] += amount;\r\n if (level < 0) {\r\n dynamicLevels[skill] = 0;\r\n } else if (amount < 0 && level < maximum) {\r\n dynamicLevels[skill] = maximum;\r\n } else if (amount > 0 && level > maximum) {\r\n dynamicLevels[skill] = maximum;\r\n }\r\n if (restoration[skill] != null) {\r\n int ticks = 100;\r\n if (entity instanceof Player) {\r\n if (((Player) entity).getPrayer().get(PrayerType.BERSERKER)) {\r\n ticks = 75;\r\n }\r\n }\r\n restoration[skill].restart(ticks);\r\n }\r\n if (entity instanceof Player) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, skill));\r\n }\r\n return left;\r\n }" ]
[ "0.78574634", "0.77359974", "0.7661951", "0.76391083", "0.7580629", "0.7403554", "0.7145659", "0.69287103", "0.65548235", "0.6446216", "0.62431824", "0.58894867", "0.58726007", "0.58525825", "0.5667338", "0.56474906", "0.5604112", "0.5565466", "0.55058753", "0.54963166", "0.5494062", "0.5491607", "0.54884386", "0.548793", "0.5481007", "0.5450676", "0.53914857", "0.53899825", "0.5384428", "0.5381255", "0.534044", "0.5297116", "0.52891964", "0.5263729", "0.5261831", "0.5258014", "0.52476573", "0.5234792", "0.5228836", "0.51829904", "0.51726973", "0.51688397", "0.51666355", "0.5164763", "0.51424044", "0.5123672", "0.51142335", "0.5107938", "0.51056045", "0.5084085", "0.5083665", "0.506737", "0.505762", "0.5051576", "0.50486034", "0.5045271", "0.50318414", "0.501959", "0.50065815", "0.50009835", "0.5000662", "0.5000195", "0.49949598", "0.4994643", "0.49797755", "0.49741408", "0.49724385", "0.49692327", "0.49660063", "0.4964525", "0.49633053", "0.49630794", "0.49532956", "0.49482012", "0.4945392", "0.4934906", "0.49317378", "0.49225128", "0.4915409", "0.49093983", "0.4901284", "0.48957476", "0.48927733", "0.48871532", "0.488448", "0.4882864", "0.4880101", "0.48694825", "0.48689145", "0.48682493", "0.48642486", "0.48640865", "0.48626974", "0.48610994", "0.48503911", "0.48475936", "0.48454857", "0.48439062", "0.48438826", "0.48381516" ]
0.77435446
1
Test_04 of upgradeSkill method, of class SkillsList.
@Test public void testUpgradeSkill_04() { System.out.println("upgradeSkill"); Skill s = mock(Skill.class); when(s.getName()).thenReturn("Java"); when(s.getType()).thenReturn("Technical"); when(s.getCost()).thenReturn(2); when(s.getLevel()).thenReturn(10); when(s.getCostFormula()).thenReturn(Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s); instance.upgradeSkill("Java"); int result = instance.get("Java").getLevel(); assertTrue(result==10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "void updateSkill(Skill skill);", "void changeSkill(Long pokemonId, int newSkill);", "@Test\r\n\tvoid testUpdateSkillRecordShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\r\n\t}", "@Test\r\n\tvoid testUpdateSkillRecordShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\t\r\n\t}", "public static int attemptSkillUp(int skillId, Player player){ \n\t\ttry{\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == -1){return -2;}\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == 30){return -2;}\n\t\t\tint[] skillCost;\n\t\t\tskillCost = new int[8];\n\t\t\tint newSkillLevel = DwarfCraftPlayerSkills.getSkillLevel(skillId, player);\n\t\t\t/* Dan thinks skillId could be removed from the arguments in this function\n\t\t\t getSkillTrainingCost */\n\t\t\tskillCost = Skills.values()[skillId].getSkillTrainingCost(skillId, newSkillLevel, player);\n\t\t\tfor (int i = 0; i < skillCost[0];i++){\n\t\t\t\t//check inventory quantity for needed items\n\t\t\t\tif (DwarfCraftInventory.countInventoryItems(skillCost[1+2*i], player) < skillCost[2+2*i]){return -1;}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\t\tcatch(NumberFormatException f) {return 0;}\n\t}", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "public Skills chooseSkill();", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "public void transformedSkills()\r\n\t{\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5659, 1), false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(SKILLS);\r\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "public void unlockSkill() {\n int i = 0;\n while (skills.get(i).isUnlocked()) {\n i = i + 1;\n }\n skills.get(i).unlock();\n }", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n public void updateShiftList(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertTrue(shiftListResource.updateShiftlist(new ShiftList(\"dummy3\", 1, true, new Date(2015-01-02), 50, false)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 1, \"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.LEER);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.EMBER)));\n levelUpSkills.put(8, new ArrayList<Integer>(Arrays.asList(SkillFactory.WORK_UP)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.HEADBUTT)));\n levelUpSkills.put(15, new ArrayList<Integer>(Arrays.asList(SkillFactory.NOBLE_ROAR)));\n levelUpSkills.put(20, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAKE_DOWN)));\n levelUpSkills.put(23, new ArrayList<Integer>(Arrays.asList(SkillFactory.FIRE_FANG)));\n levelUpSkills.put(28, new ArrayList<Integer>(Arrays.asList(SkillFactory.ENDEAVOR)));\n levelUpSkills.put(33, new ArrayList<Integer>(Arrays.asList(SkillFactory.ECHOED_VOICE)));\n levelUpSkills.put(36, new ArrayList<Integer>(Arrays.asList(SkillFactory.FLAMETHROWER)));\n levelUpSkills.put(39, new ArrayList<Integer>(Arrays.asList(SkillFactory.CRUNCH)));\n levelUpSkills.put(43, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYPER_VOICE)));\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.INCINERATE)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.OVERHEAT)));\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "public Skill update(Skill skill)\r\n {\r\n name = skill.getName();\r\n shortName = skill.getShortName();\r\n selectable = skill.isSelectable();\r\n baseCost = skill.getBaseCost();\r\n levelCost = skill.getLevelCost();\r\n \r\n return this;\r\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n //TODO: CONVERSION 2\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.CONVERSION);\n beginnerSkills.add(SkillFactory.SHARPEN);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.PSYBEAM)));\n levelUpSkills.put(12, new ArrayList<Integer>(Arrays.asList(SkillFactory.AGILITY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RECOVER)));\n //TODO: MAGNET RISE 23\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.SIGNAL_BEAM)));\n //TODO: RECYCLE 34\n levelUpSkills.put(40, new ArrayList<Integer>(Arrays.asList(SkillFactory.DISCHARGE)));\n levelUpSkills.put(45, new ArrayList<Integer>(Arrays.asList(SkillFactory.LOCK_ON)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.TRI_ATTACK)));\n //TODO: MAGIC COAT 56\n levelUpSkills.put(62, new ArrayList<Integer>(Arrays.asList(SkillFactory.ZAP_CANNON)));\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.MEGAHORN);\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.TAIL_WHIP);\n beginnerSkills.add(SkillFactory.WATER_GUN);\n beginnerSkills.add(SkillFactory.WATER_SPORT);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAIL_WHIP)));\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_GUN)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_SPORT)));\n levelUpSkills.put(13, new ArrayList<Integer>(Arrays.asList(SkillFactory.FOCUS_ENERGY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RAZOR_SHELL)));\n levelUpSkills.put(21, new ArrayList<Integer>(Arrays.asList(SkillFactory.FURY_CUTTER)));\n levelUpSkills.put(26, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_PULSE)));\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.REVENGE)));\n levelUpSkills.put(34, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_JET)));\n //39 ENCORE\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_TAIL)));\n //51 RETALIATE\n levelUpSkills.put(58, new ArrayList<Integer>(Arrays.asList(SkillFactory.SWORDS_DANCE)));\n levelUpSkills.put(63, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYDRO_PUMP)));\n initEvolutionSkills();\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Test\n public void testAdd_01() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class); \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "private void adminGiveAllSkills(Player activeChar)\r\n\t{\r\n\t\tGameObject target = activeChar.getTarget();\r\n\t\tPlayer player = null;\r\n\t\tif(target != null && target.isPlayer())\r\n\t\t\tplayer = (Player) target;\r\n\t\telse\r\n\t\t{\r\n\t\t\tactiveChar.sendPacket(SystemMsg.INVALID_TARGET);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint unLearnable = 0;\r\n\t\tint skillCounter = 0;\r\n\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\twhile(skills.size() > unLearnable)\r\n\t\t{\r\n\t\t\tunLearnable = 0;\r\n\t\t\tfor(SkillLearn s : skills)\r\n\t\t\t{\r\n\t\t\t\tSkill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());\r\n\t\t\t\tif(sk == null || !sk.getCanLearn(player.getClassId()))\r\n\t\t\t\t{\r\n\t\t\t\t\tunLearnable++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(player.getSkillLevel(sk.getId()) == -1)\r\n\t\t\t\t\tskillCounter++;\r\n\t\t\t\tplayer.addSkill(sk, true);\r\n\t\t\t}\r\n\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\t}\r\n\r\n\t\tplayer.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message22\", player, skillCounter));\r\n\t\tplayer.sendPacket(new SkillList(player));\r\n\t\tactiveChar.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message23\", activeChar, skillCounter, player.getName()));\r\n\t}", "static public void adjustRewardForSelect(ArrayList<RewardItem> rewardList) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (toChangeCard != null) {\n if (item.type == RewardItem.RewardType.CARD) {\n boolean isExist = false;\n for (AbstractCard card : item.cards) {\n if (card.cardID.equals(toChangeCard.cardID)) {\n isExist = true;\n if (card.canUpgrade()) {\n card.upgrade();\n }\n break;\n }\n }\n if (!isExist) {\n boolean isChanged = false;\n // check same rarity\n for (AbstractCard card : item.cards) {\n if (card.rarity == toChangeCard.rarity) {\n if (card.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.remove(card);\n item.cards.add(toChangeCard);\n isChanged = true;\n break;\n }\n }\n if (!isChanged) {\n AbstractCard removed = item.cards.remove(0);\n if (removed.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.add(toChangeCard);\n }\n }\n }\n }\n }\n\n if (selectRelic != null) {\n if (AbstractDungeon.player.hasRelic(selectRelic)) {\n selectRelic = null;\n } else {\n boolean isExist = false;\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n if (item.relic.relicId.equals(selectRelic)) {\n isExist = true;\n }\n }\n\n }\n if (!isExist) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n rewardList.set(i, new RewardItem(RelicLibrary.getRelic(selectRelic)));\n }\n }\n }\n }\n clearHasRelicInPool();\n }\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public abstract void Upgrade(Tower t);", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}", "public Skills getChosenSkill();", "public void addSkill(Skill newskill) {\n skills.addElement(newskill);\n }", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void updateShiftListCatch(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertFalse(shiftListResource.updateShiftlist(new ShiftList(\"notdummy3\", 1, true, new Date(2015-01-01), 50, false)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 1, \"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n }", "@Test\n\tpublic void testHealthIncrease4() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\ttank.increaseHealth();\n\t\tassertEquals(3, tank.getHealth());\n\t}", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "@Test\n public void updateTimeList(){\n userDAO.createUser(new User(\"dummy2\", \"dummy2\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy2\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.updateTimeList(new TimeList(\"dummy2\", 1990, 0, 65, 1, 1)));\n\n //clean up\n timeListDAO.removeTimeList(1990, 0, \"dummy2\");\n userDAO.removeUser(\"dummy2\");\n }", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "private void upgrade() {\n String[] upgradeOptions = currentPlayer.getLocation().getUpgradeStrings(currentPlayer.getRank());\n // String[] upgradeTypes = {\"credits\", \"dollars\"}; // credits come before dollars for each rank in getUpgradeStrings()\n // String upgradeCostChosen;\n // String upgradeTypeChosen;\n String upgradeChoice;\n\n // choose upgrade\n if (currentPlayer.isComputer()) {\n // get next rank above player's rank\n // String upgradeRankChosen = Integer.toString(currentPlayer.getRank()+1);\n \n // randomly choose between the credit option or the dollar option for the next rank 1 above the player's current rank\n Random rand = new Random();\n int randInt = rand.nextInt(2); \n upgradeChoice = upgradeOptions[randInt];\n }\n else { // if current player is human\n // choose upgrade manually\n upgradeChoice = view.showUpgradePopUp(upgradeOptions);\n }\n\n // parse upgradeChosen and do upgrade\n String[] upgradesSplit = upgradeChoice.split(\"\\\\s+\");\n if(upgradesSplit[4].equals(\"dollars\")){ // upgrade in dollars\n if(Integer.valueOf(upgradesSplit[3]) > currentPlayer.getDollars()){ // upgrade fails\n view.showPopUp(currentPlayer.isComputer(), \"You don't have enough dollars for this upgrade\");\n }\n else{ // upgrade succeeds\n currentPlayer.incDollars(-1*(Integer.valueOf(upgradesSplit[3])));\n currentPlayer.setRank(Integer.valueOf(upgradesSplit[1]));\n view.showPopUp(currentPlayer.isComputer(), \"You are now level \" + upgradesSplit[1]);\n }\n }\n else { // upgrade in credits\n if(Integer.valueOf(upgradesSplit[3]) > currentPlayer.getCredits()){ // upgrade fails\n view.showPopUp(currentPlayer.isComputer(), \"You don't have enough credits for this upgrade\");\n }\n else{ // upgrade succeeds\n currentPlayer.incCredits(-1*(Integer.valueOf(upgradesSplit[3])));\n currentPlayer.setRank(Integer.valueOf(upgradesSplit[1]));\n view.showPopUp(currentPlayer.isComputer(), \"You are now level \" + upgradesSplit[1]);\n \n }\n }\n }", "Skill saveSkill(Skill skill);", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "void skill( String key, String value ){\n developer.skills.add( value );\n }", "private void addSkill(Skill skill) {\n Species.Characteristic att = skill.getGoverningAtt();\n int ability = character.getSpecies().getCharacteristicValue(att);\n skill.setAbility(ability);\n\n skillList.add(skill);\n }", "@Test\n public void testUpdateWordList() throws Exception {\n System.out.println(\"updateWordList\");\n\n String newDescription = \"Changed the description.\";\n String newName = \"TEST LIST NEW NAME\";\n\n testList.setDescription(newDescription);\n testList.setName(newName);\n testList.setType(ListType.PRIVATE);\n WordListApi.updateWordList(token, testList);\n\n // check that the list has 2 items\n WordList result = WordListApi.getWordList(token, testList.getPermalink());\n assertEquals(result.getDescription(), newDescription);\n assertEquals(result.getName(), newName);\n assertEquals(result.getType(), ListType.PRIVATE);\n assertEquals(result.getId(), testList.getId());\n assertEquals(result.getNumberWordsInList(), testList.getNumberWordsInList());\n assertEquals(result.getPermalink(), testList.getPermalink());\n assertEquals(result.getUserId(), testList.getUserId());\n assertEquals(result.getUsername(), testList.getUsername());\n assertFalse(result.getUpdatedAt().equals(testList.getUpdatedAt()));\n }", "public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "void skillsFound( String key ) {\n developer.skills = new ArrayList<>();\n }", "public void resetSkills()\r\n\t{\r\n\t\t// TODO Keep Skill List upto date\r\n\t\tfarming = 0;\r\n\t}", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentRemoveSku() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER,\tQUANTITY_10, order, null);\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\t\tfinal InventoryJournalRollupImpl ijRollup2 = new InventoryJournalRollupImpl();\n\t\tijRollup2.setAllocatedQuantityDelta(QUANTITY_NEG_10);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\t\tfinal InventoryJournalDao inventoryJournalDao2 = context.mock(InventoryJournalDao.class, INVENTORY_JOURNAL_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(inventoryDao2).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory2));\n\t\t\t\tallowing(inventoryJournalDao2).getRollup(inventoryKey); will(returnValue(ijRollup2));\n\t\t\t\toneOf(inventoryJournalDao2).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, WAREHOUSE_UID,\tInventoryEventType.STOCK_DEALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory2.getSkuCode(), inventory2.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_0, inventoryDto.getAllocatedQuantity());\n\t}", "protected void beforeUpdateSkillType(\n RetailscmUserContext userContext,\n SkillType existed,\n String retailStoreCountryCenterId,\n String skillTypeId,\n int skillTypeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "@Ignore\n @Test public void modifySecretSeries_success() throws Exception {\n }", "@Test\n public void playerWinDoublonsBySellingHisProductionTest(){\n player.playRole(new Craftman(stockGlobal));\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(1,player.getInventory().getDoublons());\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock-1);\n\n ArrayList<Plantation> plantationsCorn = new ArrayList<>();\n plantationsCorn.add(new CornPlantation());\n player.playRole(new Trader(stockGlobal,1));\n player.playRole(new Farmer(plantationsCorn,stockGlobal));\n\n assertEquals(true,player.getInventory().getDoublons()==1);\n assertEquals(true,stockGlobal.getStockResource(TypeWare.CORN)==initialCornStock);\n\n\n\n }", "protected void addSkill(String name) {\r\n\t\tthis.skills.add(name.toLowerCase());\r\n\t}", "public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentAddSku() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tproductSku.setGuid(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(beanFactory).getBean(INVENTORY_JOURNAL);\n\t\t\t\twill(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(orderSku, AllocationEventType.ORDER_ADJUSTMENT_ADDSKU,\tEVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\t}", "public void updatAttackArmies(){\n\t\t\n\t\tfinal String s = attackToComboBox.getSelectedItem().toString();\n\t\tCountry country = MainPlayScreen.this.game.getBoard().getCountryByName(s);\n\t\t\t\n\t\tfinal int armies = MainPlayScreen.this.game.countryArmies.get(country);\n\t\tSystem.out.println(s + \" Defender Armies: \" + armies);\n\t\t\n\t\tif( armies == 1){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t}// end of if statement\n\t\t\n\t\telse if( armies == 2){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\t\n\t\t} // end of else if statement\n\t\t\n\t\telse{\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\tnumberOfArmies[5].addItem(3);\n\t\t\t\n\t\t}// end of else statement\n\t\tnumberOfArmies[5].repaint();\n\t}", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentChangeQty() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tfinal long warehouseUid = WAREHOUSE_UID;\n\t\tinventory.setWarehouseUid(warehouseUid);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tfinal String skuCode = SKU_CODE;\n\t\tproductSku.setSkuCode(skuCode);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(skuCode, warehouseUid); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t}\n\t\t});\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao2).getInventory(skuCode, warehouseUid); will(returnValue(inventory2));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(\n\t\t\t\torderSku, AllocationEventType.ORDER_ADJUSTMENT_CHANGEQTY, EVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10 - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10 + QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\t}", "@Override\n\tpublic void addSkill(Skill theSkill) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//add/update the skill\n\t\tcurrentSession.saveOrUpdate(theSkill);\n\t}", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "@Test\n public void testGet_02() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"C\");\n assertTrue(result==null);\n }", "@Test\n public void updateDecline() throws Exception {\n }", "public void setRechargeTime(Skills skill, int time);", "public void setSkillPrediction(Skills skill);", "@Test\n void modifyGrade()\n throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n Result result = ClassMgmtSysUtils.getCourseResult(db.S_JACKY_JUNIOR, db.C_NUMERICAL);\n assert (result != null);\n assertEquals(\"3\", result.getGrade());\n ModifyGradeController mgc = new ModifyGradeController();\n Method modifyGrade = ModifyGradeController.class\n .getDeclaredMethod(\"changeGrade\", EntityManager.class, String.class, Result.class);\n modifyGrade.setAccessible(true);\n modifyGrade.invoke(mgc, TestMain.entityManager, \"5\", result);\n result = ClassMgmtSysUtils.getCourseResult(db.S_JACKY_JUNIOR, db.C_NUMERICAL);\n assert (result != null);\n assertEquals(\"5\", result.getGrade());\n }", "public void initSkills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tskills.setLocation(500,300);\n\t\tskills.setSize(400,300);\n\t\t\t\n\t\tt1 = new JButton(\"Dicker Brecher (benötigt 2 Skillpunkte)\");\n\t\tt1.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tt3 = new JButton(\"Kanten-Paule (benötigt 4 Skillpunkte und Dicker Brecher)\");\n\t\tt3.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tt2 = new JButton(\"Brutaler Prügelknabe (benötigt 2 Skillpunkte)\");\n\t\tt2.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 20);\n\t\t\t\t\tplayer.setSkillStrength1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tt4 = new JButton(\"Mega-Mörder brutaler Prügelknabe (benötigt 4 Skillpunkte und Brutaler Prügelknabe)\");\n\t\tt4.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 30);\n\t\t\t\t\tplayer.setSkillStrength2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tt5 = new JButton(\"Ich will nix - danke\");\n\t\tt5.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tskills.setLayout(new GridLayout(3,2));\n\t\tskills.add(t1);\n\t\tskills.add(t2);\n\t\tskills.add(t3);\n\t\tskills.add(t4);\n\t\tskills.add(t5);\n\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\t\n\t\tskills.pack();\n\t\t\n\t}", "void updateLeaderSlot(String username, ArrayList<LightLeaderCard> leaderSlot);", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "@Test(priority=3)\n\t\tpublic void addToWishlist() throws Exception{\n\t\t\t\n//'**********************************************************\n//Calling method to click on 'Add to Wishlist' link and verify success toast is displayed\n//'**********************************************************\n\t\t\tThread.sleep(1500);\n\t\t\tgalaxyPage.clickOnAddToWishlist();\n\t\t\tThread.sleep(1500);\n\t\t\tAssert.assertTrue(galaxyPage.getSuccessMessage().contains(\"Success\"), \"Product is not added to Wishlist\");\n\t\t\textentTest.log(LogStatus.PASS,\"Success: You have added Samsung Galaxy Tab 10.1 to your wish list!\");\n//'**********************************************************\n//Calling method to close the success toast\n//'**********************************************************\n\t\t\tgalaxyPage.closeSuccesstoast();\n//'**********************************************************\n//Calling method to click on 'Wishlist' link and check user is redirected to 'My Wishlist' page\n//'**********************************************************\n\t\t\tmyWishlistPage = galaxyPage.clickOnWishlist();\n\t\t\t\n\t\t\tAssert.assertTrue(myWishlistPage.getTitle().equals(\"My Wish List\"), \"User is not redirected to wishlist page\");\n\t\t\textentTest.log(LogStatus.PASS,\"User is redirected to My Wishlist Page\");\n\t\t\t\n//'**********************************************************\n//Verifying count in 'Wishlist' link is equal to number of products in the page\n//'**********************************************************\n\t\t\tAssert.assertEquals(myWishlistPage.valueInWishlistLink(), myWishlistPage.numOfProductsInTable(), \"Value shown in wishlist link is different from number of records in the table\");\n\t\t\textentTest.log(LogStatus.PASS,\"Product added: Value shown in wishlist link is equal to number of records in the table\");\n\t\t\t\n\t\t\t}", "@Test\n void testUpdateGoalie() {\n\n }", "public abstract boolean modifyRole(int game_id, int numberOfWerewolves, boolean hasWitch, boolean hasFortuneTeller, boolean hasLittleGirl, boolean hasCupid, boolean hasHunter) throws SQLException;", "public abstract void doUpgrade();", "public int getSkillRechargeTime(Skills currentSkill);", "@Test\n public void getWantSwap() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy\", 2, true, new Date(2017-01-01), 0, true));\n\n assertNotNull(shiftListResource.getWantSwap(true));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01), 2, \"dummy\");\n userDAO.removeUser((\"dummy\"));\n }", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "@Test\n\tpublic void testHealthIncrease3() {\n\t\ttank.setHealth(1);\n\t\ttank.increaseHealth();\n\t\tassertEquals(2, tank.getHealth());\n\t}", "@Test\n void saveOrUpdateSuccess() {\n String newRoleName = \"readOnly\";\n UserRoles toUpdate = (UserRoles) genericDao.getById(3);\n toUpdate.setRoleName(newRoleName);\n genericDao.saveOrUpdate(toUpdate);\n UserRoles retrievedRole = (UserRoles) genericDao.getById(3);\n assertEquals(newRoleName, retrievedRole.getRoleName());\n log.info(\"update role success test\");\n\n }", "@Override\n public void applyDefaults(DynamicSkill skill, String prefix) { }", "public void addSkills(final Characters player, final Characters enemy)\r\n\t{\r\n\t\tskillOne = new JButton(\"Skill 1\");\r\n\t\tadd(skillOne);\r\n\t\tskillOne.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tcombatLog = combatLog + \"\\n\" + player.attack(enemy);\r\n\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\tstate.setWaiting(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillTwo = new JButton(\"Skill 2\");\r\n\t\tadd(skillTwo);\r\n\t\tskillTwo.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(0, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillThree = new JButton(\"Skill 3\");\r\n\t\tadd(skillThree);\r\n\t\tskillThree.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(1, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillFour = new JButton(\"Skill 4\");\r\n\t\tadd(skillFour);\r\n\t\tskillFour.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(2, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillFive = new JButton(\"Skill 5\");\r\n\t\tadd(skillFive);\r\n\t\tskillFive.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(3, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "@Test\n public void testUpdateApartmentStatus() {\n System.out.println(\"updateApartmentStatus\");\n String status = \"Unavailable\";\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n instance.updateApartmentStatus(status, apartmentid);\n }", "@Override\n public void useSkill(Creature activeChar, Creature targets) {\n }", "@Test(dependsOnMethods = \"testUpdateCertificate\")\n public void testUpdateCertificateVersion() {\n throw new SkipException(\"bug in requirements for function\");\n }", "public void fixTeacherRating()\n {\n // put your code here\n if(profQuality < 5)\n profQuality++;\n }", "@Test\n\tvoid purchaseTest() {\n\t\ttestCrew.setMoney(10000);\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tint currentMoney = testCrew.getMoney();\n\t\t\titem.purchase(testCrew);\n\t\t\tassertEquals(testCrew.getMoney(), currentMoney - item.getPrice());\n\t\t\tassertTrue(testCrew.getMedicalItems().get(0).getClass().isAssignableFrom(item.getClass()));\n\t\t\ttestCrew.removeFromMedicalItems(testCrew.getMedicalItems().get(0));\n\t\t}\n\t}", "@Deprecated\n/* */ protected static boolean performAttack(int pos, boolean aiming, Creature performer, Skills performerSkills, Item attWeapon, Item target, double attBonus, Skill attackerFightSkill, int counter) {\n/* 3189 */ if (!performer.hasLink())\n/* 3190 */ return true; \n/* 3191 */ boolean done = false;\n/* 3192 */ Skill primWeaponSkill = null;\n/* 3193 */ int skillnum = -10;\n/* 3194 */ performer.getStatus().modifyStamina(-1000.0F);\n/* 3195 */ if (attWeapon != null) {\n/* */ \n/* */ try {\n/* */ \n/* 3199 */ skillnum = attWeapon.getPrimarySkill();\n/* 3200 */ primWeaponSkill = performerSkills.getSkill(skillnum);\n/* */ }\n/* 3202 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 3204 */ if (skillnum != -10) {\n/* 3205 */ primWeaponSkill = performerSkills.learn(skillnum, 1.0F);\n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 3215 */ Skill attStrengthSkill = performerSkills.getSkill(102);\n/* */ }\n/* 3217 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 3219 */ Skill attStrengthSkill = performerSkills.learn(102, 1.0F);\n/* 3220 */ logger.log(Level.WARNING, performer.getName() + \" had no strength. Weird.\");\n/* */ } \n/* */ \n/* 3223 */ double bonus = 0.0D;\n/* 3224 */ if (primWeaponSkill != null) {\n/* */ \n/* 3226 */ boolean dryrun = (primWeaponSkill.getKnowledge(0.0D) >= 20.0D);\n/* 3227 */ bonus = Math.max(0.0D, primWeaponSkill\n/* */ \n/* 3229 */ .skillCheck((attWeapon.getCurrentQualityLevel() + 10.0F), attBonus, dryrun, \n/* 3230 */ Math.max(1, counter / 2)));\n/* */ } \n/* */ \n/* 3233 */ if (aiming) {\n/* */ \n/* 3235 */ int rand = 10;\n/* 3236 */ if (pos == 1) {\n/* */ \n/* 3238 */ rand = Server.rand.nextInt(100);\n/* 3239 */ bonus = -60.0D;\n/* 3240 */ if (rand < 50) {\n/* 3241 */ pos = 17;\n/* */ }\n/* 3243 */ } else if (pos == 29) {\n/* */ \n/* 3245 */ rand = Server.rand.nextInt(100);\n/* 3246 */ bonus = -80.0D;\n/* 3247 */ if (rand < 98) {\n/* 3248 */ pos = 29;\n/* 3249 */ } else if (rand < 99) {\n/* 3250 */ pos = 18;\n/* 3251 */ } else if (rand < 100) {\n/* 3252 */ pos = 19;\n/* */ } \n/* 3254 */ } else if (pos == 2) {\n/* */ \n/* 3256 */ rand = Server.rand.nextInt(20);\n/* 3257 */ bonus = -40.0D;\n/* 3258 */ if (rand < 5) {\n/* 3259 */ pos = 21;\n/* 3260 */ } else if (rand < 7) {\n/* 3261 */ pos = 27;\n/* 3262 */ } else if (rand < 9) {\n/* 3263 */ pos = 26;\n/* 3264 */ } else if (rand < 12) {\n/* 3265 */ pos = 32;\n/* 3266 */ } else if (rand < 14) {\n/* 3267 */ pos = 23;\n/* 3268 */ } else if (rand < 18) {\n/* 3269 */ pos = 24;\n/* 3270 */ } else if (rand < 20) {\n/* 3271 */ pos = 25;\n/* */ } \n/* 3273 */ } else if (pos == 3) {\n/* */ \n/* 3275 */ rand = Server.rand.nextInt(10);\n/* 3276 */ bonus = -30.0D;\n/* 3277 */ if (rand < 5) {\n/* 3278 */ pos = 5;\n/* 3279 */ } else if (rand < 9) {\n/* 3280 */ pos = 9;\n/* */ } else {\n/* 3282 */ pos = 13;\n/* */ } \n/* 3284 */ } else if (pos == 4) {\n/* */ \n/* 3286 */ rand = Server.rand.nextInt(10);\n/* 3287 */ bonus = -30.0D;\n/* 3288 */ if (rand < 5) {\n/* 3289 */ pos = 6;\n/* 3290 */ } else if (rand < 9) {\n/* 3291 */ pos = 10;\n/* */ } else {\n/* 3293 */ pos = 14;\n/* */ } \n/* 3295 */ } else if (pos == 34) {\n/* */ \n/* 3297 */ rand = Server.rand.nextInt(20);\n/* 3298 */ bonus = -30.0D;\n/* 3299 */ if (rand < 5) {\n/* 3300 */ pos = 7;\n/* 3301 */ } else if (rand < 9) {\n/* 3302 */ pos = 11;\n/* 3303 */ } else if (rand < 10) {\n/* 3304 */ pos = 15;\n/* 3305 */ } if (rand < 15) {\n/* 3306 */ pos = 8;\n/* 3307 */ } else if (rand < 19) {\n/* 3308 */ pos = 12;\n/* */ } else {\n/* 3310 */ pos = 16;\n/* */ } \n/* */ } \n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* 3317 */ pos = PracticeDollBehaviour.getRandomWoundPos();\n/* */ }\n/* 3319 */ catch (Exception ex) {\n/* */ \n/* 3321 */ logger.log(Level.WARNING, \"Could not get random wound position on \" + target\n/* 3322 */ .getName() + \" due to \" + ex.getMessage(), ex);\n/* */ } \n/* */ } \n/* 3325 */ double attCheck = 0.0D;\n/* */ \n/* */ \n/* 3328 */ if (primWeaponSkill != null) {\n/* */ \n/* 3330 */ boolean dryrun = (attackerFightSkill.getKnowledge(0.0D) >= 20.0D);\n/* 3331 */ attCheck = attackerFightSkill.skillCheck(10.0D, attWeapon, bonus, dryrun, Math.max(1, counter / 2));\n/* */ } else {\n/* */ \n/* 3334 */ attCheck = attackerFightSkill.skillCheck(10.0D, attWeapon, bonus, true, Math.max(1, counter));\n/* 3335 */ } String attString = getAttackString(performer, attWeapon);\n/* 3336 */ if (attCheck > 0.0D) {\n/* */ \n/* */ \n/* */ \n/* 3340 */ double damage = Math.max(0.1F, Server.rand.nextFloat() * Weapon.getBaseDamageForWeapon(attWeapon) / 10.0F);\n/* */ \n/* */ \n/* */ \n/* 3344 */ if (primWeaponSkill != null) {\n/* 3345 */ attWeapon.setDamage(attWeapon.getDamage() + 0.05F * Weapon.getBaseDamageForWeapon(attWeapon));\n/* */ }\n/* */ \n/* */ \n/* 3349 */ String broadCastString = performer.getNameWithGenus() + \" \" + attString + \"s \" + target.getNameWithGenus() + \" \" + getStrengthString(damage) + \" in the \" + PracticeDollBehaviour.getWoundLocationString(pos) + \".\";\n/* */ \n/* 3351 */ performer.getCommunicator().sendSafeServerMessage(\"You \" + attString + \" \" + target\n/* 3352 */ .getNameWithGenus() + \" \" + getStrengthString(damage) + \" in the \" + \n/* 3353 */ PracticeDollBehaviour.getWoundLocationString(pos) + \".\");\n/* 3354 */ Server.getInstance().broadCastAction(broadCastString, performer, 3);\n/* */ \n/* 3356 */ done = target.setDamage(target.getDamage() + (float)damage * target.getDamageModifier());\n/* */ \n/* 3358 */ int tilex = (int)target.getPosX() >> 2;\n/* 3359 */ int tiley = (int)target.getPosY() >> 2;\n/* */ \n/* 3361 */ String sstring = \"sound.combat.parry1\";\n/* 3362 */ int x = Server.rand.nextInt(3);\n/* 3363 */ if (x == 0) {\n/* 3364 */ sstring = \"sound.combat.parry2\";\n/* 3365 */ } else if (x == 1) {\n/* 3366 */ sstring = \"sound.combat.parry3\";\n/* 3367 */ } SoundPlayer.playSound(sstring, target, 1.6F);\n/* 3368 */ performer.playAnimation(\"practice_cut\", false, target.getWurmId());\n/* 3369 */ if (done)\n/* */ {\n/* 3371 */ broadCastString = target.getNameWithGenus() + \" is no more.\";\n/* 3372 */ Server.getInstance().broadCastMessage(broadCastString, tilex, tiley, performer.isOnSurface(), 3);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 3377 */ String sstring = \"sound.combat.miss.light\";\n/* 3378 */ if (attCheck < -80.0D) {\n/* 3379 */ sstring = \"sound.combat.miss.heavy\";\n/* 3380 */ } else if (attCheck < -40.0D) {\n/* 3381 */ sstring = \"sound.combat.miss.med\";\n/* 3382 */ } SoundPlayer.playSound(sstring, target, 1.6F);\n/* 3383 */ if (performer.spamMode()) {\n/* */ \n/* 3385 */ if (aiming) {\n/* 3386 */ performer.getCommunicator().sendNormalServerMessage(\"You miss.\");\n/* */ } else {\n/* 3388 */ performer.getCommunicator().sendNormalServerMessage(\"You try to \" + attString + \" \" + target\n/* 3389 */ .getNameWithGenus() + \" in the \" + \n/* 3390 */ PracticeDollBehaviour.getWoundLocationString(pos) + \" but \" + \n/* 3391 */ getMissString(true, attCheck));\n/* */ } \n/* 3393 */ } else if (aiming) {\n/* 3394 */ performer.getCommunicator().sendNormalServerMessage(\"You miss.\");\n/* */ } \n/* */ } \n/* 3397 */ return done;\n/* */ }", "public abstract void upgrade();", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tskillUpdown(skill.getSid());\n\t\t\t}", "public int updateLevel(int skill, int amount, int maximum) {\r\n if (amount > 0 && dynamicLevels[skill] > maximum) {\r\n return -amount;\r\n }\r\n int left = (dynamicLevels[skill] + amount) - maximum;\r\n int level = dynamicLevels[skill] += amount;\r\n if (level < 0) {\r\n dynamicLevels[skill] = 0;\r\n } else if (amount < 0 && level < maximum) {\r\n dynamicLevels[skill] = maximum;\r\n } else if (amount > 0 && level > maximum) {\r\n dynamicLevels[skill] = maximum;\r\n }\r\n if (restoration[skill] != null) {\r\n int ticks = 100;\r\n if (entity instanceof Player) {\r\n if (((Player) entity).getPrayer().get(PrayerType.BERSERKER)) {\r\n ticks = 75;\r\n }\r\n }\r\n restoration[skill].restart(ticks);\r\n }\r\n if (entity instanceof Player) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, skill));\r\n }\r\n return left;\r\n }" ]
[ "0.7855561", "0.77196133", "0.7663627", "0.7616986", "0.75847214", "0.7384186", "0.71085894", "0.68762714", "0.6494575", "0.6397772", "0.6187979", "0.5920354", "0.5890022", "0.5872661", "0.5690077", "0.566687", "0.5613494", "0.5582569", "0.55632997", "0.55207366", "0.5484979", "0.5480104", "0.5478075", "0.54626113", "0.5455901", "0.54457843", "0.5368666", "0.5362573", "0.5351081", "0.533556", "0.5326918", "0.53076595", "0.5294965", "0.52929395", "0.5239726", "0.5239189", "0.5229273", "0.5226742", "0.521847", "0.5205668", "0.5201508", "0.51916456", "0.5157407", "0.5150613", "0.51429296", "0.5136275", "0.5104841", "0.5082519", "0.5077755", "0.5071694", "0.50646514", "0.5062836", "0.50526106", "0.5050865", "0.5043514", "0.5027732", "0.50274664", "0.50254494", "0.50165874", "0.49948794", "0.499487", "0.499368", "0.49788016", "0.49777496", "0.4975271", "0.49675134", "0.4960534", "0.4952957", "0.4947924", "0.49449635", "0.49430788", "0.49393752", "0.49391422", "0.49267462", "0.49244902", "0.49244627", "0.49222818", "0.49175188", "0.4912024", "0.49118248", "0.4908907", "0.49030423", "0.48777106", "0.4876028", "0.48749432", "0.48736066", "0.48705342", "0.4869432", "0.4857514", "0.48514423", "0.48498344", "0.48497707", "0.4847766", "0.48472145", "0.4846662", "0.4846526", "0.48462304", "0.48419252", "0.4840331", "0.48363966" ]
0.775633
1
Test_01 of getCost method, of class SkillsList.
@Test public void testGetCost_01() { System.out.println("getCost"); SkillsList instance = new SkillsList(); int result = instance.getCost(); assertTrue(result==0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "double getCost();", "double getCost();", "int getCost();", "int getCost();", "int getCost();", "public abstract double getCost();", "@Pure\n\tdouble getCost();", "public double getCosts();", "public abstract int getCost();", "public abstract int getCost();", "public abstract int getCost();", "double getTotalCost();", "public void getCosts() {\n\t}", "public double getCost()\r\n\t{\treturn this.cost;\t}", "@Override\n public double getCost() {\n return cost;\n }", "public int getCost() {\n/* 69 */ return this.cost;\n/* */ }", "@Override\r\n public int getCost() {\r\n return cost;\r\n }", "public double getCost() {\r\n\t \treturn(cost);\r\n\t}", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "public float getCost()\r\n/* 13: */ {\r\n/* 14:10 */ return this.costFromStart + this.estimatedCostToGoal;\r\n/* 15: */ }", "public double getCost() {\r\n return cost;\r\n }", "public int getCost()\n {\n return cost;\n }", "@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}", "@Test\n public void testCalculateCostWithEmptyList() {\n List inspectionList = new ArrayList();\n int expResult = 100;\n int result = instance.calculateCost(inspectionList);\n assertEquals(expResult, result);\n }", "public int getCost(){\r\n\t\treturn this.cost;\r\n\t}", "@Test\n public void costTest() {\n // TODO: test cost\n }", "public double getCost(){\n return cost;\n }", "@Override\n public double getCost() {\n\t return 13;\n }", "public double getCost() {\n return cost;\n }", "public double getCost() {\n return cost;\n }", "public int getCost(){\n return this.cost;\n }", "public double getCost() {\r\n\t\treturn cost;\r\n\t}", "public double getCost()\n\t{\n\t\treturn 0.9;\n\t}", "public CostInfo getCostInfo();", "@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}", "public int getCost() {\n return cost;\n }", "public int getCost() {\n return cost;\n }", "@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}", "public double calculateCost(Purchase purchase);", "public double getCost() {\n\t\treturn cost;\n\t}", "@Test\n public void testGetCost() {\n VirusAttribute virusAttribute = new VirusAttribute(\"att\", \"desc\", 30);\n int result = virusAttribute.getCost();\n assertEquals(30, result);\n }", "@Pure\n\tdouble getEstimatedCost();", "public Number getCost()\r\n {\r\n return (m_cost);\r\n }", "public double getCost() {\n\t\treturn 1.25;\n\t}", "List<ResourceSkuCosts> costs();", "public int getCost() {\n \t\treturn cost;\n \t}", "public int getCost() {\n return cost;\n }", "@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "double calculateCost() {\n double cost = 0;\n InspectionDTO[] DTOArray = this.currentInspectionChecklist.inspectionDTOArray;\n for (int i = 0; i <= DTOArray.length - 1; i++) {\n cost += DTOArray[i].getCost();\n }\n return cost;\n }", "@Test\r\n public void testGetCost() {\r\n \r\n String regNo = \"ABC123\";\r\n instance = new Controller(dbMgr);\r\n int expResult = 60;\r\n int result = instance.getCost(regNo);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}", "public double getCost() {\n\n\t\treturn cost;\n\t}", "@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}", "public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}", "public int getCost()\r\n\t{\n\t\treturn 70000;\r\n\t}", "public Money getCost(){\r\n return this.cost;\r\n }", "public BigDecimal getCost() {\r\n return cost;\r\n }", "protected abstract double getDefaultCost();", "public double getCost() {\n double price = 0;\n price += this.numPizzas * this.pizzaType.getCost();\n if(this.numPizzas >= 20) // Discount if >=20 pizzas\n return price * 0.9;\n else if(this.numPizzas >= 10) // Discount if between 10 and 20 pizzas\n return price * 0.95;\n return price; // No discount\n }", "public Integer getCost() {\r\n\t\treturn cost;\r\n\t}", "public double getCost() \n { \n return super.getCost() +22;\n }", "public Integer getCost() {\n return cost;\n }", "public BigDecimal getCost() {\n return this.cost;\n }", "public int getCost() {\n\t\treturn cost;\n\t}", "public double getCost() {\n return quantity*ppu;\n\n }", "public double getCost() {\n return price;\n }", "public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}", "public String getCost() {\n return cost;\n }", "int getResourceCost();", "@Override\n public int getCost() {\n\treturn 0;\n }", "public int[] getCost(){\n\t\treturn this.cost;\n\t}", "public int selectedCost()\r\n {\r\n if (selectedIndex == -1) //nothing selected\r\n return 0;\r\n \r\n return dummyList.get(selectedIndex).cost();\r\n }", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }", "public double getCost(int endId) throws IllegalArgumentException, IllegalStateException;", "@Override\n public double getCost() {\n /**\n * @return the cost of Ice Cream\n */\n // TODO Auto-generated method stub\n return this.cost;\n }", "public double cost()\n\t{\n\t\treturn _dblCost;\n\t}", "public int getHealthCost();", "public ArrayList<RewardBean> getTotalCost() {\n/* 28 */ return this.totalCost;\n/* */ }", "@Override\n public int getCost() {\n\n\n //return cost converted to int\n return (int) cost;\n }", "@Override\r\n\tpublic double getCost() {\n\t\treturn 0;\r\n\t}", "@Override\n public double cost(){\n return 1 + super.sandwich.cost();\n }", "public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}", "@Override\n public double getCost() {\n if (lunch != null && dinner != null) {\n return lunch.getCost() + dinner.getCost();\n }\n return 0;\n }", "double getSolutionCost();", "public void calculateCost(){\n if(this.isChair){\n for(int i = 0; i < this.chairs.length; i++){\n this.cost += this.chairs[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isDesk){\n for(int i = 0; i < this.desks.length; i++){\n this.cost += this.desks[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isFiling){\n for(int i = 0; i < this.filingCabinets.length; i++){\n this.cost += this.filingCabinets[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isLamp){\n for(int i = 0; i < this.lamps.length; i++){\n this.cost += this.lamps[i].getPrice();\n }\n }\n }", "@Override\n public int getCost() {\n return iceCreamPrice + topPrice;\n }", "public double getCost() {\n return this.product.getPrice() * quanity;\n }", "public int getJobCost(int jNo);", "@Override\r\n\tpublic double getCost() {\n\t\treturn this.cost_of_icecream;\r\n\t}", "public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}", "public int getWorkCredCost();", "public double getTotalCost() {\r\n return totalCost;\r\n }", "public double getCost() {\n\t\treturn costOverride > 0 ? costOverride : getDefaultCost();\n\t}", "@Test\n\tvoid testCost() {\n\t\tint nbCores = 16;\n\t\tlong duration = 2000;\n\t\tDate requestDate = new Date(\"01/01/2000\");\n\t\tJob j1 = new Job(nbCores,requestDate,duration,mediumQ);//16 cores less than 1h\n\t\tJob j2 = new Job(nbCores*2,requestDate,duration,mediumQ);//32 cores less than 1h\n\t\tJob j3 = new Job(nbCores*2+1,requestDate,duration,mediumQ);//33 cores less than 1h\n\t\tJob j4 = new Job(nbCores,requestDate,duration*2,mediumQ);//16 cores more than 1h\n\t\tJob j5 = new Job(nbCores*2+1,requestDate,duration*2,mediumQ);//33 cores more than 1h\n\t\tassertEquals(j1.getCost(),0.05f);\n\t\tassertEquals(j2.getCost(),0.05f);\n\t\tassertEquals(j3.getCost(),0.1f);\n\t\tassertEquals(j4.getCost(),0.1f);\n\t\tassertEquals(j5.getCost(),0.2f);\n\t}", "@Override\n public long cost() {\n return 100;\n }" ]
[ "0.81955796", "0.7574065", "0.7574065", "0.7439566", "0.7439566", "0.7439566", "0.725477", "0.7157551", "0.7113247", "0.7096004", "0.7096004", "0.7096004", "0.70489216", "0.6910736", "0.6790161", "0.6772388", "0.6769784", "0.6753408", "0.67480946", "0.67147905", "0.6709028", "0.6693647", "0.6671664", "0.6669912", "0.6665366", "0.66638696", "0.66564703", "0.6654472", "0.665364", "0.6624379", "0.6624379", "0.66193604", "0.6606255", "0.6606243", "0.66022587", "0.6595919", "0.6536401", "0.6536401", "0.6528893", "0.6526916", "0.6516605", "0.6499837", "0.6495682", "0.6487501", "0.6486936", "0.6483855", "0.6482751", "0.6482586", "0.6478048", "0.6474712", "0.6474712", "0.6473813", "0.64641947", "0.6449693", "0.6445831", "0.6435031", "0.64337504", "0.6431858", "0.64233524", "0.6404859", "0.64015985", "0.63942456", "0.6379636", "0.6371978", "0.63691634", "0.6366797", "0.63657665", "0.63613844", "0.6358721", "0.633713", "0.6328764", "0.63118553", "0.6309689", "0.6306856", "0.6296282", "0.6279749", "0.6266941", "0.62659955", "0.62630403", "0.62560475", "0.62509865", "0.6247827", "0.62435377", "0.62434566", "0.62413776", "0.6235878", "0.6228252", "0.6220518", "0.6212402", "0.6210488", "0.62068653", "0.620145", "0.6191906", "0.6178797", "0.61691517", "0.6163897", "0.61529136", "0.61346203", "0.6130135", "0.61229914" ]
0.78395057
1
Test_02 of getCost method, of class SkillsList.
@Test public void testGetCost_02() { System.out.println("getCost"); Skill s = new Skill("Java", "Technical", 2, 3, Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s); int result = instance.getCost(); assertTrue(result==6); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getCost();", "double getCost();", "int getCost();", "int getCost();", "int getCost();", "@Test\n public void testGetCost_01() {\n System.out.println(\"getCost\");\n SkillsList instance = new SkillsList();\n int result = instance.getCost();\n assertTrue(result==0);\n }", "public abstract double getCost();", "@Pure\n\tdouble getCost();", "public abstract int getCost();", "public abstract int getCost();", "public abstract int getCost();", "public double getCosts();", "double getTotalCost();", "public int getCost() {\n/* 69 */ return this.cost;\n/* */ }", "public void getCosts() {\n\t}", "public double getCost()\r\n\t{\treturn this.cost;\t}", "@Override\r\n public int getCost() {\r\n return cost;\r\n }", "@Override\n public double getCost() {\n return cost;\n }", "public double getCost() {\r\n\t \treturn(cost);\r\n\t}", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "public int getCost(){\r\n\t\treturn this.cost;\r\n\t}", "public int getCost()\n {\n return cost;\n }", "public double getCost() {\r\n return cost;\r\n }", "@Override\n public double getCost() {\n\t return 13;\n }", "public float getCost()\r\n/* 13: */ {\r\n/* 14:10 */ return this.costFromStart + this.estimatedCostToGoal;\r\n/* 15: */ }", "public int getCost(){\n return this.cost;\n }", "public double getCost(){\n return cost;\n }", "@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}", "public double getCost() {\n return cost;\n }", "public double getCost() {\n return cost;\n }", "@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}", "public CostInfo getCostInfo();", "public double getCost() {\r\n\t\treturn cost;\r\n\t}", "public double getCost()\n\t{\n\t\treturn 0.9;\n\t}", "public int getCost() {\n return cost;\n }", "public int getCost() {\n return cost;\n }", "public double calculateCost(Purchase purchase);", "@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}", "public Number getCost()\r\n {\r\n return (m_cost);\r\n }", "public int getCost() {\n \t\treturn cost;\n \t}", "public double getCost() {\n\t\treturn cost;\n\t}", "public int getCost() {\n return cost;\n }", "double calculateCost() {\n double cost = 0;\n InspectionDTO[] DTOArray = this.currentInspectionChecklist.inspectionDTOArray;\n for (int i = 0; i <= DTOArray.length - 1; i++) {\n cost += DTOArray[i].getCost();\n }\n return cost;\n }", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}", "List<ResourceSkuCosts> costs();", "@Pure\n\tdouble getEstimatedCost();", "public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}", "@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}", "public int getCost()\r\n\t{\n\t\treturn 70000;\r\n\t}", "public double getCost() {\n\t\treturn 1.25;\n\t}", "public double getCost() {\n\n\t\treturn cost;\n\t}", "public double getCost() \n { \n return super.getCost() +22;\n }", "public Money getCost(){\r\n return this.cost;\r\n }", "public Integer getCost() {\r\n\t\treturn cost;\r\n\t}", "public BigDecimal getCost() {\r\n return cost;\r\n }", "public Integer getCost() {\n return cost;\n }", "public double getCost(int endId) throws IllegalArgumentException, IllegalStateException;", "public BigDecimal getCost() {\n return this.cost;\n }", "public int getCost() {\n\t\treturn cost;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}", "@Test\n public void testCalculateCostWithEmptyList() {\n List inspectionList = new ArrayList();\n int expResult = 100;\n int result = instance.calculateCost(inspectionList);\n assertEquals(expResult, result);\n }", "public double getCost() {\n double price = 0;\n price += this.numPizzas * this.pizzaType.getCost();\n if(this.numPizzas >= 20) // Discount if >=20 pizzas\n return price * 0.9;\n else if(this.numPizzas >= 10) // Discount if between 10 and 20 pizzas\n return price * 0.95;\n return price; // No discount\n }", "public double getCost() {\n return quantity*ppu;\n\n }", "@Override\n public int getCost() {\n\n\n //return cost converted to int\n return (int) cost;\n }", "public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}", "public double getCost() {\n return price;\n }", "public int[] getCost(){\n\t\treturn this.cost;\n\t}", "public String getCost() {\n return cost;\n }", "int getResourceCost();", "@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}", "protected abstract double getDefaultCost();", "@Override\n public int getCost() {\n\treturn 0;\n }", "@Override\n public int getCost() {\n return iceCreamPrice + topPrice;\n }", "@Test\n public void costTest() {\n // TODO: test cost\n }", "public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }", "@Override\n public double getCost() {\n if (lunch != null && dinner != null) {\n return lunch.getCost() + dinner.getCost();\n }\n return 0;\n }", "public int selectedCost()\r\n {\r\n if (selectedIndex == -1) //nothing selected\r\n return 0;\r\n \r\n return dummyList.get(selectedIndex).cost();\r\n }", "public double cost()\n\t{\n\t\treturn _dblCost;\n\t}", "public int getJobCost(int jNo);", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "public void calculateCost(){\n if(this.isChair){\n for(int i = 0; i < this.chairs.length; i++){\n this.cost += this.chairs[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isDesk){\n for(int i = 0; i < this.desks.length; i++){\n this.cost += this.desks[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isFiling){\n for(int i = 0; i < this.filingCabinets.length; i++){\n this.cost += this.filingCabinets[i].getPrice();\n }\n }\n //if furniture type is chair, add up cost of all items in list\n if(this.isLamp){\n for(int i = 0; i < this.lamps.length; i++){\n this.cost += this.lamps[i].getPrice();\n }\n }\n }", "public ArrayList<RewardBean> getTotalCost() {\n/* 28 */ return this.totalCost;\n/* */ }", "@Override\n public double getCost() {\n /**\n * @return the cost of Ice Cream\n */\n // TODO Auto-generated method stub\n return this.cost;\n }", "@Override\r\n\tpublic double getCost() {\n\t\treturn 0;\r\n\t}", "public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}", "@Test\n public void testGetCost() {\n VirusAttribute virusAttribute = new VirusAttribute(\"att\", \"desc\", 30);\n int result = virusAttribute.getCost();\n assertEquals(30, result);\n }", "public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}", "public double getCost() {\n return this.product.getPrice() * quanity;\n }", "public int getHealthCost();", "@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}", "@Override\n public double cost(){\n return 1 + super.sandwich.cost();\n }", "@Override\r\n\tpublic double getCost() {\n\t\treturn this.cost_of_icecream;\r\n\t}", "public double getCost() {\r\n\t\t\r\n\t\tif (super.getSize() == \"Small\") { totalCost = 2.00; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Medium\") { totalCost = 2.50; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Large\") { totalCost = 3.00; }\r\n\t\t\r\n\t\treturn totalCost;\r\n\t}", "double getSolutionCost();", "public double getCost() {\n\t\treturn costOverride > 0 ? costOverride : getDefaultCost();\n\t}", "public double getTotalCost() {\r\n return totalCost;\r\n }", "@NotNull\n public BigDecimal getCost() {\n return cost;\n }", "@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}" ]
[ "0.7734183", "0.7734183", "0.7632914", "0.7632914", "0.7632914", "0.7589102", "0.7389139", "0.729733", "0.7251668", "0.7251668", "0.7251668", "0.7190428", "0.7188105", "0.69755244", "0.69609225", "0.695106", "0.6948207", "0.6946672", "0.6915673", "0.6878441", "0.6871515", "0.68550795", "0.68350196", "0.6834182", "0.68298316", "0.68296546", "0.68169755", "0.6787928", "0.6766541", "0.6766541", "0.67634827", "0.6760232", "0.6754518", "0.67396754", "0.67206305", "0.67206305", "0.6703318", "0.6692631", "0.6683219", "0.66704285", "0.66632503", "0.66612303", "0.6659804", "0.6641907", "0.6641907", "0.6629303", "0.6618138", "0.6609605", "0.66042835", "0.6598542", "0.6594635", "0.6585439", "0.6583349", "0.6581945", "0.6581226", "0.6567219", "0.65655595", "0.6560864", "0.6559086", "0.6537895", "0.6535221", "0.6530281", "0.65301985", "0.65232915", "0.6517279", "0.6515884", "0.6496702", "0.64890957", "0.6485374", "0.64838016", "0.6465882", "0.64604837", "0.64595", "0.64548457", "0.6447703", "0.6434292", "0.6428487", "0.64238554", "0.64164877", "0.64147174", "0.6409013", "0.64017725", "0.63887453", "0.6385651", "0.6367511", "0.635589", "0.6354627", "0.63538605", "0.634921", "0.63346434", "0.6317756", "0.6312699", "0.630981", "0.63031495", "0.6300088", "0.6299838", "0.6296278", "0.62910014", "0.62846977", "0.6283006" ]
0.8074741
0
Test_02 of updateMainSkillCompareToNewChange method, of class SkillsList.
@Test public void testUpdateMainSkillCompareToNewChange_02() { System.out.println("updateMainSkillCompareToNewChange"); SkillsList instance = new SkillsList(); Skill result = instance.getMainSkill(); assertTrue(result==null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\r\n\tvoid testUpdateSkillRecordShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\r\n\t}", "@Test\r\n\tvoid testUpdateSkillRecordShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\t\r\n\t}", "void updateSkill(Skill skill);", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "void changeSkill(Long pokemonId, int newSkill);", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Override\n\tpublic void updateScoreAfterTest(Score score2) {\n\t\tscoreDao.updateScoreAfterTest(score2);\n\t}", "private static void setTest( int modifyAt\n ) {\n System.out.println(\n \"changed element \" + modifyAt + \" from \"\n + list.set( modifyAt, modifyAt + 1000) + \" to \"\n + list.get( modifyAt)\n );\n }", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public void testCompareTo() throws Exception {\r\n setUp();\r\n Student allison = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n Student alli = new Student(\"0\", \"Aaa\", \"DeSantis\");\r\n\r\n // same last name, returns 1\r\n assertEquals(allison.compareTo(alli), 1);\r\n\r\n // same last name, returns -1\r\n Student al = new Student(\"0\", \"z\", \"DeSantis\");\r\n assertEquals(allison.compareTo(al), -1);\r\n\r\n // same name\r\n Student allis = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n assertEquals(allison.compareTo(allis), 0);\r\n\r\n // same first name, returns 1\r\n Student last = new Student(\"0\", \"Allison\", \"c\");\r\n assertEquals(allison.compareTo(last), 1);\r\n\r\n // same first name, returns -1\r\n Student diff = new Student(\"0\", \"Allison\", \"Z\");\r\n assertEquals(allison.compareTo(diff), -1);\r\n\r\n\r\n Student c1 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n Student c2 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n\r\n assertEquals(c1.compareTo(c2), 0);\r\n\r\n assertEquals(c2.compareTo(c1), 0);\r\n\r\n Student c3 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n assertEquals(c1.compareTo(c3), 0);\r\n }", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "@FXML\n private void increasePriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1) {\n storyPriority = getModel().getLowestPriorityStory();\n }\n else if (storyPriority == 1) {\n return;\n }\n else {\n storyPriority--;\n }\n try {\n getModel().modifyStory(story, storyPriority);\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI,\n //e.g Disabling buttons.\n ErrorReporter.get().reportError(e, \"Failed to modify the story priority\");\n }\n updateStoryTable();\n }\n }", "public int compare(Skill s1,Skill s2){\n\t\t\t\t\treturn s1.getNumber()-s2.getNumber();\r\n\t\t\t\t}", "public int compare(Skill s1,Skill s2){\n\t\t\t\t\treturn s1.getNumber()-s2.getNumber();\r\n\t\t\t\t}", "@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}", "@Test\n public void TestEditTwo(){\n ArrayList<Task> listToEdit = new ArrayList<Task>();\n ArrayList<Integer> indexList = new ArrayList<Integer>();\n String message;\n \n indexList.add(0);\n listToEdit.add(new Task(\"New item 1\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n listToEdit.clear();\n indexList.add(1);\n listToEdit.add(new Task(\"New item 2\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"New item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n listToEdit.clear();\n indexList.add(2);\n listToEdit.add(new Task(\"New item 3\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"New item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n logicObject.showUpdatedItems();\n listToEdit.clear();\n indexList.add(1);\n listToEdit.add(new Task(\"item 2 changed again!\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"item 2 changed again!\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 3\", logicObject.listOfTasks.get(2).getName());\n }", "public void testCmdUpdate_priority_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 4: Testing priority field (all ID are valid)(default priority is\n\t\t * normal)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 4a: priority is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 4b: priority is normal\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_NORM);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4c: priority is high\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_HIGH);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.HIGH);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t\t\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4d: priority is low\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_LOW);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.LOW);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}", "@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "@Test\n public void testSort() {\n initialize();\n var realList = new HighScoreList();\n realList.setList(list);\n realList.sort();\n\n assertEquals(300, realList.getList().get(0).getScore());\n assertEquals(200, realList.getList().get(1).getScore());\n assertEquals(100, realList.getList().get(2).getScore());\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Test\n /* testUpdateRecord\n * testing update exist record in Save.Json\n * */\n public void testUpdateRecord() {\n testAddRecord();\n\n score = 300;\n level = 3;\n name = \"test1\";\n\n saveReader.updateRecord(indexOfReturned, \"name\", name);\n assertEquals(\"True : name field updated successfully\", name, saveReader.LoadsList.get(indexOfReturned).name);\n\n saveReader.updateRecord(indexOfReturned, \"score\", score);\n assertEquals(\"True : score field updated successfully\", score, saveReader.LoadsList.get(indexOfReturned).score);\n\n saveReader.updateRecord(indexOfReturned, \"level\", level);\n assertEquals(\"True : level field updated successfully\", level, saveReader.LoadsList.get(indexOfReturned).level);\n }", "@FXML\n private void decreasePriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1) {\n return;\n }\n else if (storyPriority + 1 >= getModel().getLowestPriorityStory()) {\n storyPriority = null;\n }\n else {\n storyPriority++;\n }\n try {\n if (storyPriority != null) {\n getModel().modifyStory(story, storyPriority);\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().modifyStory(story, null);\n } catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Failed to modify the priority of the story\");\n }\n });\n }\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Failed to modify the priority of the story\");\n }\n updateStoryTable();\n }\n }", "public void UpCheck_status1(MajorChange mc) ;", "static public void adjustRewardForSelect(ArrayList<RewardItem> rewardList) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (toChangeCard != null) {\n if (item.type == RewardItem.RewardType.CARD) {\n boolean isExist = false;\n for (AbstractCard card : item.cards) {\n if (card.cardID.equals(toChangeCard.cardID)) {\n isExist = true;\n if (card.canUpgrade()) {\n card.upgrade();\n }\n break;\n }\n }\n if (!isExist) {\n boolean isChanged = false;\n // check same rarity\n for (AbstractCard card : item.cards) {\n if (card.rarity == toChangeCard.rarity) {\n if (card.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.remove(card);\n item.cards.add(toChangeCard);\n isChanged = true;\n break;\n }\n }\n if (!isChanged) {\n AbstractCard removed = item.cards.remove(0);\n if (removed.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.add(toChangeCard);\n }\n }\n }\n }\n }\n\n if (selectRelic != null) {\n if (AbstractDungeon.player.hasRelic(selectRelic)) {\n selectRelic = null;\n } else {\n boolean isExist = false;\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n if (item.relic.relicId.equals(selectRelic)) {\n isExist = true;\n }\n }\n\n }\n if (!isExist) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n rewardList.set(i, new RewardItem(RelicLibrary.getRelic(selectRelic)));\n }\n }\n }\n }\n clearHasRelicInPool();\n }\n }", "@Test\n void testUpdateGoaliePositionLimitsYmin() {\n goalie.setPosition(new Vector(goalie.getX(), 192f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the negative minimum direction\n goalie.setNext_direction(new Vector(0,-1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(-1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmin\" +\n \" Goalie moved past the Y-Min limit\");\n }\n }", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "@Test\r\n\tvoid testChangeItems() {\r\n\t\tToDoItem newItem = new ToDoItem(\"Item 1\", \"2/6/21\", 1, \"Body text 1\");\r\n\t\tString correctInfo = \"Name: Item 2\\nDue Date: 3/16/21\\nPriority: Medium\\nNotes: New notes\\nLate: Yes\\nItem Complete: Yes\";\r\n\t\tnewItem.setName(\"Item 2\");\r\n\t\tnewItem.setDueDate(\"3/16/21\");\r\n\t\tnewItem.setPriority(2);\r\n\t\tnewItem.setNotes(\"New notes\");\r\n\t\tnewItem.setIsLate(true);\r\n\t\tnewItem.setIsDone(true);\r\n\r\n\t\tif (!newItem.getAllInfo().equals(correctInfo)) {\r\n\t\t\tfail(\"Error changing ToDoItem values\");\r\n\t\t}\r\n\t}", "public static int attemptSkillUp(int skillId, Player player){ \n\t\ttry{\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == -1){return -2;}\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == 30){return -2;}\n\t\t\tint[] skillCost;\n\t\t\tskillCost = new int[8];\n\t\t\tint newSkillLevel = DwarfCraftPlayerSkills.getSkillLevel(skillId, player);\n\t\t\t/* Dan thinks skillId could be removed from the arguments in this function\n\t\t\t getSkillTrainingCost */\n\t\t\tskillCost = Skills.values()[skillId].getSkillTrainingCost(skillId, newSkillLevel, player);\n\t\t\tfor (int i = 0; i < skillCost[0];i++){\n\t\t\t\t//check inventory quantity for needed items\n\t\t\t\tif (DwarfCraftInventory.countInventoryItems(skillCost[1+2*i], player) < skillCost[2+2*i]){return -1;}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\t\tcatch(NumberFormatException f) {return 0;}\n\t}", "@Test\n\tpublic void test_update_last_commit_time_change(){\n\t\ttest2.updateLastCommitTime(current);\n\t\tassertEquals(\"Last Commit Time shoud be updated\", current, test2.getLastCommitTime());\n\t}", "@Override\r\n\tpublic void updateDriverRate(int score, String driverID) {\n\t\t\r\n\t}", "@Test\n public void changeScoreTest() {\n //will be false as animal is not moving\n boolean expectedValue = animal.changeScore();\n Assert.assertEquals(expectedValue,false);\n }", "protected void beforeUpdateSkillType(\n RetailscmUserContext userContext,\n SkillType existed,\n String retailStoreCountryCenterId,\n String skillTypeId,\n int skillTypeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "@Test\n void compareTo_MatchButModifying_NameAndAddress()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.no, AnswerType.no, ContactMatchType.MatchButModifying);\n }", "Test update(TestData testData, Test test);", "@Test\n public void TestEditOne(){\n ArrayList<Task> listToEdit = new ArrayList<Task>();\n ArrayList<Integer> indexList = new ArrayList<Integer>();\n String message;\n \n indexList.add(3);\n listToEdit.add(new Task(\"New item 99\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(2);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(-1);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(-2);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n void ScoreBoardIntoList() {\n //Should be\n List<StatisticsGetDTO> intended = new ArrayList<StatisticsGetDTO>();\n StatisticsGetDTO statisticsGetDTO = new StatisticsGetDTO();\n statisticsGetDTO.setScore(100);\n statisticsGetDTO.setPlayerName(\"A\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(1);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(200);\n statisticsGetDTO.setPlayerName(\"B\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(2);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(300);\n statisticsGetDTO.setPlayerName(\"C\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(3);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(400);\n statisticsGetDTO.setPlayerName(\"D\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(4);\n intended.add(statisticsGetDTO);\n\n List<StatisticsGetDTO> actualList = scoreboard.transformIntoList();\n List<Integer> scoresActualList = new ArrayList<Integer>();\n List<String> namesActualList = new ArrayList<String>();\n List<Integer> mysteryActualList = new ArrayList<Integer>();\n for (StatisticsGetDTO element : actualList){\n scoresActualList.add(element.getScore());\n namesActualList.add(element.getPlayerName());\n mysteryActualList.add(element.getNumberOfCorrectlyGuessedMysteryWords());\n }\n\n assertTrue(scoresActualList.contains(intended.get(0).getScore()));\n assertTrue(scoresActualList.contains(intended.get(1).getScore()));\n assertTrue(scoresActualList.contains(intended.get(2).getScore()));\n assertTrue(scoresActualList.contains(intended.get(3).getScore()));\n assertTrue(namesActualList.contains(intended.get(0).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(1).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(2).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(3).getPlayerName()));\n assertTrue(mysteryActualList.contains(intended.get(0).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(1).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(2).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(3).getNumberOfCorrectlyGuessedMysteryWords()));\n }", "@Test\n public void testChangeAge() {\n System.out.println(\"Animal.changeAge\");\n animal1.changeAge(2);\n animal2.changeAge(-1);\n assertEquals(19, animal1.getAge());\n assertEquals(2, animal2.getAge());\n }", "private static void checkForUpgrades(@Nullable List<UpdatablePackage> completedChanges) {\n if (completedChanges == null) {\n return;\n }\n int highestNewApiLevel = 0;\n for (UpdatablePackage updated : completedChanges) {\n TypeDetails details = updated.getRepresentative().getTypeDetails();\n if (details instanceof DetailsTypes.PlatformDetailsType) {\n int api = ((DetailsTypes.PlatformDetailsType)details).getApiLevel();\n if (api > highestNewApiLevel) {\n highestNewApiLevel = api;\n }\n }\n }\n if (highestNewApiLevel > 0) {\n // TODO: Fix this code after we delete WizardConstants\n PropertiesComponent.getInstance().setValue(WizardConstants.NEWLY_INSTALLED_API_KEY.name, highestNewApiLevel, -1);\n }\n }", "@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}", "@Test\r\n public void testUpdate() {\r\n }", "@FXML\n private void jumpPriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1 || storyPriority != 0) {\n try {\n getModel().modifyStory(story, 1);\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Cannot increase priority\");\n }\n updateStoryTable();\n }\n }\n }", "@Override\n public boolean acceptMove(int baselineObjectiveValue, int newObjectiveValue) {\n if (newObjectiveValue > baselineObjectiveValue) {\n return true;\n }\n else {\n return false;\n }\n }", "@Test\n void testForLargestCardInTrickComparingRank() {\n Dealer testDealer = new Dealer();\n\n Suit suit1 = Suit.DIAMONDS;\n Suit suit2 = Suit.SPADES;\n Suit suit3 = Suit.DIAMONDS;\n Suit suit4 = Suit.DIAMONDS;\n \n Rank rank1 = Rank.TWO;\n Rank rank2 = Rank.KING;\n Rank rank3 = Rank.ACE;\n Rank rank4 = Rank.FIVE;\n\n Card card1 = new Card(suit1,rank1,false);\n Card card2 = new Card(suit2,rank2,false);\n Card card3 = new Card(suit3,rank3,false);\n Card card4 = new Card(suit4,rank4,false);\n\n \n testDealer.addToPlayedCards(card1);\n testDealer.addToPlayedCards(card2);\n testDealer.addToPlayedCards(card3);\n testDealer.addToPlayedCards(card4);\n\n assertEquals(card3 , testDealer.getLargestCardFromTrick());\n }", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "private void checkForTyreChange(int lapNo, char[] allTyreTypes)\n {\n RNG generator = new RNG(1,11);\n Validation validator = new Validation();\n for(int i = 0; i < getDrivers().getSize(); i++)\n {\n int timeAffected = 0;\n if(getDrivers().getDriver(i).getEligibleToRace()) // if driver is eligible to race\n {\n int randomNo = generator.generateRandomNo(); // generates random number between 1 and 11(exclusive)\n if(validator.isNumberBetween(1, 5, randomNo)) // 50% chance to change tyre type\n {\n allTyreTypes[i] = 'W';\n timeAffected = 10;\n System.out.println(getDrivers().getDriver(i).getName() + \" has chosen to change tyres from Dry-weather to Wet-weather, which increases lap \" + lapNo + \n \" time by \" + timeAffected + \" secs\");\n getDrivers().getDriver(i).setAccumulatedTime(getDrivers().getDriver(i).getAccumulatedTime() + timeAffected); // update time affected\n }\n }\n }\n }", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "@Test\n void testUpdateGoaliePositionLimitsYmax() {\n goalie.setPosition(new Vector(goalie.getX(), 512f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the positive direction\n goalie.setNext_direction(new Vector(0,1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmax\" +\n \" Goalie moved past the Y-Max limit\");\n }\n\n }", "@Test\n void testGetSortedList(){\n ToDoList todoList = new ToDoList();\n ToDo todo1 = new ToDo(\"Todo1\");\n todo1.setInhalt(\"Dies ist ein Test\");\n\n todoList.add(new ToDo((\"Todo2\")));\n ToDo todo3 = new ToDo(\"Todo3\");\n todo3.setInhalt(\"3+3=6\");\n todo3.setStatus(Status.IN_ARBEIT);\n todoList.add(new ToDo((\"Todo4\")));\n todoList.add(todo3);\n ToDo todo4 = new ToDo(\"Trala\");\n todo4.setStatus(Status.IN_ARBEIT);\n todo4.setStatus(Status.BEENDET);\n todo4.setInhalt(\"ab\");\n ToDo todo5 = new ToDo(\"Trala\");\n todo5.setInhalt(\"aa\");\n todo5.setStatus(Status.IN_ARBEIT);\n todo5.setStatus(Status.BEENDET);\n todoList.add(todo5);\n todoList.add(todo4);\n todoList.add(todo1);\n\n todoList = todoList.getSortedList();\n\n assertEquals(Status.OFFEN, todoList.get(0).getStatus());\n assertEquals(Status.OFFEN, todoList.get(1).getStatus());\n assertEquals(Status.OFFEN, todoList.get(2).getStatus());\n assertEquals(Status.IN_ARBEIT, todoList.get(3).getStatus());\n assertEquals(Status.BEENDET, todoList.get(4).getStatus());\n assertEquals(Status.BEENDET, todoList.get(5).getStatus());\n\n assertEquals(\"Trala\", todoList.get(5).getBez());\n assertEquals(\"Todo3\", todoList.get(3).getBez());\n\n assertEquals(\"aa\", todoList.get(4).getInhalt());\n assertEquals(\"ab\", todoList.get(5).getInhalt());\n }", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "private static void testupdate() {\n\t\ttry {\n\t\t\tRoleModel model = new RoleModel();\n\t\t\tRoleBean bean = new RoleBean();\n\t\t\tbean = model.findByPK(7L);\n\t\t\tbean.setName(\"Finance\");\n\t\t\tbean.setDescription(\"Finance Dept\");\n\t\t\tbean.setCreatedBy(\"CCD MYSORE\");\n\t\t\tbean.setModifiedBy(\"CCD MYSORE\");\n\t\t\tbean.setCreatedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tbean.setModifiedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tmodel.update(bean);\n\t\t\tRoleBean updateBean = model.findByPK(1);\n\t\t\tif (\"12\".equals(updateBean.getName())) {\n\t\t\t\tSystem.out.println(\"UPDATE RECORD FAILED\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"RECORD UPDATED SUCCESSFULLY\");\n\t\t\t}\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DuplicateRecordException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n\tpublic void testLLSort() {\n\t\tLinkedList playerList = new LinkedList();\n\t\tPlayer tempInsert5 = new Player();\n\t\ttempInsert5.setName(\"test5\");\n\t\ttempInsert5.setPoints(5);\n\t\ttempInsert5.setWins(4);\n\t\ttempInsert5.setLosses(3);\n\t\tplayerList.LLInsert(tempInsert5);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tPlayer tempInsert2 = new Player();\n\t\ttempInsert2.setName(\"test2\");\n\t\ttempInsert2.setPoints(2);\n\t\ttempInsert2.setWins(1);\n\t\ttempInsert2.setLosses(0);\n\t\tplayerList.LLInsert(tempInsert2);\n\t\t\n\t\tPlayer tempInsert3 = new Player();\n\t\ttempInsert3.setName(\"test3\");\n\t\ttempInsert3.setPoints(3);\n\t\ttempInsert3.setWins(2);\n\t\ttempInsert3.setLosses(1);\n\t\tplayerList.LLInsert(tempInsert3);\n\t\t\n\t\tPlayer tempInsert1 = new Player();\n\t\ttempInsert1.setName(\"test1\");\n\t\ttempInsert1.setPoints(1);\n\t\ttempInsert1.setWins(0);\n\t\ttempInsert1.setLosses(0);\n\t\tplayerList.LLInsert(tempInsert1);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tPlayer tempInsert4 = new Player();\n\t\ttempInsert4.setName(\"test4\");\n\t\ttempInsert4.setPoints(4);\n\t\ttempInsert4.setWins(3);\n\t\ttempInsert4.setLosses(2);\n\t\tplayerList.LLInsert(tempInsert4);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tplayerList.LLSort();\n\t\tassertEquals(playerList.LLPrint(), \n\t\t\t\t\"test5: Points: 5, Wins/Losses: 4/3\\n\"\n\t\t\t\t\t\t+ \"test4: Points: 4, Wins/Losses: 3/2\\n\"\n\t\t\t\t\t\t+ \"test3: Points: 3, Wins/Losses: 2/1\\n\"\n\t\t\t\t\t\t+ \"test2: Points: 2, Wins/Losses: 1/0\\n\"\n\t\t\t\t\t\t+ \"test1: Points: 1, Wins/Losses: 0/0\\n\");\n\t}", "@Test\n public void testEditProduct() throws Exception {\n System.out.println(\"editProduct\");\n Product p;\n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n p = prs.get(0);\n String nameNew = \"newName\", nameOld = p.getName();\n p.setName(nameNew);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.isEmpty());\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.contains(p));\n assertTrue(prs.size() == 1);\n p.setName(nameOld);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.isEmpty());\n }", "@Test\n void testUpdateGoalie() {\n\n }", "int updateByPrimaryKeySelective(WizardValuationHistoryEntity record);", "void changeCost(ArrayList<CostsChanges> changes);", "private void updateSingles(Hierarchy con, ViolatedCandidate lCandidate, ViolatedCandidate tCandidate,\n double delta) {\n Multiset<Constraint> targetPreferringView = UpdateUtils.getViolatedByLearner(lCandidate, tCandidate);\n Multiset<Constraint> learnerPreferringView = UpdateUtils.getViolatedByTarget(lCandidate, tCandidate);\n Multiset<Constraint> learnerPreferringHigh = HashMultiset.create(learnerPreferringView.size());\n double promoteWeightedDelta = delta / targetPreferringView.size();\n double maxTPreferringRanking = Double.MIN_VALUE;\n for (Constraint constraint : targetPreferringView.elementSet()) {\n maxTPreferringRanking = Math.max(maxTPreferringRanking, con.getRanking(constraint));\n double multipliedDelta = (targetPreferringView.count(constraint) * promoteWeightedDelta);\n con.changeConstraintRanking(constraint, multipliedDelta);\n }\n\n for (Constraint constraint : learnerPreferringView.elementSet()) {\n double thisRanking = con.getRanking(constraint);\n if (thisRanking > maxTPreferringRanking) {\n int count = learnerPreferringView.count(constraint);\n learnerPreferringHigh.add(constraint, count);\n }\n }\n // If 'higher' set is empty, just add argMax to it\n if (learnerPreferringHigh.isEmpty()) {\n Constraint argMax = UpdateUtils.getMax(learnerPreferringView, con);\n learnerPreferringHigh.add(argMax);\n }\n\n Multiset<Constraint> toIterateOver = learnerPreferringHigh;\n\n double demoteWeightedDelta = -(delta / toIterateOver.size());\n for (Constraint constraint : toIterateOver.elementSet()) {\n double multipliedDelta = toIterateOver.count(constraint) * demoteWeightedDelta;\n con.changeConstraintRanking(constraint, multipliedDelta);\n // System.out.println(\"↓ Updating \" + constraint +\" by \" +\n // multipliedDelta);\n }\n }", "@Test\r\n\tvoid testAddToDoItem() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\t// case 1: insert one ToDoItem\r\n\t\tlist.insert(toDoItem4);\r\n\t\tif (!list.getHead().getName().equals(\"Item 4\")) { // check the head is set correctly\r\n\t\t\tfail(\"Head set incorrectly for: \" + toDoItem4.getName() + \", should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\tif (list.getSize() != 1) { // check that size is incremented\r\n\t\t\tfail(\"List size is incorrect: should be 1\");\r\n\t\t}\r\n\r\n\t\t// case 2: second item is insert\r\n\t\tlist.insert(toDoItem1);\r\n\t\tif (list.getSize() != 2) { // check size incremented correctly\r\n\t\t\tfail(\"Size incorrect: should be 2\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 1\")) { // check the item is in the list\r\n\t\t\tfail(\"Item 1 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check the position of Item 1\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\t// check that the current pointer is in the right location\r\n\t\tif (!list.getCurrent().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Current set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\t// check that tail is set correctly\r\n\t\tif (!list.getTail().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Tail set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\r\n\t\t// case 3: third item is inserted\r\n\t\tlist.insert(toDoItem5);\r\n\t\tif (list.getSize() != 3) {\r\n\t\t\tfail(\"Size incorrect: should be 3\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 5\")) {\r\n\t\t\tfail(\"Item 5 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.getTail().getName().equals(\"Item 5\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 5\\\"\");\r\n\t\t}\r\n\r\n\t\t// insert several more and test to make sure they are ordered correctly\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem6);\r\n\t\tlist.insert(toDoItem3);\r\n\r\n\t\tToDoItem tempHead = list.getHead();\r\n\t\tString currList = \"|\";\r\n\t\tString correctList = \"|Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|\";\r\n\r\n\t\twhile (tempHead != null) {\r\n\t\t\tcurrList += tempHead.getName() + \"|\";\r\n\t\t\ttempHead = tempHead.getNext();\r\n\t\t}\r\n\r\n\t\tif (!currList.equals(correctList)) {\r\n\t\t\tfail(\"The list was ordered incorrectly after inserting all items\");\r\n\t\t}\r\n\t}", "@Test\n public void testSubList_SubList_Item_Update() {\n SegmentedOasisList<StringBuilder> instance = new SegmentedOasisList<>();\n\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"7\"));\n instance.add(new StringBuilder(\"7\"));\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"1\"));\n\n List<StringBuilder> expResult = Arrays.asList(new StringBuilder(\"17\"), new StringBuilder(\"7\"),\n new StringBuilder(\"7\"));\n List<StringBuilder> result = instance.subList(1, 4);\n\n instance.get(1).append(\"7\");\n assertTrue(isEqual(expResult, result));\n }", "@Test\r\n\tpublic void getAllGradesWithChangeOfTestOfTeacherValueAndAdjustementTest()\r\n\t\t\tthrows ClassNotFoundException, SonarqubeDataBaseException, SQLException, IOException {\r\n\t\tmapQuality.put(\"TestOfTeacher\", new ModelValue(90f));\r\n\t\tmapQuality.put(\"Comments\", new ModelValue(25f, 10f));\r\n\t\tlistAllGrades.put(\"FinalGrade\", new Float(5.5));\r\n\t\tAssert.assertEquals(UtilCalculGrade.getAllGrades(mapQuality, listScoreMetricStudent, listScoreMetricTeacher,\r\n\t\t\t\tmapConf, mapIssues, projectName, idModule).get(\"FinalGrade\"), listAllGrades.get(\"FinalGrade\"));\r\n\t}", "@Test\n\tpublic void testChangeMultiAttributeOrderDoesMatterLDAP96()\n\t\t\tthrows Exception {\n\t\tfinal Attributes fixtureAttrs = new BasicAttributes();\n\t\tAttribute multi = new BasicAttribute(\"title\");\n\t\tmulti.add(\"Juergen\");\n\t\tmulti.add(\"George\");\n\t\tfixtureAttrs.put(multi);\n\t\tclass TestableDirContextAdapter extends DirContextAdapter {\n\t\t\tpublic TestableDirContextAdapter() {\n\t\t\t\tsuper(fixtureAttrs, null);\n\t\t\t\tsetUpdateMode(true);\n\t\t\t}\n\t\t}\n\t\ttested = new TestableDirContextAdapter();\n\t\tassertTrue(tested.isUpdateMode());\n\t\ttested.setAttributeValues(\"title\", new String[] { \"Jim\", \"George\",\n\t\t\t\t\"Juergen\" }, true);\n\n\t\t// change\n\t\tModificationItem[] mods = tested.getModificationItems();\n\t\tassertEquals(1, mods.length);\n\t\tassertEquals(DirContext.REPLACE_ATTRIBUTE, mods[0].getModificationOp());\n\t\tAttribute attr = mods[0].getAttribute();\n\t\tassertEquals(\"Jim\", attr.get(0));\n\t\tassertEquals(\"George\", attr.get(1));\n\t\tassertEquals(\"Juergen\", attr.get(2));\n\t}", "@Test\n\tpublic void testModifyQuestion() {\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\n\t\tquestion.setQuestionText(\"Testing update\");\n\n\t\t// Test with invalid permissions\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.assertNotNull(e);\n\t\t} \n\n\t\t// Test with valid permission\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tQnaQuestion changedQuestion = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\t\t\tAssert.assertEquals(changedQuestion.getQuestionText(), \"Testing update\");\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\t}", "@Test\n public final void testSmallerThanMax() {\n for (ArrayList<TradeGood> planetsGoods : goods) {\n for (TradeGood good : planetsGoods) {\n assertTrue(good.getPrice() < good.type.mhl);\n }\n }\n }", "private boolean testChanges(boolean testRepository) {\r\n\t\t\r\n\t\tif (testRepository) {\r\n\t\t\t\r\n\t\t\tString status = \"Status: [ACTION - Testing Repository Changes]...\";\r\n\t\t\t\r\n\t\t\t// test changes in repository for clashes etc.\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = true;\r\n\t\t\tint failCount = 0;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// do an update first to make sure rep-side changes are all there\r\n\t\t\t\tboolean updateSuccess = this.updateRepChanges(false);\r\n\t\t\t\t\r\n\t\t\t\tif (!updateSuccess) {\r\n\t\t\t\t\tstatusBar.setText(status+\"Update FAILED\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// load baseOntology using URI\r\n\t\t\t\tstatusBar.setText(status+\"Loading Base Ontology\");\r\n\t\t\t\tOWLOntology baseOntology = swoopModel.loadOntology(baseOntologyURI);\r\n\t\t\t\tif (baseOntology == null) {\r\n\t\t\t\t\t// there is no base ontology, changes start from scratch\r\n\t\t\t\t\t// create new ontology using OWLBuilder\r\n\t\t\t\t\tOWLBuilder builder = new OWLBuilder();\r\n\t\t\t\t\tbuilder.createOntology(baseOntologyURI, baseOntologyURI);\r\n\t\t\t\t\tbaseOntology = builder.getOntology();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// get all repository side changes: under repRoot\r\n\t\t\t\tList allRepChanges = this.getDescendantChanges(repRoot);\r\n\t\t\t\tstatusBar.setText(status+\"Testing \"+allRepChanges.size()+\" repository-side changes\");\r\n\t\t\t\t\r\n\t\t\t\t// apply allRepChanges to baseOntology\r\n\t\t\t\tfor (int i=0; i<allRepChanges.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) allRepChanges.get(i);\r\n\t\t\t\t\tOntologyChange oc = swc.getChange();\r\n\t\t\t\t\t//*** need to align changes with ontology! ***/\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tOntologyChange alignOC = (OntologyChange) controlHandler.swoopHandler.changeLog.getChangeInformation(oc, ChangeLog.CHANGE_ALIGN, null, new ArrayList(), baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// save state of baseOntology and see if it changes\r\n\t\t\t\t\t\t// use Abstract Syntax since its more concise than rdf/xml?\r\n\t\t\t\t\t\tString before = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// APPLY CHANGE\r\n\t\t\t\t\t\tboolean check = true;\r\n\t\t\t\t\t\tif (alignOC instanceof BooleanElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyBooleanElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse if (alignOC instanceof EnumElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyEnumElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t\telse alignOC.accept((ChangeVisitor) baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// need to see if any change in the ontology occured\r\n\t\t\t\t\t\tString after = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (before.equals(after) || !check) {\r\n\t\t\t\t\t\t\t// nothing has changed!\r\n\t\t\t\t\t\t\tSystem.out.println(\"Found redundant change: \"+oc);\r\n\t\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse swc.isRedundant = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Change Error for: \"+oc);\r\n\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\ttestSuccess = false;\r\n\t\t\t}\r\n\t\t\tif (testSuccess) statusBar.setText(status+\"Test PASSED\");\r\n\t\t\telse {\r\n\t\t\t\tstatusBar.setText(status+\"Test FAILED\");\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Change Test FAILED: \"+failCount+\" change(s) is/are redundant or cause clashes. Please Fix/Remove them and try again.\");\r\n\t\t\t}\r\n\t\t\t// refresh repTreeTable\r\n\t\t\tthis.refreshRepTreeTable(false);\r\n\t\t\treturn testSuccess;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// test changes in Swoop Ontology for clashes etc.\r\n\t\t\tString status = \"Status: [ACTION - Testing LOCAL Ontology Changes]...\";\r\n\t\t\t\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = true;\r\n\t\t\tint failCount = 0;\r\n\t\t\t\r\n\t\t\t// get base ontology\r\n\t\t\tstatusBar.setText(status+\"Loading Base Ontology\");\r\n\t\t\tOWLOntology baseOntology = null;\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\t// get existing ontology from swoopModel\r\n\t\t\t\tbaseOntology = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\t// but clone it to prevent applying changes on *it*\r\n\t\t\t\tbaseOntology = this.cloneOntology(baseOntology);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tURI ontURI = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// load ontology with URI\r\n\t\t\t\t\tontURI = new URI(swoopOntFld.getText());\r\n\t\t\t\t\tbaseOntology = swoopModel.loadOntology(ontURI);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t// create new ontology\r\n\t\t\t\t\tOWLBuilder builder = new OWLBuilder();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbuilder.createOntology(ontURI, ontURI);\r\n\t\t\t\t\t} catch (OWLException e) {\r\n\t\t\t\t\t\te.printStackTrace();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaseOntology = builder.getOntology();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (baseOntology == null) {\r\n\t\t\t\tstatusBar.setText(status+\"Unable to load base ontology\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfor (int i=0; i<ontChanges.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) ontChanges.get(i);\r\n\t\t\t\t\tOntologyChange oc = swc.getChange();\r\n\t\t\t\t\t//*** need to align changes with ontology! ***/\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tOntologyChange alignOC = (OntologyChange) controlHandler.swoopHandler.changeLog.getChangeInformation(oc, ChangeLog.CHANGE_ALIGN, null, new ArrayList(), baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// save state of baseOntology and see if it changes\r\n\t\t\t\t\t\t// use Abstract Syntax since its more concise than rdf/xml?\r\n\t\t\t\t\t\tString before = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// APPLY CHANGE\r\n\t\t\t\t\t\tboolean check = true;\r\n\t\t\t\t\t\tif (alignOC instanceof BooleanElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyBooleanElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse if (alignOC instanceof EnumElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyEnumElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t\telse alignOC.accept((ChangeVisitor) baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// need to see if any change in the ontology occured\r\n\t\t\t\t\t\tString after = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (before.equals(after) || !check) {\r\n\t\t\t\t\t\t\t// nothing has changed!\r\n\t\t\t\t\t\t\tSystem.out.println(\"Found redundant change: \"+oc);\r\n\t\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse swc.isRedundant = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Change Error for: \"+oc);\r\n\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\ttestSuccess = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (testSuccess) statusBar.setText(status+\"Test PASSED\");\r\n\t\t\telse {\r\n\t\t\t\tstatusBar.setText(status+\"Test FAILED\");\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Change Test FAILED: \"+failCount+\" change(s) is/are redundant or cause clashes. Please Fix/Remove them and try again.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// refresh ontTreeTable\r\n\t\t\tthis.refreshOntTreeTable();\r\n\t\t\treturn testSuccess;\t\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\n public void testProjectRolesChanges() {\n coiPerson.setContactRole(ContactRoleFixtureFactory.MOCK_KEY_PERSON);\n Assert.assertFalse(\"Key Person Role not checked for\", rule.checkForKeyPersonProjectRoles(award.getProjectPersons()));\n coiPerson.setKeyPersonRole(\"fromCOI\");\n Assert.assertTrue(\"Key Person Role not checked for\", rule.checkForKeyPersonProjectRoles(award.getProjectPersons()));\n \n // when a key person is changed to coi\n kpPerson.setContactRole(ContactRoleFixtureFactory.MOCK_COI);\n Assert.assertTrue(\"rule should return true\", rule.processSaveAwardProjectPersonsBusinessRules(award.getProjectPersons()));\n }", "@Test\n public void adding_item_to_menu_should_increase_menu_size_by_1_Failure_Scenario(){\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.addToMenu(\"Sizzling brownie\",319);\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n System.out.println(\"Will decrease Instead of adding\");\n }", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n \n public void testD_MenuDescriptionChanged() {\n\n\n Menu menu = (Menu) menuTable.getSelectionModel().getSelectedItem();\n String descriptionBefore = menu.getDescription();\n\n // Click on cell 4 and change Status\n Node cell = lookup(\"#clmnDescription\").nth(1).query();\n doubleClickOn(cell).write(\"Cambio\").type(KeyCode.ENTER);\n\n // Select row and get user.\n cell = lookup(\".table-row-cell\").nth(0).query();\n clickOn(cell);\n Menu menu2 = (Menu) menuTable.getSelectionModel().getSelectedItem();\n assertNotEquals(descriptionBefore, menu2.getDescription());\n\n }", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "@Test\n public void testUpdate() {\n\n }", "@Test\n public void update() {\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "public void editStudentList(int stuNumber){\n for(int i = 0; i<studList.size();i++){\n if(stuNumber == studList.get(i).getStuNumber()){\n \n System.out.println(\"Student Name: \" + studList.get(i).getFullName() + \", Student Number: \" + \n studList.get(i).getStuNumber() + \", Student GPA: \" + studList.get(i).getGPA());\n\n Scanner input = new Scanner(System.in);\n String newName = \"\";\n double newGPA;\n\n System.out.print(\"Student name: \");\n newName = input.nextLine();\n\n System.out.print(\"Student GPA: \");\n newGPA = input.nextDouble();\n\n Student temp = new Student(newName, studList.get(i).getStuNumber(), newGPA);\n studList.set(i, temp);\n }\n }\n }", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "private void updateRacePoints(char[] allTyreTypes)\n {\n getDrivers().adjustDriversListByTime(allTyreTypes);\n for(int i = 0 ; i < getDrivers().getSize() ; i++)\n {\n int scoringPoints = 0;\n if(i == 0 && getDrivers().getDriver(i).getEligibleToRace()) // if first and eligible\n {\n scoringPoints = 8;\n }\n else if(i == 1 && getDrivers().getDriver(i).getEligibleToRace()) // if second and eligible\n {\n scoringPoints = 5;\n }\n else if(i == 2 && getDrivers().getDriver(i).getEligibleToRace()) // if third and eligible\n {\n scoringPoints = 3;\n }\n else if(i == 3 && getDrivers().getDriver(i).getEligibleToRace()) // if fourth and eligible\n {\n scoringPoints = 1;\n }\n getDrivers().getDriver(i).setAccumulatedScore(getDrivers().getDriver(i).getAccumulatedScore() + scoringPoints);\n }\n }", "@Test\n public void shouldIncrementAndThenReleaseScorePlayerTwo() {\n int expected = 0 ;\n scoreService.incrementScorePlayerTwo() ;\n scoreService.incrementScorePlayerTwo() ;\n scoreService.releaseScores() ;\n int scorePlayerTwo = scoreService.getScorePlayerTwo() ;\n assertThat(scorePlayerTwo, is(expected)) ;\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "@Test\r\n\tpublic void decrementScoreTest() \r\n\t{\r\n\t\tscoreBehavior.decrementScore();\r\n\t\tassertEquals(-1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(0, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.decrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t}", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "@Test\n void getCurrentRewardsFromUpgradeTest() {\n EnumMap<CardPoints,Integer> oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 3);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); //index/state = 0, cost stage 1\n assertEquals(oracle, this.wonder.getProp().get(this.wonder.getState()).y); //index/state = 0, cost stage 1\n\n wonder.setState(wonder.getState() + 1); // stage one is build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n //reward is an effect, so no cardpoints\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 1, cost stage 2\n\n wonder.setState(wonder.getState() + 1); // 2 stage build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 7);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 2, cost stage 3\n wonder.setState(wonder.getState() + 1); // Build the last stage\n\n //return an outIndexError when we call this method\n }" ]
[ "0.87710804", "0.8763099", "0.80528057", "0.6387558", "0.6386021", "0.6382789", "0.61719114", "0.6126679", "0.5810932", "0.5657053", "0.56344354", "0.5614929", "0.5520954", "0.5430696", "0.5410108", "0.53766924", "0.5374427", "0.5328732", "0.53160286", "0.5270028", "0.5192649", "0.5170174", "0.5134688", "0.5109011", "0.5109011", "0.5090648", "0.50824654", "0.50639135", "0.5055458", "0.5045811", "0.5016855", "0.5015616", "0.5012495", "0.50099474", "0.50043553", "0.49981177", "0.49853197", "0.49676386", "0.4966273", "0.49647757", "0.49579263", "0.49497244", "0.49472845", "0.4942652", "0.49339867", "0.492881", "0.49256736", "0.4918941", "0.48970962", "0.48765364", "0.4876242", "0.48636964", "0.48594958", "0.48469427", "0.48421547", "0.48355538", "0.48304173", "0.48255086", "0.48232025", "0.48211715", "0.4812498", "0.48064354", "0.48056328", "0.4799036", "0.479793", "0.47845647", "0.4775862", "0.4772196", "0.47673705", "0.47621322", "0.4760372", "0.47521114", "0.47443944", "0.47434074", "0.47423854", "0.4739802", "0.47396383", "0.47357297", "0.47308448", "0.4729118", "0.4718734", "0.47186103", "0.47134086", "0.4710251", "0.4700923", "0.46985254", "0.4698237", "0.469789", "0.46945947", "0.4692315", "0.4684699", "0.46793294", "0.46772766", "0.4671083", "0.4669245", "0.46665847", "0.4665227", "0.4664896", "0.46646428", "0.46645695" ]
0.86176336
2
Test_03 of updateMainSkillCompareToNewChange method, of class SkillsList.
@Test public void testUpdateMainSkillCompareToNewChange_03() { System.out.println("updateMainSkillCompareToNewChange"); //Skill s1 = new Skill("Java", "Technical", 2, 3, Skill.PLUS_2); //Skill s2 = new Skill("C", "Technical", 2, 5, Skill.PLUS_2); Skill s1 = mock(Skill.class); when(s1.getName()).thenReturn("Java"); when(s1.getType()).thenReturn("Technical"); when(s1.getCost()).thenReturn(2); when(s1.getLevel()).thenReturn(3); when(s1.getCostFormula()).thenReturn(Skill.PLUS_2); Skill s2 = mock(Skill.class); when(s2.getName()).thenReturn("C"); when(s2.getType()).thenReturn("Technical"); when(s2.getCost()).thenReturn(2); when(s2.getLevel()).thenReturn(5); when(s2.getCostFormula()).thenReturn(Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s1); instance.add(s2); String result = instance.getMainSkill().getName(); assertTrue(result.equals("C")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\r\n\tvoid testUpdateSkillRecordShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\r\n\t}", "@Test\r\n\tvoid testUpdateSkillRecordShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\t\r\n\t}", "void updateSkill(Skill skill);", "void changeSkill(Long pokemonId, int newSkill);", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "private static void setTest( int modifyAt\n ) {\n System.out.println(\n \"changed element \" + modifyAt + \" from \"\n + list.set( modifyAt, modifyAt + 1000) + \" to \"\n + list.get( modifyAt)\n );\n }", "@Override\n\tpublic void updateScoreAfterTest(Score score2) {\n\t\tscoreDao.updateScoreAfterTest(score2);\n\t}", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "public void testCompareTo() throws Exception {\r\n setUp();\r\n Student allison = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n Student alli = new Student(\"0\", \"Aaa\", \"DeSantis\");\r\n\r\n // same last name, returns 1\r\n assertEquals(allison.compareTo(alli), 1);\r\n\r\n // same last name, returns -1\r\n Student al = new Student(\"0\", \"z\", \"DeSantis\");\r\n assertEquals(allison.compareTo(al), -1);\r\n\r\n // same name\r\n Student allis = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n assertEquals(allison.compareTo(allis), 0);\r\n\r\n // same first name, returns 1\r\n Student last = new Student(\"0\", \"Allison\", \"c\");\r\n assertEquals(allison.compareTo(last), 1);\r\n\r\n // same first name, returns -1\r\n Student diff = new Student(\"0\", \"Allison\", \"Z\");\r\n assertEquals(allison.compareTo(diff), -1);\r\n\r\n\r\n Student c1 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n Student c2 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n\r\n assertEquals(c1.compareTo(c2), 0);\r\n\r\n assertEquals(c2.compareTo(c1), 0);\r\n\r\n Student c3 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n assertEquals(c1.compareTo(c3), 0);\r\n }", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }", "@FXML\n private void increasePriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1) {\n storyPriority = getModel().getLowestPriorityStory();\n }\n else if (storyPriority == 1) {\n return;\n }\n else {\n storyPriority--;\n }\n try {\n getModel().modifyStory(story, storyPriority);\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI,\n //e.g Disabling buttons.\n ErrorReporter.get().reportError(e, \"Failed to modify the story priority\");\n }\n updateStoryTable();\n }\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "public int compare(Skill s1,Skill s2){\n\t\t\t\t\treturn s1.getNumber()-s2.getNumber();\r\n\t\t\t\t}", "public int compare(Skill s1,Skill s2){\n\t\t\t\t\treturn s1.getNumber()-s2.getNumber();\r\n\t\t\t\t}", "@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}", "public void testCmdUpdate_priority_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 4: Testing priority field (all ID are valid)(default priority is\n\t\t * normal)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 4a: priority is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 4b: priority is normal\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_NORM);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4c: priority is high\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_HIGH);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.HIGH);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t\t\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4d: priority is low\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_LOW);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.LOW);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}", "@Test\n public void TestEditTwo(){\n ArrayList<Task> listToEdit = new ArrayList<Task>();\n ArrayList<Integer> indexList = new ArrayList<Integer>();\n String message;\n \n indexList.add(0);\n listToEdit.add(new Task(\"New item 1\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n listToEdit.clear();\n indexList.add(1);\n listToEdit.add(new Task(\"New item 2\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"New item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n listToEdit.clear();\n indexList.add(2);\n listToEdit.add(new Task(\"New item 3\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"New item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n logicObject.showUpdatedItems();\n listToEdit.clear();\n indexList.add(1);\n listToEdit.add(new Task(\"item 2 changed again!\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"item 2 changed again!\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 3\", logicObject.listOfTasks.get(2).getName());\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@FXML\n private void decreasePriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1) {\n return;\n }\n else if (storyPriority + 1 >= getModel().getLowestPriorityStory()) {\n storyPriority = null;\n }\n else {\n storyPriority++;\n }\n try {\n if (storyPriority != null) {\n getModel().modifyStory(story, storyPriority);\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().modifyStory(story, null);\n } catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Failed to modify the priority of the story\");\n }\n });\n }\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Failed to modify the priority of the story\");\n }\n updateStoryTable();\n }\n }", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "public void UpCheck_status1(MajorChange mc) ;", "public static int attemptSkillUp(int skillId, Player player){ \n\t\ttry{\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == -1){return -2;}\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == 30){return -2;}\n\t\t\tint[] skillCost;\n\t\t\tskillCost = new int[8];\n\t\t\tint newSkillLevel = DwarfCraftPlayerSkills.getSkillLevel(skillId, player);\n\t\t\t/* Dan thinks skillId could be removed from the arguments in this function\n\t\t\t getSkillTrainingCost */\n\t\t\tskillCost = Skills.values()[skillId].getSkillTrainingCost(skillId, newSkillLevel, player);\n\t\t\tfor (int i = 0; i < skillCost[0];i++){\n\t\t\t\t//check inventory quantity for needed items\n\t\t\t\tif (DwarfCraftInventory.countInventoryItems(skillCost[1+2*i], player) < skillCost[2+2*i]){return -1;}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\t\tcatch(NumberFormatException f) {return 0;}\n\t}", "@Test\n public void testSort() {\n initialize();\n var realList = new HighScoreList();\n realList.setList(list);\n realList.sort();\n\n assertEquals(300, realList.getList().get(0).getScore());\n assertEquals(200, realList.getList().get(1).getScore());\n assertEquals(100, realList.getList().get(2).getScore());\n }", "static public void adjustRewardForSelect(ArrayList<RewardItem> rewardList) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (toChangeCard != null) {\n if (item.type == RewardItem.RewardType.CARD) {\n boolean isExist = false;\n for (AbstractCard card : item.cards) {\n if (card.cardID.equals(toChangeCard.cardID)) {\n isExist = true;\n if (card.canUpgrade()) {\n card.upgrade();\n }\n break;\n }\n }\n if (!isExist) {\n boolean isChanged = false;\n // check same rarity\n for (AbstractCard card : item.cards) {\n if (card.rarity == toChangeCard.rarity) {\n if (card.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.remove(card);\n item.cards.add(toChangeCard);\n isChanged = true;\n break;\n }\n }\n if (!isChanged) {\n AbstractCard removed = item.cards.remove(0);\n if (removed.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.add(toChangeCard);\n }\n }\n }\n }\n }\n\n if (selectRelic != null) {\n if (AbstractDungeon.player.hasRelic(selectRelic)) {\n selectRelic = null;\n } else {\n boolean isExist = false;\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n if (item.relic.relicId.equals(selectRelic)) {\n isExist = true;\n }\n }\n\n }\n if (!isExist) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n rewardList.set(i, new RewardItem(RelicLibrary.getRelic(selectRelic)));\n }\n }\n }\n }\n clearHasRelicInPool();\n }\n }", "@Test\n /* testUpdateRecord\n * testing update exist record in Save.Json\n * */\n public void testUpdateRecord() {\n testAddRecord();\n\n score = 300;\n level = 3;\n name = \"test1\";\n\n saveReader.updateRecord(indexOfReturned, \"name\", name);\n assertEquals(\"True : name field updated successfully\", name, saveReader.LoadsList.get(indexOfReturned).name);\n\n saveReader.updateRecord(indexOfReturned, \"score\", score);\n assertEquals(\"True : score field updated successfully\", score, saveReader.LoadsList.get(indexOfReturned).score);\n\n saveReader.updateRecord(indexOfReturned, \"level\", level);\n assertEquals(\"True : level field updated successfully\", level, saveReader.LoadsList.get(indexOfReturned).level);\n }", "protected void beforeUpdateSkillType(\n RetailscmUserContext userContext,\n SkillType existed,\n String retailStoreCountryCenterId,\n String skillTypeId,\n int skillTypeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Override\r\n\tpublic void updateDriverRate(int score, String driverID) {\n\t\t\r\n\t}", "@Test\r\n\tvoid testChangeItems() {\r\n\t\tToDoItem newItem = new ToDoItem(\"Item 1\", \"2/6/21\", 1, \"Body text 1\");\r\n\t\tString correctInfo = \"Name: Item 2\\nDue Date: 3/16/21\\nPriority: Medium\\nNotes: New notes\\nLate: Yes\\nItem Complete: Yes\";\r\n\t\tnewItem.setName(\"Item 2\");\r\n\t\tnewItem.setDueDate(\"3/16/21\");\r\n\t\tnewItem.setPriority(2);\r\n\t\tnewItem.setNotes(\"New notes\");\r\n\t\tnewItem.setIsLate(true);\r\n\t\tnewItem.setIsDone(true);\r\n\r\n\t\tif (!newItem.getAllInfo().equals(correctInfo)) {\r\n\t\t\tfail(\"Error changing ToDoItem values\");\r\n\t\t}\r\n\t}", "@Test\n void testUpdateGoaliePositionLimitsYmin() {\n goalie.setPosition(new Vector(goalie.getX(), 192f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the negative minimum direction\n goalie.setNext_direction(new Vector(0,-1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(-1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmin\" +\n \" Goalie moved past the Y-Min limit\");\n }\n }", "@Test\n public void changeScoreTest() {\n //will be false as animal is not moving\n boolean expectedValue = animal.changeScore();\n Assert.assertEquals(expectedValue,false);\n }", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "@Test\n\tpublic void test_update_last_commit_time_change(){\n\t\ttest2.updateLastCommitTime(current);\n\t\tassertEquals(\"Last Commit Time shoud be updated\", current, test2.getLastCommitTime());\n\t}", "@Test\n void compareTo_MatchButModifying_NameAndAddress()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.no, AnswerType.no, ContactMatchType.MatchButModifying);\n }", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@FXML\n private void jumpPriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1 || storyPriority != 0) {\n try {\n getModel().modifyStory(story, 1);\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Cannot increase priority\");\n }\n updateStoryTable();\n }\n }\n }", "private static void checkForUpgrades(@Nullable List<UpdatablePackage> completedChanges) {\n if (completedChanges == null) {\n return;\n }\n int highestNewApiLevel = 0;\n for (UpdatablePackage updated : completedChanges) {\n TypeDetails details = updated.getRepresentative().getTypeDetails();\n if (details instanceof DetailsTypes.PlatformDetailsType) {\n int api = ((DetailsTypes.PlatformDetailsType)details).getApiLevel();\n if (api > highestNewApiLevel) {\n highestNewApiLevel = api;\n }\n }\n }\n if (highestNewApiLevel > 0) {\n // TODO: Fix this code after we delete WizardConstants\n PropertiesComponent.getInstance().setValue(WizardConstants.NEWLY_INSTALLED_API_KEY.name, highestNewApiLevel, -1);\n }\n }", "@Test\n public void TestEditOne(){\n ArrayList<Task> listToEdit = new ArrayList<Task>();\n ArrayList<Integer> indexList = new ArrayList<Integer>();\n String message;\n \n indexList.add(3);\n listToEdit.add(new Task(\"New item 99\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(2);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(-1);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(-2);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n }", "Test update(TestData testData, Test test);", "@Override\n public boolean acceptMove(int baselineObjectiveValue, int newObjectiveValue) {\n if (newObjectiveValue > baselineObjectiveValue) {\n return true;\n }\n else {\n return false;\n }\n }", "@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "private void checkForTyreChange(int lapNo, char[] allTyreTypes)\n {\n RNG generator = new RNG(1,11);\n Validation validator = new Validation();\n for(int i = 0; i < getDrivers().getSize(); i++)\n {\n int timeAffected = 0;\n if(getDrivers().getDriver(i).getEligibleToRace()) // if driver is eligible to race\n {\n int randomNo = generator.generateRandomNo(); // generates random number between 1 and 11(exclusive)\n if(validator.isNumberBetween(1, 5, randomNo)) // 50% chance to change tyre type\n {\n allTyreTypes[i] = 'W';\n timeAffected = 10;\n System.out.println(getDrivers().getDriver(i).getName() + \" has chosen to change tyres from Dry-weather to Wet-weather, which increases lap \" + lapNo + \n \" time by \" + timeAffected + \" secs\");\n getDrivers().getDriver(i).setAccumulatedTime(getDrivers().getDriver(i).getAccumulatedTime() + timeAffected); // update time affected\n }\n }\n }\n }", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "@Test\n public void testChangeAge() {\n System.out.println(\"Animal.changeAge\");\n animal1.changeAge(2);\n animal2.changeAge(-1);\n assertEquals(19, animal1.getAge());\n assertEquals(2, animal2.getAge());\n }", "@Test\n void ScoreBoardIntoList() {\n //Should be\n List<StatisticsGetDTO> intended = new ArrayList<StatisticsGetDTO>();\n StatisticsGetDTO statisticsGetDTO = new StatisticsGetDTO();\n statisticsGetDTO.setScore(100);\n statisticsGetDTO.setPlayerName(\"A\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(1);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(200);\n statisticsGetDTO.setPlayerName(\"B\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(2);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(300);\n statisticsGetDTO.setPlayerName(\"C\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(3);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(400);\n statisticsGetDTO.setPlayerName(\"D\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(4);\n intended.add(statisticsGetDTO);\n\n List<StatisticsGetDTO> actualList = scoreboard.transformIntoList();\n List<Integer> scoresActualList = new ArrayList<Integer>();\n List<String> namesActualList = new ArrayList<String>();\n List<Integer> mysteryActualList = new ArrayList<Integer>();\n for (StatisticsGetDTO element : actualList){\n scoresActualList.add(element.getScore());\n namesActualList.add(element.getPlayerName());\n mysteryActualList.add(element.getNumberOfCorrectlyGuessedMysteryWords());\n }\n\n assertTrue(scoresActualList.contains(intended.get(0).getScore()));\n assertTrue(scoresActualList.contains(intended.get(1).getScore()));\n assertTrue(scoresActualList.contains(intended.get(2).getScore()));\n assertTrue(scoresActualList.contains(intended.get(3).getScore()));\n assertTrue(namesActualList.contains(intended.get(0).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(1).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(2).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(3).getPlayerName()));\n assertTrue(mysteryActualList.contains(intended.get(0).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(1).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(2).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(3).getNumberOfCorrectlyGuessedMysteryWords()));\n }", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "@Test\n void testForLargestCardInTrickComparingRank() {\n Dealer testDealer = new Dealer();\n\n Suit suit1 = Suit.DIAMONDS;\n Suit suit2 = Suit.SPADES;\n Suit suit3 = Suit.DIAMONDS;\n Suit suit4 = Suit.DIAMONDS;\n \n Rank rank1 = Rank.TWO;\n Rank rank2 = Rank.KING;\n Rank rank3 = Rank.ACE;\n Rank rank4 = Rank.FIVE;\n\n Card card1 = new Card(suit1,rank1,false);\n Card card2 = new Card(suit2,rank2,false);\n Card card3 = new Card(suit3,rank3,false);\n Card card4 = new Card(suit4,rank4,false);\n\n \n testDealer.addToPlayedCards(card1);\n testDealer.addToPlayedCards(card2);\n testDealer.addToPlayedCards(card3);\n testDealer.addToPlayedCards(card4);\n\n assertEquals(card3 , testDealer.getLargestCardFromTrick());\n }", "@Test\r\n public void testUpdate() {\r\n }", "private void updateSingles(Hierarchy con, ViolatedCandidate lCandidate, ViolatedCandidate tCandidate,\n double delta) {\n Multiset<Constraint> targetPreferringView = UpdateUtils.getViolatedByLearner(lCandidate, tCandidate);\n Multiset<Constraint> learnerPreferringView = UpdateUtils.getViolatedByTarget(lCandidate, tCandidate);\n Multiset<Constraint> learnerPreferringHigh = HashMultiset.create(learnerPreferringView.size());\n double promoteWeightedDelta = delta / targetPreferringView.size();\n double maxTPreferringRanking = Double.MIN_VALUE;\n for (Constraint constraint : targetPreferringView.elementSet()) {\n maxTPreferringRanking = Math.max(maxTPreferringRanking, con.getRanking(constraint));\n double multipliedDelta = (targetPreferringView.count(constraint) * promoteWeightedDelta);\n con.changeConstraintRanking(constraint, multipliedDelta);\n }\n\n for (Constraint constraint : learnerPreferringView.elementSet()) {\n double thisRanking = con.getRanking(constraint);\n if (thisRanking > maxTPreferringRanking) {\n int count = learnerPreferringView.count(constraint);\n learnerPreferringHigh.add(constraint, count);\n }\n }\n // If 'higher' set is empty, just add argMax to it\n if (learnerPreferringHigh.isEmpty()) {\n Constraint argMax = UpdateUtils.getMax(learnerPreferringView, con);\n learnerPreferringHigh.add(argMax);\n }\n\n Multiset<Constraint> toIterateOver = learnerPreferringHigh;\n\n double demoteWeightedDelta = -(delta / toIterateOver.size());\n for (Constraint constraint : toIterateOver.elementSet()) {\n double multipliedDelta = toIterateOver.count(constraint) * demoteWeightedDelta;\n con.changeConstraintRanking(constraint, multipliedDelta);\n // System.out.println(\"↓ Updating \" + constraint +\" by \" +\n // multipliedDelta);\n }\n }", "void changeCost(ArrayList<CostsChanges> changes);", "@Test\n void testGetSortedList(){\n ToDoList todoList = new ToDoList();\n ToDo todo1 = new ToDo(\"Todo1\");\n todo1.setInhalt(\"Dies ist ein Test\");\n\n todoList.add(new ToDo((\"Todo2\")));\n ToDo todo3 = new ToDo(\"Todo3\");\n todo3.setInhalt(\"3+3=6\");\n todo3.setStatus(Status.IN_ARBEIT);\n todoList.add(new ToDo((\"Todo4\")));\n todoList.add(todo3);\n ToDo todo4 = new ToDo(\"Trala\");\n todo4.setStatus(Status.IN_ARBEIT);\n todo4.setStatus(Status.BEENDET);\n todo4.setInhalt(\"ab\");\n ToDo todo5 = new ToDo(\"Trala\");\n todo5.setInhalt(\"aa\");\n todo5.setStatus(Status.IN_ARBEIT);\n todo5.setStatus(Status.BEENDET);\n todoList.add(todo5);\n todoList.add(todo4);\n todoList.add(todo1);\n\n todoList = todoList.getSortedList();\n\n assertEquals(Status.OFFEN, todoList.get(0).getStatus());\n assertEquals(Status.OFFEN, todoList.get(1).getStatus());\n assertEquals(Status.OFFEN, todoList.get(2).getStatus());\n assertEquals(Status.IN_ARBEIT, todoList.get(3).getStatus());\n assertEquals(Status.BEENDET, todoList.get(4).getStatus());\n assertEquals(Status.BEENDET, todoList.get(5).getStatus());\n\n assertEquals(\"Trala\", todoList.get(5).getBez());\n assertEquals(\"Todo3\", todoList.get(3).getBez());\n\n assertEquals(\"aa\", todoList.get(4).getInhalt());\n assertEquals(\"ab\", todoList.get(5).getInhalt());\n }", "int updateByPrimaryKeySelective(WizardValuationHistoryEntity record);", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "@Test\n\tpublic void testLLSort() {\n\t\tLinkedList playerList = new LinkedList();\n\t\tPlayer tempInsert5 = new Player();\n\t\ttempInsert5.setName(\"test5\");\n\t\ttempInsert5.setPoints(5);\n\t\ttempInsert5.setWins(4);\n\t\ttempInsert5.setLosses(3);\n\t\tplayerList.LLInsert(tempInsert5);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tPlayer tempInsert2 = new Player();\n\t\ttempInsert2.setName(\"test2\");\n\t\ttempInsert2.setPoints(2);\n\t\ttempInsert2.setWins(1);\n\t\ttempInsert2.setLosses(0);\n\t\tplayerList.LLInsert(tempInsert2);\n\t\t\n\t\tPlayer tempInsert3 = new Player();\n\t\ttempInsert3.setName(\"test3\");\n\t\ttempInsert3.setPoints(3);\n\t\ttempInsert3.setWins(2);\n\t\ttempInsert3.setLosses(1);\n\t\tplayerList.LLInsert(tempInsert3);\n\t\t\n\t\tPlayer tempInsert1 = new Player();\n\t\ttempInsert1.setName(\"test1\");\n\t\ttempInsert1.setPoints(1);\n\t\ttempInsert1.setWins(0);\n\t\ttempInsert1.setLosses(0);\n\t\tplayerList.LLInsert(tempInsert1);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tPlayer tempInsert4 = new Player();\n\t\ttempInsert4.setName(\"test4\");\n\t\ttempInsert4.setPoints(4);\n\t\ttempInsert4.setWins(3);\n\t\ttempInsert4.setLosses(2);\n\t\tplayerList.LLInsert(tempInsert4);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tplayerList.LLSort();\n\t\tassertEquals(playerList.LLPrint(), \n\t\t\t\t\"test5: Points: 5, Wins/Losses: 4/3\\n\"\n\t\t\t\t\t\t+ \"test4: Points: 4, Wins/Losses: 3/2\\n\"\n\t\t\t\t\t\t+ \"test3: Points: 3, Wins/Losses: 2/1\\n\"\n\t\t\t\t\t\t+ \"test2: Points: 2, Wins/Losses: 1/0\\n\"\n\t\t\t\t\t\t+ \"test1: Points: 1, Wins/Losses: 0/0\\n\");\n\t}", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "@Test\n void testUpdateGoaliePositionLimitsYmax() {\n goalie.setPosition(new Vector(goalie.getX(), 512f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the positive direction\n goalie.setNext_direction(new Vector(0,1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmax\" +\n \" Goalie moved past the Y-Max limit\");\n }\n\n }", "private static void testupdate() {\n\t\ttry {\n\t\t\tRoleModel model = new RoleModel();\n\t\t\tRoleBean bean = new RoleBean();\n\t\t\tbean = model.findByPK(7L);\n\t\t\tbean.setName(\"Finance\");\n\t\t\tbean.setDescription(\"Finance Dept\");\n\t\t\tbean.setCreatedBy(\"CCD MYSORE\");\n\t\t\tbean.setModifiedBy(\"CCD MYSORE\");\n\t\t\tbean.setCreatedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tbean.setModifiedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tmodel.update(bean);\n\t\t\tRoleBean updateBean = model.findByPK(1);\n\t\t\tif (\"12\".equals(updateBean.getName())) {\n\t\t\t\tSystem.out.println(\"UPDATE RECORD FAILED\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"RECORD UPDATED SUCCESSFULLY\");\n\t\t\t}\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DuplicateRecordException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n public void testEditProduct() throws Exception {\n System.out.println(\"editProduct\");\n Product p;\n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n p = prs.get(0);\n String nameNew = \"newName\", nameOld = p.getName();\n p.setName(nameNew);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.isEmpty());\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.contains(p));\n assertTrue(prs.size() == 1);\n p.setName(nameOld);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.isEmpty());\n }", "private void updateRacePoints(char[] allTyreTypes)\n {\n getDrivers().adjustDriversListByTime(allTyreTypes);\n for(int i = 0 ; i < getDrivers().getSize() ; i++)\n {\n int scoringPoints = 0;\n if(i == 0 && getDrivers().getDriver(i).getEligibleToRace()) // if first and eligible\n {\n scoringPoints = 8;\n }\n else if(i == 1 && getDrivers().getDriver(i).getEligibleToRace()) // if second and eligible\n {\n scoringPoints = 5;\n }\n else if(i == 2 && getDrivers().getDriver(i).getEligibleToRace()) // if third and eligible\n {\n scoringPoints = 3;\n }\n else if(i == 3 && getDrivers().getDriver(i).getEligibleToRace()) // if fourth and eligible\n {\n scoringPoints = 1;\n }\n getDrivers().getDriver(i).setAccumulatedScore(getDrivers().getDriver(i).getAccumulatedScore() + scoringPoints);\n }\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "@Test\n public void testProjectRolesChanges() {\n coiPerson.setContactRole(ContactRoleFixtureFactory.MOCK_KEY_PERSON);\n Assert.assertFalse(\"Key Person Role not checked for\", rule.checkForKeyPersonProjectRoles(award.getProjectPersons()));\n coiPerson.setKeyPersonRole(\"fromCOI\");\n Assert.assertTrue(\"Key Person Role not checked for\", rule.checkForKeyPersonProjectRoles(award.getProjectPersons()));\n \n // when a key person is changed to coi\n kpPerson.setContactRole(ContactRoleFixtureFactory.MOCK_COI);\n Assert.assertTrue(\"rule should return true\", rule.processSaveAwardProjectPersonsBusinessRules(award.getProjectPersons()));\n }", "@Test\r\n\tpublic void getAllGradesWithChangeOfTestOfTeacherValueAndAdjustementTest()\r\n\t\t\tthrows ClassNotFoundException, SonarqubeDataBaseException, SQLException, IOException {\r\n\t\tmapQuality.put(\"TestOfTeacher\", new ModelValue(90f));\r\n\t\tmapQuality.put(\"Comments\", new ModelValue(25f, 10f));\r\n\t\tlistAllGrades.put(\"FinalGrade\", new Float(5.5));\r\n\t\tAssert.assertEquals(UtilCalculGrade.getAllGrades(mapQuality, listScoreMetricStudent, listScoreMetricTeacher,\r\n\t\t\t\tmapConf, mapIssues, projectName, idModule).get(\"FinalGrade\"), listAllGrades.get(\"FinalGrade\"));\r\n\t}", "@Test\n\tpublic void testModifyQuestion() {\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\n\t\tquestion.setQuestionText(\"Testing update\");\n\n\t\t// Test with invalid permissions\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.assertNotNull(e);\n\t\t} \n\n\t\t// Test with valid permission\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tQnaQuestion changedQuestion = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\t\t\tAssert.assertEquals(changedQuestion.getQuestionText(), \"Testing update\");\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\t}", "@Test\r\n\tvoid testAddToDoItem() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\t// case 1: insert one ToDoItem\r\n\t\tlist.insert(toDoItem4);\r\n\t\tif (!list.getHead().getName().equals(\"Item 4\")) { // check the head is set correctly\r\n\t\t\tfail(\"Head set incorrectly for: \" + toDoItem4.getName() + \", should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\tif (list.getSize() != 1) { // check that size is incremented\r\n\t\t\tfail(\"List size is incorrect: should be 1\");\r\n\t\t}\r\n\r\n\t\t// case 2: second item is insert\r\n\t\tlist.insert(toDoItem1);\r\n\t\tif (list.getSize() != 2) { // check size incremented correctly\r\n\t\t\tfail(\"Size incorrect: should be 2\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 1\")) { // check the item is in the list\r\n\t\t\tfail(\"Item 1 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check the position of Item 1\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\t// check that the current pointer is in the right location\r\n\t\tif (!list.getCurrent().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Current set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\t// check that tail is set correctly\r\n\t\tif (!list.getTail().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Tail set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\r\n\t\t// case 3: third item is inserted\r\n\t\tlist.insert(toDoItem5);\r\n\t\tif (list.getSize() != 3) {\r\n\t\t\tfail(\"Size incorrect: should be 3\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 5\")) {\r\n\t\t\tfail(\"Item 5 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.getTail().getName().equals(\"Item 5\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 5\\\"\");\r\n\t\t}\r\n\r\n\t\t// insert several more and test to make sure they are ordered correctly\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem6);\r\n\t\tlist.insert(toDoItem3);\r\n\r\n\t\tToDoItem tempHead = list.getHead();\r\n\t\tString currList = \"|\";\r\n\t\tString correctList = \"|Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|\";\r\n\r\n\t\twhile (tempHead != null) {\r\n\t\t\tcurrList += tempHead.getName() + \"|\";\r\n\t\t\ttempHead = tempHead.getNext();\r\n\t\t}\r\n\r\n\t\tif (!currList.equals(correctList)) {\r\n\t\t\tfail(\"The list was ordered incorrectly after inserting all items\");\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testChangeMultiAttributeOrderDoesMatterLDAP96()\n\t\t\tthrows Exception {\n\t\tfinal Attributes fixtureAttrs = new BasicAttributes();\n\t\tAttribute multi = new BasicAttribute(\"title\");\n\t\tmulti.add(\"Juergen\");\n\t\tmulti.add(\"George\");\n\t\tfixtureAttrs.put(multi);\n\t\tclass TestableDirContextAdapter extends DirContextAdapter {\n\t\t\tpublic TestableDirContextAdapter() {\n\t\t\t\tsuper(fixtureAttrs, null);\n\t\t\t\tsetUpdateMode(true);\n\t\t\t}\n\t\t}\n\t\ttested = new TestableDirContextAdapter();\n\t\tassertTrue(tested.isUpdateMode());\n\t\ttested.setAttributeValues(\"title\", new String[] { \"Jim\", \"George\",\n\t\t\t\t\"Juergen\" }, true);\n\n\t\t// change\n\t\tModificationItem[] mods = tested.getModificationItems();\n\t\tassertEquals(1, mods.length);\n\t\tassertEquals(DirContext.REPLACE_ATTRIBUTE, mods[0].getModificationOp());\n\t\tAttribute attr = mods[0].getAttribute();\n\t\tassertEquals(\"Jim\", attr.get(0));\n\t\tassertEquals(\"George\", attr.get(1));\n\t\tassertEquals(\"Juergen\", attr.get(2));\n\t}", "@Test\n public final void testSmallerThanMax() {\n for (ArrayList<TradeGood> planetsGoods : goods) {\n for (TradeGood good : planetsGoods) {\n assertTrue(good.getPrice() < good.type.mhl);\n }\n }\n }", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "@Test\n void testUpdateGoalie() {\n\n }", "private boolean testChanges(boolean testRepository) {\r\n\t\t\r\n\t\tif (testRepository) {\r\n\t\t\t\r\n\t\t\tString status = \"Status: [ACTION - Testing Repository Changes]...\";\r\n\t\t\t\r\n\t\t\t// test changes in repository for clashes etc.\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = true;\r\n\t\t\tint failCount = 0;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// do an update first to make sure rep-side changes are all there\r\n\t\t\t\tboolean updateSuccess = this.updateRepChanges(false);\r\n\t\t\t\t\r\n\t\t\t\tif (!updateSuccess) {\r\n\t\t\t\t\tstatusBar.setText(status+\"Update FAILED\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// load baseOntology using URI\r\n\t\t\t\tstatusBar.setText(status+\"Loading Base Ontology\");\r\n\t\t\t\tOWLOntology baseOntology = swoopModel.loadOntology(baseOntologyURI);\r\n\t\t\t\tif (baseOntology == null) {\r\n\t\t\t\t\t// there is no base ontology, changes start from scratch\r\n\t\t\t\t\t// create new ontology using OWLBuilder\r\n\t\t\t\t\tOWLBuilder builder = new OWLBuilder();\r\n\t\t\t\t\tbuilder.createOntology(baseOntologyURI, baseOntologyURI);\r\n\t\t\t\t\tbaseOntology = builder.getOntology();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// get all repository side changes: under repRoot\r\n\t\t\t\tList allRepChanges = this.getDescendantChanges(repRoot);\r\n\t\t\t\tstatusBar.setText(status+\"Testing \"+allRepChanges.size()+\" repository-side changes\");\r\n\t\t\t\t\r\n\t\t\t\t// apply allRepChanges to baseOntology\r\n\t\t\t\tfor (int i=0; i<allRepChanges.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) allRepChanges.get(i);\r\n\t\t\t\t\tOntologyChange oc = swc.getChange();\r\n\t\t\t\t\t//*** need to align changes with ontology! ***/\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tOntologyChange alignOC = (OntologyChange) controlHandler.swoopHandler.changeLog.getChangeInformation(oc, ChangeLog.CHANGE_ALIGN, null, new ArrayList(), baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// save state of baseOntology and see if it changes\r\n\t\t\t\t\t\t// use Abstract Syntax since its more concise than rdf/xml?\r\n\t\t\t\t\t\tString before = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// APPLY CHANGE\r\n\t\t\t\t\t\tboolean check = true;\r\n\t\t\t\t\t\tif (alignOC instanceof BooleanElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyBooleanElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse if (alignOC instanceof EnumElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyEnumElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t\telse alignOC.accept((ChangeVisitor) baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// need to see if any change in the ontology occured\r\n\t\t\t\t\t\tString after = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (before.equals(after) || !check) {\r\n\t\t\t\t\t\t\t// nothing has changed!\r\n\t\t\t\t\t\t\tSystem.out.println(\"Found redundant change: \"+oc);\r\n\t\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse swc.isRedundant = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Change Error for: \"+oc);\r\n\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\ttestSuccess = false;\r\n\t\t\t}\r\n\t\t\tif (testSuccess) statusBar.setText(status+\"Test PASSED\");\r\n\t\t\telse {\r\n\t\t\t\tstatusBar.setText(status+\"Test FAILED\");\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Change Test FAILED: \"+failCount+\" change(s) is/are redundant or cause clashes. Please Fix/Remove them and try again.\");\r\n\t\t\t}\r\n\t\t\t// refresh repTreeTable\r\n\t\t\tthis.refreshRepTreeTable(false);\r\n\t\t\treturn testSuccess;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// test changes in Swoop Ontology for clashes etc.\r\n\t\t\tString status = \"Status: [ACTION - Testing LOCAL Ontology Changes]...\";\r\n\t\t\t\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = true;\r\n\t\t\tint failCount = 0;\r\n\t\t\t\r\n\t\t\t// get base ontology\r\n\t\t\tstatusBar.setText(status+\"Loading Base Ontology\");\r\n\t\t\tOWLOntology baseOntology = null;\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\t// get existing ontology from swoopModel\r\n\t\t\t\tbaseOntology = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\t// but clone it to prevent applying changes on *it*\r\n\t\t\t\tbaseOntology = this.cloneOntology(baseOntology);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tURI ontURI = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// load ontology with URI\r\n\t\t\t\t\tontURI = new URI(swoopOntFld.getText());\r\n\t\t\t\t\tbaseOntology = swoopModel.loadOntology(ontURI);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t// create new ontology\r\n\t\t\t\t\tOWLBuilder builder = new OWLBuilder();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbuilder.createOntology(ontURI, ontURI);\r\n\t\t\t\t\t} catch (OWLException e) {\r\n\t\t\t\t\t\te.printStackTrace();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaseOntology = builder.getOntology();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (baseOntology == null) {\r\n\t\t\t\tstatusBar.setText(status+\"Unable to load base ontology\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfor (int i=0; i<ontChanges.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) ontChanges.get(i);\r\n\t\t\t\t\tOntologyChange oc = swc.getChange();\r\n\t\t\t\t\t//*** need to align changes with ontology! ***/\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tOntologyChange alignOC = (OntologyChange) controlHandler.swoopHandler.changeLog.getChangeInformation(oc, ChangeLog.CHANGE_ALIGN, null, new ArrayList(), baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// save state of baseOntology and see if it changes\r\n\t\t\t\t\t\t// use Abstract Syntax since its more concise than rdf/xml?\r\n\t\t\t\t\t\tString before = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// APPLY CHANGE\r\n\t\t\t\t\t\tboolean check = true;\r\n\t\t\t\t\t\tif (alignOC instanceof BooleanElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyBooleanElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse if (alignOC instanceof EnumElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyEnumElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t\telse alignOC.accept((ChangeVisitor) baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// need to see if any change in the ontology occured\r\n\t\t\t\t\t\tString after = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (before.equals(after) || !check) {\r\n\t\t\t\t\t\t\t// nothing has changed!\r\n\t\t\t\t\t\t\tSystem.out.println(\"Found redundant change: \"+oc);\r\n\t\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse swc.isRedundant = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Change Error for: \"+oc);\r\n\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\ttestSuccess = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (testSuccess) statusBar.setText(status+\"Test PASSED\");\r\n\t\t\telse {\r\n\t\t\t\tstatusBar.setText(status+\"Test FAILED\");\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Change Test FAILED: \"+failCount+\" change(s) is/are redundant or cause clashes. Please Fix/Remove them and try again.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// refresh ontTreeTable\r\n\t\t\tthis.refreshOntTreeTable();\r\n\t\t\treturn testSuccess;\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void editStudentList(int stuNumber){\n for(int i = 0; i<studList.size();i++){\n if(stuNumber == studList.get(i).getStuNumber()){\n \n System.out.println(\"Student Name: \" + studList.get(i).getFullName() + \", Student Number: \" + \n studList.get(i).getStuNumber() + \", Student GPA: \" + studList.get(i).getGPA());\n\n Scanner input = new Scanner(System.in);\n String newName = \"\";\n double newGPA;\n\n System.out.print(\"Student name: \");\n newName = input.nextLine();\n\n System.out.print(\"Student GPA: \");\n newGPA = input.nextDouble();\n\n Student temp = new Student(newName, studList.get(i).getStuNumber(), newGPA);\n studList.set(i, temp);\n }\n }\n }", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "@Test\n public void adding_item_to_menu_should_increase_menu_size_by_1_Failure_Scenario(){\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.addToMenu(\"Sizzling brownie\",319);\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n System.out.println(\"Will decrease Instead of adding\");\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public abstract void increasedPriority(int elementId, float oldRank, float newRank);", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "public void adjustWeightsTest() {\n\t\tboolean[] tempCorrectArray = new boolean[numInstances()];\n\t\tfor (int i = 0; i < tempCorrectArray.length / 2; i++) {\n\t\t\ttempCorrectArray[i] = true;\n\t\t} // Of for i\n\n\t\tdouble tempWeightedError = 0.3;\n\n\t\tadjustWeights(tempCorrectArray, tempWeightedError);\n\n\t\tSystem.out.println(\"After adjusting\");\n\n\t\tSystem.out.println(toString());\n\t}", "@Test\n \n public void testD_MenuDescriptionChanged() {\n\n\n Menu menu = (Menu) menuTable.getSelectionModel().getSelectedItem();\n String descriptionBefore = menu.getDescription();\n\n // Click on cell 4 and change Status\n Node cell = lookup(\"#clmnDescription\").nth(1).query();\n doubleClickOn(cell).write(\"Cambio\").type(KeyCode.ENTER);\n\n // Select row and get user.\n cell = lookup(\".table-row-cell\").nth(0).query();\n clickOn(cell);\n Menu menu2 = (Menu) menuTable.getSelectionModel().getSelectedItem();\n assertNotEquals(descriptionBefore, menu2.getDescription());\n\n }", "public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "@Test\n public void testSubList_SubList_Item_Update() {\n SegmentedOasisList<StringBuilder> instance = new SegmentedOasisList<>();\n\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"7\"));\n instance.add(new StringBuilder(\"7\"));\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"1\"));\n\n List<StringBuilder> expResult = Arrays.asList(new StringBuilder(\"17\"), new StringBuilder(\"7\"),\n new StringBuilder(\"7\"));\n List<StringBuilder> result = instance.subList(1, 4);\n\n instance.get(1).append(\"7\");\n assertTrue(isEqual(expResult, result));\n }", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "@Override\r\n\tpublic int compareTo(ListElements arg0) {\n\t\tint compareQuantity = ((ListElements) arg0).getScore(); \r\n\t\t \r\n\t\t//ascending order\r\n\t\treturn this.score - compareQuantity;\r\n\t}", "public void updateReward(Instance selectedInstance, boolean doBernoulliRewards, boolean isTrainingInstance, boolean verbose)\n\t{\n\t\tif (verbose);////System.out.println(\"\");\n\t\tif (verbose);////System.out.println(\"updateReward called()\");\n\n\t\t//Determine difficulty level associated to this instance\n\t\tint difficultyLevel;\n\t\tif (isTrainingInstance) {\n\t\t\tdifficultyLevel = Integer.parseInt(selectedInstance.toString(45)); //in this attribute the difficulty level is stored\n\t\t} \n\t\telse {\n\t\t\tdifficultyLevel = getDifficulty(); //now: m.DIFFICULTY. perhaps it should be m.state ?\n\t\t}\n\t\tif (verbose);////System.out.println(\"-calculating reward for previous level segment with difficulty level: \" + difficultyLevel );\n\t\t//double probsAppro = getProbsAppropriateness_ObservationStr(observation_str, false);\n\t\tdouble probsAppro = classifyInstance(selectedInstance, false)[1]; \n\t\tif (verbose);////System.out.println(\"-difficulty of level segment was deemed appropriate with a probability of: \" + probsAppro );\n\n\t\t//Determine rewards according to Bernoulli scheme / proportional reward\n\t\tdouble reward = 0.0;\n\t\tif (doBernoulliRewards) {\n\t\t\tif (verbose);////System.out.println(\"-returning reward of 1 with probablity of \" + probsAppro + \", else reward of 0 (Bernoulli rewards)\");\n\t\t\tboolean returnBernoulliReward;\n\t\t\tif ( Math.random() <= probsAppro ) returnBernoulliReward = true;\n\t\t\telse returnBernoulliReward = false;\n\n\t\t\tif (verbose);////System.out.println(\"-boolean returnBernoulliReward: \" + returnBernoulliReward);\n\t\t\tif (returnBernoulliReward) reward = 1.0;\n\t\t\telse reward = 0.0; \n\t\t}\n\t\telse {\n\t\t\tif (verbose);////System.out.println(\"-returning reward \" + probsAppro + \" (regular non-Bernoulli rewards)\");\n\t\t\treward = probsAppro;\n\t\t}\n\n\t\tif (verbose);////System.out.println(\"-adding reward of \" + reward + \" to arraylist playerModelDiff\" + difficultyLevel);\n\t\tswitch (difficultyLevel) {\n\t\tcase 1: playerModelDiff1.add(reward); break;\n\t\tcase 4: playerModelDiff4.add(reward); break;\n\t\tcase 7: playerModelDiff7.add(reward); break;\n\t\tdefault:;////System.out.println(\"-ERROR! Cannot add reward to concerning playerModelDiff1,4,7 due to incorrect input of difficultyLevel\"); break;\n\t\t}\n\t\t//Note, updating the display of average rewards is performed by updatePlayerModel()\n\t\t//int index = getPlayerModelIndex(difficultyLevel);\n\t\t////System.out.println(\"-updating playerModel[\" + index + \"] with reward: \" + reward);\n\t\t//playerModel[index] += reward;\n\t\tif (verbose);////System.out.println(\"-done\");\n\n\t\t//OLD\n\t\t//Increase reward proportionally to appropriateness of current difficulty level to the specific player\n\t\t//As determed by probabilities in player model\n\t\t/*\n ;////System.out.println(\"\");\n ;////System.out.println(\"updateReward called()\");\n double reward = getPlayerModelElement(m.DIFFICULTY);\n ;////System.out.println(\"-increasing reward by: \" + reward);\n m.REWARD += reward;\n ;////System.out.println(\"-new reward is now: \" + m.REWARD);\n\t\t */\n\n\t\t//OLD OLD\n\t\t/*\n if (m.state == 1) { //SANDER UPDATE - NOT CORRECT AT THE MOMENT\n //Appropriate difficulty - Increase reward\n int rangeMin = 0;\n int rangeMax = 1;\n Random r = new Random();\n double randomValue = rangeMin + (rangeMax - rangeMin) * r.nextDouble();\n ;////System.out.println(\"Increasing reward by: \" + randomValue);\n m.REWARD += randomValue;\n ;////System.out.println(\"New cummulative reward: \" + m.REWARD);\n }\n else {\n //No appropriate difficulty - Do not increase reward for this level block\n m.REWARD += 0; \n }\n\t\t */\n\t}" ]
[ "0.8770859", "0.8758855", "0.860871", "0.63607234", "0.634464", "0.63434523", "0.61209524", "0.6108031", "0.5777987", "0.5663138", "0.5603786", "0.55804586", "0.5531259", "0.54102963", "0.53574675", "0.53509617", "0.53365076", "0.53225183", "0.5302445", "0.5275048", "0.5206449", "0.519087", "0.5145732", "0.5115004", "0.5115004", "0.5096883", "0.50783604", "0.50595284", "0.50439584", "0.5042902", "0.5038508", "0.502043", "0.5003167", "0.4997564", "0.4980668", "0.49756554", "0.4973898", "0.4973454", "0.49443385", "0.49422583", "0.49384105", "0.49234045", "0.49196917", "0.49126387", "0.4912372", "0.49120075", "0.4909332", "0.48880517", "0.4878283", "0.48688698", "0.4868391", "0.48490041", "0.48376322", "0.48352587", "0.48206815", "0.4819406", "0.48115346", "0.48046124", "0.47982395", "0.4797569", "0.47936445", "0.47915486", "0.47735235", "0.47655123", "0.47630954", "0.47607642", "0.4758224", "0.47487047", "0.47456336", "0.47410128", "0.4734299", "0.47316357", "0.47298932", "0.4723192", "0.47197363", "0.47151545", "0.47143945", "0.4709844", "0.47096455", "0.47067633", "0.47042215", "0.47040263", "0.469549", "0.46938154", "0.46911824", "0.46868533", "0.4686489", "0.4683937", "0.4679323", "0.46727186", "0.46707532", "0.46689698", "0.4659429", "0.46572828", "0.4656336", "0.46553007", "0.46536598", "0.4651617", "0.46508405", "0.46473637" ]
0.80344194
3
Test_04 of updateMainSkillCompareToNewChange method, of class SkillsList.
@Test public void testUpdateMainSkillCompareToNewChange_04() { System.out.println("updateMainSkillCompareToNewChange"); Skill s1 = new Skill("Java", "Technical", 2, 3, Skill.PLUS_2); Skill s2 = new Skill("C", "Technical", 2, 5, Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s1); instance.add(s2); instance.upgradeSkill("Java"); instance.upgradeSkill("Java"); instance.upgradeSkill("Java"); String result = instance.getMainSkill().getName(); assertTrue(result.equals("Java")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateMainSkillCompareToNewChange_05() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\r\n\tvoid testUpdateSkillRecordShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\r\n\t}", "@Test\r\n\tvoid testUpdateSkillRecordShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\t\r\n\t}", "void updateSkill(Skill skill);", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "void changeSkill(Long pokemonId, int newSkill);", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "private static void setTest( int modifyAt\n ) {\n System.out.println(\n \"changed element \" + modifyAt + \" from \"\n + list.set( modifyAt, modifyAt + 1000) + \" to \"\n + list.get( modifyAt)\n );\n }", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Override\n\tpublic void updateScoreAfterTest(Score score2) {\n\t\tscoreDao.updateScoreAfterTest(score2);\n\t}", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "public void testCompareTo() throws Exception {\r\n setUp();\r\n Student allison = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n Student alli = new Student(\"0\", \"Aaa\", \"DeSantis\");\r\n\r\n // same last name, returns 1\r\n assertEquals(allison.compareTo(alli), 1);\r\n\r\n // same last name, returns -1\r\n Student al = new Student(\"0\", \"z\", \"DeSantis\");\r\n assertEquals(allison.compareTo(al), -1);\r\n\r\n // same name\r\n Student allis = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n assertEquals(allison.compareTo(allis), 0);\r\n\r\n // same first name, returns 1\r\n Student last = new Student(\"0\", \"Allison\", \"c\");\r\n assertEquals(allison.compareTo(last), 1);\r\n\r\n // same first name, returns -1\r\n Student diff = new Student(\"0\", \"Allison\", \"Z\");\r\n assertEquals(allison.compareTo(diff), -1);\r\n\r\n\r\n Student c1 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n Student c2 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n\r\n assertEquals(c1.compareTo(c2), 0);\r\n\r\n assertEquals(c2.compareTo(c1), 0);\r\n\r\n Student c3 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n assertEquals(c1.compareTo(c3), 0);\r\n }", "@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "@FXML\n private void increasePriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1) {\n storyPriority = getModel().getLowestPriorityStory();\n }\n else if (storyPriority == 1) {\n return;\n }\n else {\n storyPriority--;\n }\n try {\n getModel().modifyStory(story, storyPriority);\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI,\n //e.g Disabling buttons.\n ErrorReporter.get().reportError(e, \"Failed to modify the story priority\");\n }\n updateStoryTable();\n }\n }", "@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}", "public int compare(Skill s1,Skill s2){\n\t\t\t\t\treturn s1.getNumber()-s2.getNumber();\r\n\t\t\t\t}", "public int compare(Skill s1,Skill s2){\n\t\t\t\t\treturn s1.getNumber()-s2.getNumber();\r\n\t\t\t\t}", "public void testCmdUpdate_priority_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 4: Testing priority field (all ID are valid)(default priority is\n\t\t * normal)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 4a: priority is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 4b: priority is normal\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_NORM);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4c: priority is high\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_HIGH);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.HIGH);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t\t\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4d: priority is low\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_LOW);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.LOW);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}", "@Test\n public void TestEditTwo(){\n ArrayList<Task> listToEdit = new ArrayList<Task>();\n ArrayList<Integer> indexList = new ArrayList<Integer>();\n String message;\n \n indexList.add(0);\n listToEdit.add(new Task(\"New item 1\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n listToEdit.clear();\n indexList.add(1);\n listToEdit.add(new Task(\"New item 2\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"New item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n listToEdit.clear();\n indexList.add(2);\n listToEdit.add(new Task(\"New item 3\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"New item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n logicObject.showUpdatedItems();\n listToEdit.clear();\n indexList.add(1);\n listToEdit.add(new Task(\"item 2 changed again!\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"item 2 changed again!\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 3\", logicObject.listOfTasks.get(2).getName());\n }", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "static public void adjustRewardForSelect(ArrayList<RewardItem> rewardList) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (toChangeCard != null) {\n if (item.type == RewardItem.RewardType.CARD) {\n boolean isExist = false;\n for (AbstractCard card : item.cards) {\n if (card.cardID.equals(toChangeCard.cardID)) {\n isExist = true;\n if (card.canUpgrade()) {\n card.upgrade();\n }\n break;\n }\n }\n if (!isExist) {\n boolean isChanged = false;\n // check same rarity\n for (AbstractCard card : item.cards) {\n if (card.rarity == toChangeCard.rarity) {\n if (card.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.remove(card);\n item.cards.add(toChangeCard);\n isChanged = true;\n break;\n }\n }\n if (!isChanged) {\n AbstractCard removed = item.cards.remove(0);\n if (removed.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.add(toChangeCard);\n }\n }\n }\n }\n }\n\n if (selectRelic != null) {\n if (AbstractDungeon.player.hasRelic(selectRelic)) {\n selectRelic = null;\n } else {\n boolean isExist = false;\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n if (item.relic.relicId.equals(selectRelic)) {\n isExist = true;\n }\n }\n\n }\n if (!isExist) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n rewardList.set(i, new RewardItem(RelicLibrary.getRelic(selectRelic)));\n }\n }\n }\n }\n clearHasRelicInPool();\n }\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Override\r\n\tpublic void updateDriverRate(int score, String driverID) {\n\t\t\r\n\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@FXML\n private void decreasePriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1) {\n return;\n }\n else if (storyPriority + 1 >= getModel().getLowestPriorityStory()) {\n storyPriority = null;\n }\n else {\n storyPriority++;\n }\n try {\n if (storyPriority != null) {\n getModel().modifyStory(story, storyPriority);\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().modifyStory(story, null);\n } catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Failed to modify the priority of the story\");\n }\n });\n }\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Failed to modify the priority of the story\");\n }\n updateStoryTable();\n }\n }", "@Test\n /* testUpdateRecord\n * testing update exist record in Save.Json\n * */\n public void testUpdateRecord() {\n testAddRecord();\n\n score = 300;\n level = 3;\n name = \"test1\";\n\n saveReader.updateRecord(indexOfReturned, \"name\", name);\n assertEquals(\"True : name field updated successfully\", name, saveReader.LoadsList.get(indexOfReturned).name);\n\n saveReader.updateRecord(indexOfReturned, \"score\", score);\n assertEquals(\"True : score field updated successfully\", score, saveReader.LoadsList.get(indexOfReturned).score);\n\n saveReader.updateRecord(indexOfReturned, \"level\", level);\n assertEquals(\"True : level field updated successfully\", level, saveReader.LoadsList.get(indexOfReturned).level);\n }", "@Test\n public void testSort() {\n initialize();\n var realList = new HighScoreList();\n realList.setList(list);\n realList.sort();\n\n assertEquals(300, realList.getList().get(0).getScore());\n assertEquals(200, realList.getList().get(1).getScore());\n assertEquals(100, realList.getList().get(2).getScore());\n }", "public static int attemptSkillUp(int skillId, Player player){ \n\t\ttry{\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == -1){return -2;}\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == 30){return -2;}\n\t\t\tint[] skillCost;\n\t\t\tskillCost = new int[8];\n\t\t\tint newSkillLevel = DwarfCraftPlayerSkills.getSkillLevel(skillId, player);\n\t\t\t/* Dan thinks skillId could be removed from the arguments in this function\n\t\t\t getSkillTrainingCost */\n\t\t\tskillCost = Skills.values()[skillId].getSkillTrainingCost(skillId, newSkillLevel, player);\n\t\t\tfor (int i = 0; i < skillCost[0];i++){\n\t\t\t\t//check inventory quantity for needed items\n\t\t\t\tif (DwarfCraftInventory.countInventoryItems(skillCost[1+2*i], player) < skillCost[2+2*i]){return -1;}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\t\tcatch(NumberFormatException f) {return 0;}\n\t}", "public void UpCheck_status1(MajorChange mc) ;", "protected void beforeUpdateSkillType(\n RetailscmUserContext userContext,\n SkillType existed,\n String retailStoreCountryCenterId,\n String skillTypeId,\n int skillTypeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "@Test\n void testUpdateGoaliePositionLimitsYmin() {\n goalie.setPosition(new Vector(goalie.getX(), 192f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the negative minimum direction\n goalie.setNext_direction(new Vector(0,-1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(-1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmin\" +\n \" Goalie moved past the Y-Min limit\");\n }\n }", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Test\r\n\tvoid testChangeItems() {\r\n\t\tToDoItem newItem = new ToDoItem(\"Item 1\", \"2/6/21\", 1, \"Body text 1\");\r\n\t\tString correctInfo = \"Name: Item 2\\nDue Date: 3/16/21\\nPriority: Medium\\nNotes: New notes\\nLate: Yes\\nItem Complete: Yes\";\r\n\t\tnewItem.setName(\"Item 2\");\r\n\t\tnewItem.setDueDate(\"3/16/21\");\r\n\t\tnewItem.setPriority(2);\r\n\t\tnewItem.setNotes(\"New notes\");\r\n\t\tnewItem.setIsLate(true);\r\n\t\tnewItem.setIsDone(true);\r\n\r\n\t\tif (!newItem.getAllInfo().equals(correctInfo)) {\r\n\t\t\tfail(\"Error changing ToDoItem values\");\r\n\t\t}\r\n\t}", "@Test\n void compareTo_MatchButModifying_NameAndAddress()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.no, AnswerType.no, ContactMatchType.MatchButModifying);\n }", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "@Test\n public void changeScoreTest() {\n //will be false as animal is not moving\n boolean expectedValue = animal.changeScore();\n Assert.assertEquals(expectedValue,false);\n }", "@Test\n\tpublic void test_update_last_commit_time_change(){\n\t\ttest2.updateLastCommitTime(current);\n\t\tassertEquals(\"Last Commit Time shoud be updated\", current, test2.getLastCommitTime());\n\t}", "@Test\n public void TestEditOne(){\n ArrayList<Task> listToEdit = new ArrayList<Task>();\n ArrayList<Integer> indexList = new ArrayList<Integer>();\n String message;\n \n indexList.add(3);\n listToEdit.add(new Task(\"New item 99\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(2);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(-1);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(-2);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n }", "@Override\n public boolean acceptMove(int baselineObjectiveValue, int newObjectiveValue) {\n if (newObjectiveValue > baselineObjectiveValue) {\n return true;\n }\n else {\n return false;\n }\n }", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "private static void checkForUpgrades(@Nullable List<UpdatablePackage> completedChanges) {\n if (completedChanges == null) {\n return;\n }\n int highestNewApiLevel = 0;\n for (UpdatablePackage updated : completedChanges) {\n TypeDetails details = updated.getRepresentative().getTypeDetails();\n if (details instanceof DetailsTypes.PlatformDetailsType) {\n int api = ((DetailsTypes.PlatformDetailsType)details).getApiLevel();\n if (api > highestNewApiLevel) {\n highestNewApiLevel = api;\n }\n }\n }\n if (highestNewApiLevel > 0) {\n // TODO: Fix this code after we delete WizardConstants\n PropertiesComponent.getInstance().setValue(WizardConstants.NEWLY_INSTALLED_API_KEY.name, highestNewApiLevel, -1);\n }\n }", "Test update(TestData testData, Test test);", "@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "@FXML\n private void jumpPriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1 || storyPriority != 0) {\n try {\n getModel().modifyStory(story, 1);\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Cannot increase priority\");\n }\n updateStoryTable();\n }\n }\n }", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "private void checkForTyreChange(int lapNo, char[] allTyreTypes)\n {\n RNG generator = new RNG(1,11);\n Validation validator = new Validation();\n for(int i = 0; i < getDrivers().getSize(); i++)\n {\n int timeAffected = 0;\n if(getDrivers().getDriver(i).getEligibleToRace()) // if driver is eligible to race\n {\n int randomNo = generator.generateRandomNo(); // generates random number between 1 and 11(exclusive)\n if(validator.isNumberBetween(1, 5, randomNo)) // 50% chance to change tyre type\n {\n allTyreTypes[i] = 'W';\n timeAffected = 10;\n System.out.println(getDrivers().getDriver(i).getName() + \" has chosen to change tyres from Dry-weather to Wet-weather, which increases lap \" + lapNo + \n \" time by \" + timeAffected + \" secs\");\n getDrivers().getDriver(i).setAccumulatedTime(getDrivers().getDriver(i).getAccumulatedTime() + timeAffected); // update time affected\n }\n }\n }\n }", "@Test\n public void testChangeAge() {\n System.out.println(\"Animal.changeAge\");\n animal1.changeAge(2);\n animal2.changeAge(-1);\n assertEquals(19, animal1.getAge());\n assertEquals(2, animal2.getAge());\n }", "@Test\n void ScoreBoardIntoList() {\n //Should be\n List<StatisticsGetDTO> intended = new ArrayList<StatisticsGetDTO>();\n StatisticsGetDTO statisticsGetDTO = new StatisticsGetDTO();\n statisticsGetDTO.setScore(100);\n statisticsGetDTO.setPlayerName(\"A\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(1);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(200);\n statisticsGetDTO.setPlayerName(\"B\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(2);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(300);\n statisticsGetDTO.setPlayerName(\"C\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(3);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(400);\n statisticsGetDTO.setPlayerName(\"D\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(4);\n intended.add(statisticsGetDTO);\n\n List<StatisticsGetDTO> actualList = scoreboard.transformIntoList();\n List<Integer> scoresActualList = new ArrayList<Integer>();\n List<String> namesActualList = new ArrayList<String>();\n List<Integer> mysteryActualList = new ArrayList<Integer>();\n for (StatisticsGetDTO element : actualList){\n scoresActualList.add(element.getScore());\n namesActualList.add(element.getPlayerName());\n mysteryActualList.add(element.getNumberOfCorrectlyGuessedMysteryWords());\n }\n\n assertTrue(scoresActualList.contains(intended.get(0).getScore()));\n assertTrue(scoresActualList.contains(intended.get(1).getScore()));\n assertTrue(scoresActualList.contains(intended.get(2).getScore()));\n assertTrue(scoresActualList.contains(intended.get(3).getScore()));\n assertTrue(namesActualList.contains(intended.get(0).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(1).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(2).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(3).getPlayerName()));\n assertTrue(mysteryActualList.contains(intended.get(0).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(1).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(2).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(3).getNumberOfCorrectlyGuessedMysteryWords()));\n }", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "int updateByPrimaryKeySelective(WizardValuationHistoryEntity record);", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "@Test\r\n public void testUpdate() {\r\n }", "private void updateSingles(Hierarchy con, ViolatedCandidate lCandidate, ViolatedCandidate tCandidate,\n double delta) {\n Multiset<Constraint> targetPreferringView = UpdateUtils.getViolatedByLearner(lCandidate, tCandidate);\n Multiset<Constraint> learnerPreferringView = UpdateUtils.getViolatedByTarget(lCandidate, tCandidate);\n Multiset<Constraint> learnerPreferringHigh = HashMultiset.create(learnerPreferringView.size());\n double promoteWeightedDelta = delta / targetPreferringView.size();\n double maxTPreferringRanking = Double.MIN_VALUE;\n for (Constraint constraint : targetPreferringView.elementSet()) {\n maxTPreferringRanking = Math.max(maxTPreferringRanking, con.getRanking(constraint));\n double multipliedDelta = (targetPreferringView.count(constraint) * promoteWeightedDelta);\n con.changeConstraintRanking(constraint, multipliedDelta);\n }\n\n for (Constraint constraint : learnerPreferringView.elementSet()) {\n double thisRanking = con.getRanking(constraint);\n if (thisRanking > maxTPreferringRanking) {\n int count = learnerPreferringView.count(constraint);\n learnerPreferringHigh.add(constraint, count);\n }\n }\n // If 'higher' set is empty, just add argMax to it\n if (learnerPreferringHigh.isEmpty()) {\n Constraint argMax = UpdateUtils.getMax(learnerPreferringView, con);\n learnerPreferringHigh.add(argMax);\n }\n\n Multiset<Constraint> toIterateOver = learnerPreferringHigh;\n\n double demoteWeightedDelta = -(delta / toIterateOver.size());\n for (Constraint constraint : toIterateOver.elementSet()) {\n double multipliedDelta = toIterateOver.count(constraint) * demoteWeightedDelta;\n con.changeConstraintRanking(constraint, multipliedDelta);\n // System.out.println(\"↓ Updating \" + constraint +\" by \" +\n // multipliedDelta);\n }\n }", "void changeCost(ArrayList<CostsChanges> changes);", "@Test\n void testGetSortedList(){\n ToDoList todoList = new ToDoList();\n ToDo todo1 = new ToDo(\"Todo1\");\n todo1.setInhalt(\"Dies ist ein Test\");\n\n todoList.add(new ToDo((\"Todo2\")));\n ToDo todo3 = new ToDo(\"Todo3\");\n todo3.setInhalt(\"3+3=6\");\n todo3.setStatus(Status.IN_ARBEIT);\n todoList.add(new ToDo((\"Todo4\")));\n todoList.add(todo3);\n ToDo todo4 = new ToDo(\"Trala\");\n todo4.setStatus(Status.IN_ARBEIT);\n todo4.setStatus(Status.BEENDET);\n todo4.setInhalt(\"ab\");\n ToDo todo5 = new ToDo(\"Trala\");\n todo5.setInhalt(\"aa\");\n todo5.setStatus(Status.IN_ARBEIT);\n todo5.setStatus(Status.BEENDET);\n todoList.add(todo5);\n todoList.add(todo4);\n todoList.add(todo1);\n\n todoList = todoList.getSortedList();\n\n assertEquals(Status.OFFEN, todoList.get(0).getStatus());\n assertEquals(Status.OFFEN, todoList.get(1).getStatus());\n assertEquals(Status.OFFEN, todoList.get(2).getStatus());\n assertEquals(Status.IN_ARBEIT, todoList.get(3).getStatus());\n assertEquals(Status.BEENDET, todoList.get(4).getStatus());\n assertEquals(Status.BEENDET, todoList.get(5).getStatus());\n\n assertEquals(\"Trala\", todoList.get(5).getBez());\n assertEquals(\"Todo3\", todoList.get(3).getBez());\n\n assertEquals(\"aa\", todoList.get(4).getInhalt());\n assertEquals(\"ab\", todoList.get(5).getInhalt());\n }", "@Test\n public void testEditProduct() throws Exception {\n System.out.println(\"editProduct\");\n Product p;\n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n p = prs.get(0);\n String nameNew = \"newName\", nameOld = p.getName();\n p.setName(nameNew);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.isEmpty());\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.contains(p));\n assertTrue(prs.size() == 1);\n p.setName(nameOld);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.isEmpty());\n }", "private static void testupdate() {\n\t\ttry {\n\t\t\tRoleModel model = new RoleModel();\n\t\t\tRoleBean bean = new RoleBean();\n\t\t\tbean = model.findByPK(7L);\n\t\t\tbean.setName(\"Finance\");\n\t\t\tbean.setDescription(\"Finance Dept\");\n\t\t\tbean.setCreatedBy(\"CCD MYSORE\");\n\t\t\tbean.setModifiedBy(\"CCD MYSORE\");\n\t\t\tbean.setCreatedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tbean.setModifiedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tmodel.update(bean);\n\t\t\tRoleBean updateBean = model.findByPK(1);\n\t\t\tif (\"12\".equals(updateBean.getName())) {\n\t\t\t\tSystem.out.println(\"UPDATE RECORD FAILED\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"RECORD UPDATED SUCCESSFULLY\");\n\t\t\t}\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DuplicateRecordException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n void testForLargestCardInTrickComparingRank() {\n Dealer testDealer = new Dealer();\n\n Suit suit1 = Suit.DIAMONDS;\n Suit suit2 = Suit.SPADES;\n Suit suit3 = Suit.DIAMONDS;\n Suit suit4 = Suit.DIAMONDS;\n \n Rank rank1 = Rank.TWO;\n Rank rank2 = Rank.KING;\n Rank rank3 = Rank.ACE;\n Rank rank4 = Rank.FIVE;\n\n Card card1 = new Card(suit1,rank1,false);\n Card card2 = new Card(suit2,rank2,false);\n Card card3 = new Card(suit3,rank3,false);\n Card card4 = new Card(suit4,rank4,false);\n\n \n testDealer.addToPlayedCards(card1);\n testDealer.addToPlayedCards(card2);\n testDealer.addToPlayedCards(card3);\n testDealer.addToPlayedCards(card4);\n\n assertEquals(card3 , testDealer.getLargestCardFromTrick());\n }", "@Test\n\tpublic void testLLSort() {\n\t\tLinkedList playerList = new LinkedList();\n\t\tPlayer tempInsert5 = new Player();\n\t\ttempInsert5.setName(\"test5\");\n\t\ttempInsert5.setPoints(5);\n\t\ttempInsert5.setWins(4);\n\t\ttempInsert5.setLosses(3);\n\t\tplayerList.LLInsert(tempInsert5);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tPlayer tempInsert2 = new Player();\n\t\ttempInsert2.setName(\"test2\");\n\t\ttempInsert2.setPoints(2);\n\t\ttempInsert2.setWins(1);\n\t\ttempInsert2.setLosses(0);\n\t\tplayerList.LLInsert(tempInsert2);\n\t\t\n\t\tPlayer tempInsert3 = new Player();\n\t\ttempInsert3.setName(\"test3\");\n\t\ttempInsert3.setPoints(3);\n\t\ttempInsert3.setWins(2);\n\t\ttempInsert3.setLosses(1);\n\t\tplayerList.LLInsert(tempInsert3);\n\t\t\n\t\tPlayer tempInsert1 = new Player();\n\t\ttempInsert1.setName(\"test1\");\n\t\ttempInsert1.setPoints(1);\n\t\ttempInsert1.setWins(0);\n\t\ttempInsert1.setLosses(0);\n\t\tplayerList.LLInsert(tempInsert1);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tPlayer tempInsert4 = new Player();\n\t\ttempInsert4.setName(\"test4\");\n\t\ttempInsert4.setPoints(4);\n\t\ttempInsert4.setWins(3);\n\t\ttempInsert4.setLosses(2);\n\t\tplayerList.LLInsert(tempInsert4);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tplayerList.LLSort();\n\t\tassertEquals(playerList.LLPrint(), \n\t\t\t\t\"test5: Points: 5, Wins/Losses: 4/3\\n\"\n\t\t\t\t\t\t+ \"test4: Points: 4, Wins/Losses: 3/2\\n\"\n\t\t\t\t\t\t+ \"test3: Points: 3, Wins/Losses: 2/1\\n\"\n\t\t\t\t\t\t+ \"test2: Points: 2, Wins/Losses: 1/0\\n\"\n\t\t\t\t\t\t+ \"test1: Points: 1, Wins/Losses: 0/0\\n\");\n\t}", "@Test\r\n\tvoid testAddToDoItem() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\t// case 1: insert one ToDoItem\r\n\t\tlist.insert(toDoItem4);\r\n\t\tif (!list.getHead().getName().equals(\"Item 4\")) { // check the head is set correctly\r\n\t\t\tfail(\"Head set incorrectly for: \" + toDoItem4.getName() + \", should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\tif (list.getSize() != 1) { // check that size is incremented\r\n\t\t\tfail(\"List size is incorrect: should be 1\");\r\n\t\t}\r\n\r\n\t\t// case 2: second item is insert\r\n\t\tlist.insert(toDoItem1);\r\n\t\tif (list.getSize() != 2) { // check size incremented correctly\r\n\t\t\tfail(\"Size incorrect: should be 2\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 1\")) { // check the item is in the list\r\n\t\t\tfail(\"Item 1 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check the position of Item 1\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\t// check that the current pointer is in the right location\r\n\t\tif (!list.getCurrent().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Current set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\t// check that tail is set correctly\r\n\t\tif (!list.getTail().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Tail set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\r\n\t\t// case 3: third item is inserted\r\n\t\tlist.insert(toDoItem5);\r\n\t\tif (list.getSize() != 3) {\r\n\t\t\tfail(\"Size incorrect: should be 3\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 5\")) {\r\n\t\t\tfail(\"Item 5 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.getTail().getName().equals(\"Item 5\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 5\\\"\");\r\n\t\t}\r\n\r\n\t\t// insert several more and test to make sure they are ordered correctly\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem6);\r\n\t\tlist.insert(toDoItem3);\r\n\r\n\t\tToDoItem tempHead = list.getHead();\r\n\t\tString currList = \"|\";\r\n\t\tString correctList = \"|Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|\";\r\n\r\n\t\twhile (tempHead != null) {\r\n\t\t\tcurrList += tempHead.getName() + \"|\";\r\n\t\t\ttempHead = tempHead.getNext();\r\n\t\t}\r\n\r\n\t\tif (!currList.equals(correctList)) {\r\n\t\t\tfail(\"The list was ordered incorrectly after inserting all items\");\r\n\t\t}\r\n\t}", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "@Test\n void testUpdateGoaliePositionLimitsYmax() {\n goalie.setPosition(new Vector(goalie.getX(), 512f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the positive direction\n goalie.setNext_direction(new Vector(0,1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmax\" +\n \" Goalie moved past the Y-Max limit\");\n }\n\n }", "private void updateRacePoints(char[] allTyreTypes)\n {\n getDrivers().adjustDriversListByTime(allTyreTypes);\n for(int i = 0 ; i < getDrivers().getSize() ; i++)\n {\n int scoringPoints = 0;\n if(i == 0 && getDrivers().getDriver(i).getEligibleToRace()) // if first and eligible\n {\n scoringPoints = 8;\n }\n else if(i == 1 && getDrivers().getDriver(i).getEligibleToRace()) // if second and eligible\n {\n scoringPoints = 5;\n }\n else if(i == 2 && getDrivers().getDriver(i).getEligibleToRace()) // if third and eligible\n {\n scoringPoints = 3;\n }\n else if(i == 3 && getDrivers().getDriver(i).getEligibleToRace()) // if fourth and eligible\n {\n scoringPoints = 1;\n }\n getDrivers().getDriver(i).setAccumulatedScore(getDrivers().getDriver(i).getAccumulatedScore() + scoringPoints);\n }\n }", "public void AddNewSkill()\n\t{\n\t\t\n\t}", "@Test\n\tpublic void testModifyQuestion() {\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\n\t\tquestion.setQuestionText(\"Testing update\");\n\n\t\t// Test with invalid permissions\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.assertNotNull(e);\n\t\t} \n\n\t\t// Test with valid permission\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tQnaQuestion changedQuestion = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\t\t\tAssert.assertEquals(changedQuestion.getQuestionText(), \"Testing update\");\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\t}", "@Test\r\n\tpublic void getAllGradesWithChangeOfTestOfTeacherValueAndAdjustementTest()\r\n\t\t\tthrows ClassNotFoundException, SonarqubeDataBaseException, SQLException, IOException {\r\n\t\tmapQuality.put(\"TestOfTeacher\", new ModelValue(90f));\r\n\t\tmapQuality.put(\"Comments\", new ModelValue(25f, 10f));\r\n\t\tlistAllGrades.put(\"FinalGrade\", new Float(5.5));\r\n\t\tAssert.assertEquals(UtilCalculGrade.getAllGrades(mapQuality, listScoreMetricStudent, listScoreMetricTeacher,\r\n\t\t\t\tmapConf, mapIssues, projectName, idModule).get(\"FinalGrade\"), listAllGrades.get(\"FinalGrade\"));\r\n\t}", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "@Test\n public void testSubList_SubList_Item_Update() {\n SegmentedOasisList<StringBuilder> instance = new SegmentedOasisList<>();\n\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"7\"));\n instance.add(new StringBuilder(\"7\"));\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"1\"));\n\n List<StringBuilder> expResult = Arrays.asList(new StringBuilder(\"17\"), new StringBuilder(\"7\"),\n new StringBuilder(\"7\"));\n List<StringBuilder> result = instance.subList(1, 4);\n\n instance.get(1).append(\"7\");\n assertTrue(isEqual(expResult, result));\n }", "@Test\n\tpublic void testChangeMultiAttributeOrderDoesMatterLDAP96()\n\t\t\tthrows Exception {\n\t\tfinal Attributes fixtureAttrs = new BasicAttributes();\n\t\tAttribute multi = new BasicAttribute(\"title\");\n\t\tmulti.add(\"Juergen\");\n\t\tmulti.add(\"George\");\n\t\tfixtureAttrs.put(multi);\n\t\tclass TestableDirContextAdapter extends DirContextAdapter {\n\t\t\tpublic TestableDirContextAdapter() {\n\t\t\t\tsuper(fixtureAttrs, null);\n\t\t\t\tsetUpdateMode(true);\n\t\t\t}\n\t\t}\n\t\ttested = new TestableDirContextAdapter();\n\t\tassertTrue(tested.isUpdateMode());\n\t\ttested.setAttributeValues(\"title\", new String[] { \"Jim\", \"George\",\n\t\t\t\t\"Juergen\" }, true);\n\n\t\t// change\n\t\tModificationItem[] mods = tested.getModificationItems();\n\t\tassertEquals(1, mods.length);\n\t\tassertEquals(DirContext.REPLACE_ATTRIBUTE, mods[0].getModificationOp());\n\t\tAttribute attr = mods[0].getAttribute();\n\t\tassertEquals(\"Jim\", attr.get(0));\n\t\tassertEquals(\"George\", attr.get(1));\n\t\tassertEquals(\"Juergen\", attr.get(2));\n\t}", "public abstract void increasedPriority(int elementId, float oldRank, float newRank);", "@Test\n public void adding_item_to_menu_should_increase_menu_size_by_1_Failure_Scenario(){\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.addToMenu(\"Sizzling brownie\",319);\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n System.out.println(\"Will decrease Instead of adding\");\n }", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n void testUpdateGoalie() {\n\n }", "@Test\n public final void testSmallerThanMax() {\n for (ArrayList<TradeGood> planetsGoods : goods) {\n for (TradeGood good : planetsGoods) {\n assertTrue(good.getPrice() < good.type.mhl);\n }\n }\n }", "public void editStudentList(int stuNumber){\n for(int i = 0; i<studList.size();i++){\n if(stuNumber == studList.get(i).getStuNumber()){\n \n System.out.println(\"Student Name: \" + studList.get(i).getFullName() + \", Student Number: \" + \n studList.get(i).getStuNumber() + \", Student GPA: \" + studList.get(i).getGPA());\n\n Scanner input = new Scanner(System.in);\n String newName = \"\";\n double newGPA;\n\n System.out.print(\"Student name: \");\n newName = input.nextLine();\n\n System.out.print(\"Student GPA: \");\n newGPA = input.nextDouble();\n\n Student temp = new Student(newName, studList.get(i).getStuNumber(), newGPA);\n studList.set(i, temp);\n }\n }\n }", "@Test\n public void testProjectRolesChanges() {\n coiPerson.setContactRole(ContactRoleFixtureFactory.MOCK_KEY_PERSON);\n Assert.assertFalse(\"Key Person Role not checked for\", rule.checkForKeyPersonProjectRoles(award.getProjectPersons()));\n coiPerson.setKeyPersonRole(\"fromCOI\");\n Assert.assertTrue(\"Key Person Role not checked for\", rule.checkForKeyPersonProjectRoles(award.getProjectPersons()));\n \n // when a key person is changed to coi\n kpPerson.setContactRole(ContactRoleFixtureFactory.MOCK_COI);\n Assert.assertTrue(\"rule should return true\", rule.processSaveAwardProjectPersonsBusinessRules(award.getProjectPersons()));\n }", "private boolean testChanges(boolean testRepository) {\r\n\t\t\r\n\t\tif (testRepository) {\r\n\t\t\t\r\n\t\t\tString status = \"Status: [ACTION - Testing Repository Changes]...\";\r\n\t\t\t\r\n\t\t\t// test changes in repository for clashes etc.\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = true;\r\n\t\t\tint failCount = 0;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// do an update first to make sure rep-side changes are all there\r\n\t\t\t\tboolean updateSuccess = this.updateRepChanges(false);\r\n\t\t\t\t\r\n\t\t\t\tif (!updateSuccess) {\r\n\t\t\t\t\tstatusBar.setText(status+\"Update FAILED\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// load baseOntology using URI\r\n\t\t\t\tstatusBar.setText(status+\"Loading Base Ontology\");\r\n\t\t\t\tOWLOntology baseOntology = swoopModel.loadOntology(baseOntologyURI);\r\n\t\t\t\tif (baseOntology == null) {\r\n\t\t\t\t\t// there is no base ontology, changes start from scratch\r\n\t\t\t\t\t// create new ontology using OWLBuilder\r\n\t\t\t\t\tOWLBuilder builder = new OWLBuilder();\r\n\t\t\t\t\tbuilder.createOntology(baseOntologyURI, baseOntologyURI);\r\n\t\t\t\t\tbaseOntology = builder.getOntology();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// get all repository side changes: under repRoot\r\n\t\t\t\tList allRepChanges = this.getDescendantChanges(repRoot);\r\n\t\t\t\tstatusBar.setText(status+\"Testing \"+allRepChanges.size()+\" repository-side changes\");\r\n\t\t\t\t\r\n\t\t\t\t// apply allRepChanges to baseOntology\r\n\t\t\t\tfor (int i=0; i<allRepChanges.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) allRepChanges.get(i);\r\n\t\t\t\t\tOntologyChange oc = swc.getChange();\r\n\t\t\t\t\t//*** need to align changes with ontology! ***/\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tOntologyChange alignOC = (OntologyChange) controlHandler.swoopHandler.changeLog.getChangeInformation(oc, ChangeLog.CHANGE_ALIGN, null, new ArrayList(), baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// save state of baseOntology and see if it changes\r\n\t\t\t\t\t\t// use Abstract Syntax since its more concise than rdf/xml?\r\n\t\t\t\t\t\tString before = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// APPLY CHANGE\r\n\t\t\t\t\t\tboolean check = true;\r\n\t\t\t\t\t\tif (alignOC instanceof BooleanElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyBooleanElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse if (alignOC instanceof EnumElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyEnumElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t\telse alignOC.accept((ChangeVisitor) baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// need to see if any change in the ontology occured\r\n\t\t\t\t\t\tString after = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (before.equals(after) || !check) {\r\n\t\t\t\t\t\t\t// nothing has changed!\r\n\t\t\t\t\t\t\tSystem.out.println(\"Found redundant change: \"+oc);\r\n\t\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse swc.isRedundant = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Change Error for: \"+oc);\r\n\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\ttestSuccess = false;\r\n\t\t\t}\r\n\t\t\tif (testSuccess) statusBar.setText(status+\"Test PASSED\");\r\n\t\t\telse {\r\n\t\t\t\tstatusBar.setText(status+\"Test FAILED\");\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Change Test FAILED: \"+failCount+\" change(s) is/are redundant or cause clashes. Please Fix/Remove them and try again.\");\r\n\t\t\t}\r\n\t\t\t// refresh repTreeTable\r\n\t\t\tthis.refreshRepTreeTable(false);\r\n\t\t\treturn testSuccess;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// test changes in Swoop Ontology for clashes etc.\r\n\t\t\tString status = \"Status: [ACTION - Testing LOCAL Ontology Changes]...\";\r\n\t\t\t\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = true;\r\n\t\t\tint failCount = 0;\r\n\t\t\t\r\n\t\t\t// get base ontology\r\n\t\t\tstatusBar.setText(status+\"Loading Base Ontology\");\r\n\t\t\tOWLOntology baseOntology = null;\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\t// get existing ontology from swoopModel\r\n\t\t\t\tbaseOntology = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\t// but clone it to prevent applying changes on *it*\r\n\t\t\t\tbaseOntology = this.cloneOntology(baseOntology);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tURI ontURI = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// load ontology with URI\r\n\t\t\t\t\tontURI = new URI(swoopOntFld.getText());\r\n\t\t\t\t\tbaseOntology = swoopModel.loadOntology(ontURI);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t// create new ontology\r\n\t\t\t\t\tOWLBuilder builder = new OWLBuilder();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbuilder.createOntology(ontURI, ontURI);\r\n\t\t\t\t\t} catch (OWLException e) {\r\n\t\t\t\t\t\te.printStackTrace();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaseOntology = builder.getOntology();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (baseOntology == null) {\r\n\t\t\t\tstatusBar.setText(status+\"Unable to load base ontology\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfor (int i=0; i<ontChanges.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) ontChanges.get(i);\r\n\t\t\t\t\tOntologyChange oc = swc.getChange();\r\n\t\t\t\t\t//*** need to align changes with ontology! ***/\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tOntologyChange alignOC = (OntologyChange) controlHandler.swoopHandler.changeLog.getChangeInformation(oc, ChangeLog.CHANGE_ALIGN, null, new ArrayList(), baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// save state of baseOntology and see if it changes\r\n\t\t\t\t\t\t// use Abstract Syntax since its more concise than rdf/xml?\r\n\t\t\t\t\t\tString before = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// APPLY CHANGE\r\n\t\t\t\t\t\tboolean check = true;\r\n\t\t\t\t\t\tif (alignOC instanceof BooleanElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyBooleanElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse if (alignOC instanceof EnumElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyEnumElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t\telse alignOC.accept((ChangeVisitor) baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// need to see if any change in the ontology occured\r\n\t\t\t\t\t\tString after = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (before.equals(after) || !check) {\r\n\t\t\t\t\t\t\t// nothing has changed!\r\n\t\t\t\t\t\t\tSystem.out.println(\"Found redundant change: \"+oc);\r\n\t\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse swc.isRedundant = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Change Error for: \"+oc);\r\n\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\ttestSuccess = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (testSuccess) statusBar.setText(status+\"Test PASSED\");\r\n\t\t\telse {\r\n\t\t\t\tstatusBar.setText(status+\"Test FAILED\");\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Change Test FAILED: \"+failCount+\" change(s) is/are redundant or cause clashes. Please Fix/Remove them and try again.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// refresh ontTreeTable\r\n\t\t\tthis.refreshOntTreeTable();\r\n\t\t\treturn testSuccess;\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "public void updateReward(Instance selectedInstance, boolean doBernoulliRewards, boolean isTrainingInstance, boolean verbose)\n\t{\n\t\tif (verbose);////System.out.println(\"\");\n\t\tif (verbose);////System.out.println(\"updateReward called()\");\n\n\t\t//Determine difficulty level associated to this instance\n\t\tint difficultyLevel;\n\t\tif (isTrainingInstance) {\n\t\t\tdifficultyLevel = Integer.parseInt(selectedInstance.toString(45)); //in this attribute the difficulty level is stored\n\t\t} \n\t\telse {\n\t\t\tdifficultyLevel = getDifficulty(); //now: m.DIFFICULTY. perhaps it should be m.state ?\n\t\t}\n\t\tif (verbose);////System.out.println(\"-calculating reward for previous level segment with difficulty level: \" + difficultyLevel );\n\t\t//double probsAppro = getProbsAppropriateness_ObservationStr(observation_str, false);\n\t\tdouble probsAppro = classifyInstance(selectedInstance, false)[1]; \n\t\tif (verbose);////System.out.println(\"-difficulty of level segment was deemed appropriate with a probability of: \" + probsAppro );\n\n\t\t//Determine rewards according to Bernoulli scheme / proportional reward\n\t\tdouble reward = 0.0;\n\t\tif (doBernoulliRewards) {\n\t\t\tif (verbose);////System.out.println(\"-returning reward of 1 with probablity of \" + probsAppro + \", else reward of 0 (Bernoulli rewards)\");\n\t\t\tboolean returnBernoulliReward;\n\t\t\tif ( Math.random() <= probsAppro ) returnBernoulliReward = true;\n\t\t\telse returnBernoulliReward = false;\n\n\t\t\tif (verbose);////System.out.println(\"-boolean returnBernoulliReward: \" + returnBernoulliReward);\n\t\t\tif (returnBernoulliReward) reward = 1.0;\n\t\t\telse reward = 0.0; \n\t\t}\n\t\telse {\n\t\t\tif (verbose);////System.out.println(\"-returning reward \" + probsAppro + \" (regular non-Bernoulli rewards)\");\n\t\t\treward = probsAppro;\n\t\t}\n\n\t\tif (verbose);////System.out.println(\"-adding reward of \" + reward + \" to arraylist playerModelDiff\" + difficultyLevel);\n\t\tswitch (difficultyLevel) {\n\t\tcase 1: playerModelDiff1.add(reward); break;\n\t\tcase 4: playerModelDiff4.add(reward); break;\n\t\tcase 7: playerModelDiff7.add(reward); break;\n\t\tdefault:;////System.out.println(\"-ERROR! Cannot add reward to concerning playerModelDiff1,4,7 due to incorrect input of difficultyLevel\"); break;\n\t\t}\n\t\t//Note, updating the display of average rewards is performed by updatePlayerModel()\n\t\t//int index = getPlayerModelIndex(difficultyLevel);\n\t\t////System.out.println(\"-updating playerModel[\" + index + \"] with reward: \" + reward);\n\t\t//playerModel[index] += reward;\n\t\tif (verbose);////System.out.println(\"-done\");\n\n\t\t//OLD\n\t\t//Increase reward proportionally to appropriateness of current difficulty level to the specific player\n\t\t//As determed by probabilities in player model\n\t\t/*\n ;////System.out.println(\"\");\n ;////System.out.println(\"updateReward called()\");\n double reward = getPlayerModelElement(m.DIFFICULTY);\n ;////System.out.println(\"-increasing reward by: \" + reward);\n m.REWARD += reward;\n ;////System.out.println(\"-new reward is now: \" + m.REWARD);\n\t\t */\n\n\t\t//OLD OLD\n\t\t/*\n if (m.state == 1) { //SANDER UPDATE - NOT CORRECT AT THE MOMENT\n //Appropriate difficulty - Increase reward\n int rangeMin = 0;\n int rangeMax = 1;\n Random r = new Random();\n double randomValue = rangeMin + (rangeMax - rangeMin) * r.nextDouble();\n ;////System.out.println(\"Increasing reward by: \" + randomValue);\n m.REWARD += randomValue;\n ;////System.out.println(\"New cummulative reward: \" + m.REWARD);\n }\n else {\n //No appropriate difficulty - Do not increase reward for this level block\n m.REWARD += 0; \n }\n\t\t */\n\t}", "private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }", "public void adjustWeightsTest() {\n\t\tboolean[] tempCorrectArray = new boolean[numInstances()];\n\t\tfor (int i = 0; i < tempCorrectArray.length / 2; i++) {\n\t\t\ttempCorrectArray[i] = true;\n\t\t} // Of for i\n\n\t\tdouble tempWeightedError = 0.3;\n\n\t\tadjustWeights(tempCorrectArray, tempWeightedError);\n\n\t\tSystem.out.println(\"After adjusting\");\n\n\t\tSystem.out.println(toString());\n\t}", "@Test\n public void testGet_01() {\n System.out.println(\"get\");\n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n SkillsList instance = new SkillsList();\n instance.add(s);\n Skill result = instance.get(\"Java\");\n assertTrue(result.getName().equals(\"Java\"));\n }", "@Override\r\n\tpublic int compareTo(ListElements arg0) {\n\t\tint compareQuantity = ((ListElements) arg0).getScore(); \r\n\t\t \r\n\t\t//ascending order\r\n\t\treturn this.score - compareQuantity;\r\n\t}", "@Test\n public void updateTimeList(){\n userDAO.createUser(new User(\"dummy2\", \"dummy2\", 1));\n timeListDAO.createTimeList(new TimeList(\"dummy2\", 1990, 0, 60, 0, 0));\n\n assertTrue(timeListResource.updateTimeList(new TimeList(\"dummy2\", 1990, 0, 65, 1, 1)));\n\n //clean up\n timeListDAO.removeTimeList(1990, 0, \"dummy2\");\n userDAO.removeUser(\"dummy2\");\n }", "@Test\n \n public void testD_MenuDescriptionChanged() {\n\n\n Menu menu = (Menu) menuTable.getSelectionModel().getSelectedItem();\n String descriptionBefore = menu.getDescription();\n\n // Click on cell 4 and change Status\n Node cell = lookup(\"#clmnDescription\").nth(1).query();\n doubleClickOn(cell).write(\"Cambio\").type(KeyCode.ENTER);\n\n // Select row and get user.\n cell = lookup(\".table-row-cell\").nth(0).query();\n clickOn(cell);\n Menu menu2 = (Menu) menuTable.getSelectionModel().getSelectedItem();\n assertNotEquals(descriptionBefore, menu2.getDescription());\n\n }", "@Test\n void getCurrentRewardsFromUpgradeTest() {\n EnumMap<CardPoints,Integer> oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 3);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); //index/state = 0, cost stage 1\n assertEquals(oracle, this.wonder.getProp().get(this.wonder.getState()).y); //index/state = 0, cost stage 1\n\n wonder.setState(wonder.getState() + 1); // stage one is build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n //reward is an effect, so no cardpoints\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 1, cost stage 2\n\n wonder.setState(wonder.getState() + 1); // 2 stage build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 7);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 2, cost stage 3\n wonder.setState(wonder.getState() + 1); // Build the last stage\n\n //return an outIndexError when we call this method\n }", "@Test\n public void testUpdateInputsHistory() {\n model.updateInputsHistory(1);\n model.updateInputsHistory(2);\n model.updateInputsHistory(3);\n int[] expectedInputsHistory = {1, 2, 3, 0};\n int expectedInputsElements = 3;\n int[] resultedInputsHistory = model.getInputsHistory();\n int resultedInputsElements = model.getElementsInInputsHistory();\n\n Assert.assertArrayEquals(expectedInputsHistory, resultedInputsHistory);\n Assert.assertEquals(expectedInputsElements, resultedInputsElements);\n\n //inputsHistory array resizing with next updates\n model.updateInputsHistory(4);\n model.updateInputsHistory(5);\n int[] expectedResizedInputsHistory = {1, 2, 3, 4, 5};\n int expectedInputsElementsAfterResize = 5;\n int[] resultedResizedInputsHistory = model.getInputsHistory();\n int resultingInputsElementsAfterResize = model.getElementsInInputsHistory();\n\n Assert.assertArrayEquals(expectedResizedInputsHistory, resultedResizedInputsHistory);\n Assert.assertEquals(expectedInputsElementsAfterResize, resultingInputsElementsAfterResize);\n }" ]
[ "0.8788527", "0.86209846", "0.8034373", "0.63733983", "0.6373147", "0.63674253", "0.61411", "0.6108558", "0.57711506", "0.56604433", "0.5616799", "0.55882484", "0.55304575", "0.54103506", "0.5389736", "0.5388755", "0.5327845", "0.53204894", "0.5312184", "0.5288453", "0.51996326", "0.5161062", "0.5153055", "0.51033056", "0.5098048", "0.5098048", "0.50761455", "0.50740767", "0.505985", "0.5040865", "0.5018232", "0.5016198", "0.501565", "0.5010595", "0.5004078", "0.5002239", "0.49974942", "0.49870178", "0.49806207", "0.494648", "0.4938138", "0.49369943", "0.4936626", "0.49345398", "0.49225062", "0.4916397", "0.4912591", "0.4897785", "0.4886059", "0.48795646", "0.48587957", "0.48576558", "0.48516056", "0.48496285", "0.48341948", "0.48334074", "0.4832616", "0.48288873", "0.48231477", "0.48174012", "0.4796862", "0.47967994", "0.47947615", "0.47942063", "0.47939783", "0.47872066", "0.4786964", "0.47799802", "0.47793168", "0.47767973", "0.4771398", "0.4763523", "0.47610834", "0.47496527", "0.47378755", "0.47252795", "0.4722893", "0.47177517", "0.47163448", "0.47141987", "0.4710124", "0.4704519", "0.47031462", "0.46995598", "0.4698264", "0.46982458", "0.4696831", "0.46908328", "0.46871227", "0.46856293", "0.468311", "0.46793234", "0.46787304", "0.46644488", "0.46641284", "0.46626937", "0.46626726", "0.46616167", "0.46567488", "0.46562704" ]
0.8780996
1
Test_05 of updateMainSkillCompareToNewChange method, of class SkillsList.
@Test public void testUpdateMainSkillCompareToNewChange_05() { System.out.println("updateMainSkillCompareToNewChange"); Skill s1 = new Skill("Java", "Technical", 2, 3, Skill.PLUS_2); Skill s2 = new Skill("C", "Technical", 2, 5, Skill.PLUS_2); SkillsList instance = new SkillsList(); instance.add(s1); instance.add(s2); instance.upgradeSkill("Java"); instance.upgradeSkill("Java"); String result = instance.getMainSkill().getName(); assertTrue(result.equals("C")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateMainSkillCompareToNewChange_04() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n instance.upgradeSkill(\"Java\");\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_02() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n SkillsList instance = new SkillsList();\n Skill result = instance.getMainSkill();\n assertTrue(result==null);\n }", "@Test\n public void testUpdateMainSkillCompareToNewChange_03() {\n System.out.println(\"updateMainSkillCompareToNewChange\");\n //Skill s1 = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n //Skill s2 = new Skill(\"C\", \"Technical\", 2, 5, Skill.PLUS_2);\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(3);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getMainSkill().getName();\n assertTrue(result.equals(\"C\"));\n }", "@Test\n public void testUpgradeSkill_03() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(4);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"C\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==4);\n }", "@Test\n public void testUpgradeSkill_01() {\n System.out.println(\"upgradeSkill\");\n \n// Skill s = mock(Skill.class);\n// when(s.getName()).thenReturn(\"Java\");\n// when(s.getType()).thenReturn(\"Technical\");\n// when(s.getCost()).thenReturn(2);\n// when(s.getLevel()).thenReturn(4);\n// when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s = new Skill(\"Java\",\"Technical\",2,4,Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==5);\n }", "@Test\n public void testUpgradeSkill_04() {\n System.out.println(\"upgradeSkill\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n when(s.getType()).thenReturn(\"Technical\");\n when(s.getCost()).thenReturn(2);\n when(s.getLevel()).thenReturn(10);\n when(s.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.upgradeSkill(\"Java\");\n int result = instance.get(\"Java\").getLevel();\n assertTrue(result==10);\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "@Test\r\n\tvoid testUpdateSkillRecordShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\r\n\t}", "@Test\r\n\tvoid testUpdateSkillRecordShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint playerSru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standardLevel = 5;\r\n\t\tint spinLevel = 4;\r\n\t\tint popLevel = 3;\r\n\t\tString passingNotes = \"Passing\";\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint frontLevel= 4;\r\n\t\tint rearLevel = 4;\r\n\t\tint sideLevel = 3;\r\n\t\tint scrabbleLevel = 2;\r\n\t\tString tacklingNotes = \"Tackling\";\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint dropLevel= 4;\r\n\t\tint puntLevel = 5;\r\n\t\tint grubberLevel = 3;\r\n\t\tint goalLevel = 3;\r\n\t\tString kickingNotes = \"Kicking\";\r\n\t\r\n\t\tboolean successful = ctrl.createNewSkillRecord(playerSru, standardLevel, spinLevel, popLevel, passingNotes,\r\n\t\t\t\tfrontLevel, rearLevel, sideLevel, scrabbleLevel, tacklingNotes,\r\n\t\t\t\tdropLevel, puntLevel, grubberLevel, goalLevel, kickingNotes);\r\n\t\t\r\n\t\tassertTrue(successful);\t\r\n\t}", "@Test\r\n public void testUpdate() {\r\n TestingTypeList test = new TestingTypeList();\r\n test.addTestingType(\"TestType\", \"test\");\r\n TestingType testValue = test.getTestingTypeAt(0);\r\n test.update(testValue, testValue);\r\n TestingType notInList = new TestingType(\"NotInList\", \"notinlist\", \"notinlist\");\r\n test.update(notInList, notInList);\r\n assertEquals(1, test.size());\r\n }", "void updateSkill(Skill skill);", "void changeSkill(Long pokemonId, int newSkill);", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "private static void setTest( int modifyAt\n ) {\n System.out.println(\n \"changed element \" + modifyAt + \" from \"\n + list.set( modifyAt, modifyAt + 1000) + \" to \"\n + list.get( modifyAt)\n );\n }", "@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Override\n\tpublic void updateScoreAfterTest(Score score2) {\n\t\tscoreDao.updateScoreAfterTest(score2);\n\t}", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "public void testCompareTo() throws Exception {\r\n setUp();\r\n Student allison = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n Student alli = new Student(\"0\", \"Aaa\", \"DeSantis\");\r\n\r\n // same last name, returns 1\r\n assertEquals(allison.compareTo(alli), 1);\r\n\r\n // same last name, returns -1\r\n Student al = new Student(\"0\", \"z\", \"DeSantis\");\r\n assertEquals(allison.compareTo(al), -1);\r\n\r\n // same name\r\n Student allis = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n assertEquals(allison.compareTo(allis), 0);\r\n\r\n // same first name, returns 1\r\n Student last = new Student(\"0\", \"Allison\", \"c\");\r\n assertEquals(allison.compareTo(last), 1);\r\n\r\n // same first name, returns -1\r\n Student diff = new Student(\"0\", \"Allison\", \"Z\");\r\n assertEquals(allison.compareTo(diff), -1);\r\n\r\n\r\n Student c1 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n Student c2 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n\r\n assertEquals(c1.compareTo(c2), 0);\r\n\r\n assertEquals(c2.compareTo(c1), 0);\r\n\r\n Student c3 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n assertEquals(c1.compareTo(c3), 0);\r\n }", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }", "@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }", "@FXML\n private void increasePriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1) {\n storyPriority = getModel().getLowestPriorityStory();\n }\n else if (storyPriority == 1) {\n return;\n }\n else {\n storyPriority--;\n }\n try {\n getModel().modifyStory(story, storyPriority);\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI,\n //e.g Disabling buttons.\n ErrorReporter.get().reportError(e, \"Failed to modify the story priority\");\n }\n updateStoryTable();\n }\n }", "@Test\n public void testGetCost_02() {\n System.out.println(\"getCost\");\n Skill s = new Skill(\"Java\", \"Technical\", 2, 3, Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n int result = instance.getCost();\n assertTrue(result==6);\n }", "public int compare(Skill s1,Skill s2){\n\t\t\t\t\treturn s1.getNumber()-s2.getNumber();\r\n\t\t\t\t}", "public int compare(Skill s1,Skill s2){\n\t\t\t\t\treturn s1.getNumber()-s2.getNumber();\r\n\t\t\t\t}", "@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}", "public void testCmdUpdate_priority_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 4: Testing priority field (all ID are valid)(default priority is\n\t\t * normal)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 4a: priority is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 4b: priority is normal\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_NORM);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4c: priority is high\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_HIGH);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.HIGH);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t\t\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4d: priority is low\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_LOW);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.LOW);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}", "@Test\n public void TestEditTwo(){\n ArrayList<Task> listToEdit = new ArrayList<Task>();\n ArrayList<Integer> indexList = new ArrayList<Integer>();\n String message;\n \n indexList.add(0);\n listToEdit.add(new Task(\"New item 1\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n listToEdit.clear();\n indexList.add(1);\n listToEdit.add(new Task(\"New item 2\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"New item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n listToEdit.clear();\n indexList.add(2);\n listToEdit.add(new Task(\"New item 3\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"New item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n logicObject.showUpdatedItems();\n listToEdit.clear();\n indexList.add(1);\n listToEdit.add(new Task(\"item 2 changed again!\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"New item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"item 2 changed again!\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 3\", logicObject.listOfTasks.get(2).getName());\n }", "@Test\n public void testCurrentSugarLevelAndChangeSugarLevel() {\n System.out.println(\"changeSugarLevel\");\n\n Sugarman instance = new Sugarman();\n instance.getSugarlevel();\n instance.changeSugarLevel(20);\n\n int result = instance.getSugarlevel();\n int expResult = 70;\n assertEquals(result, expResult);\n\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tvoid testGetPlayerSkillsShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 1000;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "@Test\n public void testSort() {\n initialize();\n var realList = new HighScoreList();\n realList.setList(list);\n realList.sort();\n\n assertEquals(300, realList.getList().get(0).getScore());\n assertEquals(200, realList.getList().get(1).getScore());\n assertEquals(100, realList.getList().get(2).getScore());\n }", "static public void adjustRewardForSelect(ArrayList<RewardItem> rewardList) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (toChangeCard != null) {\n if (item.type == RewardItem.RewardType.CARD) {\n boolean isExist = false;\n for (AbstractCard card : item.cards) {\n if (card.cardID.equals(toChangeCard.cardID)) {\n isExist = true;\n if (card.canUpgrade()) {\n card.upgrade();\n }\n break;\n }\n }\n if (!isExist) {\n boolean isChanged = false;\n // check same rarity\n for (AbstractCard card : item.cards) {\n if (card.rarity == toChangeCard.rarity) {\n if (card.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.remove(card);\n item.cards.add(toChangeCard);\n isChanged = true;\n break;\n }\n }\n if (!isChanged) {\n AbstractCard removed = item.cards.remove(0);\n if (removed.upgraded) {\n toChangeCard.upgrade();\n }\n item.cards.add(toChangeCard);\n }\n }\n }\n }\n }\n\n if (selectRelic != null) {\n if (AbstractDungeon.player.hasRelic(selectRelic)) {\n selectRelic = null;\n } else {\n boolean isExist = false;\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n if (item.relic.relicId.equals(selectRelic)) {\n isExist = true;\n }\n }\n\n }\n if (!isExist) {\n for (int i = 0; i < rewardList.size(); i++) {\n RewardItem item = rewardList.get(i);\n if (item.type == RewardItem.RewardType.RELIC) {\n rewardList.set(i, new RewardItem(RelicLibrary.getRelic(selectRelic)));\n }\n }\n }\n }\n clearHasRelicInPool();\n }\n }", "@FXML\n private void decreasePriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1) {\n return;\n }\n else if (storyPriority + 1 >= getModel().getLowestPriorityStory()) {\n storyPriority = null;\n }\n else {\n storyPriority++;\n }\n try {\n if (storyPriority != null) {\n getModel().modifyStory(story, storyPriority);\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().modifyStory(story, null);\n } catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Failed to modify the priority of the story\");\n }\n });\n }\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Failed to modify the priority of the story\");\n }\n updateStoryTable();\n }\n }", "@Test\n public void testGetLowest_02() {\n System.out.println(\"getLowest\");;\n SkillsList instance = new SkillsList();\n Skill result = instance.getLowest();\n assertTrue(result==null);\n }", "@Override\r\n\tpublic void updateDriverRate(int score, String driverID) {\n\t\t\r\n\t}", "public void UpCheck_status1(MajorChange mc) ;", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "@Test\n /* testUpdateRecord\n * testing update exist record in Save.Json\n * */\n public void testUpdateRecord() {\n testAddRecord();\n\n score = 300;\n level = 3;\n name = \"test1\";\n\n saveReader.updateRecord(indexOfReturned, \"name\", name);\n assertEquals(\"True : name field updated successfully\", name, saveReader.LoadsList.get(indexOfReturned).name);\n\n saveReader.updateRecord(indexOfReturned, \"score\", score);\n assertEquals(\"True : score field updated successfully\", score, saveReader.LoadsList.get(indexOfReturned).score);\n\n saveReader.updateRecord(indexOfReturned, \"level\", level);\n assertEquals(\"True : level field updated successfully\", level, saveReader.LoadsList.get(indexOfReturned).level);\n }", "public static int attemptSkillUp(int skillId, Player player){ \n\t\ttry{\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == -1){return -2;}\n\t\t\tif(DwarfCraftPlayerSkills.getSkillLevel(skillId, player) == 30){return -2;}\n\t\t\tint[] skillCost;\n\t\t\tskillCost = new int[8];\n\t\t\tint newSkillLevel = DwarfCraftPlayerSkills.getSkillLevel(skillId, player);\n\t\t\t/* Dan thinks skillId could be removed from the arguments in this function\n\t\t\t getSkillTrainingCost */\n\t\t\tskillCost = Skills.values()[skillId].getSkillTrainingCost(skillId, newSkillLevel, player);\n\t\t\tfor (int i = 0; i < skillCost[0];i++){\n\t\t\t\t//check inventory quantity for needed items\n\t\t\t\tif (DwarfCraftInventory.countInventoryItems(skillCost[1+2*i], player) < skillCost[2+2*i]){return -1;}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t\t\tcatch(NumberFormatException f) {return 0;}\n\t}", "@Test\n void compareTo_MatchButModifying_NameAndAddress()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.no, AnswerType.no, ContactMatchType.MatchButModifying);\n }", "@Test\n void testUpdateGoaliePositionLimitsYmin() {\n goalie.setPosition(new Vector(goalie.getX(), 192f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the negative minimum direction\n goalie.setNext_direction(new Vector(0,-1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(-1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmin\" +\n \" Goalie moved past the Y-Min limit\");\n }\n }", "@Test\n\tpublic void test_update_last_commit_time_change(){\n\t\ttest2.updateLastCommitTime(current);\n\t\tassertEquals(\"Last Commit Time shoud be updated\", current, test2.getLastCommitTime());\n\t}", "@Test\n public void changeScoreTest() {\n //will be false as animal is not moving\n boolean expectedValue = animal.changeScore();\n Assert.assertEquals(expectedValue,false);\n }", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Test\r\n\tvoid testChangeItems() {\r\n\t\tToDoItem newItem = new ToDoItem(\"Item 1\", \"2/6/21\", 1, \"Body text 1\");\r\n\t\tString correctInfo = \"Name: Item 2\\nDue Date: 3/16/21\\nPriority: Medium\\nNotes: New notes\\nLate: Yes\\nItem Complete: Yes\";\r\n\t\tnewItem.setName(\"Item 2\");\r\n\t\tnewItem.setDueDate(\"3/16/21\");\r\n\t\tnewItem.setPriority(2);\r\n\t\tnewItem.setNotes(\"New notes\");\r\n\t\tnewItem.setIsLate(true);\r\n\t\tnewItem.setIsDone(true);\r\n\r\n\t\tif (!newItem.getAllInfo().equals(correctInfo)) {\r\n\t\t\tfail(\"Error changing ToDoItem values\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic void updateTestCase(TestCaseStatus testCaseStatus) {\n\t\t\n\t}", "protected void beforeUpdateSkillType(\n RetailscmUserContext userContext,\n SkillType existed,\n String retailStoreCountryCenterId,\n String skillTypeId,\n int skillTypeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "@Override\n public boolean acceptMove(int baselineObjectiveValue, int newObjectiveValue) {\n if (newObjectiveValue > baselineObjectiveValue) {\n return true;\n }\n else {\n return false;\n }\n }", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "private static void checkForUpgrades(@Nullable List<UpdatablePackage> completedChanges) {\n if (completedChanges == null) {\n return;\n }\n int highestNewApiLevel = 0;\n for (UpdatablePackage updated : completedChanges) {\n TypeDetails details = updated.getRepresentative().getTypeDetails();\n if (details instanceof DetailsTypes.PlatformDetailsType) {\n int api = ((DetailsTypes.PlatformDetailsType)details).getApiLevel();\n if (api > highestNewApiLevel) {\n highestNewApiLevel = api;\n }\n }\n }\n if (highestNewApiLevel > 0) {\n // TODO: Fix this code after we delete WizardConstants\n PropertiesComponent.getInstance().setValue(WizardConstants.NEWLY_INSTALLED_API_KEY.name, highestNewApiLevel, -1);\n }\n }", "@Test\n public void TestEditOne(){\n ArrayList<Task> listToEdit = new ArrayList<Task>();\n ArrayList<Integer> indexList = new ArrayList<Integer>();\n String message;\n \n indexList.add(3);\n listToEdit.add(new Task(\"New item 99\"));\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"Item 3\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(2);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Item(s) successfully edited.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(-1);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n \n indexList.clear();\n indexList.add(-2);\n message = logicObject.editItem(listToEdit, indexList, true, true);\n assertEquals(\"Error: There is no item at this index.\", message);\n assertEquals(\"Item 1\", logicObject.listOfTasks.get(0).getName());\n assertEquals(\"Item 2\", logicObject.listOfTasks.get(1).getName());\n assertEquals(\"New item 99\", logicObject.listOfTasks.get(2).getName());\n }", "@Test\n void ScoreBoardIntoList() {\n //Should be\n List<StatisticsGetDTO> intended = new ArrayList<StatisticsGetDTO>();\n StatisticsGetDTO statisticsGetDTO = new StatisticsGetDTO();\n statisticsGetDTO.setScore(100);\n statisticsGetDTO.setPlayerName(\"A\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(1);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(200);\n statisticsGetDTO.setPlayerName(\"B\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(2);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(300);\n statisticsGetDTO.setPlayerName(\"C\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(3);\n intended.add(statisticsGetDTO);\n statisticsGetDTO.setScore(400);\n statisticsGetDTO.setPlayerName(\"D\");\n statisticsGetDTO.setNumberOfCorrectlyGuessedMysteryWords(4);\n intended.add(statisticsGetDTO);\n\n List<StatisticsGetDTO> actualList = scoreboard.transformIntoList();\n List<Integer> scoresActualList = new ArrayList<Integer>();\n List<String> namesActualList = new ArrayList<String>();\n List<Integer> mysteryActualList = new ArrayList<Integer>();\n for (StatisticsGetDTO element : actualList){\n scoresActualList.add(element.getScore());\n namesActualList.add(element.getPlayerName());\n mysteryActualList.add(element.getNumberOfCorrectlyGuessedMysteryWords());\n }\n\n assertTrue(scoresActualList.contains(intended.get(0).getScore()));\n assertTrue(scoresActualList.contains(intended.get(1).getScore()));\n assertTrue(scoresActualList.contains(intended.get(2).getScore()));\n assertTrue(scoresActualList.contains(intended.get(3).getScore()));\n assertTrue(namesActualList.contains(intended.get(0).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(1).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(2).getPlayerName()));\n assertTrue(namesActualList.contains(intended.get(3).getPlayerName()));\n assertTrue(mysteryActualList.contains(intended.get(0).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(1).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(2).getNumberOfCorrectlyGuessedMysteryWords()));\n assertTrue(mysteryActualList.contains(intended.get(3).getNumberOfCorrectlyGuessedMysteryWords()));\n }", "Test update(TestData testData, Test test);", "@Test\n public void testChangeAge() {\n System.out.println(\"Animal.changeAge\");\n animal1.changeAge(2);\n animal2.changeAge(-1);\n assertEquals(19, animal1.getAge());\n assertEquals(2, animal2.getAge());\n }", "@Test\n void testForLargestCardInTrickComparingRank() {\n Dealer testDealer = new Dealer();\n\n Suit suit1 = Suit.DIAMONDS;\n Suit suit2 = Suit.SPADES;\n Suit suit3 = Suit.DIAMONDS;\n Suit suit4 = Suit.DIAMONDS;\n \n Rank rank1 = Rank.TWO;\n Rank rank2 = Rank.KING;\n Rank rank3 = Rank.ACE;\n Rank rank4 = Rank.FIVE;\n\n Card card1 = new Card(suit1,rank1,false);\n Card card2 = new Card(suit2,rank2,false);\n Card card3 = new Card(suit3,rank3,false);\n Card card4 = new Card(suit4,rank4,false);\n\n \n testDealer.addToPlayedCards(card1);\n testDealer.addToPlayedCards(card2);\n testDealer.addToPlayedCards(card3);\n testDealer.addToPlayedCards(card4);\n\n assertEquals(card3 , testDealer.getLargestCardFromTrick());\n }", "@FXML\n private void jumpPriority(final ActionEvent event) {\n Story story = storyTable.getSelectionModel().getSelectedItem();\n if (story != null) {\n Integer storyPriority = getModel().getStoryPriority(story);\n if (storyPriority == -1 || storyPriority != 0) {\n try {\n getModel().modifyStory(story, 1);\n }\n catch (CustomException e) {\n //Should not ever happen, this should be handled by the GUI\n ErrorReporter.get().reportError(e, \"Cannot increase priority\");\n }\n updateStoryTable();\n }\n }\n }", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "private void checkForTyreChange(int lapNo, char[] allTyreTypes)\n {\n RNG generator = new RNG(1,11);\n Validation validator = new Validation();\n for(int i = 0; i < getDrivers().getSize(); i++)\n {\n int timeAffected = 0;\n if(getDrivers().getDriver(i).getEligibleToRace()) // if driver is eligible to race\n {\n int randomNo = generator.generateRandomNo(); // generates random number between 1 and 11(exclusive)\n if(validator.isNumberBetween(1, 5, randomNo)) // 50% chance to change tyre type\n {\n allTyreTypes[i] = 'W';\n timeAffected = 10;\n System.out.println(getDrivers().getDriver(i).getName() + \" has chosen to change tyres from Dry-weather to Wet-weather, which increases lap \" + lapNo + \n \" time by \" + timeAffected + \" secs\");\n getDrivers().getDriver(i).setAccumulatedTime(getDrivers().getDriver(i).getAccumulatedTime() + timeAffected); // update time affected\n }\n }\n }\n }", "@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}", "@Test\n\tpublic void testLLSort() {\n\t\tLinkedList playerList = new LinkedList();\n\t\tPlayer tempInsert5 = new Player();\n\t\ttempInsert5.setName(\"test5\");\n\t\ttempInsert5.setPoints(5);\n\t\ttempInsert5.setWins(4);\n\t\ttempInsert5.setLosses(3);\n\t\tplayerList.LLInsert(tempInsert5);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tPlayer tempInsert2 = new Player();\n\t\ttempInsert2.setName(\"test2\");\n\t\ttempInsert2.setPoints(2);\n\t\ttempInsert2.setWins(1);\n\t\ttempInsert2.setLosses(0);\n\t\tplayerList.LLInsert(tempInsert2);\n\t\t\n\t\tPlayer tempInsert3 = new Player();\n\t\ttempInsert3.setName(\"test3\");\n\t\ttempInsert3.setPoints(3);\n\t\ttempInsert3.setWins(2);\n\t\ttempInsert3.setLosses(1);\n\t\tplayerList.LLInsert(tempInsert3);\n\t\t\n\t\tPlayer tempInsert1 = new Player();\n\t\ttempInsert1.setName(\"test1\");\n\t\ttempInsert1.setPoints(1);\n\t\ttempInsert1.setWins(0);\n\t\ttempInsert1.setLosses(0);\n\t\tplayerList.LLInsert(tempInsert1);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tPlayer tempInsert4 = new Player();\n\t\ttempInsert4.setName(\"test4\");\n\t\ttempInsert4.setPoints(4);\n\t\ttempInsert4.setWins(3);\n\t\ttempInsert4.setLosses(2);\n\t\tplayerList.LLInsert(tempInsert4);\n\t\tplayerList.LLPrint();\n\t\t\n\t\tplayerList.LLSort();\n\t\tassertEquals(playerList.LLPrint(), \n\t\t\t\t\"test5: Points: 5, Wins/Losses: 4/3\\n\"\n\t\t\t\t\t\t+ \"test4: Points: 4, Wins/Losses: 3/2\\n\"\n\t\t\t\t\t\t+ \"test3: Points: 3, Wins/Losses: 2/1\\n\"\n\t\t\t\t\t\t+ \"test2: Points: 2, Wins/Losses: 1/0\\n\"\n\t\t\t\t\t\t+ \"test1: Points: 1, Wins/Losses: 0/0\\n\");\n\t}", "private void updateSingles(Hierarchy con, ViolatedCandidate lCandidate, ViolatedCandidate tCandidate,\n double delta) {\n Multiset<Constraint> targetPreferringView = UpdateUtils.getViolatedByLearner(lCandidate, tCandidate);\n Multiset<Constraint> learnerPreferringView = UpdateUtils.getViolatedByTarget(lCandidate, tCandidate);\n Multiset<Constraint> learnerPreferringHigh = HashMultiset.create(learnerPreferringView.size());\n double promoteWeightedDelta = delta / targetPreferringView.size();\n double maxTPreferringRanking = Double.MIN_VALUE;\n for (Constraint constraint : targetPreferringView.elementSet()) {\n maxTPreferringRanking = Math.max(maxTPreferringRanking, con.getRanking(constraint));\n double multipliedDelta = (targetPreferringView.count(constraint) * promoteWeightedDelta);\n con.changeConstraintRanking(constraint, multipliedDelta);\n }\n\n for (Constraint constraint : learnerPreferringView.elementSet()) {\n double thisRanking = con.getRanking(constraint);\n if (thisRanking > maxTPreferringRanking) {\n int count = learnerPreferringView.count(constraint);\n learnerPreferringHigh.add(constraint, count);\n }\n }\n // If 'higher' set is empty, just add argMax to it\n if (learnerPreferringHigh.isEmpty()) {\n Constraint argMax = UpdateUtils.getMax(learnerPreferringView, con);\n learnerPreferringHigh.add(argMax);\n }\n\n Multiset<Constraint> toIterateOver = learnerPreferringHigh;\n\n double demoteWeightedDelta = -(delta / toIterateOver.size());\n for (Constraint constraint : toIterateOver.elementSet()) {\n double multipliedDelta = toIterateOver.count(constraint) * demoteWeightedDelta;\n con.changeConstraintRanking(constraint, multipliedDelta);\n // System.out.println(\"↓ Updating \" + constraint +\" by \" +\n // multipliedDelta);\n }\n }", "@Test\n public void testAdd_02() {\n System.out.println(\"add\");\n \n Skill s = mock(Skill.class);\n when(s.getName()).thenReturn(\"Java\");\n \n SkillsList instance = new SkillsList();\n instance.add(s);\n instance.add(s);\n int result = instance.size();\n assertTrue(result==1);\n }", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "@Test\r\n\tpublic void getAllGradesWithChangeOfTestOfTeacherValueAndAdjustementTest()\r\n\t\t\tthrows ClassNotFoundException, SonarqubeDataBaseException, SQLException, IOException {\r\n\t\tmapQuality.put(\"TestOfTeacher\", new ModelValue(90f));\r\n\t\tmapQuality.put(\"Comments\", new ModelValue(25f, 10f));\r\n\t\tlistAllGrades.put(\"FinalGrade\", new Float(5.5));\r\n\t\tAssert.assertEquals(UtilCalculGrade.getAllGrades(mapQuality, listScoreMetricStudent, listScoreMetricTeacher,\r\n\t\t\t\tmapConf, mapIssues, projectName, idModule).get(\"FinalGrade\"), listAllGrades.get(\"FinalGrade\"));\r\n\t}", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "@Test\n void testGetSortedList(){\n ToDoList todoList = new ToDoList();\n ToDo todo1 = new ToDo(\"Todo1\");\n todo1.setInhalt(\"Dies ist ein Test\");\n\n todoList.add(new ToDo((\"Todo2\")));\n ToDo todo3 = new ToDo(\"Todo3\");\n todo3.setInhalt(\"3+3=6\");\n todo3.setStatus(Status.IN_ARBEIT);\n todoList.add(new ToDo((\"Todo4\")));\n todoList.add(todo3);\n ToDo todo4 = new ToDo(\"Trala\");\n todo4.setStatus(Status.IN_ARBEIT);\n todo4.setStatus(Status.BEENDET);\n todo4.setInhalt(\"ab\");\n ToDo todo5 = new ToDo(\"Trala\");\n todo5.setInhalt(\"aa\");\n todo5.setStatus(Status.IN_ARBEIT);\n todo5.setStatus(Status.BEENDET);\n todoList.add(todo5);\n todoList.add(todo4);\n todoList.add(todo1);\n\n todoList = todoList.getSortedList();\n\n assertEquals(Status.OFFEN, todoList.get(0).getStatus());\n assertEquals(Status.OFFEN, todoList.get(1).getStatus());\n assertEquals(Status.OFFEN, todoList.get(2).getStatus());\n assertEquals(Status.IN_ARBEIT, todoList.get(3).getStatus());\n assertEquals(Status.BEENDET, todoList.get(4).getStatus());\n assertEquals(Status.BEENDET, todoList.get(5).getStatus());\n\n assertEquals(\"Trala\", todoList.get(5).getBez());\n assertEquals(\"Todo3\", todoList.get(3).getBez());\n\n assertEquals(\"aa\", todoList.get(4).getInhalt());\n assertEquals(\"ab\", todoList.get(5).getInhalt());\n }", "@Test\n void testUpdateGoaliePositionLimitsYmax() {\n goalie.setPosition(new Vector(goalie.getX(), 512f));\n\n // save the goalie position\n Vector prev_goalie_position = goalie.getPosition();\n\n // Set a moving direction for goalie in the positive direction\n goalie.setNext_direction(new Vector(0,1));\n\n // Generate a translation\n goalie.GenerateNextTranslation();\n\n // Apply translation\n goalie.UpdateGoaliePosition();\n\n // Check if new position is in the yMin position still\n // Check previous and new position are the same\n Vector new_goalie_position = goalie.getPosition();\n if (( prev_goalie_position.getY() - new_goalie_position.getY()) == 0)\n assertEquals(1,1);\n else {\n assertEquals(1, 0, \"\\nFailed testUpdateGoaliePositionMovedLimitsYmax\" +\n \" Goalie moved past the Y-Max limit\");\n }\n\n }", "void changeCost(ArrayList<CostsChanges> changes);", "@Test\r\n public void testUpdate() {\r\n }", "private static void testupdate() {\n\t\ttry {\n\t\t\tRoleModel model = new RoleModel();\n\t\t\tRoleBean bean = new RoleBean();\n\t\t\tbean = model.findByPK(7L);\n\t\t\tbean.setName(\"Finance\");\n\t\t\tbean.setDescription(\"Finance Dept\");\n\t\t\tbean.setCreatedBy(\"CCD MYSORE\");\n\t\t\tbean.setModifiedBy(\"CCD MYSORE\");\n\t\t\tbean.setCreatedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tbean.setModifiedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tmodel.update(bean);\n\t\t\tRoleBean updateBean = model.findByPK(1);\n\t\t\tif (\"12\".equals(updateBean.getName())) {\n\t\t\t\tSystem.out.println(\"UPDATE RECORD FAILED\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"RECORD UPDATED SUCCESSFULLY\");\n\t\t\t}\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DuplicateRecordException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n public final void testSmallerThanMax() {\n for (ArrayList<TradeGood> planetsGoods : goods) {\n for (TradeGood good : planetsGoods) {\n assertTrue(good.getPrice() < good.type.mhl);\n }\n }\n }", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "@Test\r\n\tvoid testAddToDoItem() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\t// case 1: insert one ToDoItem\r\n\t\tlist.insert(toDoItem4);\r\n\t\tif (!list.getHead().getName().equals(\"Item 4\")) { // check the head is set correctly\r\n\t\t\tfail(\"Head set incorrectly for: \" + toDoItem4.getName() + \", should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\tif (list.getSize() != 1) { // check that size is incremented\r\n\t\t\tfail(\"List size is incorrect: should be 1\");\r\n\t\t}\r\n\r\n\t\t// case 2: second item is insert\r\n\t\tlist.insert(toDoItem1);\r\n\t\tif (list.getSize() != 2) { // check size incremented correctly\r\n\t\t\tfail(\"Size incorrect: should be 2\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 1\")) { // check the item is in the list\r\n\t\t\tfail(\"Item 1 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check the position of Item 1\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\t// check that the current pointer is in the right location\r\n\t\tif (!list.getCurrent().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Current set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\t\t// check that tail is set correctly\r\n\t\tif (!list.getTail().getName().equals(\"Item 4\")) {\r\n\t\t\tfail(\"Tail set incorrectly: should be \\\"Item 4\\\"\");\r\n\t\t}\r\n\r\n\t\t// case 3: third item is inserted\r\n\t\tlist.insert(toDoItem5);\r\n\t\tif (list.getSize() != 3) {\r\n\t\t\tfail(\"Size incorrect: should be 3\");\r\n\t\t}\r\n\t\tif (!list.contains(\"Item 5\")) {\r\n\t\t\tfail(\"Item 5 is not in the list\");\r\n\t\t}\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (!list.getTail().getName().equals(\"Item 5\")) { // check for correct position\r\n\t\t\tfail(\"Head set incorrectly: should be \\\"Item 5\\\"\");\r\n\t\t}\r\n\r\n\t\t// insert several more and test to make sure they are ordered correctly\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem6);\r\n\t\tlist.insert(toDoItem3);\r\n\r\n\t\tToDoItem tempHead = list.getHead();\r\n\t\tString currList = \"|\";\r\n\t\tString correctList = \"|Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|\";\r\n\r\n\t\twhile (tempHead != null) {\r\n\t\t\tcurrList += tempHead.getName() + \"|\";\r\n\t\t\ttempHead = tempHead.getNext();\r\n\t\t}\r\n\r\n\t\tif (!currList.equals(correctList)) {\r\n\t\t\tfail(\"The list was ordered incorrectly after inserting all items\");\r\n\t\t}\r\n\t}", "private void updateRacePoints(char[] allTyreTypes)\n {\n getDrivers().adjustDriversListByTime(allTyreTypes);\n for(int i = 0 ; i < getDrivers().getSize() ; i++)\n {\n int scoringPoints = 0;\n if(i == 0 && getDrivers().getDriver(i).getEligibleToRace()) // if first and eligible\n {\n scoringPoints = 8;\n }\n else if(i == 1 && getDrivers().getDriver(i).getEligibleToRace()) // if second and eligible\n {\n scoringPoints = 5;\n }\n else if(i == 2 && getDrivers().getDriver(i).getEligibleToRace()) // if third and eligible\n {\n scoringPoints = 3;\n }\n else if(i == 3 && getDrivers().getDriver(i).getEligibleToRace()) // if fourth and eligible\n {\n scoringPoints = 1;\n }\n getDrivers().getDriver(i).setAccumulatedScore(getDrivers().getDriver(i).getAccumulatedScore() + scoringPoints);\n }\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "@Test\n\tpublic void testChangeMultiAttributeOrderDoesMatterLDAP96()\n\t\t\tthrows Exception {\n\t\tfinal Attributes fixtureAttrs = new BasicAttributes();\n\t\tAttribute multi = new BasicAttribute(\"title\");\n\t\tmulti.add(\"Juergen\");\n\t\tmulti.add(\"George\");\n\t\tfixtureAttrs.put(multi);\n\t\tclass TestableDirContextAdapter extends DirContextAdapter {\n\t\t\tpublic TestableDirContextAdapter() {\n\t\t\t\tsuper(fixtureAttrs, null);\n\t\t\t\tsetUpdateMode(true);\n\t\t\t}\n\t\t}\n\t\ttested = new TestableDirContextAdapter();\n\t\tassertTrue(tested.isUpdateMode());\n\t\ttested.setAttributeValues(\"title\", new String[] { \"Jim\", \"George\",\n\t\t\t\t\"Juergen\" }, true);\n\n\t\t// change\n\t\tModificationItem[] mods = tested.getModificationItems();\n\t\tassertEquals(1, mods.length);\n\t\tassertEquals(DirContext.REPLACE_ATTRIBUTE, mods[0].getModificationOp());\n\t\tAttribute attr = mods[0].getAttribute();\n\t\tassertEquals(\"Jim\", attr.get(0));\n\t\tassertEquals(\"George\", attr.get(1));\n\t\tassertEquals(\"Juergen\", attr.get(2));\n\t}", "int updateByPrimaryKeySelective(WizardValuationHistoryEntity record);", "@Test\n public void testProjectRolesChanges() {\n coiPerson.setContactRole(ContactRoleFixtureFactory.MOCK_KEY_PERSON);\n Assert.assertFalse(\"Key Person Role not checked for\", rule.checkForKeyPersonProjectRoles(award.getProjectPersons()));\n coiPerson.setKeyPersonRole(\"fromCOI\");\n Assert.assertTrue(\"Key Person Role not checked for\", rule.checkForKeyPersonProjectRoles(award.getProjectPersons()));\n \n // when a key person is changed to coi\n kpPerson.setContactRole(ContactRoleFixtureFactory.MOCK_COI);\n Assert.assertTrue(\"rule should return true\", rule.processSaveAwardProjectPersonsBusinessRules(award.getProjectPersons()));\n }", "@Test\n public void testEditProduct() throws Exception {\n System.out.println(\"editProduct\");\n Product p;\n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n p = prs.get(0);\n String nameNew = \"newName\", nameOld = p.getName();\n p.setName(nameNew);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.isEmpty());\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.contains(p));\n assertTrue(prs.size() == 1);\n p.setName(nameOld);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.isEmpty());\n }", "@Test\n\tpublic void testModifyQuestion() {\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\n\t\tquestion.setQuestionText(\"Testing update\");\n\n\t\t// Test with invalid permissions\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.assertNotNull(e);\n\t\t} \n\n\t\t// Test with valid permission\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tQnaQuestion changedQuestion = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\t\t\tAssert.assertEquals(changedQuestion.getQuestionText(), \"Testing update\");\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\t}", "private boolean testChanges(boolean testRepository) {\r\n\t\t\r\n\t\tif (testRepository) {\r\n\t\t\t\r\n\t\t\tString status = \"Status: [ACTION - Testing Repository Changes]...\";\r\n\t\t\t\r\n\t\t\t// test changes in repository for clashes etc.\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = true;\r\n\t\t\tint failCount = 0;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// do an update first to make sure rep-side changes are all there\r\n\t\t\t\tboolean updateSuccess = this.updateRepChanges(false);\r\n\t\t\t\t\r\n\t\t\t\tif (!updateSuccess) {\r\n\t\t\t\t\tstatusBar.setText(status+\"Update FAILED\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// load baseOntology using URI\r\n\t\t\t\tstatusBar.setText(status+\"Loading Base Ontology\");\r\n\t\t\t\tOWLOntology baseOntology = swoopModel.loadOntology(baseOntologyURI);\r\n\t\t\t\tif (baseOntology == null) {\r\n\t\t\t\t\t// there is no base ontology, changes start from scratch\r\n\t\t\t\t\t// create new ontology using OWLBuilder\r\n\t\t\t\t\tOWLBuilder builder = new OWLBuilder();\r\n\t\t\t\t\tbuilder.createOntology(baseOntologyURI, baseOntologyURI);\r\n\t\t\t\t\tbaseOntology = builder.getOntology();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// get all repository side changes: under repRoot\r\n\t\t\t\tList allRepChanges = this.getDescendantChanges(repRoot);\r\n\t\t\t\tstatusBar.setText(status+\"Testing \"+allRepChanges.size()+\" repository-side changes\");\r\n\t\t\t\t\r\n\t\t\t\t// apply allRepChanges to baseOntology\r\n\t\t\t\tfor (int i=0; i<allRepChanges.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) allRepChanges.get(i);\r\n\t\t\t\t\tOntologyChange oc = swc.getChange();\r\n\t\t\t\t\t//*** need to align changes with ontology! ***/\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tOntologyChange alignOC = (OntologyChange) controlHandler.swoopHandler.changeLog.getChangeInformation(oc, ChangeLog.CHANGE_ALIGN, null, new ArrayList(), baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// save state of baseOntology and see if it changes\r\n\t\t\t\t\t\t// use Abstract Syntax since its more concise than rdf/xml?\r\n\t\t\t\t\t\tString before = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// APPLY CHANGE\r\n\t\t\t\t\t\tboolean check = true;\r\n\t\t\t\t\t\tif (alignOC instanceof BooleanElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyBooleanElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse if (alignOC instanceof EnumElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyEnumElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t\telse alignOC.accept((ChangeVisitor) baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// need to see if any change in the ontology occured\r\n\t\t\t\t\t\tString after = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (before.equals(after) || !check) {\r\n\t\t\t\t\t\t\t// nothing has changed!\r\n\t\t\t\t\t\t\tSystem.out.println(\"Found redundant change: \"+oc);\r\n\t\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse swc.isRedundant = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Change Error for: \"+oc);\r\n\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\ttestSuccess = false;\r\n\t\t\t}\r\n\t\t\tif (testSuccess) statusBar.setText(status+\"Test PASSED\");\r\n\t\t\telse {\r\n\t\t\t\tstatusBar.setText(status+\"Test FAILED\");\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Change Test FAILED: \"+failCount+\" change(s) is/are redundant or cause clashes. Please Fix/Remove them and try again.\");\r\n\t\t\t}\r\n\t\t\t// refresh repTreeTable\r\n\t\t\tthis.refreshRepTreeTable(false);\r\n\t\t\treturn testSuccess;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// test changes in Swoop Ontology for clashes etc.\r\n\t\t\tString status = \"Status: [ACTION - Testing LOCAL Ontology Changes]...\";\r\n\t\t\t\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tboolean testSuccess = true;\r\n\t\t\tint failCount = 0;\r\n\t\t\t\r\n\t\t\t// get base ontology\r\n\t\t\tstatusBar.setText(status+\"Loading Base Ontology\");\r\n\t\t\tOWLOntology baseOntology = null;\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\t// get existing ontology from swoopModel\r\n\t\t\t\tbaseOntology = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\t// but clone it to prevent applying changes on *it*\r\n\t\t\t\tbaseOntology = this.cloneOntology(baseOntology);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tURI ontURI = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// load ontology with URI\r\n\t\t\t\t\tontURI = new URI(swoopOntFld.getText());\r\n\t\t\t\t\tbaseOntology = swoopModel.loadOntology(ontURI);\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t// create new ontology\r\n\t\t\t\t\tOWLBuilder builder = new OWLBuilder();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbuilder.createOntology(ontURI, ontURI);\r\n\t\t\t\t\t} catch (OWLException e) {\r\n\t\t\t\t\t\te.printStackTrace();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbaseOntology = builder.getOntology();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (baseOntology == null) {\r\n\t\t\t\tstatusBar.setText(status+\"Unable to load base ontology\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfor (int i=0; i<ontChanges.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) ontChanges.get(i);\r\n\t\t\t\t\tOntologyChange oc = swc.getChange();\r\n\t\t\t\t\t//*** need to align changes with ontology! ***/\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tOntologyChange alignOC = (OntologyChange) controlHandler.swoopHandler.changeLog.getChangeInformation(oc, ChangeLog.CHANGE_ALIGN, null, new ArrayList(), baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// save state of baseOntology and see if it changes\r\n\t\t\t\t\t\t// use Abstract Syntax since its more concise than rdf/xml?\r\n\t\t\t\t\t\tString before = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// APPLY CHANGE\r\n\t\t\t\t\t\tboolean check = true;\r\n\t\t\t\t\t\tif (alignOC instanceof BooleanElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyBooleanElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse if (alignOC instanceof EnumElementChange) { \r\n\t\t \t\t\t\tcheck = swoopModel.applyEnumElementChange(alignOC);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t\telse alignOC.accept((ChangeVisitor) baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// need to see if any change in the ontology occured\r\n\t\t\t\t\t\tString after = controlHandler.swoopHandler.changeLog.getOntSnapshot(baseOntology);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (before.equals(after) || !check) {\r\n\t\t\t\t\t\t\t// nothing has changed!\r\n\t\t\t\t\t\t\tSystem.out.println(\"Found redundant change: \"+oc);\r\n\t\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse swc.isRedundant = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex) {\r\n\t\t\t\t\t\tswc.isRedundant = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Change Error for: \"+oc);\r\n\t\t\t\t\t\ttestSuccess = false;\r\n\t\t\t\t\t\tfailCount++;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\ttestSuccess = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (testSuccess) statusBar.setText(status+\"Test PASSED\");\r\n\t\t\telse {\r\n\t\t\t\tstatusBar.setText(status+\"Test FAILED\");\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Change Test FAILED: \"+failCount+\" change(s) is/are redundant or cause clashes. Please Fix/Remove them and try again.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// refresh ontTreeTable\r\n\t\t\tthis.refreshOntTreeTable();\r\n\t\t\treturn testSuccess;\t\r\n\t\t}\r\n\t\t\r\n\t}", "private void changeAndVerifyAllRTQOptions(EditPlanDirectToManaged editPlanPage) throws Exception{\n Reporter.log(\"Adjusting RTQ and retirement age to check for all Investment Objective Combinations.\",\n true);\n changeAndVerifyRTQ(editPlanPage, Constants.RiskTolerance.MODERATE);\n changeAndVerifyRTQ(editPlanPage, Constants.RiskTolerance.AGGRESSIVE);\n }", "public void adjustWeightsTest() {\n\t\tboolean[] tempCorrectArray = new boolean[numInstances()];\n\t\tfor (int i = 0; i < tempCorrectArray.length / 2; i++) {\n\t\t\ttempCorrectArray[i] = true;\n\t\t} // Of for i\n\n\t\tdouble tempWeightedError = 0.3;\n\n\t\tadjustWeights(tempCorrectArray, tempWeightedError);\n\n\t\tSystem.out.println(\"After adjusting\");\n\n\t\tSystem.out.println(toString());\n\t}", "@Test\n public void adding_item_to_menu_should_increase_menu_size_by_1_Failure_Scenario(){\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.addToMenu(\"Sizzling brownie\",319);\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n System.out.println(\"Will decrease Instead of adding\");\n }", "public void editStudentList(int stuNumber){\n for(int i = 0; i<studList.size();i++){\n if(stuNumber == studList.get(i).getStuNumber()){\n \n System.out.println(\"Student Name: \" + studList.get(i).getFullName() + \", Student Number: \" + \n studList.get(i).getStuNumber() + \", Student GPA: \" + studList.get(i).getGPA());\n\n Scanner input = new Scanner(System.in);\n String newName = \"\";\n double newGPA;\n\n System.out.print(\"Student name: \");\n newName = input.nextLine();\n\n System.out.print(\"Student GPA: \");\n newGPA = input.nextDouble();\n\n Student temp = new Student(newName, studList.get(i).getStuNumber(), newGPA);\n studList.set(i, temp);\n }\n }\n }", "@Test\n \n public void testD_MenuDescriptionChanged() {\n\n\n Menu menu = (Menu) menuTable.getSelectionModel().getSelectedItem();\n String descriptionBefore = menu.getDescription();\n\n // Click on cell 4 and change Status\n Node cell = lookup(\"#clmnDescription\").nth(1).query();\n doubleClickOn(cell).write(\"Cambio\").type(KeyCode.ENTER);\n\n // Select row and get user.\n cell = lookup(\".table-row-cell\").nth(0).query();\n clickOn(cell);\n Menu menu2 = (Menu) menuTable.getSelectionModel().getSelectedItem();\n assertNotEquals(descriptionBefore, menu2.getDescription());\n\n }", "@Test\n void getCurrentRewardsFromUpgradeTest() {\n EnumMap<CardPoints,Integer> oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 3);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); //index/state = 0, cost stage 1\n assertEquals(oracle, this.wonder.getProp().get(this.wonder.getState()).y); //index/state = 0, cost stage 1\n\n wonder.setState(wonder.getState() + 1); // stage one is build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n //reward is an effect, so no cardpoints\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 1, cost stage 2\n\n wonder.setState(wonder.getState() + 1); // 2 stage build\n oracle = new EnumMap<CardPoints, Integer>(CardPoints.class);\n oracle.put(CardPoints.VICTORY, 7);\n assertEquals(oracle, this.wonder.getCurrentRewardsFromUpgrade()); // index/state = 2, cost stage 3\n wonder.setState(wonder.getState() + 1); // Build the last stage\n\n //return an outIndexError when we call this method\n }", "@Test\n public void testSubList_SubList_Item_Update() {\n SegmentedOasisList<StringBuilder> instance = new SegmentedOasisList<>();\n\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"7\"));\n instance.add(new StringBuilder(\"7\"));\n instance.add(new StringBuilder(\"1\"));\n instance.add(new StringBuilder(\"1\"));\n\n List<StringBuilder> expResult = Arrays.asList(new StringBuilder(\"17\"), new StringBuilder(\"7\"),\n new StringBuilder(\"7\"));\n List<StringBuilder> result = instance.subList(1, 4);\n\n instance.get(1).append(\"7\");\n assertTrue(isEqual(expResult, result));\n }", "public abstract void increasedPriority(int elementId, float oldRank, float newRank);", "@Test\n void testUpdateGoalie() {\n\n }", "@Test\n public void aminoCompareTest1(){\n //these list are already sorted\n AminoAcidLL first = AminoAcidLL.createFromRNASequence(c);\n AminoAcidLL second = AminoAcidLL.createFromRNASequence(d);\n int expected = 1;\n assertEquals(expected, first.aminoAcidCompare(second));\n }", "public void fixTeacherRating()\n {\n // put your code here\n if(profQuality < 5)\n profQuality++;\n }", "@Override\r\n\tpublic int compareTo(ListElements arg0) {\n\t\tint compareQuantity = ((ListElements) arg0).getScore(); \r\n\t\t \r\n\t\t//ascending order\r\n\t\treturn this.score - compareQuantity;\r\n\t}", "@Test\n public void testUpdateInputsHistory() {\n model.updateInputsHistory(1);\n model.updateInputsHistory(2);\n model.updateInputsHistory(3);\n int[] expectedInputsHistory = {1, 2, 3, 0};\n int expectedInputsElements = 3;\n int[] resultedInputsHistory = model.getInputsHistory();\n int resultedInputsElements = model.getElementsInInputsHistory();\n\n Assert.assertArrayEquals(expectedInputsHistory, resultedInputsHistory);\n Assert.assertEquals(expectedInputsElements, resultedInputsElements);\n\n //inputsHistory array resizing with next updates\n model.updateInputsHistory(4);\n model.updateInputsHistory(5);\n int[] expectedResizedInputsHistory = {1, 2, 3, 4, 5};\n int expectedInputsElementsAfterResize = 5;\n int[] resultedResizedInputsHistory = model.getInputsHistory();\n int resultingInputsElementsAfterResize = model.getElementsInInputsHistory();\n\n Assert.assertArrayEquals(expectedResizedInputsHistory, resultedResizedInputsHistory);\n Assert.assertEquals(expectedInputsElementsAfterResize, resultingInputsElementsAfterResize);\n }", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "public void updateReward(Instance selectedInstance, boolean doBernoulliRewards, boolean isTrainingInstance, boolean verbose)\n\t{\n\t\tif (verbose);////System.out.println(\"\");\n\t\tif (verbose);////System.out.println(\"updateReward called()\");\n\n\t\t//Determine difficulty level associated to this instance\n\t\tint difficultyLevel;\n\t\tif (isTrainingInstance) {\n\t\t\tdifficultyLevel = Integer.parseInt(selectedInstance.toString(45)); //in this attribute the difficulty level is stored\n\t\t} \n\t\telse {\n\t\t\tdifficultyLevel = getDifficulty(); //now: m.DIFFICULTY. perhaps it should be m.state ?\n\t\t}\n\t\tif (verbose);////System.out.println(\"-calculating reward for previous level segment with difficulty level: \" + difficultyLevel );\n\t\t//double probsAppro = getProbsAppropriateness_ObservationStr(observation_str, false);\n\t\tdouble probsAppro = classifyInstance(selectedInstance, false)[1]; \n\t\tif (verbose);////System.out.println(\"-difficulty of level segment was deemed appropriate with a probability of: \" + probsAppro );\n\n\t\t//Determine rewards according to Bernoulli scheme / proportional reward\n\t\tdouble reward = 0.0;\n\t\tif (doBernoulliRewards) {\n\t\t\tif (verbose);////System.out.println(\"-returning reward of 1 with probablity of \" + probsAppro + \", else reward of 0 (Bernoulli rewards)\");\n\t\t\tboolean returnBernoulliReward;\n\t\t\tif ( Math.random() <= probsAppro ) returnBernoulliReward = true;\n\t\t\telse returnBernoulliReward = false;\n\n\t\t\tif (verbose);////System.out.println(\"-boolean returnBernoulliReward: \" + returnBernoulliReward);\n\t\t\tif (returnBernoulliReward) reward = 1.0;\n\t\t\telse reward = 0.0; \n\t\t}\n\t\telse {\n\t\t\tif (verbose);////System.out.println(\"-returning reward \" + probsAppro + \" (regular non-Bernoulli rewards)\");\n\t\t\treward = probsAppro;\n\t\t}\n\n\t\tif (verbose);////System.out.println(\"-adding reward of \" + reward + \" to arraylist playerModelDiff\" + difficultyLevel);\n\t\tswitch (difficultyLevel) {\n\t\tcase 1: playerModelDiff1.add(reward); break;\n\t\tcase 4: playerModelDiff4.add(reward); break;\n\t\tcase 7: playerModelDiff7.add(reward); break;\n\t\tdefault:;////System.out.println(\"-ERROR! Cannot add reward to concerning playerModelDiff1,4,7 due to incorrect input of difficultyLevel\"); break;\n\t\t}\n\t\t//Note, updating the display of average rewards is performed by updatePlayerModel()\n\t\t//int index = getPlayerModelIndex(difficultyLevel);\n\t\t////System.out.println(\"-updating playerModel[\" + index + \"] with reward: \" + reward);\n\t\t//playerModel[index] += reward;\n\t\tif (verbose);////System.out.println(\"-done\");\n\n\t\t//OLD\n\t\t//Increase reward proportionally to appropriateness of current difficulty level to the specific player\n\t\t//As determed by probabilities in player model\n\t\t/*\n ;////System.out.println(\"\");\n ;////System.out.println(\"updateReward called()\");\n double reward = getPlayerModelElement(m.DIFFICULTY);\n ;////System.out.println(\"-increasing reward by: \" + reward);\n m.REWARD += reward;\n ;////System.out.println(\"-new reward is now: \" + m.REWARD);\n\t\t */\n\n\t\t//OLD OLD\n\t\t/*\n if (m.state == 1) { //SANDER UPDATE - NOT CORRECT AT THE MOMENT\n //Appropriate difficulty - Increase reward\n int rangeMin = 0;\n int rangeMax = 1;\n Random r = new Random();\n double randomValue = rangeMin + (rangeMax - rangeMin) * r.nextDouble();\n ;////System.out.println(\"Increasing reward by: \" + randomValue);\n m.REWARD += randomValue;\n ;////System.out.println(\"New cummulative reward: \" + m.REWARD);\n }\n else {\n //No appropriate difficulty - Do not increase reward for this level block\n m.REWARD += 0; \n }\n\t\t */\n\t}", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void AddNewSkill()\n\t{\n\t\t\n\t}" ]
[ "0.8737843", "0.8583009", "0.80015785", "0.6328312", "0.63281244", "0.6323061", "0.6112557", "0.60739076", "0.5742588", "0.5582009", "0.55648255", "0.5509654", "0.54848516", "0.5394001", "0.53671783", "0.5345704", "0.53449523", "0.53208214", "0.53050065", "0.52854013", "0.51713455", "0.5137999", "0.51349837", "0.5120265", "0.5120265", "0.5085608", "0.5063277", "0.50530374", "0.50286907", "0.5012001", "0.5010313", "0.4992246", "0.4991632", "0.4989638", "0.4982079", "0.49682978", "0.49657035", "0.49449396", "0.49379104", "0.49366838", "0.4934905", "0.49348962", "0.49298316", "0.4922862", "0.4914052", "0.49140137", "0.49112326", "0.490623", "0.48870143", "0.48678854", "0.4857845", "0.48449394", "0.48324946", "0.4831048", "0.48306647", "0.48272526", "0.4827175", "0.4814215", "0.48116758", "0.47961888", "0.4790029", "0.4789508", "0.47885472", "0.47728944", "0.47723734", "0.47652185", "0.47604904", "0.475868", "0.4756322", "0.47544238", "0.47370335", "0.47356996", "0.47338685", "0.4732629", "0.4732106", "0.47153524", "0.47135508", "0.47077206", "0.47021633", "0.47007674", "0.46982023", "0.4689311", "0.4687873", "0.46859547", "0.46858373", "0.46813586", "0.46783474", "0.46719933", "0.4670859", "0.46707612", "0.4669684", "0.4665882", "0.4665452", "0.4660956", "0.46603012", "0.46562526", "0.4652929", "0.46527216", "0.46486813", "0.46477818" ]
0.87675047
0
especificamos las variables del contructor gracias a la herencia de planta
public Girasol(int x,int y){ super(x,y); this.setComportamiento("Crea 20 soles cada 2 turnos"); this.setVidas(1); this.impresion="G("+this.getVidas()+")"; this.setDaño(0); this.setFrecuencia(2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "protected void initVars() {}", "private LocalParameters() {\n\n\t}", "Variables createVariables();", "Petunia() {\r\n\t\t}", "public Parameters() {\n\t}", "private void __sep__Constructors__() {}", "public TradeVariables() { /*gets default values*/ }", "public Plato(){\n\t\t\n\t}", "public Pitonyak_09_02() {\r\n }", "public BaseParameters(){\r\n\t}", "public Pasien() {\r\n }", "public Final_parametre() {\r\n\t}", "public RptPotonganGaji() {\n }", "public prueba()\r\n {\r\n }", "Constructor() {\r\n\t\t \r\n\t }", "private Params()\n {\n }", "public static void initialisations() {\n\t\tit = 0;\r\n\t\tbc = 1;\r\n\r\n\t\t// pile des reprises pour compilation des branchements en avant\r\n\t\tpileRep = new TPileRep(); \r\n\t\t// programme objet = code Mapile de l'unite en cours de compilation\r\n\t\tpo = new ProgObjet();\r\n\t\t// COMPILATION SEPAREE: desripteur de l'unite en cours de compilation\r\n\t\tdesc = new Descripteur();\r\n\r\n\t\t// initialisation necessaire aux attributs lexicaux\r\n\t\tUtilLex.initialisation();\r\n\r\n\t\t// initialisation du type de l'expression courante\r\n\t\ttCour = NEUTRE;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de param�tres de chaque proc�dure \r\n\t\tnbParamProc = 0;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de variables d�clar�es\r\n\t\tnbVar++;\r\n\r\n\t\t//Initialisation vTmp\r\n\t\tvTmp = 0;\r\n\t\t\r\n\t\tdesc.setUnite(\"programme\");\r\n\t\t\r\n\t}", "protected void setupParameters() {\n \n \n\n }", "public Propuestas() {}", "protected ParameterList(){\n //title = t;\n //cellWorld = cw;\n }", "private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }", "public Constructor(){\n\t\t\n\t}", "protected void parametersInstantiation_EM() {\n }", "public AntrianPasien() {\r\n\r\n }", "public Propiedad(){\n\t}", "public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}", "public Perro() {\n// super(\"No define\", \"NN\", 0); en caso el constructor de animal tenga parametros\n this.pelaje = \"corto\";\n }", "public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }", "public Parametros() {\r\n semilla = SEMILLA_DEFECTO;\r\n numeroPistas = NUMERO_PISTAS_DEFECTO;\r\n duracionSlot = DURACION_SLOT_DEFECTO;\r\n frecuencia = FRECUENCIA_DEFECTO;\r\n duracionMedia = DURACION_MEDIA_DEFECTO;\r\n duracionDesviacion = DURACION_DESVIACION_DEFECTO;\r\n duracionMinima = DURACION_MINIMA_DEFECTO;\r\n demoraMedia = DEMORA_MEDIA_DEFECTO;\r\n demoraDesviacion = DEMORA_DESVIACION_DEFECTO;\r\n }", "public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuilder();\n\twheres = new StringBuilder();\n }", "public ModuleParams()\n\t{\n\t}", "private void setUp() {\r\n\tvariables = new Vector();\r\n\tstatements = new Vector();\r\n\tconstraints = new Vector();\r\n\tvariableGenerator = new SimpleVariableGenerator(\"v_\");\r\n }", "private Pares(){\n\t\t\tprimero=null;\n\t\t\tsegundo=null;\n\t\t\tdistancia=0;\n\t\t}", "public Variables() {\n this.numCliente = 0;\n this.tiempoSalida = 999;\n }", "private void init() {\n\n\n\n }", "public ValorVariavel() {\r\n }", "public void init(){\n \n }", "public void init() {\n \n }", "private TMCourse() {\n\t}", "public TParametrosVOImpl() {\r\n }", "Reproducible newInstance();", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public Evaluador() {\n aL = new Arguments();\n }", "public void init() {\r\n\r\n\t}", "private DiscretePotentialOperations() {\r\n\t}", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public p7p2() {\n }", "final public ppp.p1 ppp$p1$$init$S() {\r\n {\r\n \r\n //#line 4 \"C:/Users/GERALD/Desktop/distribuido/x10dt/workspace/ppp/src/ppp/p1.x10\"\r\n \r\n \r\n //#line 4 \"C:/Users/GERALD/Desktop/distribuido/x10dt/workspace/ppp/src/ppp/p1.x10\"\r\n this.__fieldInitializers_ppp_p1();\r\n }\r\n return this;\r\n }", "private void init() {\n\n\t}", "private UsineJoueur() {}", "private void initFields() {\n\n tipPercent = 0.0;\n noPersons = 1;\n totalPay = 0.0;\n totalTip = 0.0;\n totalPerPerson = 0.0;\n\n }", "public void init(){}", "public EnsembleLettre() {\n\t\t\n\t}", "public Alojamiento() {\r\n\t}", "public static void main(String[] args) {\n /**\n * Construction par defaut\n */\n Personne p = new Personne();\n System.out.println(p.toString());\n /**\n * Construction avec comme parametre nom et prenom\n */\n Personne p1 = new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\");\n System.out.println(p1.toString());\n /**\n * Construction avec comme parametre nom, prenom et age\n */\n Personne p2 = new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\",22);\n System.out.println(p2.toString());\n /**\n * Construction tous les parametres\n */\n Personne p3= new Personne(\"Thiaw\",\"Serigne Cheikh Mbacke\",22,Sexe.Masculin);\n System.out.println(p3.toString());\n }", "public void init() {\n\t\t \r\n\t\t }", "public Funcionario() {\r\n\t\t\r\n\t}", "public Phl() {\n }", "public Clade() {}", "public SlanjePoruke() {\n }", "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "public Caso_de_uso () {\n }", "private Rekenhulp()\n\t{\n\t}", "public Persona()\n\t{\n\t\tnombre = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\tapellido = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\tedad = 0; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\talias = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\t\t\n\t}", "public Hello()\n {\n // initialise instance variables\n \n }", "private void init() {\n }", "private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public void init() {\n\t\t\n\t}", "public Produto() {}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public void init() {\n\t\n\t}", "@Before\r\n\tpublic void constructObj (){\r\n\t\tproteinSeq = new ProteinSequence(new char[]{'A','A','T','G','C','C','A','G','T','C','A','G','C','A','T','A','G','C','G'});\r\n\t}", "private Instantiation(){}", "public void init() {}", "public void init() {}", "public Cgg_jur_anticipo(){}", "public Professor()\n\t{\n\t\t//stuff\n\t}", "protected void initParametros ( int numParametros ) {\n if ( numParametros > 0 )\n parametros = new Parametro[ numParametros ];\n }", "void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}", "public PSRelation()\n {\n }", "public Tbdcongvan36() {\n super();\n }", "public Potencial() {\r\n }", "public void init(Object[] parameters) {\n\n\t}", "public TebakNusantara()\n {\n }", "public Persona() {\n\t}", "void setupVariables(IVariableFactory factory);", "@Override // opcional\n public void init(){\n\n }", "public ModuleParams() {\n }", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public Curso() {\r\n }", "public void init() {\n\t\t}", "private MetallicityUtils() {\n\t\t\n\t}" ]
[ "0.7069988", "0.692478", "0.6890294", "0.68165386", "0.68112856", "0.67930394", "0.6746435", "0.67399085", "0.67240393", "0.67199516", "0.66323084", "0.6615159", "0.6609186", "0.65874773", "0.6565128", "0.6549484", "0.65027386", "0.6477062", "0.6475324", "0.64721596", "0.6471359", "0.6468281", "0.6459259", "0.64400226", "0.6434577", "0.6418242", "0.64101094", "0.64058036", "0.64032406", "0.6381727", "0.6362899", "0.63269717", "0.63130015", "0.6290635", "0.62748766", "0.6264602", "0.6264549", "0.6248388", "0.6241649", "0.6231971", "0.6230584", "0.6204096", "0.61939377", "0.61939377", "0.61939377", "0.619323", "0.6185392", "0.61803895", "0.61749476", "0.6169588", "0.61695826", "0.6168803", "0.6166931", "0.6163144", "0.6159892", "0.6153619", "0.6150771", "0.6143193", "0.6129361", "0.61276174", "0.61258245", "0.612518", "0.6125155", "0.611961", "0.61188066", "0.61109287", "0.6110877", "0.61102194", "0.6109826", "0.61087894", "0.6106069", "0.61044806", "0.61018753", "0.6096649", "0.6096649", "0.6096649", "0.6096649", "0.60887676", "0.6087608", "0.6082564", "0.6082366", "0.6082366", "0.6081453", "0.607247", "0.60700434", "0.60677826", "0.6066132", "0.6065334", "0.6064898", "0.60641867", "0.6064099", "0.6063152", "0.6061562", "0.6061043", "0.6046952", "0.6044138", "0.6044138", "0.6044138", "0.6042982", "0.6035118", "0.6030857" ]
0.0
-1
para sobreescribir el tablero segun el estado del Girasol
@Override public String toString(){ return "G("+this.getVidas()+")"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void createTable(){\n Object[][] data = new Object[0][8];\n int i = 0;\n for (Grupo grupo : etapa.getGrupos()) {\n Object[][] dataAux = new Object[data.length+1][8];\n System.arraycopy(data, 0, dataAux, 0, data.length);\n dataAux[i++] = new Object[]{grupo.getNum(),grupo.getAtletas().size(),\"Registar Valores\",\"Selecionar Vencedores\", \"Selecionar Atletas\"};\n data = dataAux.clone();\n }\n\n //COLUMN HEADERS\n String columnHeaders[]={\"Numero do Grupo\",\"Número de Atletas\",\"\",\"\",\"\"};\n\n tableEventos.setModel(new DefaultTableModel(\n data,columnHeaders\n ));\n //SET CUSTOM RENDERER TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(3).setCellRenderer(new ButtonRenderer());\n tableEventos.getColumnModel().getColumn(4).setCellRenderer(new ButtonRenderer());\n\n //SET CUSTOM EDITOR TO TEAMS COLUMN\n tableEventos.getColumnModel().getColumn(2).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(3).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n tableEventos.getColumnModel().getColumn(4).setCellEditor(new ButtonEditor(new JTextField(), this.etapa));\n\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Dependente dependente : new NDependente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(dependente.getId() + \"\");\n linha.add(dependente.getNome());\n linha.add(dependente.getTelefone());\n linha.add(new NCliente().consultar(dependente.getCliente_id()).getNome());\n linha.add(dependente.getDataNascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblDependentes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }", "public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "private EstabelecimentoTable() {\n\t\t\t}", "Tablero consultarTablero();", "private void srediTabelu() {\n ModelTabeleStavka mts = new ModelTabeleStavka();\n mts.setLista(n.getLista());\n tblStavka.setModel(mts);\n }", "public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}", "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "public void mostrarTablero(){\n\t\tIterator<String> itr = getIteradorMinas();\n\t\tString mina = null;\n\t\tint col;\n\t\tint fila;\n\t\tint conta=1;\n\t\tCasilla casilla;\n\t\tif (lMinas.size()>0){\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tconta++;\n\t\t\t\tmina=itr.next(); \n\t\t\t\tcol=this.separarCoordenadasCol(this.separarCoordenadasString(mina));\n\t\t\t\tfila=this.separarCoordenadasFil(this.separarCoordenadasString(mina));\n\t\t\t\tcasilla=buscarCasilla(fila, col);\n\t\t\t\tif(!casilla.estaDesvelada()&&!casilla.tieneBandera()){\n\t\t\t\t\tcasilla.descubrir();\n\t\t\t\t\tsetChanged();\n\t\t\t\t\tnotifyObservers(fila+\",\"+col+\",\"+10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcomprobarBanderas();\n\t\t\n\t}", "private void popuniTabelu() {\n try {\n List<PutnikEntity> putnici=Controller.vratiSvePutnike();\n TableModel tm=new PutnikTableModel(putnici);\n jtblPutnici.setModel(tm);\n } catch (Exception ex) {\n Logger.getLogger(FIzaberiLet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "protected void dataTableleibie(int i) {\n\t\r\n}", "private void IniciarTabla(){\n \n // limpia los datos de los Label y los datos relacionados a la actualizacion de los datos e inhabilita y habilitar botones\nthis.jLabelId.setText(\"Id\");\nthis.jnombre.setText(\"\");\ngrabarCambios.setEnabled(false);\njBotonAgregar.setEnabled(true);\n\n DefaultTableModel dfm = new DefaultTableModel();\n tabla = this.jTabla;\n tabla.setModel(dfm);\n \n // agrega los datos al index de la tabla \n dfm.setColumnIdentifiers(new Object[]{\"id\",\"Comuna\",\"Estado\"});\n Conexion cn = new Conexion();\n rs = cn.SeleccionarTodosComunas();\n try{\n // se recorre rs donde estan los resultados de la busqueda de los datos de la tabla comuna\n while(rs.next()){\n String activo =\"\";\n if (rs.getInt(\"COM_ESTADO\")==1) {\n activo = \"activo\";\n } else {\n activo = \"no activo\";};\n // se agrega la fila con los datos de la columna \n dfm.addRow(new Object[]{rs.getInt(\"COM_ID\"),rs.getString(\"COM_NOMBRE\"),activo});\n }\n \n } catch(Exception e){\n System.out.println(\"Error Revisar funcion TableModel\" + e);\n }\n }", "private void enlazarListadoTabla() {\n tblCursos.setItems(listaCursos);\n\n //Enlazar columnas con atributos\n clmNombre.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"nombre\"));\n clmAmbito.setCellValueFactory(new PropertyValueFactory<Curso, String>(\"familiaProfesional\"));\n clmDuracion.setCellValueFactory(new PropertyValueFactory<Curso, Integer>(\"duracion\"));\n }", "private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "public Complementos() {\n initComponents();\n String cabecera []={\"Producto\",\"Precio\"};\nString datos[][]={};\nboolean t=true;\nboolean f=false;\nmodelo = new Tablachida(datos,cabecera);\ntabla.setModel(modelo);\nTableColumnModel columnModel = tabla.getColumnModel();\ncolumnModel.getColumn(0).setPreferredWidth(250);\ntabla.setRowHeight(40);\n\n }", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "public DefaultTableModel buscarlotes() {\n \n String encabezados[]= {\"Nombre\",\"Codigo\",\"Lote\",\"Vencimiento\",\"Dias Restantes\"};\n Control.ControlLote c = new Control.ControlLote();\n List<Modelo.Lotes> lotes = null;\n \n try {\n lotes = c.buscarlote();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(AgregarStock.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n Long resta;//para saber cuanto queda de vencimiento\n java.util.Date fechaActual = new Date(); \n \n String [][] data = new String[lotes.size()][5];\n for (int i = 0; i < lotes.size(); i++) {\n \n resta=lotes.get(i).getVencimiento().getTime()-fechaActual.getTime();\n long dias = (resta / (1000 * 60 * 60 * 24))+1;\n \n \n data[i][0] = lotes.get(i).getNombre();\n data[i][1] = Long.toString(lotes.get(i).getCodigo());\n data[i][2] = lotes.get(i).getLote();\n data[i][3] = lotes.get(i).getVencimiento().toString();\n if(dias<1)\n data[i][4] = (\"Vencido\");\n else{\n data[i][4] = Long.toString(dias);\n }\n\n }\n\n jTable1.setDefaultRenderer (Object.class, new MiRender());\n \n return new DefaultTableModel(data,encabezados);\n }", "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"CPF\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Endereço\");\n cabecalho.add(\"E-mail\");\n cabecalho.add(\"Data de Nascimento\");\n\n Vector detalhe = new Vector();\n\n for (Cliente cliente : new NCliente().listar()) {\n Vector<String> linha = new Vector();\n\n linha.add(cliente.getId() + \"\");\n linha.add(cliente.getNome());\n linha.add(cliente.getCpf());\n linha.add(cliente.getTelefone());\n linha.add(cliente.getEndereco());\n linha.add(cliente.getEmail());\n linha.add(cliente.getData_nascimento().toString());\n detalhe.add(linha);\n\n }\n\n tblClientes.setModel(new DefaultTableModel(detalhe, cabecalho));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "private void continuarInicializandoComponentes() {\n javax.swing.table.TableColumn columna1 = tablaDetalle.getColumn(\"Id\");\n columna1.setPreferredWidth(10); \n javax.swing.table.TableColumn columna2 = tablaDetalle.getColumn(\"Tipo\");\n columna2.setPreferredWidth(250); \n javax.swing.table.TableColumn columna3 = tablaDetalle.getColumn(\"Número\");\n columna3.setPreferredWidth(50); \n DefaultTableCellRenderer tcrr = new DefaultTableCellRenderer();\n tcrr.setHorizontalAlignment(SwingConstants.RIGHT);\n DefaultTableCellRenderer tcrc = new DefaultTableCellRenderer();\n tcrc.setHorizontalAlignment(SwingConstants.CENTER);\n tablaDetalle.getColumnModel().getColumn(0).setCellRenderer(tcrc);\n tablaDetalle.getColumnModel().getColumn(2).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(3).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(4).setCellRenderer(tcrr);\n }", "private ArrayList<FornecedorModelo> iniciaTabela() {\n int i;\n DefaultTableModel model=(DefaultTableModel)tblFornecedor.getModel();\n // atribui 0 linhas à coluna\n model.setNumRows(0);\n // atribui um tamanho fixo a coluna codigo\n tblFornecedor.getColumnModel().getColumn(0).setPreferredWidth(2);\n ArrayList<FornecedorModelo> listaFornecedores = new ArrayList<FornecedorModelo>();\n listaFornecedores = new FornecedorControle().listarFornecedor();\n //adiciona alunos as tabelas\n for (i=0;i<=listaFornecedores.size()-1;i++){\n model.addRow(\n new Object[]{\n listaFornecedores.get(i).getCodFornecedor(),\n listaFornecedores.get(i).getNomeFantasia(),\n listaFornecedores.get(i).getRazaoSocial(),\n listaFornecedores.get(i).getEndereco(),\n listaFornecedores.get(i).getEmail(),\n listaFornecedores.get(i).getTelefone(),\n listaFornecedores.get(i).getCnpj(),\n Boolean.FALSE\n }\n );\n }\n return listaFornecedores;\n }", "private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }", "private void cargarTablaConPaquetes() {\n tcId.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"codigo\"));\n tcdescripcion.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"descripcion\"));\n tcDestino.setCellValueFactory(\n new PropertyValueFactory<Paquete, String>(\"destino\"));\n tcEntregado.setCellValueFactory(\n new PropertyValueFactory<Paquete, Boolean>(\"entregado\"));\n\n tbPaqueteria.setItems(data);\n tbPaqueteria.getSelectionModel().selectFirst();\n\n //TODO futura implementacion\n //setDobleClickFila();\n }", "public ExibeTarefas() {\n initComponents();\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n jTable1.setRowSorter(new TableRowSorter(modelo));\n readJTable();\n readItemBox();\n }", "public void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "public void cargarTabla(String servidor){\n String base_de_datos1=cbBaseDeDatos.getSelectedItem().toString();\n String sql =\"USE [\"+base_de_datos1+\"]\\n\" +\n \"SELECT name FROM sysobjects where xtype='U' and category <> 2\";\n // JOptionPane.showMessageDialog(null,\"SQL cargarbases \"+sql);\n Conexion cc = new Conexion();\n Connection cn=cc.conectarBase(servidor, base_de_datos1);\n modeloTabla=new DefaultTableModel();\n String fila[]=new String[1] ;\n String[] titulos={\"Tablas\"} ;\n try {\n Statement psd = cn.createStatement();\n ResultSet rs=psd.executeQuery(sql);\n if(modeloTabla.getColumnCount()<2){\n modeloTabla.addColumn(titulos[0]);\n //modeloTabla.addColumn(titulos[1]);\n }\n while(rs.next()){\n fila[0]=rs.getString(\"name\");\n // fila[1]=\"1\";\n modeloTabla.addRow(fila);\n }\n tblTablas.setModel(modeloTabla);\n }catch(Exception ex){\n JOptionPane.showMessageDialog(null, ex+\" al cargar tabla\");\n }\n }", "public void PreencherTabela() throws SQLException {\n try (Connection connection = ConnectionFactory.getConnection()) {\n String[] colunas = new String[]{\"ID\", \"Nome\", \"Nomenclatura\", \"Quantidade\"};\n ArrayList dados = new ArrayList();\n for (ViewProdutoPedido v : viewProdutoPedidos) {\n dados.add(new Object[]{v.getId(), v.getNome(), v.getNomenclatura(), v.getQuantidade()});\n }\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n jTableItensPedido.setModel(modelo);\n jTableItensPedido.setRowSorter(new TableRowSorter(modelo));\n jTableItensPedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTableItensPedido.getColumnModel().getColumn(0).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(1).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(2).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(2).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(3).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(3).setResizable(false);\n\n }\n }", "public void paramTable() {\n jTable2.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);\n mode = (DefaultTableModel) jTable2.getModel();\n dtcm = (DefaultTableColumnModel) jTable2.getColumnModel();\n\n jTable2.setRowHeight(40);\n largeurColoneMax(dtcm, 0, 70);\n largeurColoneMax(dtcm, 3, 50);\n largeurColoneMax(dtcm, 4, 100);\n largeurColoneMax(dtcm, 6, 90);\n largeurColoneMax(dtcm, 9, 70);\n\n TableCellRenderer tbcProjet = getTableCellRenderer();\n TableCellRenderer tbcProjet2 = getTableHeaderRenderer();\n for (int i = 0; i < jTable2.getColumnCount(); i++) {\n TableColumn tc = jTable2.getColumnModel().getColumn(i);\n tc.setCellRenderer(tbcProjet);\n tc.setHeaderRenderer(tbcProjet2);\n\n }\n\n }", "public void PreencherTabela2() throws SQLException {\n\n String[] colunas = new String[]{\"ID do Pedido\", \"Numero Grafica\", \"Data Emissao\",\"Boleto\"};\n ArrayList dados = new ArrayList();\n Connection connection = ConnectionFactory.getConnection();\n PedidoDAO pedidoDAO = new PedidoDAO(connection);\n ModeloPedido modeloPedido = new ModeloPedido();\n modeloPedido = pedidoDAO.buscaPorId(idPedidoClasse);\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n dados.add(new Object[]{modeloPedido.getId(), modeloPedido.getNumeroGrafica(), format.format(modeloPedido.getDataEmissao()), modeloPedido.isBoleto()});\n\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n\n jTablePedido.setModel(modelo);\n jTablePedido.setRowSorter(new TableRowSorter(modelo));\n jTablePedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTablePedido.getColumnModel().getColumn(0).setResizable(false);\n jTablePedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTablePedido.getColumnModel().getColumn(1).setResizable(false);\n\n jTablePedido.getTableHeader().setReorderingAllowed(false);\n connection.close();\n }", "private void riempimentoTableQuote() {\n\t\tString[] nameColumns = { \"Id\", \"Data inizio\", \"Valore\", \"Tipologia\" };\n\t\tquote = new ArrayList<Quota>(model.getQuote());\n\n\t\t/* Istanza del TableModel con l'override di isCellEditable per rendere\n\t\tla tabella non modificabile */\n\t\t@SuppressWarnings(\"serial\")\n\t\tDefaultTableModel dati = new DefaultTableModel(nameColumns, 0) {\n\t\t\t@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\tfor (int j = 0; j < quote.size(); j++) {\n\t\t\tdati.addRow(new Vector<>());\n\t\t\tdati.setValueAt(quote.get(j).getId(), j, 0);\n\t\t\tdati.setValueAt(quote.get(j).getDataI(), j, 1);\n\t\t\tdati.setValueAt(quote.get(j).getValore(), j, 2);\n\t\t\tdati.setValueAt(quote.get(j).getTipologia(), j, 3);\n\t\t}\n\t\tviewGestione.getTable().setModel(dati);\n\t}", "private JTable fontesNaoPagas() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT data_ultimo_vencimento_fonte_r, cod_fonte_d, nome_fonte_d, valor_fonte_d, tipo_valor_fonte_d, data_abertura_fonte_d, periodo_fonte_d FROM Fonte_despesa WHERE vencimento_fonte_d = '0'\";\n\t \n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Fonte de despesa\", \"Valor previsto\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t select = \"select DATE_ADD(?,INTERVAL ? day)\";\n\t while (rs.next()){\n\t \t \n\t \tptStatement = c.prepareStatement(select);\n\t\t\t\tptStatement.setString(1, rs.getString(\"data_ultimo_vencimento_fonte_r\"));\n\t\t\t\tptStatement.setString(2, rs.getString(\"periodo_fonte_d\"));\n\t\t\t\trs2 = ptStatement.executeQuery();\n\t\t\t\trs2.next();\n\t\t linhas.add(new Object[]{rs.getString(\"nome_fonte_d\"),rs.getString(\"valor_fonte_d\"),rs2.getString(1), \"Pagar\", rs.getString(\"cod_fonte_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"fonteNaoPaga\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "private static void popuniTabelu() {\r\n\t\tDefaultTableModel dfm = (DefaultTableModel) teretanaGui.getTable().getModel();\r\n\r\n\t\tdfm.setRowCount(0);\r\n\r\n\t\tfor (int i = 0; i < listaClanova.size(); i++) {\r\n\t\t\tClan c = listaClanova.getClan(i);\r\n\t\t\tdfm.addRow(new Object[] { c.getBrojClanskeKarte(), c.getIme(), c.getPrezime(), c.getPol() });\r\n\t\t}\r\n\t\tcentrirajTabelu();\r\n\t}", "private void load_anggota(){\n Object header[] = {\"ID ANGGOTA\",\"NIS\",\"NAMA ANGGOTA\",\"JK\",\"TINGKAT\",\"JURUSAN\",\"NO HP\",\"STATUS\"};\n DefaultTableModel tableModel = new DefaultTableModel(null, header);\n TabelAnggota.setModel(tableModel);\n\n String sql_data=\"SELECT * FROM tbl_anggota\";\n try{\n Connection kon = koneksi.getConnection();\n Statement st=kon.createStatement();\n ResultSet rs=st.executeQuery(sql_data);\n while(rs.next()){\n String d1=rs.getString(1);\n String d2=rs.getString(2);\n String d3=rs.getString(3);\n String d4=rs.getString(4);\n String d5=rs.getString(5);\n String d6=rs.getString(6);\n String d7=rs.getString(7);\n String d8=rs.getString(8);\n \n String d[]={d1,d2,d3,d4,d5,d6,d7,d8};\n tableModel.addRow(d);\n }\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n }", "@Override\n public void tableRows_()\n {\n }", "private void export4(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\tif (WICH_ONE.equals(\"E\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"F\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\", \"ascSalario\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"G\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\", \"ascSalario\");\n\t\t}\n\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tif (WICH_ONE.equals(\"E\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahoYApor\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\t\treturn descAportaciones + descAhorros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.presYSeg\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tCtaCasCuentaAsociadoDAO casDAO = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descPrestamos + descSeguros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\t\tif (WICH_ONE.equals(\"F\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.aportaciones\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahorros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.presYSeg\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tCtaCasCuentaAsociadoDAO casDAO = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descPrestamos + descSeguros;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (WICH_ONE.equals(\"G\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahoYApor\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\t\treturn descAportaciones + descAhorros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.prestamos\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\t\t\t\t\treturn descPrestamos;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.seguros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descSeguros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\ttableFacade.render();\n\t}", "private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }", "private void establecerTablaPlatillos() {\n Object[] columnas = {\"Platillo\", \"Cantidad\", \"Costo\"};\n Object[][] modelo = new Object[platillosAVender.size()][3];\n int x = 0;\n\n for (VentaPlatillo ventaPlatillo : platillosAVender) {\n\n modelo[x][0] = ventaPlatillo.getPlatillo().getNombre();\n modelo[x][1] = ventaPlatillo.getCantidad();\n modelo[x][2] = ventaPlatillo.getCosto();\n x++;\n }\n // Se establece el modelo en la tabla con los datos\n tablaPlatillosAVender.setDefaultEditor(Object.class, null);\n tablaPlatillosAVender.setModel(new DefaultTableModel(modelo, columnas));\n tablaPlatillosAVender.setCellSelectionEnabled(false);\n tablaPlatillosAVender.setRowSelectionAllowed(false);\n txtTotal.setText(total + \"\");\n }", "public HTMLTableSectionElement getElementTablaTablero() { return this.$element_TablaTablero; }", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "public void cargarTablaFiltro(JTable table, int tipo, String restriccion) {\n\t\t\n\t\tString filtro = restriccion + \"-\" + tipo; \n\t\tList<CocheTaller> coches = mecanicoController.filtrarCocheTaller(filtro);\n\t\tString[] columnNames = {\"Marticula\", \"Marca\", \"Modelo\", \"DNI Cliente\", \"Mecanico\", \"Coste\", \"Estado\"};\n\t\t\n\t\tif (!coches.isEmpty()) {\n\t\t\t DefaultTableModel model = new DefaultTableModel();\n\t\t\t table.setModel(model);\n\t\t\t model.setColumnIdentifiers(columnNames);\n\t\t\t \n\t\t\t for (CocheTaller c : coches) {\n\t\t\t\t Object[] o = new Object[7];\n\t\t\t\t o[0] = c.getMatricula();\n\t\t\t\t o[1] = c.getMarca();\n\t\t\t\t o[2] = c.getModelo();\n\t\t\t\t o[3] = c.getDniCliente();\n\t\t\t\t o[4] = c.getMecanico();\n\t\t\t\t o[5] = c.getCoste() + \"€\";\n\t\t\t\t o[6] = mecanicoController.traducirEstado(c.getEstado());\n\t\t\t\t model.addRow(o);\n\t\t\t\t }\n\t\t} else {\n\t\t\tlogger.error(\"No se dispone ningun vehiculo con ese filtrado.\");\n\t\t}\n\t}", "private void atualizarTabuleiro() throws Exception {\n JogoVelha jogo;\n \n // Recebe dados do jogo\n jogo = remoteApi.getJogo(this.idJogo);\n // Atualizar tabuleiro com o jogo recebido\n jButton11.setText(String.valueOf(jogo.getCelula(1, 1)));\n jButton12.setText(String.valueOf(jogo.getCelula(1, 2)));\n jButton13.setText(String.valueOf(jogo.getCelula(1, 3)));\n jButton21.setText(String.valueOf(jogo.getCelula(2, 1)));\n jButton22.setText(String.valueOf(jogo.getCelula(2, 2)));\n jButton23.setText(String.valueOf(jogo.getCelula(2, 3)));\n jButton31.setText(String.valueOf(jogo.getCelula(3, 1)));\n jButton32.setText(String.valueOf(jogo.getCelula(3, 2)));\n jButton33.setText(String.valueOf(jogo.getCelula(3, 3)));\n }", "private void cargar(List<Personas> listaP) {\n int total= listaP.size();\n Object [][] tab = new Object [total][10];\n int i=0;\n Iterator iter = listaP.iterator();\n while (iter.hasNext()){\n Object objeto = iter.next();\n Personas pro = (Personas) objeto;\n\n tab[i][0]=pro.getLocalidadesid().getProvinciasId();\n tab[i][1]=pro.getLocalidadesid();\n tab[i][2]=pro.getCuilcuit();\n tab[i][3]=pro.getApellido();\n tab[i][4]=pro.getNombres();\n tab[i][5]=pro.getCalle();\n tab[i][6]=pro.getAltura();\n tab[i][7]=pro.getPiso();\n tab[i][8]=pro.getEmail();\n// if(pro.getEmpleados().equals(\"\")){\n tab[i][9]=\"Cliente\";\n // }else{\n // tab[i][7]=\"Empleado\";\n // }\n i++;\n }\njTable1 = new javax.swing.JTable();\n\njTable1.setModel(new javax.swing.table.DefaultTableModel(\ntab,\nnew String [] {\n \"Provincia\", \"Localidad\", \"DNI/Cuit\", \"Apellido\", \"Nombres\", \"Calle\", \"Altura\", \"Piso\", \"Email\", \"Tipo\"\n}\n));\n jScrollPane1.setViewportView(jTable1);\n }", "public void tabelaktivitas() {\n DefaultTableModel tbl= new DefaultTableModel();\n tbl.addColumn(\"Group\");\n tbl.addColumn(\"Compart\");\n tbl.addColumn(\"Activity\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Harga\");\n tbl.addColumn(\"Total\");\n tblaktivitas.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblaktivitas\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"nama_grup\"),\n res.getString(\"compart\"),\n res.getString(\"pekerjaan\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"total\")\n });\n tblaktivitas.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n }", "public void rozmiarTablicy()\n {\n iloscWierszy = tabelaDanych.getRowCount();\n iloscKolumn = tabelaDanych.getColumnCount();\n tablica = new int[iloscWierszy][iloscKolumn];\n // wypelnienie tablicy pomocniczej z wartościami tabeli\n for (int i = 0; i < iloscWierszy ; i++)\n {\n for (int j = 0; j < iloscKolumn; j++)\n {\n tablica [i][j] = (int) tabelaDanych.getValueAt(i,j);\n }\n }\n }", "public final void detalleTabla()\n {\n \n try\n {\n ResultSet obj=nueva.executeQuery(\"SELECT cli_nit,cli_razon_social FROM clientes.cliente ORDER BY cli_razon_social ASC\");\n \n while (obj.next()) \n {\n \n Object [] datos = new Object[2];\n \n \n for (int i=0;i<2;i++)\n {\n datos[i] =obj.getObject(i+1);\n }\n\n modelo.addRow(datos);\n \n }\n tabla_cliente.setModel(modelo);\n nueva.desconectar();\n \n \n \n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public Estadisticas() {\n initComponents();\n \n llenar_tabla();\n setCellRender(tbResult);\n }", "public void rePintarTablero() {\n int colorArriba = turnoComputadora != 0 ? turnoComputadora : -1;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n if (x % 2 == 0) {\n tablero[x][y].setFondo(y % 2 == 1 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 1 ? getNegroResaltado() : getBlancoResaltado());\n } else {\n tablero[x][y].setFondo(y % 2 == 0 ? getNegro() : getBlanco());\n tablero[x][y].setResaltar(y % 2 == 0 ? getNegroResaltado() : getBlancoResaltado());\n }\n tablero[x][y].setBounds(anchoCuadro * (colorArriba == -1 ? x : (7 - x)), altoCuadro * (colorArriba == -1 ? y : (7 - y)), anchoCuadro, altoCuadro);\n }\n }\n }", "private void export(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascIngresoCoope\",\n\t\t\t\t\"ascRetiroCoope\", \"ascProfesion\", \"ascSalario\",\n\t\t\t\t\"ascAsociadoPadre\");\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic String getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.aportaciones\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\treturn descAportaciones;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascRetiroCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahorros\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\t\t\t\treturn descAhorros;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascProfesion\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.prestamos\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\t\t\t\treturn descPrestamos;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.seguros\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\t\t\t\treturn descSeguros;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascAsociadoPadre\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.total\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\n\t\t\t\treturn descAportaciones + descAhorros + descPrestamos\n\t\t\t\t\t\t+ descSeguros;\n\t\t\t}\n\t\t});\n\n\t\ttableFacade.render();\n\t}", "public void llenarLogros(){\n DefaultTableModel table = (DefaultTableModel) logrosTabla.getModel();\n ArrayList<Logro> logros = ninno.getLogros();\n \n for(Logro logro: logros){\n table.addRow(new Object[]{logro.getBimestreString(), logro.getTitulo(), logro.getEstado()});\n }\n }", "public void atualizarTabela() {\n\t\tJTAlocar.setModel(modelAlocar = new TableModelAlocar(ManipulacaoXml.getInstace().todasAlocacoes()));\n\t}", "public void atualizarTabelaRespostas(){\n resposta = new Resposta(); \n\n try{\n if(txtIdPergunta.getText().isEmpty()){\n listaRespostas = respostaDao.ListaResposta(0);\n \n }else{\n listaRespostas = respostaDao.ListaResposta(Integer.parseInt(txtIdPergunta.getText()));\n \n }\n }catch (SQLException ex){\n Logger.getLogger(PerguntaView.class.getName()).log(Level.SEVERE, null, ex);\n } \nString dados [][] = new String[listaRespostas.size()][0];\nint i = 0;\nfor(Resposta resposta : listaRespostas){\n dados[i][0] = String.valueOf(resposta.getId());\n dados[i][1] = resposta.getDescricao();\n \n i++;\n}\nString tituloColuna[] ={\"ID Resposta\", \"Resposta\"};\nDefaultTableModel tabelaresposta = new DefaultTableModel();\ntabelaresposta.setDataVector(dados, tituloColuna);\n \n\n tabela_respostas.setModel(new DefaultTableModel(dados, tituloColuna){\n boolean[] canEdit = new boolean[]{\n false, false};\n \n public boolean isCellEditable(int rowIndex, int columnIndex){\n return canEdit[columnIndex];\n }\n \n\n });\ntabela_respostas.getColumnModel().getColumn(0).setPreferredWidth(100);\ntabela_respostas.getColumnModel().getColumn(1).setPreferredWidth(400);\n\nDefaultTableCellRenderer alinhamentoCentro = new DefaultTableCellRenderer();\nalinhamentoCentro.setHorizontalAlignment(SwingConstants.CENTER);\n\n\ntabela_respostas.getColumnModel().getColumn(0).setCellRenderer(alinhamentoCentro);\n\n\ntabela_respostas.setRowHeight(25);\ntabela_respostas.updateUI();\n }", "public void ordenarTablero() {\n Pieza.setCantMovimientosSinCambios(0);\n setTurno(1);\n suspenderJuego = false;\n //Limpiar el tablero\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y].setPieza(null);\n }\n }\n int color = -1;\n for (int i = 0; i <= 1; i++) {\n tablero[0][i * 7].setPieza(new Torre(color));\n tablero[1][i * 7].setPieza(new Caballo(color));\n tablero[2][i * 7].setPieza(new Alfil(color));\n tablero[3][i * 7].setPieza(new Reina(color));\n Rey rey = new Rey(color);\n setRey(rey, color);\n tablero[4][i * 7].setPieza(rey);\n tablero[5][i * 7].setPieza(new Alfil(color));\n tablero[6][i * 7].setPieza(new Caballo(color));\n tablero[7][i * 7].setPieza(new Torre(color));\n for (int j = 0; j < 8; j++) {\n tablero[j][i == 0 ? 1 : 6].setPieza(new Peon(color));\n }\n color *= -1;\n }\n rePintarTablero();\n if (turnoComputadora == getTurno()) {\n jugarMaquinaSola(getTurno());\n }\n }", "private void tablaConsultasMouseClicked(java.awt.event.MouseEvent evt) {\n datosconsulta = new DefaultTableModel();\n datosconsulta.addColumn(\"Cod Mascota\");\n datosconsulta.addColumn(\"Mascota\");\n datosconsulta.addColumn(\"Cod Enfermedad\");\n datosconsulta.addColumn(\"Enfermedad\");\n datosconsulta.addColumn(\"Diagnostico\");\n datosconsulta.addColumn(\"Notas\");\n datosconsulta.addColumn(\"Cod Vacuna\");\n datosconsulta.addColumn(\"Vacuna\");\n datosconsulta.addColumn(\"Aplicación\");\n datosconsulta.addColumn(\"Proxima\");\n tablaDatosDeconsulta.setModel(datosconsulta);\n cargarDatos();\n }", "public void LlenarPagos(){\n datos=new DefaultTableModel();\n LlenarModelo();\n this.TablaPagos.setModel(datos);\n }", "private JTable fontesNaoRecebidas() {\n\t\tinitConexao();\t\t\n try {\t \n\t String select = \"SELECT data_ultimo_recebimento_fonte_r, cod_fonte_r, nome_fonte_r, valor_fonte_r, tipo_valor_fonte_r, periodo_fonte_r FROM Fonte_receita WHERE status_fonte_r = '0'\";\n\t \n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Fonte de receita\", \"Valor previsto\", \"Data prevista do recebimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t select = \"select DATE_ADD(?,INTERVAL ? day)\";\n\t while (rs.next()){\n\t \t \n\t \tptStatement = c.prepareStatement(select);\n\t\t\t\tptStatement.setString(1, rs.getString(\"data_ultimo_recebimento_fonte_r\"));\n\t\t\t\tptStatement.setString(2, rs.getString(\"periodo_fonte_r\"));\n\t\t\t\trs2 = ptStatement.executeQuery();\n\t\t\t\trs2.next();\n\t\t linhas.add(new Object[]{rs.getString(\"nome_fonte_r\"),rs.getString(\"valor_fonte_r\"),rs2.getString(1), \"Receber\", rs.getString(\"cod_fonte_r\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"fonteNaoRecebida\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "private void export2(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascIngresoCoope\",\n\t\t\t\t\"ascAsociadoPadre\");\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.empresa\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString empresa = \"\";\n\t\t\t\tif (asociado.getAscDirTrabajo() == null\n\t\t\t\t\t\t|| asociado.getAscDirTrabajo().equals(\"\")) {\n\t\t\t\t\tCtaDptDepartamentoTrabajo departamentoTrabajo = asociado\n\t\t\t\t\t\t\t.getCtaDptDepartamentoTrabajo();\n\t\t\t\t\tCtaEtrEmpresaTrabajoDAO empresaTrabajoDAO = new CtaEtrEmpresaTrabajoDAO(getSessionHibernate(request));\n\t\t\t\t\tCtaEtrEmpresaTrabajo empresaTrabajo = empresaTrabajoDAO\n\t\t\t\t\t\t\t.findById(departamentoTrabajo\n\t\t\t\t\t\t\t\t\t.getCtaEtrEmpresaTrabajo().getEtrId());\n\t\t\t\t\tempresa = empresaTrabajo.getEtrNombre();\n\t\t\t\t} else {\n\t\t\t\t\tempresa = asociado.getAscDirTrabajo();\n\t\t\t\t}\n\t\t\t\treturn empresa;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascAsociadoPadre\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.total\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\n\t\t\t\treturn descAportaciones + descAhorros + descPrestamos\n\t\t\t\t\t\t+ descSeguros;\n\t\t\t}\n\t\t});\n\n\t\ttableFacade.render();\n\t}", "public void clicTable(View v) {\n try {\n conteoTab ct = clc.get(tb.getIdTabla() - 1);\n\n if(ct.getEstado().equals(\"0\")) {\n String variedad = ct.getVariedad();\n String bloque = ct.getBloque();\n Long idSiembra = ct.getIdSiembra();\n String idSiempar = String.valueOf(idSiembra);\n\n long idReg = ct.getIdConteo();\n int cuadro = ct.getCuadro();\n int conteo1 = ct.getConteo1();\n int conteo4 = ct.getConteo4();\n int total = ct.getTotal();\n\n txtidReg.setText(\"idReg:\" + idReg);\n txtCuadro.setText(\"Cuadro: \" + cuadro);\n cap_1.setText(String.valueOf(conteo1));\n cap_2.setText(String.valueOf(conteo4));\n cap_ct.setText(String.valueOf(total));\n txtId.setText(\"Siembra: \" + idSiempar);\n txtVariedad.setText(\"Variedad: \" + variedad);\n txtBloque.setText(\"Bloque: \" + bloque);\n }else{\n Toast.makeText(this, \"No se puede cargar el registro por que ya ha sido enviado\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (Exception E) {\n Toast.makeText(getApplicationContext(), \"No has seleccionado aún una fila \\n\" + E, Toast.LENGTH_LONG).show();\n }\n }", "public void tablero(){\r\n System.out.println(\" X \");\r\n System.out.println(\" 1 2 3\");\r\n System.out.println(\" | |\");\r\n //imprimir primera fila\r\n System.out.println(\" 1 \"+gato[0][0]+\" | \"+gato[0][1]+\" | \"+gato[0][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir segunda fila\r\n System.out.println(\"Y 2 \"+gato[1][0]+\" | \"+gato[1][1]+\" | \"+gato[1][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir tercera fila\r\n System.out.println(\" 3 \"+gato[2][0]+\" | \"+gato[2][1]+\" | \"+gato[2][2]+\" \");\r\n System.out.println(\" | |\");\r\n }", "public void tampil_tb_mahasiswa(){\n Object []baris = {\"No Bp\",\"Nama\",\"Tempat Lahir\",\"Tanggal Lhair\",\"Jurusan\",\"Tanggal Masuk\"};\n tabmode = new DefaultTableModel(null, baris);\n //tb_mahasiswa.setModel(tabmode);\n try {\n Connection con = new koneksi().getConnection();\n String sql = \"select * from tb_mahasiswa order by no_bp asc\";\n java.sql.Statement stat = con.createStatement();\n java.sql.ResultSet hasil = stat.executeQuery(sql);\n while (hasil.next()){\n String no_bp = hasil.getString(\"no_bp\");\n String nama = hasil.getString(\"nama\");\n String tempat_lahir = hasil.getString(\"tempat_lahir\");\n String tanggal_lahir = hasil.getString(\"tanggal_lahir\");\n String jurusan = hasil.getString(\"jurusan\"); \n String tanggal_masuk = hasil.getString(\"tanggal_masuk\");\n String[] data = {no_bp, nama, tempat_lahir, tanggal_lahir, jurusan, tanggal_masuk};\n tabmode.addRow(data);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\",\"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }", "public void fill_table()\n {\n Secante secante = new Secante(GraficaSecanteController.a, GraficaSecanteController.b, GraficaSecanteController.ep, FuncionController.e);\n list = secante.algoritmo();\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public PantallaPaginas() {\r\n initComponents();\r\n framePaginas=new DefaultTableModel();\r\n framePaginas.addColumn(\"Num Pagina\");\r\n framePaginas.addColumn(\"Bit Residencia\");\r\n framePaginas.addColumn(\"Info Relevante\"); \r\n framePaginas.addRow(new Object []{null, null, null});\r\n tablaPaginas.setModel(framePaginas);\r\n Window[] w=PantallaProcesos.getWindows();\r\n w[1].setLocation(w[0].getWidth()+5, w[0].getY());\r\n\r\n TableColumn tcol;\r\n //va recrriendo las columnas\r\n for(int i=0;i<3;i++)\r\n {\r\n tcol= tablaPaginas.getColumnModel().getColumn(i);\r\n tcol.setCellRenderer(new CustomTableCellRenderer());\r\n }\r\n }", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "public void limpiarcarrito() {\r\n setTotal(0);//C.P.M limpiamos el total\r\n vista.jTtotal.setText(\"0.00\");//C.P.M limpiamos la caja de texto con el formato adecuado\r\n int x = vista.Tlista.getRowCount() - 1;//C.P.M inicializamos una variable con el numero de columnas\r\n {\r\n try {\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo actual de la tabla\r\n while (x >= 0) {//C.P.M la recorremos\r\n temp.removeRow(x);//C.P.M vamos removiendo las filas de la tabla\r\n x--;//C.P.M y segimos disminuyendo para eliminar la siguiente \r\n }\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al limpiar la venta\");\r\n }\r\n }\r\n }", "public DetalleTablaComplementario() {\r\n }", "private void llenarTabla() {\n\t\t// TODO Auto-generated method stub\n\t\tif (gestionando.equals(\"Empleado\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> empleados = administradorDelegado.listarEmpleadosObservables();\n\t\t\t\ttable.setItems(empleados);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else if (gestionando.equals(\"Recolector\")) {\n\t\t\ttry {\n\t\t\t\tObservableList<PersonaObservable> recolectores = administradorDelegado.listarRecolectoresObservables();\n\t\t\t\ttable.setItems(recolectores);\n\t\t\t\tcolumnCedula.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"cedula\"));\n\t\t\t\tcolumnNombre.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"nombre\"));\n\t\t\t\tcolumnApellidos.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"apellido\"));\n\t\t\t\tcolumnTelefono.setCellValueFactory(new PropertyValueFactory<PersonaObservable, String>(\"telefono\"));\n\t\t\t\ttable.getColumns().setAll(columnCedula, columnNombre, columnApellidos, columnTelefono);\n\t\t\t\ttable.setPrefWidth(450);\n\t\t\t\ttable.setPrefHeight(300);\n\t\t\t\ttable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\n\t\t\t\ttable.getSelectionModel().selectedIndexProperty().addListener(new RowSelectChangeListener());\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "private void load_table() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"ID\");\n model.addColumn(\"NIM\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Kelamin\");\n model.addColumn(\"Phone\");\n model.addColumn(\"Agama\");\n model.addColumn(\"Status\");\n\n //menampilkan data database kedalam tabel\n try {\n String sql = \"SELECT * FROM mhs\";\n java.sql.Connection koneksi = (Connection) Koneksi.KoneksiDB();\n java.sql.Statement stm = koneksi.createStatement();\n java.sql.ResultSet res = stm.executeQuery(sql);\n\n while (res.next()) {\n model.addRow(new Object[]{res.getString(1), res.getString(2),\n res.getString(3), res.getString(4), res.getString(5),\n res.getString(6), res.getString(7)});\n }\n tabelMahasiswa.setModel(model);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }", "@Override\r\n public String toString() {\r\n StringBuilder cad = new StringBuilder(\"\");\r\n cad.append(\"\\nTabla: {\\n\");\r\n for (int i = 0; i < this.table.length; i++) {\r\n if(this.table[i] == null){\r\n cad.append(\"\\t()\\n\");\r\n }else{\r\n cad.append(\"\\t\").append(this.table[i].toString()).append(\"\\n\");\r\n }\r\n }\r\n cad.append(\"}\");\r\n return cad.toString();\r\n }", "public void crearModelo() {\n modeloagr = new DefaultTableModel(null, columnasAgr) {\n public boolean isCellEditable(int fila, int columna) {\n return false;\n }\n };\n tbl.llenarTabla(AgendarA.tblAgricultor, modeloagr, columnasAgr.length, \"SELECT idPersonalExterno,cedula,CONCAT(nombres,' ',apellidos),municipios.nombre,telefono,telefono2,telefono3 FROM personalexterno,municipios WHERE tipo='agricultor' AND personalexterno.idMunicipio=municipios.idMunicipio\");\n tbl.alinearHeaderTable(AgendarA.tblAgricultor, headerColumnas);\n tbl.alinearCamposTable(AgendarA.tblAgricultor, camposColumnas);\n tbl.rowNumberTabel(AgendarA.tblAgricultor);\n }", "private void tableAdapt(ArrayList<String[]> lista, boolean isTraslateAvalible) {\n TableLayout table = (TableLayout) findViewById(R.id.table);\n //declaramos el objeto que nos creará la tabla dinámica\n TableModel tbModel = new TableModel(MainActivity.this, table);\n //indicamos los encabezados de la tabla\n if (isTraslateAvalible) {\n tbModel.setHeaders(new String[]{\"N\", \"Object\", \"Traslated\", \"Accuracy\"});\n } else {\n tbModel.setHeaders(new String[]{\"N\", \"Object\", \"Accuracy\"});\n }\n //enviamos los datos del cuerpo de la tabla\n tbModel.setRows(lista);\n //configuramos la tabla, colores del encabezado y el cuerpo\n // tanto del texto como el fondo\n tbModel.setHeaderBackGroundColor(R.color.back_black);\n tbModel.setRowsBackGroundColor(R.color.back_white);\n\n tbModel.setHeadersForeGroundColor(R.color.back_white);\n tbModel.setRowsForeGroundColor(R.color.back_black);\n //Modifica la tabla a partir de los datos enviados y los parámetros enviados\n tbModel.makeTable();\n\n MyLogs.info(\" FIN \");\n }", "public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n for(int i = 0; i < nomeCasa.size(); i++){\n casas.put(nomeCasa.get(i), new Casa(nomeCasa.get(i)));\n casas.get(nomeCasa.get(i)).setCor(corInicial);\n } \n }", "public pasien() {\n initComponents();\n model = new DefaultTableModel();\n tabelpasien.setModel(model);\n model.addColumn(\"ID_PASIEN\");\n model.addColumn(\"NAMA_PASIEN\");\n model.addColumn(\"ALAMAT\");\n \n loadData();\n \n }", "public void preecheTabCliente(Cliente c){\n \n limpaTabela(tbClientes);\n DefaultTableModel model = (DefaultTableModel) tbClientes.getModel();\n Vector row = new Vector();\n \n row.add(c.getCNPJ());\n row.add(c.getRSocial());\n row.add(c.getNFantasia());\n row.add(c.getRsp());\n row.add(\"(\"+c.getDDDTel()+\")\"+c.getTel());\n \n model.addRow(row);\n \n }", "public DefaultTableModel Ordernar() {\n String sql;\n sql = \"SELECT idempleado,empleados.documento,nombre,apellido,sueldo,trabajo FROM empleados,personas WHERE empleados.documento=personas.documento ORDER BY idempleado\";\n try {\n setTitulos();\n PS = con.Conectarse().prepareStatement(sql);\n rst = PS.executeQuery();\n Object[] fila = new Object[6];\n while (rst.next()) {\n fila[0] = rst.getInt(\"idempleado\");\n fila[1] = rst.getString(\"documento\");\n fila[2] = rst.getString(\"nombre\");\n fila[3] = rst.getString(\"apellido\");\n fila[4] = rst.getDouble(\"sueldo\");\n fila[5] = rst.getString(\"trabajo\");\n DIM.addRow(fila);\n }\n\n } catch (SQLException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, \"NO EXISTEN DATOS\", \"AVISO\", JOptionPane.INFORMATION_MESSAGE);\n }\n return DIM;\n }", "private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }", "private void carga_tabla_cobro(JTable tbl_cobro,String opc) {\n DefaultTableModel model =new DefaultTableModel();\n tbl_cobro.setModel(model);\n model.addColumn(\"Trans\");\n model.addColumn(\"Sub Trans\");\n model.addColumn(\"Entidad\");\n model.addColumn(\"Nro Valor\");\n model.addColumn(\"Nro Cuenta\");\n model.addColumn(\"Importe\");\n int[] anchos = {100,100,100,100,100,150};\n for (int i = 0; i < vistaForma_Pag.tbl_cobro.getColumnCount(); i++) {\n vistaForma_Pag.tbl_cobro.getColumnModel().getColumn(i).setPreferredWidth(anchos[i]);\n }\n }", "public void atualizarTabelaFunc() throws SQLException {\n DefaultTableModel model = (DefaultTableModel) tabelaFunc.getModel();\n model.setNumRows(0);\n dadosDAO dados = new dadosDAO();\n String pesquisa = funcField.getText().toUpperCase();\n for (funcionario func : dados.readFuncionarios()){\n if (!funcField.getText().equals(\"\")){\n if (nomeBtnFunc.isSelected()){\n if (func.getNome().contains(pesquisa)){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else if (cpfBtnFunc.isSelected()){\n if (funcField.getText().equals(func.getCpf())) {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else {\n if (funcField.getText().equals(String.valueOf(func.getId_func()))){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n } else {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n }", "private void export3(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\tif (WICH_ONE.equals(\"A\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascIngresoCoope\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"B\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascRetiroCoope\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"C\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascProfesion\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"D\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascSalario\");\n\t\t}\n\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tif (WICH_ONE.equals(\"A\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.aportaciones\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"B\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascRetiroCoope\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahorros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\t\t\t\t\treturn descAhorros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"C\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascProfesion\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.prestamos\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\t\t\t\t\treturn descPrestamos;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"D\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.seguros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descSeguros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\n\t\ttableFacade.render();\n\t}", "private void tampilkan() {\n //To change body of generated methods, choose Tools | Templates.\n DefaultTableModel tabelpegawai = new DefaultTableModel();\n tabelpegawai.addColumn(\"NAMA\");\n tabelpegawai.addColumn(\"ALAMAT\");\n tabelpegawai.addColumn(\"HP\");\n tabelpegawai.addColumn(\"BBM\");\n tabelpegawai.addColumn(\"SITUS\");\n \n \n try {\n conek getCnn = new conek();\n con= null;\n con= (com.mysql.jdbc.Connection) getCnn.getConnection();\n String sql = \"select * from toko \";\n Statement stat = con.createStatement();\n ResultSet res=stat.executeQuery(sql);\n while (res.next()){\n tabelpegawai.addRow(new Object[]{res.getString(1),res.getString(2),res.getString(3),res.getString(4),res.getString(5)});\n }\n jTable1.setModel(tabelpegawai);\n } catch(Exception e){}\n }", "private void llenar_tabla() {\n \n try {\n DefaultTableModel modelo;\n conexion cnx = new conexion();\n Connection registros = cnx.conexion();\n String[] nombre_atributos = {\"id_producto\", \"nombre\",\"id_categoria\"};\n String sql = (\"SELECT *FROM producto\");\n modelo = new DefaultTableModel(null, nombre_atributos);\n Statement st = (Statement) registros.createStatement();\n ResultSet rs = st.executeQuery(sql);\n String[] filas = new String[3];\n\n while (rs.next()) {\n filas[0] = rs.getString(\"id_producto\");\n filas[1] = rs.getString(\"nombre\");\n filas[2] = rs.getString(\"id_categoria\");\n modelo.addRow(filas);\n\n }\n jtabla.setModel(modelo);\n registros.close();\n } catch (SQLException ex) {\n Logger.getLogger(responsable.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public TabellaModel() {\r\n lista = new Lista();\r\n elenco = new Vector<Persona>();\r\n elenco =lista.getElenco();\r\n values = new String[elenco.size()][3];\r\n Iterator<Persona> iterator = elenco.iterator();\r\n while (iterator.hasNext()) {\r\n\t\t\tfor (int i = 0; i < elenco.size(); i++) {\r\n\t\t\t\tpersona = new Persona();\r\n\t\t\t\tpersona = (Persona) iterator.next();\r\n\t\t\t\tvalues[i][0] = persona.getNome();\r\n\t\t\t\tvalues[i][1] = persona.getCognome();\r\n\t\t\t\tvalues[i][2] = persona.getTelefono();\t\r\n\t\t\t}\r\n\t\t}\r\n setDataVector(values, columnNames);\t\r\n }", "private void mostrarTablero() {\n Jugada objJugada = null;\n if (! this.objJuegoTresEnRaya.getMovimientos().estaVacia())\n objJugada = this.objJuegoTresEnRaya.getMovimientos().ultimo();\n\n if (objJugada == null) {\n tab0x0.setEnabled(true);\n tab0x1.setEnabled(true);\n tab0x2.setEnabled(true);\n \n tab1x0.setEnabled(true);\n tab1x1.setEnabled(true);\n tab1x2.setEnabled(true);\n \n tab2x0.setEnabled(true);\n tab2x1.setEnabled(true);\n tab2x2.setEnabled(true);\n \n tab0x0.setText(\"\");\n tab0x1.setText(\"\");\n tab0x2.setText(\"\");\n \n tab1x0.setText(\"\");\n tab1x1.setText(\"\");\n tab1x2.setText(\"\");\n \n tab2x0.setText(\"\");\n tab2x1.setText(\"\");\n tab2x2.setText(\"\");\n return;\n }\n \n if (objJugada.getTablero(0, 0) > 0) {\n tab0x0.setEnabled(false);\n tab0x0.setText(getTexto(objJugada.getTablero(0, 0)));\n }\n if (objJugada.getTablero(0, 1) > 0) {\n tab0x1.setEnabled(false);\n tab0x1.setText(getTexto(objJugada.getTablero(0, 1)));\n }\n if (objJugada.getTablero(0, 2) > 0) {\n tab0x2.setEnabled(false);\n tab0x2.setText(getTexto(objJugada.getTablero(0, 2)));\n }\n\n if (objJugada.getTablero(1, 0) > 0) {\n tab1x0.setEnabled(false);\n tab1x0.setText(getTexto(objJugada.getTablero(1, 0)));\n }\n if (objJugada.getTablero(1, 1) > 0) {\n tab1x1.setEnabled(false);\n tab1x1.setText(getTexto(objJugada.getTablero(1, 1)));\n }\n if (objJugada.getTablero(1, 2) > 0) {\n tab1x2.setEnabled(false);\n tab1x2.setText(getTexto(objJugada.getTablero(1, 2)));\n }\n\n if (objJugada.getTablero(2, 0) > 0) {\n tab2x0.setEnabled(false);\n tab2x0.setText(getTexto(objJugada.getTablero(2, 0)));\n }\n if (objJugada.getTablero(2, 1) > 0) {\n tab2x1.setEnabled(false);\n tab2x1.setText(getTexto(objJugada.getTablero(2, 1)));\n }\n if (objJugada.getTablero(2, 2) > 0) {\n tab2x2.setEnabled(false);\n tab2x2.setText(getTexto(objJugada.getTablero(2, 2)));\n }\n \n this.numNodosResultLabel.setText(\"\" + objJuegoTresEnRaya.getNumeroNodosUltima());\n \n if (objJuegoTresEnRaya.estaTerminado()) {\n tab0x0.setEnabled(false);\n tab0x1.setEnabled(false);\n tab0x2.setEnabled(false);\n \n tab1x0.setEnabled(false);\n tab1x1.setEnabled(false);\n tab1x2.setEnabled(false);\n \n tab2x0.setEnabled(false);\n tab2x1.setEnabled(false);\n tab2x2.setEnabled(false);\n \n this.quienGanoResultLabel.setText(getTexto(objJuegoTresEnRaya.getQuienGano()));\n }\n }", "String getTabela();", "public void setTable(TableCaracteristique tab) {\n this.table = tab;\n }", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "public void initTable() {\n this.table.setSelectable(true);\n this.table.setImmediate(true);\n this.table.setWidth(\"100%\");\n this.table.addListener(this);\n this.table.setDropHandler(this);\n this.table.addActionHandler(this);\n this.table.setDragMode(TableDragMode.ROW);\n this.table.setSizeFull();\n\n this.table.setColumnCollapsingAllowed(true);\n // table.setColumnReorderingAllowed(true);\n\n // BReiten definieren\n this.table.setColumnExpandRatio(LABEL_ICON, 1);\n this.table.setColumnExpandRatio(LABEL_DATEINAME, 3);\n this.table.setColumnExpandRatio(LABEL_DATUM, 2);\n this.table.setColumnExpandRatio(LABEL_GROESSE, 1);\n this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1);\n this.table.setColumnHeader(LABEL_ICON, \"\");\n }", "private void preencherTabelaVeiculoCarga() {\n\n ArrayList dados = new ArrayList();\n cargaDao = new CargaDao();\n Carga carga;\n String[] colunas = new String[]{\"ID\", \"DESCRICAO\", \"STATUS\"};\n\n try {\n final List<Object> listaCarga = cargaDao.listarCargasDoVeiculo(idVeiculoSelecionado);\n\n if (listaCarga != null && listaCarga.size() > 0) {\n for (Object cargaAtual : listaCarga) {\n carga = (Carga) cargaAtual;\n dados.add(new Object[]{carga.getIdCarga(), carga.getDescricao(), carga.getStatus()});\n }\n }\n\n ModeloTabela modTabela = new ModeloTabela(dados, colunas);\n jTB_VeiculoCarga.setModel(modTabela);\n jTB_VeiculoCarga.getColumnModel().getColumn(0).setPreferredWidth(100);\n jTB_VeiculoCarga.getColumnModel().getColumn(0).setResizable(false);\n jTB_VeiculoCarga.getColumnModel().getColumn(1).setPreferredWidth(300);\n jTB_VeiculoCarga.getColumnModel().getColumn(1).setResizable(false);\n jTB_VeiculoCarga.getColumnModel().getColumn(2).setPreferredWidth(150);\n jTB_VeiculoCarga.getColumnModel().getColumn(2).setResizable(false);\n\n jTB_VeiculoCarga.getTableHeader().setReorderingAllowed(false);\n jTB_VeiculoCarga.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n jTB_VeiculoCarga.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n jTB_VeiculoCarga.addMouseListener(new MouseAdapter() {\n\n @Override\n public void mouseClicked(MouseEvent e) {\n try {\n List<Object> lista = cargaDao.listarCargasDoVeiculo(idVeiculoSelecionado);\n cargaSelecionada = (Carga) lista.\n get(jTB_VeiculoCarga.convertRowIndexToModel(jTB_VeiculoCarga.getSelectedRow()));\n\n // if (veiculoDao.listarVeiculosAtivos().size() > 0 && veiculoDao.listarVeiculosAtivos() != null) {}\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(FormVeiculoCargas.this, \"Erro genérico1: \" + ex.getMessage());\n ex.printStackTrace(System.err);\n }\n }\n\n });\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Erro genérico2: \" + e.getMessage());\n }\n }", "private void Table()\n{\n Object [] Kolom = {\"Nama\", \"No. Telp\", \"Kota Asal\"};\n Table = new DefaultTableModel(null, Kolom);\n Tabel.setModel(Table);\n}", "public void echantillon_zone(){\n\n JLabel lbl_Echantillon = new JLabel(\"Offre d'\\u00E9chantillons :\");\n lbl_Echantillon.setBounds(340, 170, 119, 16);\n add(lbl_Echantillon);\n\n // MODEL\n final DefaultTableModel model = new DefaultTableModel();\n final DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();\n rightRenderer.setHorizontalAlignment(JLabel.RIGHT);\n Object[][] o = new Object[sizeVector][2];\n for(int i = 0; i < sizeVector; i++){\n o[i][0] = medicaments.get(i)[0];\n o[i][1] = medicaments.get(i)[1];\n }\n // TABLE DATA\n model.setDataVector(o, new Object[]{\"M\\u00E9dicament\",\"Qt\\u00E9\"});\n\n\n // TABLE\n result_table = new JTable(model);\n result_table.setBounds(475, 170, 200, 150);\n result_table.getColumnModel().getColumn(1).setMaxWidth(40);\n result_table.getColumnModel().getColumn(1).setCellRenderer(rightRenderer);\n result_table.setEnabled(false);\n add(result_table);\n\n\n // SCROLLPANE\n JScrollPane apne= new JScrollPane(result_table);\n apne.setBounds(475, 170, 200, 150);\n add(apne);\n\n\n }" ]
[ "0.70474523", "0.6909487", "0.6887191", "0.68736845", "0.6868495", "0.6853521", "0.68307936", "0.67838395", "0.6781893", "0.6781756", "0.67805344", "0.6769935", "0.6759645", "0.6741832", "0.6741101", "0.674033", "0.67331076", "0.6717328", "0.6716033", "0.67145497", "0.67121667", "0.67039174", "0.6681826", "0.6673586", "0.66661054", "0.6651096", "0.6640041", "0.6632176", "0.6624065", "0.6623152", "0.6619351", "0.661361", "0.6608077", "0.6606048", "0.6604436", "0.66020125", "0.6598838", "0.6594726", "0.659145", "0.65877867", "0.65877104", "0.6577958", "0.6567581", "0.65663546", "0.65645945", "0.6556443", "0.6552679", "0.65505725", "0.65497416", "0.65426415", "0.6535045", "0.6530898", "0.6527757", "0.651845", "0.65179634", "0.6514909", "0.6514851", "0.65124935", "0.6508686", "0.6494332", "0.64899", "0.6488913", "0.64837027", "0.6482627", "0.64785546", "0.6478157", "0.6476596", "0.6475536", "0.6475061", "0.6458434", "0.6444231", "0.6442725", "0.6433493", "0.6427669", "0.64104444", "0.64086974", "0.6402961", "0.6400429", "0.639887", "0.6395581", "0.63919336", "0.63906765", "0.63865507", "0.6380332", "0.63757145", "0.6374376", "0.6374359", "0.6373686", "0.6372848", "0.6366994", "0.6350461", "0.6344955", "0.63448536", "0.6341672", "0.6340848", "0.6338577", "0.6330972", "0.63264626", "0.6324484", "0.6324139", "0.63176554" ]
0.0
-1
Calculates the best items without repetition to put into a knapsack given a weight Complexity: O( w k ) where w is the weight and k the number of items
private static long calculateBestPickWithoutRepetition(int weight, Item[] items, long[][] DP) { for(int w = 1; w <= weight; w++) { for(int i = 1; i <= items.length; i++) { DP[w][i] = DP[w][i-1]; Item item = items[i-1]; if (item.getWeight() <= w) { DP[w][i] = Math.max(DP[w][i], DP[w - item.getWeight() ][i-1] + item.getValue()); } } } return DP[DP.length -1][DP[0].length - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int knapsack(Item[] items, int maxWeight) {\n return knapsack(items, maxWeight, 0);\n }", "public Knapsack bruteForceCalc (ArrayList <Item> items,int capacity, int num_items) {\n\t\tif (num_items <= 0) {\n\t\t\tKnapsack knapsack = new Knapsack(0);\n\t\t\treturn knapsack;\n\t\t} \n\t\telse if (items.get(num_items -1).getWeight() > capacity) {\n\t\t\treturn bruteForceCalc(items, capacity, num_items - 1);\n\t\t} else {\n\n\t\t\tKnapsack ignore = bruteForceCalc(items,capacity, num_items - 1);\n\t\t\tKnapsack take = bruteForceCalc(items,capacity - items.get(num_items -1).getWeight(), num_items - 1);\n\t\t\t\n\t\t\tint ignoreVal = ignore.getValue();\n\t\t\tint takeVal = items.get(num_items - 1).getValue() + take.getValue();\n\t\t\t \n\t\t\tif( Math.max(ignoreVal, takeVal) == ignoreVal ) \n\t\t\t\treturn ignore;\n\t\t\telse {\n\t\t\t\ttake.addItem(items.get(num_items - 1));\n\t\t\t\treturn take;\n\t\t\t}\n\t\t}\n\t}", "void ksUnbounded(int targetWeight, int nItems, int[] iWeights, int[] iValues) {\n\r\n\t\tint[][] ksItemCapacity = new int[nItems + 1][targetWeight + 1];\r\n\t\tint[][] ksTrack = new int[nItems + 1][targetWeight + 1];\r\n\r\n\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\tksItemCapacity[0][w] = 0;\r\n\t\t}\r\n\r\n\t\tfor (int item = 1; item < nItems; item++) {\r\n\t\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\t\t// last known Maximum value of KS contents s.t. their weight\r\n\t\t\t\t// totals to atmost w-iWeights[item]\r\n\t\t\t\tint eItemValue = (iWeights[item] <= w) ? ksItemCapacity[item - 1][w\r\n\t\t\t\t\t\t- iWeights[item]]\r\n\t\t\t\t\t\t: 0;\r\n\t\t\t\tif ((iWeights[item] <= w)\r\n\t\t\t\t\t\t&& (iValues[item] + eItemValue) > ksItemCapacity[item - 1][w]) {\r\n\t\t\t\t\tksItemCapacity[item][w] = eItemValue + iValues[item];\r\n\t\t\t\t\t// current item included\r\n\t\t\t\t\tksTrack[item][w] = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tksItemCapacity[item][w] = ksItemCapacity[item - 1][w];\r\n\t\t\t\t\t// current item not included\r\n\t\t\t\t\tksTrack[item][w] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Print KS contents\r\n\t\tArrayList<Integer> ksContents = new ArrayList<Integer>();\r\n\t\tint tW = targetWeight;\r\n\t\tfor (int item = nItems; item >= 0; item--) {\r\n\t\t\tif (ksTrack[item][tW] == 1) {\r\n\t\t\t\ttW -= iWeights[item];\r\n\t\t\t\tksContents.add(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Items choosen are:\");\r\n\t\tint W = 0, V = 0;\r\n\t\tfor (Integer e : ksContents) {\r\n\t\t\tW += iWeights[e];\r\n\t\t\tV += iValues[e];\r\n\t\t\tSystem.out.println(\"Weight: \" + iWeights[e] + \", Value: \"\r\n\t\t\t\t\t+ iValues[e]);\r\n\t\t}\r\n\t\tSystem.out.println(\"Total weight: \" + W + \" Total value: \" + V);\r\n\t}", "static int knapSack(int totalWeight, int wt[], int val[], int n) {\n\t\t// Base Case\n\t\tif (n == 0 || totalWeight == 0)\n\t\t\treturn 0;\n\n\t\t// If weight of the nth item is more than Knapsack capacity W, then\n\t\t// this item cannot be included in the optimal solution\n\t\tif (wt[n - 1] > totalWeight)\n\t\t\treturn knapSack(totalWeight, wt, val, n - 1);\n\n\t\t// Return the maximum of two cases:\n\t\t// (1) nth item included\n\t\t// (2) not included\n\t\telse\n\t\t\treturn max(\n\t\t\t\t\tval[n - 1]\n\t\t\t\t\t\t\t+ knapSack(totalWeight - wt[n - 1], wt, val, n - 1),\n\t\t\t\t\tknapSack(totalWeight, wt, val, n - 1));\n\t}", "static int knapsack(int W, int wt[], int val[], int n)\n\t{\n\t\t// base case\n\t\tif (n==0 || W==0)\n\t\t\treturn 0;\n\t\t\n\t\t// If weight of nth item is more than knapsack capacity W, then\n\t\t// this item cannot be included in optimal solution\n\t\tif (wt[n-1] > W)\n\t\t\treturn knapsack(W, wt, val, n-1);\n\t\t\n\t\t// return maximum of two cases\n\t\t// nth item included\n\t\t// not included\n\t\telse return max(val[n-1] + knapsack(W-wt[n-1],wt,val,n-1),\n\t\t\t\tknapsack(W,wt,val,n-1)\n\t\t\t\t);\n\t}", "public static int zeroOneKnapsack(int[] weight, int[] value, int capacity) {\n\t\tint[][] dp = new int[weight.length + 1][capacity + 1];\n\n\t\tfor (int i = 0; i < weight.length + 1 ; i++) {\n\t\t\t for (int j = 0; j < capacity + 1; j++) {\n\t\t\t\t\n\t\t\t\t // base condition for memoization\n\t\t\t\t // first row and first column for 2d matrix is initialised to 0\n\t\t\t\t // profit = 0 when number of items = 0 or bag capacity = 0 \n\t\t\t\t if (i == 0 || j == 0) { \n\t\t\t\t\t dp[i][j] = 0;\n\t\t\t\t } \n\t\t\t\t \n\t\t\t\t // weight of item under consideration is less than capacity of bag\n\t\t\t\t // value of i in 2d matrix corresponds to (i-1)th element in weight and value arrays\n\t\t\t\t // hence, weight(i-1) is compared with the corresponding matrix cell capacity(i.e.column)\n\t\t\t\t \n\t\t\t\t else if (weight[i-1] <= j){\n\t\t\t\t\t \n\t\t\t\t\t // possibility 1: when item having weight(i-1) is added to bag\n\t\t\t\t\t // item having weight(i-1) has value(i-1)\n\t\t\t\t\t // this value added to array value for (i-1)th row and (j-weight[i-1])th column\n\t\t\t\t\t // because :\n\t\t\t\t\t // 1) the total capacity reduced by weight(i-1) after deciding item inclusion\n\t\t\t\t\t // 2) total no.of elements reduced by 1 after deciding item inclusion\n\t\t\t\t\t \n\t\t\t\t\t int a = value[i-1] + dp[i-1][j-weight[i-1]];\n\t\t\t\t\t \n\t\t\t\t\t// possibility 1: when item having weight(i-1) is not added to bag\n\t\t\t\t\t// 1) the total capacity remains as is after deciding item exclusion\n\t\t\t\t\t// 2) total no.of elements reduced by 1 after deciding item exclusion\n\t\t\t\t\t \n\t\t\t\t\t int b = dp[i-1][j];\n\t\t\t\t\t \n\t\t\t\t\t // max of a and b taken to find maximum profit value \n\t\t\t\t\t dp[i][j] = Math.max(a, b);\t \n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t // weight of item under consideration is more than capacity of bag\n\t\t\t\t // hence item having weight(i-1) is not added to bag\n\t\t\t\t else {\n\t\t\t\t\t \n\t\t\t\t\t// 1) the total capacity remains as is after deciding item exclusion\n\t\t\t\t\t// 2) total no.of elements reduced by 1 after deciding item exclusion\n\t\t\t\t\t \n\t\t\t\t\t dp[i][j] = dp[i-1][j];\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dp[weight.length][capacity];\n\t\t\n\t}", "static int knapsack(int[] weight, int[] value, int n, int maxWeight) {\n int[][] dp = new int[n+1][maxWeight+1];\n for (int i=0;i<=n;i++) {\n for (int j =0;j<=maxWeight;j++) {\n dp[i][j] = -1;\n }\n }\n int ans= knapsack(weight,value,n,maxWeight,dp);\n return ans;\n\n }", "static int unboundedKnapsack(int [] val,int[] wt, int W){\n int n = val.length;\n int[][] dp = new int[n+1][W+1];\n for (int i =0;i<=n;i++){\n dp[i][0] = 0;\n }\n for (int j = 0;j<=W;j++){\n dp[0][j] = 0;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=W;j++){\n if (wt[i-1] <= j){\n dp[i][j] = Math.max(dp[i-1][j], val[i-1] + dp[i][j - wt[i-1]]);\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][W];\n }", "public static void main(String[] args){ w = the total weight\n\t\t// i = item i\n\t\t// m[i, w] = maximum value attained with weight <= w using items up to i\n\t\t//\n\t\t// recurrence relation:\n\t\t// m[0, w] = 0, if there's zero items, the sum is zero\n\t\t// m[i, w] = m[i-1, w], if w(i) > w, the new item's weight > current weight limit\n\t\t// m[i, w] = max(m[i-1, w],\n\t\t// \t\t\t\t m[i-1, w-w(i)] + v(i), if w(i) <= w\n\t\t//\n\t\t//\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\n\t\titems.add(new Item(10, 60));\n\t\titems.add(new Item(20, 100));\n\t\titems.add(new Item(30, 120));\n\n\t\tSystem.out.println(knapsack(items.size()-1, 50, items));\n\t}", "public static void knapsackDynamicProgramming(objects[] items, int capacity, int n) \r\n { \r\n\t\t//use bubble sort to sort item by their weight\t\t\t\t\r\n\t\tfor (int i = 0; i < n-1; i++) \t\t\t\t\r\n\t\t{ \t\t \r\n\t\t\tfor (int j = 0; j < (n-i-1); j++) \t\t \r\n\t\t\t{\t\t \r\n\t\t\t\tif (items[j].weight < items[j+1].weight) \t\t \r\n\t\t\t\t{ \t\t \t\r\n\t\t\t\t\tobjects temp = items[j]; \t\t \r\n\t\t\t\t\titems[j] = items[j+1]; \t\t \r\n\t\t\t\t\titems[j+1] = temp; \t\t \t\t\t\t\t\r\n\t\t\t\t}\t\t \r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n \tif(n <= 0 || capacity <= 0)\r\n \t{\r\n \t\tSystem.out.print(\"Error capacity and object numbers can't be 0\");\r\n \t}\r\n \r\n \tint matrixTable[][] = new int[n+1][capacity+1]; \r\n \r\n \tfor (int i = 0; i <= n; i++) \r\n \t{ \r\n \t\tfor (int j = 0; j <= capacity; j++) \r\n \t\t{ \r\n \t\t\t//Preset row 0 value and column value to 0\r\n \t\t\tif (i==0 || j==0) \r\n \t {\r\n \t\t\t\tmatrixTable[i][j] = 0; \r\n \t }\r\n \r\n \t\t\t//If current row number is greater than current weight number\r\n \t\t\telse if (items[i-1].weight <= j) \r\n \t\t\t{\r\n \t\t\t\t//Compare the top value with top value plus value(use weight as the value to go left)result\r\n \t\t\t\t//and use the greatest value for the current one.\r\n \t\t\t\tmatrixTable[i][j] = Math.max(items[i-1].profit + matrixTable[i-1][j-items[i-1].weight], matrixTable[i-1][j]); \r\n \t\t\t}\r\n \t\t\t//If row number is less than current weight number just use the top value\r\n \t\t\telse \r\n \t\t\t{ \t \r\n \t\t\t\tmatrixTable[i][j] = matrixTable[i-1][j];\r\n \t\t\t}\r\n \t\t} \t\r\n \t} \r\n \t\r\n\t\tint totalProfit = matrixTable[n][capacity]; \t\t\r\n\t\tint temp = matrixTable[n][capacity];\r\n\t\tint [] itemInKnapsack = new int [n];\r\n\t\t\r\n\t\t//solving which item is in the knapsack\r\n for (int i = n; i > 0 && temp > 0; i--) { \r\n \r\n \r\n \tif (temp == matrixTable[i - 1][capacity]) \r\n \t{\r\n continue;\r\n \t}\r\n \t//if the top value is different than it is include in the knapsack\r\n else \r\n { \r\n itemInKnapsack[i-1] = items[i-1].index; //Save item number\r\n temp = temp - items[i - 1].profit; \r\n capacity = capacity - items[i - 1].weight; \r\n } \r\n } \r\n \r\n printResult(itemInKnapsack, totalProfit, 2); //Call print result\r\n }", "static int zeroOneKnapsack(int []val,int [] wt,int W){\n// initialize\n int[][] dp = new int[val.length+1][W+1];\n\n int n = val.length;\n for (int i = 0;i<=n;i++){\n dp[i][0] = 0;\n }\n for (int j = 0;j<=W;j++){\n dp[0][j] = 0;\n }\n\n for (int i = 1;i<=n;i++){\n for(int j = 1;j<=W;j++){\n if (wt[i-1] <= j){\n dp[i][j] = Math.max(val[i-1] + dp[i-1][j - wt[i-1]], dp[i-1][j]);\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][W];\n }", "double fractionalKnapsack(int W, Item arr[], int n) \n {\n Arrays.sort(arr, new Comparator<Item>() {\n \n public int compare(Item a, Item b)\n {\n return b.value*a.weight - a.value*b.weight;\n }\n });\n \n double ans = 0.0;\n \n for(Item it : arr )\n {\n int wt = it.weight;\n int val = it.value;\n \n if( W > wt )\n {\n W -= wt;\n ans += val;\n }\n \n else\n {\n ans += (val*W)/(double)wt;\n break;\n }\n }\n \n return ans;\n }", "private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}", "public static int optimalWeight(int W, int[] w) {\n int[][] knapsackMaxValues = new int[W+1][w.length+1];\n for(int i=1; i<=W; i++) {\n for(int j=1;j<=w.length; j++) {\n int keepItem;\n try {\n keepItem = w[j-1] + knapsackMaxValues[i-w[j-1]][j-1];\n } catch (ArrayIndexOutOfBoundsException exception) {\n keepItem = 0;\n }\n int leaveItem;\n try {\n leaveItem = knapsackMaxValues[i][j-1];\n } catch (ArrayIndexOutOfBoundsException exception) {\n leaveItem = 0;\n }\n if(keepItem > leaveItem)\n knapsackMaxValues[i][j] = keepItem;\n else\n knapsackMaxValues[i][j] = leaveItem;\n }\n //printKnapsack(knapsackMaxValues);\n }\n\n return knapsackMaxValues[W][w.length];\n }", "static int knapSack(int W, int wt[], int val[], int n, List<Integer> incl, List<Integer> v) {\r\n\tList<Integer> v1 = new ArrayList<>();\r\n\tList<Integer> v2 = new ArrayList<>();\r\n\t// Base Case\r\n\tif (n == 0 || W == 0)\r\n\t return 0;\r\n\t// If weight of the nth item is more than Knapsack capacity W, then\r\n\t// this item cannot be included in the optimal solution\r\n\tif (wt[n - 1] > W) {\r\n\t return knapSack(W, wt, val, n - 1, incl, v1);\r\n\t}\r\n\r\n\t// Return the maximum of two cases:\r\n\t// (1) nth item included\r\n\t// (2) not included\r\n\telse {\r\n\t System.out.println(wt[n - 1]);\r\n\t v1.add(n - 1);\r\n\t int m = val[n - 1] + knapSack(W - wt[n - 1], wt, val, n - 1, incl, v1);\r\n\t int n1 = knapSack(W, wt, val, n - 1, incl, v2);\r\n\t if (Math.max(m, n1) == m) {\r\n\t\tv.addAll(v1);\r\n\t } else {\r\n\t\tv.addAll(v2);\r\n\t }\r\n\t return Math.max(m, n1);\r\n\t}\r\n }", "static int knapsackDP(int weights[],int values[],int noOFitems,int capacityOfKnapsack){\n int dp[][] = new int[noOFitems+1][capacityOfKnapsack+1];\n\n for(int i=1;i<noOFitems+1;i++){\n for(int w=1;w<capacityOfKnapsack+1;w++){\n\n int inc = 0;\t\n if(weights[i] <= w){\n inc = values[i] + dp[i-1][w-weights[i]];\n }\n int exc = dp[i-1][w];\n dp[i][w] = Math.max(inc,exc);\n\n }\n }\n \n for (int i = 0; i < noOFitems+1; i++) {\n\t\t\tfor (int j = 0; j < capacityOfKnapsack+1; j++) {\n\t\t\t\tSystem.out.print(dp[i][j]+ \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n \n return dp[noOFitems][capacityOfKnapsack];\n\t}", "public double knapsack(double[] valuePass, double[] weightPass, double capacity) {\n\n if (valuePass.length == 0) { return 0; }\n value = valuePass;\n weight = weightPass;\n double[] subsets = new double[value.length];\n double takenValue = 0;\n double takenWeight = 0;\n double selection = 0;\n\n // look at each subset of the entire set\n for (int i = 0; i < Math.pow(2, value.length); i++) {\n\n /* INVARIANT: the value/weight values are greater than 0 */\n if (KnapsackMain.debug)\n assert assertionValueWeightGreaterThanZero(takenValue, takenWeight);\n\n // variables for the inner loop\n int itemToTake = value.length - 1;\n double temporaryValue = 0;\n double temporaryWeight = 0;\n\n // wh\n while (subsets[itemToTake] != 0 && itemToTake > 0) {\n subsets[itemToTake] = 0;\n itemToTake = itemToTake - 1;\n }\n\n subsets[itemToTake] = 1;\n\n for (int j = 0; j < value.length; j++) {\n\n // if the item is marked in the subset, then add it to the takenValue\n if (subsets[j] == 1 ) {\n temporaryValue = temporaryValue + value[j];\n temporaryWeight = temporaryWeight + weight[j];\n }\n }\n\n if (temporaryValue > takenValue && temporaryWeight <= capacity) {\n takenValue = temporaryValue;\n takenWeight = temporaryWeight;\n }\n }\n return takenValue;\n }", "static int webknapSackRecur(int W, int wt[], int val[], int n) {\n // Base Case\n if (n == 0 || W == 0)\n return 0;\n\n // wt[i] represents the weight of the ith item\n // If weight of the nth item is more than Knapsack capacity W, then\n // this item cannot be included in the optimal solution\n if (wt[n - 1] > W)\n return webknapSackRecur(W, wt, val, n - 1);\n\n // Return the maximum of two cases:\n // (1) nth item included\n // (2) not included\n else return max(val[n - 1] + webknapSackRecur(W - wt[n - 1], wt, val, n - 1),\n webknapSackRecur(W, wt, val, n - 1)\n );\n }", "public static void main(String[] args) {\n\t\t\n\t\tint max_size,n; \n \n ArrayList<item> items=new ArrayList();\n\t\t// item 1, value 6, size 1\n items.add(new item(1, 6, 1));\n\t\t// item 2, value 10, size 2\n\t\titems.add(new item(2, 10, 2));\n\t\t// item 3, value 12, size 3\n\t\titems.add(new item(3, 12, 3));\n\t\t// the size of your knapsack\n max_size=5; \n\t\t// sort items by density\n\t\tsortitems(items);\n \n System.out.println(\"The maximum value we can place into the knapsack is \"+ greedyfractionalknapsack(items, max_size));\n\n\n\n}", "public static int[][] greedy(float[] benefit, float[] weight, int[] knapsackWeight) {\n // number of items\n int itemLen = benefit.length;\n // number of knapsacks\n int knapsackLen = knapsackWeight.length;\n // key: index of item, value: benefit / weight of item\n Map<Integer, Float> benefitPerWeightMap = new TreeMap<>();\n // if item i is included in knapsack j, result[i][j] = 1, otherwise result[i][j] = 0\n int[][] result = new int[itemLen][knapsackLen];\n // initialize the map\n for (int i = 0; i < itemLen; i++) {\n benefitPerWeightMap.put(i, (benefit[i] / weight[i]));\n }\n\n // the value comparator for sorting the entrySet in the map by value in descending order (using lambda)\n Comparator<Map.Entry<Integer, Float>> valueComparator = (o1, o2) -> o2.getValue().compareTo(o1.getValue());\n // convert the map to list to sort it by value comparator\n List<Map.Entry<Integer, Float>> benefitPerWeightList = new ArrayList<>(benefitPerWeightMap.entrySet());\n benefitPerWeightList.sort(valueComparator);\n\n // put items in list into knapsacks\n for (int j = 0; j < knapsackLen; j++) {\n // the items have been put in and ready to be delete\n List<Map.Entry<Integer, Float>> deleteList = new ArrayList<>();\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightList) {\n int i = entry.getKey();\n if (weight[i] <= knapsackWeight[j]) {\n result[i][j] = 1;\n deleteList.add(entry);\n knapsackWeight[j] -= weight[i];\n }\n }\n // delete the items have been put in\n benefitPerWeightList.removeAll(deleteList);\n }\n return result;\n }", "public static int knapSackWithDP(int expectedWeight) {\n\t\tint N = values.length;\n\t\tint[][] dP = new int[N + 1][expectedWeight + 1];\n\t\tboolean[][] takeSoln = new boolean[N + 1][expectedWeight + 1];\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= expectedWeight; j++) {\n\t\t\t\tif (weights[i - 1] > j) {\n\t\t\t\t\tdP[i][j] = dP[i - 1][j];\n\t\t\t\t} else {\n\t\t\t\t\tint option1 = dP[i - 1][j], option2 = values[i - 1] + dP[i - 1][j - weights[i - 1]];\n\t\t\t\t\tdP[i][j] = Math.max(option2, option1);\n\t\t\t\t\ttakeSoln[i][j] = (option2 > option1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"Selected items are: \");\n\t\tint totalWt = 0, totalValue = 0;\n\t\tfor (int k = N, wt = expectedWeight; k > 0; k--) {\n\t\t\tif (takeSoln[k][wt]) {\n\t\t\t\ttotalWt += weights[k - 1];\n\t\t\t\ttotalValue += values[k - 1];\n\t\t\t\tSystem.out.printf(\"\tItem %d with weight %d and value %d\\n\", k, weights[k - 1], values[k - 1]);\n\t\t\t\twt -= weights[k - 1];\n\t\t\t}\n\t\t}\n\t\tSystem.out.printf(\"Calculated total weight= %d and total value= %d\\n\", totalWt, totalValue);\n\t\treturn dP[N][expectedWeight];\n\t}", "int knapsack01(int[] v, int[] w, int capacity) {\n return knapsack01(v, w, capacity, 0, 0);\n }", "public static int[][] neighborhoodSearch(float[] benefit, float[] weight, int[] knapsackWeight){\n\n /*\n Using greedy algorithm to put items in knapsacks\n */\n\n // number of items\n int itemLen = benefit.length;\n // number of knapsacks\n int knapsackLen = knapsackWeight.length;\n // key: index of item, value: benefit / weight of item\n Map<Integer, Float> benefitPerWeightToIndexMap = new TreeMap<>();\n // if item i is included in knapsack j, result[i][j] = 1, otherwise result[i][j] = 0\n int[][] result = new int[itemLen][knapsackLen];\n // initialize the map\n for (int i = 0; i < itemLen; i++) {\n benefitPerWeightToIndexMap.put(i, (benefit[i] / weight[i]));\n }\n\n // the value comparator for sorting the entrySet in the map by value in descending order (using lambda)\n Comparator<Map.Entry<Integer, Float>> valueComparator = (o1, o2) -> o2.getValue().compareTo(o1.getValue());\n // convert the map to list to sort it by value comparator\n List<Map.Entry<Integer, Float>> benefitPerWeightToIndexList = new ArrayList<>(benefitPerWeightToIndexMap.entrySet());\n benefitPerWeightToIndexList.sort(valueComparator);\n\n printBenefitPerWeightList(benefitPerWeightToIndexList);\n\n int greedyTotalBenefit = 0;\n\n // put items in list into knapsacks\n for (int j = 0; j < knapsackLen; j++) {\n // the items have been put in and ready to be delete\n List<Map.Entry<Integer, Float>> deleteList = new ArrayList<>();\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightToIndexList) {\n int i = entry.getKey();\n if (weight[i] <= knapsackWeight[j]) {\n result[i][j] = 1;\n greedyTotalBenefit += benefit[i];\n deleteList.add(entry);\n knapsackWeight[j] -= weight[i];\n }\n }\n // delete the items have been put in\n benefitPerWeightToIndexList.removeAll(deleteList);\n }\n // After greedy algorithm\n System.out.println(\"------After greedy algorithm------\");\n printKnapsackWeight(knapsackWeight);\n printItemsNotIncluded(benefitPerWeightToIndexList);\n System.out.println(\"Total benefit:\" + greedyTotalBenefit);\n printResult(result);\n\n /*\n Search neighborhood\n */\n\n int neighborTotalBenefit = greedyTotalBenefit;\n\n // traversing knapsacks\n for (int j1 = 0; j1 < knapsackLen - 1; j1++) {\n for (int j2 = j1 + 1; j2 < knapsackLen; j2++) {\n // traversing items in the two knapsacks\n for (int i1 = 0; i1 < itemLen; i1++) {\n for (int i2 = 0; i2 < itemLen; i2++) {\n // judge if item i1 and item i2 exists in knapsack j1 and j2 respectively\n if (result[i1][j1] == 1 && result[i2][j2] == 1) {\n // tempList for update benefitPerWeightToIndexList in iteration\n List<Map.Entry<Integer, Float>> tempList = new ArrayList<>(benefitPerWeightToIndexList);\n // traversing items that have not been included\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightToIndexList) {\n int i3 = entry.getKey();\n // judge if the neighborhood solution is feasible\n if (knapsackWeight[j2] + weight[i2] - weight[i1] >= 0\n && knapsackWeight[j1] + weight[i1] - weight[i3] >= 0) {\n // judge if the neighborhood solution is better\n if (neighborTotalBenefit - benefit[i2] + benefit[i3] > neighborTotalBenefit) {\n // change the current solution to the neighborhood solution\n result[i1][j1] = 0;\n result[i1][j2] = 1;\n\n result[i2][j2] = 0;\n\n result[i3][j1] = 1;\n\n tempList.remove(entry);\n int finalI2 = i2;\n tempList.add(new Map.Entry<Integer, Float>() {\n @Override\n public Integer getKey() {\n return finalI2;\n }\n\n @Override\n public Float getValue() {\n return benefit[finalI2] / weight[finalI2];\n }\n\n @Override\n public Float setValue(Float value) {\n return null;\n }\n });\n\n knapsackWeight[j1] += weight[i1] - weight[i3];\n knapsackWeight[j2] += weight[i2] - weight[i1];\n\n neighborTotalBenefit = (int) (neighborTotalBenefit - benefit[i2] + benefit[i3]);\n\n System.out.println(\"------Find a better solution------\");\n System.out.println(\"Remove item\" + i2 + \" in \" + \"knapsack\" + j2 + \", move item\" + i1 + \" from knapsack\" + j1 + \" to \" + \"knapsack\" + j2 + \" and put item\" + i3 + \" in knapsack\" + j1);\n printKnapsackWeight(knapsackWeight);\n printItemsNotIncluded(tempList);\n System.out.println(\"Total benefit:\" + neighborTotalBenefit);\n printResult(result);\n }\n }\n }\n // update the list after traversing the list\n benefitPerWeightToIndexList = tempList;\n }\n }\n }\n }\n }\n\n return result;\n }", "static void knapsack(int problem, int i, int profit, int weight) {\r\n\t\tif(weight <= capacities.get(problem) && profit > maxProfit) {\r\n\t\t\tmaxProfit = profit;\r\n\t\t\tnumbest = i;\r\n\t\t\tfor(int j = 0; j < include.length; j++){\r\n\t\t\t\tbestset[j] = include[j];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(promising(problem, weight, profit, i)) {\r\n\t\t\tinclude[i+1] = \"yes\";\r\n\t\t\tknapsack(problem, i+1, profit + profits[i+1], weight + weights[i+1]);\r\n\t\t\tinclude[i+1] = \"no\";\r\n\t\t\tknapsack(problem, i+1, profit, weight);\r\n\t\t}\r\n\t}", "public static int knapsack(int[] weights, int[] values, int n, int maxWeight) {\n return knapSack(maxWeight, weights, values, n);\r\n }", "public Knapsack(int k, int[] v, int[] w) {\n\t\tif (v.length != w.length)\n\t\t\tthrow new IllegalArgumentException(\"ambiguous problem size\");\n\t\tn = v.length;\n\t\tif (n < 1)\n\t\t\tthrow new IllegalArgumentException(\"no items to put in knapsack\");\n\t\tthis.k = k;\n\t\tthis.v = new int[n];\n\t\tthis.w = new int[n];\n\t\tSystem.arraycopy(v, 0, this.v, 0, n);\n\t\tSystem.arraycopy(w, 0, this.w, 0, n);\n\t\tx = new int[n];\n\t\tint max = optimize(); // sets x\n\t\tassert feasible();\n\t\toptimal = objective() == max;\n\t}", "int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}", "public int knapSack(int wt[], int val[], int w) {\n return helper(wt, val, wt.length ,w);\n }", "public static TempResult max(int allowedWeight, Set<Item> items) {\n\t\tint[] values=new int[items.size()];\n\t\tint[] weights=new int[items.size()];\n\t\t\n\n\t\tArrayList<Item> items2=new ArrayList<Item>(items);\n\t\tfor (int i=0; i<items2.size(); i++) {\n\t\t\tvalues[i]=items2.get(i).value;\n\t\t\tweights[i]=items2.get(i).weight;\n\t\t}\n\t\t\n int[][] totalValue = new int[values.length+1][allowedWeight+1];\n boolean[][] includedorNot = new boolean[values.length+1][allowedWeight+1];\n \n //We introduce item one by one to the system.\n //For each introduced item, we consider the maximal profit\n //for weight=[0:allowedWeight]\n for (int i=0; i<values.length; i++) {\n \t//introduce item i into the system.\n \tint val=values[i];\n \tint weight=weights[i];\n \t\n \tint itemIndex=i+1;\n \t\n \tfor (int w=1; w<=allowedWeight; w++) {\n \t\t\n \t\t//Zero copy of ith item; i-1 is calculated already\n \t\tint profit1=totalValue[itemIndex-1][w];\n \t\t\n \t\t//one copy of ith item.\n \t\tint profit2=Integer.MIN_VALUE;\n \t\tif (w-weight>=0) {\n \t\t\t//for a particular targeted weight, add item i does not overflow the targeted weight.\n \t\t\tprofit2=totalValue[itemIndex-1][w-weight]+val;\n \t\t}\n \t\t\n \t\tif (profit1>profit2) {\n \t\t\tincludedorNot[itemIndex][w]=false;\n \t\t\ttotalValue[itemIndex][w]=profit1;\n \t\t} else {\n \t\t\tincludedorNot[itemIndex][w]=true;\n \t\t\ttotalValue[itemIndex][w]=profit2;\n \t\t}\n \t}\n }\n\t\t\n \n TempResult result=new TempResult(0, 0);\n result.value=totalValue[values.length][allowedWeight];\n result.items=new LinkedList<>();\n int w=allowedWeight;\n for (int itemIndex=values.length; itemIndex>0; itemIndex--) {\n \tif (includedorNot[itemIndex][w]) {\n \t\tresult.items.add(items2.get(itemIndex-1));\n \t\tw=w-weights[itemIndex-1];\n \t} \n }\n \n return result;\n \n\t}", "static int webknapSackDyna(int W, int wt[], int val[], int n) {\n int i, w;\n int K[][] = new int[n + 1][W + 1];\n //K[i][w] represents the max value for weight w by using i elements\n // row i represents using i values\n // col w represents the current weight\n // Build table K[][] in bottom up manner\n // n is the number of values available to use\n // for each available value\n for (i = 0; i <= n; i++) {\n // for each weight until target weight is achieved\n for (w = 0; w <= W; w++) {\n\n if (i == 0 || w == 0)\n K[i][w] = 0;\n // if the previous weight is still less than the target weight it can potentially be included\n // to calculate the max val for current weight\n else if (wt[i - 1] <= w)\n // val[i-1]: value for the i th weight\n // K[i-1][w-wt[i-1]]: max value using i-1 values to achieve weight target weight - wt of i-1 element\n // val[i-1] + K[i-1][w-wt[i-1]] -> used ith weight add val[i-] and use the remaining i-1 weights to\n // get to the target weight w-wt of ith element -> wt-wt[i-1]\n // K[i-1][w] => max value using i-1 elements to achieve weight w i.e. not using ith element\n K[i][w] = max(val[i - 1] + K[i - 1][w - wt[i - 1]], K[i - 1][w]);\n // wt[i-1] > w\n else\n K[i][w] = K[i - 1][w];\n }\n }\n\n return K[n][W];\n }", "public int knapsack01(int[] w, int[] v, int C) {\n //dp[i] = Math.max(v[i] + dp[i - 1, c - w[i]], dp[i - 1, c])\n int[][] dp = new int[w.length][C];\n for (int i = 0; i <= C; i++) {\n if (i >= w[0])\n dp[0][i] = v[0];\n }\n for (int i = 1; i < w.length; i++) {\n for (int j = 0; j <= C; j++) {\n if (j >= w[i]) {\n dp[i][j] = Math.max(v[i] + dp[i - 1][C - w[i]], dp[i - 1][C]);\n } else {\n dp[i][j] = dp[i - 1][C];\n }\n }\n }\n return dp[w.length - 1][C];\n }", "private void Knapsack(int[] vol, int[] ben, int n, int V, int[][] M)\r\n {\r\n int i,j;\r\n \r\n for (i=1; i<n; i++) {\r\n M[i][0] = 0;\r\n }\r\n \r\n for (j=1; j<V; j++) {\r\n M[0][j] = 0;\r\n }\r\n\r\n for (i=1; i<=n; i++) {\r\n for (j=1; j<=V; j++) {\r\n if(vol[i] > j) {\r\n M[i][j] = M[i-1][j];\r\n } else {\r\n M[i][j] = max(M[i-1][j], M[i-1][j-vol[i]] + ben[i]);\r\n }\r\n }\r\n }\r\n }", "protected abstract void solve(Items items,Knapsack knapsack);", "@Test\n\tpublic void when_provided_maximum_size_list_with_all_elements_that_can_be_added_then_return_sum_in_allowable_amount_of_time() {\n\t\tfinal int[] elements = Fixture.initializeRandomList(MAX_NUM_ELEMENTS, MIN_ELEMENT_SIZE, 5);\n\t\tfinal int elementSum = IntStream.of(elements).sum();\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal int result = Knapsack.getOptimalWeight(elementSum, elements);\n\n\t\tassertThat(result, is(elementSum));\n\t\tassertThat(System.currentTimeMillis() - startTime < Fixture.MAX_ALLOWABLE_CALCULATION_TIME, is(true));\n\t}", "public static int[] knapsackNoRep(int[] values, int[] weights, int twt) {\n // at maxValSets[i] points to a row of weight indices that provide the max set to achieve weight i;\n int[][] maxValSets = new int[twt + 1][];\n for (int i = 0; i < weights.length; i++) {\n //there is only one value[i] to achieve maximum weight i\n maxValSets[weights[i]] = new int[]{i};\n }\n\n // maxValSets[weights[0]] = new int[]{0};\n int currWt = weights[0];\n while (currWt <= twt) {\n // start with weights at currWt\n for (int wtIndx = 0; wtIndx < weights.length; wtIndx++) {\n // these are set of indices that provide current max value at currWt\n int[] currMaxIndices = maxValSets[currWt];\n // if the current weight index has not already been used\n int nextWt = currWt + weights[wtIndx];\n if ((nextWt <= twt) && (!contains(currMaxIndices, wtIndx))) {\n // need to find weight indices at currWt + weight[wtIndx]\n int nextMaxWithCurr = Arrays.stream(currMaxIndices).map((ind) -> values[ind]).sum() + values[wtIndx];\n int[] nextCurrMaxIndices = maxValSets[nextWt];\n int nextCurrMax = 0;\n if (nextCurrMaxIndices != null) {\n nextCurrMax = Arrays.stream(nextCurrMaxIndices).map((ind) -> values[ind]).sum();\n }\n // if\n if (nextMaxWithCurr > nextCurrMax) {\n int[] newMaxArr = new int[currMaxIndices.length + 1];\n System.arraycopy(currMaxIndices, 0, newMaxArr, 0, currMaxIndices.length);\n // at the last element add the current weight index\n newMaxArr[currMaxIndices.length] = wtIndx;\n maxValSets[nextWt] = newMaxArr;\n }\n }\n }\n currWt++;\n while ((currWt <= twt) && (maxValSets[currWt] == null)) {\n currWt++;\n }\n }\n int[] tinds = maxValSets[twt];\n if (tinds != null) {\n int maxVal = 0;\n System.out.println(\"For target weight \" + twt + \" use:\");\n for (int i : tinds) {\n System.out.print(\"weight \" + weights[i] + \" val \" + values[i] + \" ,\");\n maxVal += values[i];\n }\n System.out.println(\" Total value = \" + maxVal);\n }\n return maxValSets[twt];\n\n }", "private static int partition3(int[] A) {\n \tint sum = 0;\r\n \tfor (int i = 0; i < A.length; i++) \r\n sum += A[i]; \r\n \r\n if (sum%3 != 0) \r\n return 0; \r\n \r\n int weight[][] = new int[sum/3+1][A.length+1];\r\n \r\n // initialize top row as true \r\n for (int i = 0; i <= A.length; i++) \r\n \tweight[0][i] = 0; \r\n \r\n // initialize leftmost column, except part[0][0], as 0 \r\n for (int i = 1; i <= sum/3; i++) \r\n \tweight[i][0] = 0; \r\n //The logic of Discrete Knapsack with no repetitions\r\n int count = 0;\r\n for(int i=1; i<=sum/3; i++){\r\n \tfor(int j=1;j<=A.length;j++){\r\n \t\tweight[i][j] = weight[i][j-1];\r\n \t\tint weight1 = 0;\r\n \t\tif(A[j-1]<=i)\r\n \t\t\tweight1 = weight[i-A[j-1]][j] + A[j-1];\r\n \t\tweight[i][j] = Math.max(weight1, weight[i][j]);\r\n \t\tif(weight[i][j] == sum/3)\r\n \t\t\tcount++;\r\n \t\t\r\n \t}\r\n }\r\n if(count < 3)\r\n \treturn 0;\r\n else\r\n \treturn 1;\r\n }", "private void leastWeightFirst(Instance instance) {\n ArrayList<Pair> order = new ArrayList<Pair>();\n\n for (int i = 0; i < instance.getSize(); i++) {\n order.add(i, new Pair(i, instance.getValue(i), instance.getWeight(i)));\n }\n\n // Sort items according to w_i <= w_i+1\n order.sort(new Comparator<Pair>() {\n @Override\n public int compare(Pair o1, Pair o2) {\n return o1.w - o2.w;\n }\n });\n\n setSolution(order);\n }", "public static double getBestknapSack01Value(double maxWeight, double[] w, double[] v) {\n // pack = new boolean[weight.length + 1];\n int[] weight = new int[w.length + 1];\n for (int i = 0; i < w.length; i++) {\n weight[i + 1] = (int) w[i];\n }\n int[] value = new int[v.length + 1];\n for (int i = 0; i < v.length; i++) {\n value[i + 1] = (int) v[i];\n }\n boolean[] pack = new boolean[v.length + 1];\n CalculateknapSack01((int) maxWeight, pack, weight, value);\n return getBestKnapSackValue((int) maxWeight, pack, weight, value);\n }", "private double bound(int i, double weight, double value, int[] items) {\n\t\tint item, wi;\n\t\tassert weight - k < EPS; // Because of when bound is called in fill\n\t\tfor (int j = n - 1; j >= 0; j--) {\n\t\t\titem = items[j];\n\t\t\tif (item <= i)\n\t\t\t\tcontinue;\n\t\t\twi = w[item];\n\t\t\tif (wi < k - weight) {\n\t\t\t\tweight += wi;\n\t\t\t\tvalue += v[item];\n\t\t\t}\n\t\t\telse return value + ((double) (k - weight) / wi) * v[item];\n\t\t}\n\t\treturn value;\n\t}", "private void knapsack(Set<CMNMove> winSet, int count, int maxnum, int target) {\n\t\tint i;\n\t\ttarget -= maxnum; /* use maxnum in sum */\n\t\tcount--; /* now need one less summand */\n\n\t\tSet<CMNMove> tempSet = new TreeSet<CMNMove>(winSet);\n\t\ttempSet.add(moveList.get(maxnum)); /* adding the winning element */\n\n\t\tif (target == 0 && count == 0) { /* we have a win */\n\t\t\tWINS.add(tempSet);\n\t\t\treturn;\n\t\t}\n\n\t\tif (target < 0 || count == 0) { /* hopeless in either case */\n\t\t\treturn;\n\t\t}\n\n\t\tfor (i = maxnum - 1; i > 0; i--) { /* try to finish recursively */\n\t\t\tknapsack(tempSet, count, i, target);\n\t\t}\n\t\treturn;\n\t}", "private void ObjectsKnapsack(int[] vol, int[][] M, int n, int V, int[] objects)\r\n {\r\n int i,W;\r\n W = V;\r\n \r\n for(i=n; i>=1; i--) {\r\n if(M[i][W] == M[i-1][W]) {\r\n objects[i] = 0;\r\n } else {\r\n \tobjects[i] = 1;\r\n W = W - vol[i];\r\n }\r\n }\r\n }", "public Solution solve(KnapsackData data);", "public static int knapsackRep(int[] values, int[] weights, int twt) {\n //assume the two input are sorted\n int[] maxVals = new int[twt + 1];\n // maximum value for the minimum weight is corresponding value\n maxVals[weights[0]] = values[0];\n // iterate over until you get the target wt\n for (int currWt = weights[0] + 1; currWt <= twt; currWt++) {\n // initialize current max weight to be infinity\n int currMaxVal = -1;\n for (int wtInd = 0; wtInd < weights.length; wtInd++) {\n // prevWt to check is current\n if ((currWt == weights[wtInd]) && (values[wtInd] > currMaxVal)) {\n currMaxVal = values[wtInd];\n }\n int prevWt = currWt - weights[wtInd];\n // if the prevWt value is valid\n if ((prevWt > 0) && (prevWt <= twt)) {\n // if there is a valid value for prevWt\n if (maxVals[prevWt] > 0) {\n int candMaxVal = maxVals[prevWt] + values[wtInd];\n if (candMaxVal > currMaxVal) {\n currMaxVal = candMaxVal;\n }\n }\n }\n }\n if (currMaxVal != -1) {\n maxVals[currWt] = currMaxVal;\n }\n }\n printArr(maxVals, \"Maximum value is %d for weight %d\" + System.lineSeparator());\n return maxVals[twt];\n }", "private void mostValuePerWeightFirst(Instance instance) {\n ArrayList<Pair> order = new ArrayList<Pair>();\n\n for (int i = 0; i < instance.getSize(); i++) {\n order.add(i, new Pair(i, instance.getValue(i), instance.getWeight(i)));\n }\n\n // Sort items according to c_i/w_i >= c_i+1/w_i+1\n order.sort(new Comparator<Pair>() {\n @Override\n public int compare(Pair o1, Pair o2) {\n return o1.compareTo(o2) * -1;\n }\n });\n\n setSolution(order);\n }", "public void\tgetData() throws IOException{\n\t\tint i,j, val;\n\t\tint profitOfItems[], weight[];\n\t\t\n\t\tSystem.out.println(\"Enter the weight of the Knapsack ( must be positive):\");\n\t\tknapsackWeight = KnapsackAlgorithmImplementation.getNumber();\n\t\t\n\t\tSystem.out.println(\"\\nEnter the number of items to put in knapsack ( must be positive):\");\n\t\tnumberOfItems = KnapsackAlgorithmImplementation.getNumber();\n\t\t\n\t\tprofitOfItems = new int[numberOfItems + 1];\n\t\tfor ( i = 1 ; i <= numberOfItems ; i++) {\n\t\t\tSystem.out.println(\"Enter profit of item \" + String.valueOf(i));\n\t\t\tprofitOfItems[i] = KnapsackAlgorithmImplementation.getNumber();\n\t\t}\t\n\t\t\n\t\tweight = new int[numberOfItems + 1];\n\t\tfor ( i = 1 ; i <= numberOfItems ; i++) {\n\t\t\tSystem.out.println(\"Enter weight of item \" + String.valueOf(i));\n\t\t\tweight[i] = KnapsackAlgorithmImplementation.getNumber();\n\t\t}\t\n\t\t\n\t\tProfit = new int[numberOfItems + 1][knapsackWeight + 1];\n\t\tDir\t = new int[numberOfItems + 1][knapsackWeight + 1];\n\t\t\n\t\tfor ( j = 0 ; j <= knapsackWeight; j++) {\n\t\t\tProfit[0][j] = 0;\t\n\t\t}\t\n\t\tfor ( i = 0 ; i <= numberOfItems; i++) {\n\t\t\tProfit[i][0] = 0;\t\n\t\t}\n\t\tfor ( i = 1 ; i <= numberOfItems; i++) { \n\t\t\tfor ( j = 1 ; j <= knapsackWeight; j++) {\n\t\t\t\tif ( weight[i] > j) {\n\t\t\t\t\tProfit[i][j] = Profit[i-1][j];\n\t\t\t\t\tDir[i][j] = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tval = profitOfItems[i] + Profit[i-1][j - weight[i]];\n\t\t\t\t\tProfit[i][j] = Find_Max( Profit[i-1][j] , val); \n\t\t\t\t\tif ( Profit[i][j] == val)\n\t\t\t\t\t\tDir[i][j] = 2;\n\t\t\t\t\telse\n\t\t\t\t\t\tDir[i][j] = 1;\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Maximum profit that can fit in the knapsack is :\" + Profit[numberOfItems][knapsackWeight]);\n\t\tPrint_KnapsackItems(Dir,weight);\t\t\n\t}", "public UnboundedKnapsack(int[] vol, int[] ben, int n, int V)\r\n {\r\n\r\n M = new int[n+1][V+1];\r\n objects = new int[n+1];\r\n Knapsack(vol, ben, n, V, this.M);\r\n ObjectsKnapsack(vol, this.M, n, V, this.objects);\r\n res = result(this.objects, vol, ben);\r\n }", "public int knapSackDP(int wt[], int val[], int mw) {\n // init DP\n int[][] dp = new int[wt.length + 1][mw + 1];\n\n // base conditions\n // set all rows for n=0 and w=0 to 0\n\n // Loop\n for (int n = 1; n < dp.length; n++) {\n for (int w = 1; w < dp[0].length; w++) {\n if (wt[n - 1] > w)\n dp[n][w] = dp[n - 1][w];\n else\n dp[n][w] = Math.max(val[n - 1] + dp[n - 1][w - wt[n - 1]], dp[n - 1][w]);\n }\n }\n return dp[dp.length - 1][dp[0].length - 1];\n }", "public static int recursiveKnapsack2(int[] weights, int[] values, int capacity) {\n return recursiveKnapsackHelper2(weights, values, capacity, 0);\n }", "private long getMaxValue( Item[] items, int maxWeight, int n) {\n\t\tif ( n == 0 || maxWeight == 0 )\n\t\t\treturn 0;\n\n\t\t// Weight of the nth item is more than maxWeight -> \n\t\t// We cannot include this item into the optimal solutions.\n\t\t// Fall back to to the nth-1 item.\n\t\tif ( items[n - 1].getWeight() > maxWeight)\n\t\t\treturn getMaxValue( items, maxWeight, n-1);\n\t\t\n\t\t// Return the maximum of these two cases:\n\t\t// 1) nth item included\n\t\t// 2) nth item is not included\n\t\t\n\t\tlong includedValue = items[n-1].getValue() + getMaxValue(items, maxWeight-items[n-1].getWeight(), n-1);\n\t\tlong notIncludedValue = getMaxValue(items, maxWeight, n - 1);\n\t\treturn Math.max( includedValue, notIncludedValue);\n\t}", "public static void main(String[] args) {\n System.out.println(\"------Random items and knapsacks------\");\n int itemLen = 10;\n int knapsackLen = 4;\n float[] benefit = new float[itemLen];\n float[] weight = new float[itemLen];\n int[] knapsackWeight = new int[knapsackLen];\n\n Random random = new Random();\n for (int i = 0; i < itemLen; i++) {\n // random benefit: 1 ~ 10\n benefit[i] = random.nextInt(9) + 1;\n // random weight: 1 ~ 10\n weight[i] = random.nextInt(9) + 1;\n }\n for (int i = 0; i < knapsackLen; i++) {\n // random knapsack weight: 5 ~ 15\n knapsackWeight[i] = random.nextInt(10) + 5;\n }\n\n /*\n Print items and knapsacks\n */\n System.out.print(\"Items benefit:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(benefit[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Items weight:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(weight[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Knapsacks weight:\");\n for (int i = 0; i < knapsackLen; i++) {\n System.out.print(knapsackWeight[i] + \" \");\n }\n System.out.println();\n\n // neighborhood search\n neighborhoodSearch(benefit, weight, knapsackWeight);\n\n }", "int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}", "private static Integer packDPRec(Integer capacity, List<Integer> weights, List<ItemDTO> items, Integer n, Integer[][] mem, List<Integer> optimalChoice) {\n // Base condition\n if (n == 0 || capacity <= 0)\n return 0;\n\n if (mem[n][capacity] != -1) {\n return mem[n][capacity];\n }\n\n if (weights.get(n - 1) > capacity) {\n // Store the value of function call\n // stack in table before return\n List<Integer> subOptimalChoice = new ArrayList<>();\n mem[n][capacity] = packDPRec(capacity, weights, items, n - 1, mem, subOptimalChoice);\n optimalChoice.addAll(subOptimalChoice);\n return mem[n][capacity];\n } else {\n // Return value of table after storing\n List<Integer> optimalChoiceIncluded = new ArrayList<>();\n List<Integer> optimalChoiceExcluded = new ArrayList<>();\n Integer valueIncluded = items.get(n - 1).getValue() + packDPRec(capacity - weights.get(n - 1), weights, items, n - 1, mem, optimalChoiceIncluded);\n Integer valueExcluded = packDPRec(capacity, weights, items, n - 1, mem, optimalChoiceExcluded);\n if (valueIncluded > valueExcluded) {\n optimalChoice.addAll(optimalChoiceIncluded);\n optimalChoice.add(items.get(n - 1).getId());\n mem[n][capacity] = valueIncluded;\n }else{\n optimalChoice.addAll(optimalChoiceExcluded);\n mem[n][capacity] = valueExcluded;\n }\n return mem[n][capacity];\n }\n }", "public static double greedyfractionalknapsack(ArrayList<item> svd, int S){\n\t\tint totalSize = 0;\n\t\tdouble totalValue = 0;\n\t\tint count = 0;\n\t\twhile(S > totalSize && count < 3) {\n\t\t\t\tif(totalSize + svd.get(count).size <= S) {\n\t\t\t\t\ttotalValue += svd.get(count).value;\n\t\t\t\t\ttotalSize += svd.get(count).size;\n\t\t\t\t}\n\t\t\t\telse if(S - totalSize < svd.get(count).size) {\n\t\t\t\t\ttotalValue = totalValue + (svd.get(count).value * ((double)(S - totalSize)/svd.get(count).size));\n\t\t\t\t\ttotalSize = S;\n\t\t\t\t\t}\n\n\t\t\tcount++;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn totalValue;\n\t\t\n\t\t\n\t}", "public static int dynamic_p(int objects,int capacity){\r\n // Array to accommodate dynamic programming solutions\r\n int dp_array[][] = new int[objects+1][capacity+1];\r\n // filling the 2D array\r\n for(int i=0; i<= objects;i++){\r\n for(int j=0; j<= capacity;j++){\r\n if(i == 0)\r\n dp_array[i][j]=0; // base case(number of objects are zero)\r\n else if(j == 0)\r\n dp_array[i][j]=0; // base case(capacity is zero)\r\n else if(randvariables[i-1] <= j){ // checking if the wight of object is less than the current knapsack capacity\r\n int included = randvalues[i-1]+dp_array[i-1][j-randvariables[i-1]]; // object is included\r\n int not_included = dp_array[i-1][j]; // object is not included\r\n\r\n //taking the max of these two\r\n if(included > not_included)\r\n dp_array[i][j] = included;\r\n else\r\n dp_array[i][j]= not_included;\r\n }\r\n else // weight is more than capacity .. not including the object\r\n dp_array[i][j] = dp_array[i-1][j];\r\n }\r\n }\r\n\r\n //System.out.println(Arrays.deepToString(dp_array));\r\n int solution = dp_array[objects][capacity];\r\n boolean[] optimalset = solution_used(dp_array,objects,capacity);\r\n System.out.println(Arrays.toString(optimalset));\r\n dp_array = null;\r\n return solution; // return the final solution\r\n\r\n }", "public static int maxSum(int[] a, int k) \n {\n PriorityQueue<Integer> pq = new PriorityQueue<>(); \n for (int x : a) \n pq.add(x); \n \n // Do k negations by removing a minimum element k times \n while (k-- > 0) \n { \n // Retrieve and remove min element \n int temp = pq.poll(); \n \n // Modify the minimum element and add back \n // to priority queue \n temp *= -1; \n pq.add(temp); \n } \n \n // Compute sum of all elements in priority queue. \n int sum = 0; \n for (int x : pq) \n sum += x; \n return sum; \n }", "public static void main(String args[]) {\r\n\tList<Integer> list = new ArrayList<>();\r\n\tint id[] = new int[] { 38, 21, 13, 15 };\r\n\tint val[] = new int[] { 500, 1800, 1500, 50 };\r\n\tint wt[] = new int[] { 130, 280, 120, 50 };\r\n\tint W = 300;\r\n\tint n = val.length;\r\n\tSystem.out.println(knapSack(W, wt, val, n, list, list));\r\n\tSystem.out.println(Arrays.toString(list.toArray()));\r\n }", "static double KWF2(int problem, int i, int currWeight, int profit) {\r\n\r\n\t\tdouble bound = profit;\r\n\t\tint n = problems.get(problem).size()+1;\r\n\t\tint capacity = capacities.get(problem);\r\n\r\n\t\tdouble[] x = new double[n];\r\n\t\tfor(int j = i; j < n; j++) x[j] = 0;\r\n\r\n\t\twhile( (currWeight < capacity) && (i <= n - 1)) {\r\n\t\t\tif(currWeight + weights[i] <= capacity) {\r\n\t\t\t\tx[i] = 1;\r\n\t\t\t\tcurrWeight += weights[i];\r\n\t\t\t\tbound += profits[i];\r\n\t\t\t} else {\r\n\t\t\t\tx[i] = (capacity - currWeight) / weights[i];\r\n\t\t\t\tcurrWeight = capacity;\r\n\t\t\t\tbound += profits[i] * x[i];\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn bound;\r\n\t}", "public boolean canPartition(int[] nums) {\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n // sum cannot be splitted evenly\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n \n // dp[i][j] represents whether 0~i-1 numbers can reach\n // weight capacity j\n boolean[][] dp = new boolean[n+1][target+1];\n \n for (int i = 1; i <= n; i++) dp[i][0] = true;\n for (int j = 1; j <= target; j++) dp[0][j] = false;\n dp[0][0] = true;\n \n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= target; j++) {\n // if don't pick current number\n dp[i][j] = dp[i-1][j];\n if (j >= nums[i-1]) {\n dp[i][j] = dp[i][j] || dp[i-1][j-nums[i-1]];\n }\n }\n }\n return dp[n][target];\n \n \n // Solution2: optimizing to save space\n // https://leetcode.com/problems/partition-equal-subset-sum/discuss/90592/01-knapsack-detailed-explanation/94996\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n boolean[] dp = new boolean[target+1];\n dp[0] = true;\n for (int num : nums) {\n // here is the trick to save space\n // because we have to update dp[j] based on \n // previous dp[j-num] and dp[j] from previous loop.\n // if we update dp from left to right\n // we first update smaller dp which is dp[j-num]\n // then we won't be able to get original dp[j-num] and dp[j]\n // from previous loop, and eventually we get the wrong\n // answer. But if we update dp from right to left\n // we can assure everything is based on previous state\n for (int j = target; j >= num; j--) {\n // if (j >= num) {\n dp[j] = dp[j] || dp[j-num];\n // }\n }\n }\n return dp[target];\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint capacity = sc.nextInt();\n\t\tint numitems = sc.nextInt();\n\t\tint[] weights = new int[numitems];\n\t\tint[] values = new int[numitems];\n\t\tfor(int i = 0; i < numitems; i++){\n\t\t\tweights[i] = sc.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < numitems; i++){\n\t\t\tvalues[i] = sc.nextInt();\n\t\t}\n\t\tknapsack(weights, values, capacity);\n\t\tsc.close();\n\n\t}", "private static void buildSolution(int weight, int currentItem, Item[] items, long[][] DP, boolean[] used) {\n\n if (currentItem == 0) {\n return;\n }\n\n int itemIndex = currentItem - 1;\n\n if (DP[weight][currentItem] == DP[weight][currentItem - 1]) {\n used[itemIndex] = false;\n buildSolution(weight, currentItem - 1, items, DP, used);\n return;\n }\n\n used[currentItem - 1] = true;\n buildSolution(weight - items[itemIndex].getWeight(), currentItem - 1, items, DP, used);\n }", "public static void main(String args[]) {\n int val[] = new int[]{60, 100, 120};\n int wt[] = new int[]{10, 20, 30};\n int W = 50;\n int n = val.length;\n System.out.println(knapSack(W, wt, val, n));\n }", "static int optimalWeight(int W, int[] w) {\n \tif (W ==0) {\n \t\treturn 0; \n \t}\n \t\n \t\n \t\n \n \tint[][] table = new int [W+1][w.length+1];\n \tfor(int i = 0; i <=w.length; i++) {\n \t\ttable[W][i] =0; \n\n \t}\n \t\n \tfor(int i = 0; i <=W; i++) {\n \t\ttable[i][w.length] =0; \n\n \t}\n \t\n \tint val = 0;\n \tfor (int i = 0; i <= W; i++) {\n \t\t\n \t\tfor (int j = 1; j<=w.length; j++) {\n \t\t\ttable[i][j] = table[i][j-1];\n \t\t\tif (w[j-1]<=i) {\n \t\t\t\tval = table[i-w[j-1]][j-1] +w[j-1]; \n \t\t\tif (table[i][j]<val) {\n \t\t\t\ttable[i][j] = val;\n \t\t\t}\n \t\t\t}\n \t\t\t\n\n \t\t}\n \t\t\n \t}\n \t\n \treturn table[W][w.length];\n\n }", "public static void main(String[] args) {\n\t\tUnboundedKnapsack ks = new UnboundedKnapsack();\n\t\tint[] profits = { 15, 50, 60, 90 };\n\t\tint[] weights = { 1, 3, 4, 5 };\n\t\tint maxProfit = ks.solveKnapsack(profits, weights, 8);\n\t\tSystem.out.println(maxProfit);\n\n\t\tmaxProfit = ks.solveKnapsackUsingMemory(profits, weights, 8);\n\t\tSystem.out.println(maxProfit);\n\n\t}", "private int[] bestFitModified(int[] chromosome) {\n\t\tint[] bins = new int[binCount];\n\t\tArrayList<Integer> cannotPackList = new ArrayList<Integer>();\n\n\t\t//honor chromosome listing when possible\n\t\tfor (int i = 0; i < chromosome.length; i++) {\n\t\t\t//if this bin isnt full & won't be after placement & this chrom hasnt gone off the end \n\t\t\t//(VERY RARE, only happens when binCount is reduced w/ elitism)\n\t\t\tif (chromosome[i] < bins.length && bins[chromosome[i]] + packageWeights[i] <= binSize) {\n\t\t\t\tbins[chromosome[i]] += packageWeights[i]; //put package into bin\n\t\t\t} else { //store those we can't honor\n\t\t\t\tchromosome[i] = -1;\n\t\t\t\tcannotPackList.add(new Integer(i)); //save all those packages whos original bins were full\n\t\t\t}\n\t\t}\n\n\t\t//best fit on all the rest whos bins were full up\n\t\tint tries = 0;\n\t\tfor (int j = 0; j < cannotPackList.size(); j++) {\n\t\t\tint i = cannotPackList.get(j);\n\t\t\tint bestBinIndex = -1;\n\n\t\t\twhile (bestBinIndex < 0 && tries < bins.length * 2) { //while we still havent found a bin to put this in and time isn't up\n\n\t\t\t\tint bestBinLeftOverSpace = binSize * 100; //how much space is left in the bin when the packages is placed in it (ideally 0 = full bin)\n\n\t\t\t\tfor (int bin = 0; bin < bins.length; bin++) {\n\t\t\t\t\t//if this bin is closer to full than the best bin and not overfilled save it\n\t\t\t\t\tif ((binSize - (bins[bin] + packageWeights[i])) >= 0 && (binSize - (bins[bin] + packageWeights[i])) < bestBinLeftOverSpace) {\n\t\t\t\t\t\tbestBinIndex = bin;\n\t\t\t\t\t\tbestBinLeftOverSpace = binSize - (bins[bin] + packageWeights[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (bestBinIndex < 0) { //if could not pack, dump out a bin (mutation)\n\t\t\t\t\tj = 0;\n\t\t\t\t\tint dumpBin = rand.nextInt(binCount);\n\t\t\t\t\tfor (int binIndex = dumpBin; binIndex < binCount; binIndex++) {\n\t\t\t\t\t\tbins[binIndex] = 0;\n\t\t\t\t\t\tfor (int chromIndex = 0; chromIndex < chromosome.length; chromIndex++) {\n\t\t\t\t\t\t\tif (chromosome[chromIndex] == binIndex) {\n\t\t\t\t\t\t\t\tchromosome[chromIndex] = -1;\n\t\t\t\t\t\t\t\tcannotPackList.add(new Integer(chromIndex));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\ttries++;\n\t\t\t}\n\n\t\t\tif (tries >= bins.length * 2) {\n\t\t\t\treturn null; //this chromosome is unsalvageable because it is impossible to fit the packages in the bins\n\t\t\t}\n\n\n\t\t\tbins[bestBinIndex] += packageWeights[i];\n\t\t\tchromosome[i] = bestBinIndex;\n\t\t\tcannotPackList.remove(j);\n\t\t\tj--;\n\t\t}\n\n\t\treturn chromosome;\n\t}", "public Chromosome withRandomKnapsackItems() {\n this.knapsackSelection = generateRandomItems();\n return this;\n }", "private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }", "public default List<Item> generateSolution(KnapsackData knapsackData, BinarySolution solution) {\r\n List<Item> pickedItem = new ArrayList<>();\r\n for (int i = 0; i < knapsackData.getSize(); i++) {\r\n if (solution.getBit(i) == 1) {\r\n pickedItem.add(knapsackData.getData(i));\r\n }\r\n }\r\n return pickedItem;\r\n }", "public void solve_base(Items items,Knapsack knapsack) {\n iteration=0;\n best_value=-1;\n System.out.println(\"iteration:\"+iteration+\" solve_begin_time:\"+System.currentTimeMillis());\n this.solve(items,knapsack);\n System.out.println(\"iteration:\"+iteration+\" solve_end_time:\"+System.currentTimeMillis());\n }", "public static ArrayList < ArrayList < Double >> binPack(double weight[], int n, double bin_cap) { \r\n int binCount = 0;\r\n int k = 0;\r\n double[] bin_space = new double[n];\r\n\r\n ArrayList < Integer > bin = new ArrayList < Integer > ();\r\n ArrayList < Double > val = new ArrayList < Double > ();\r\n ArrayList < ArrayList < Double >> binVal = new ArrayList < ArrayList < Double >> ();\r\n binVal.add(k, new ArrayList < Double > ());\r\n System.out.println(\".......Commencing Calculation...........\\n\");\r\n startTime = System.nanoTime();\r\n for (int i = 0; i < n; i++) {\r\n int j;\r\n for (j = 0; j < binCount; j++) {\r\n \r\n if (bin_space[j] >= weight[i]) {\r\n bin_space[j] = bin_space[j] - weight[i];\r\n //val.add(weight[i]);\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + j + \" took in weight \" + weight[i]);\r\n break;\r\n }\r\n \r\n }\r\n System.out.println(\"*Bad fit for next weight size \"+ weight[i]+ \r\n \"\\n\\n ***NEW BIN CREATED***\\n\");\r\n if (j == binCount) {\r\n \r\n bin_space[binCount] = bin_cap - weight[i];\r\n //val.add(weight[i]);\r\n binCount++;\r\n //k++;\r\n bin.add(j);\r\n binVal.add(j, new ArrayList < Double > ());\r\n (binVal.get(j)).add((weight[i]));\r\n k=j+1;\r\n System.out.println(\"---Bin \" + k + \" took in weight **\" + weight[i]);\r\n }\r\n } \r\n endTime = System.nanoTime();\r\n elapsedTime = (endTime- startTime);\r\n System.out.println(\"\\nBIN PACKING ALGORITHM COMPLETE\\n\");\r\n \r\n return binVal;\r\n }", "private void setWinningTuples() {\n\t\tWINS = new ArrayList<Set<CMNMove>>();\n\t\tSet<CMNMove> winSet = new TreeSet<CMNMove>();\n\t\tfor (int i = MM; i > 0; i--) {\n\t\t\tknapsack(winSet, CC, i, NN);\n\t\t}// end for\n\n\t}", "private static void normal(){\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n\n //NSGAII algorithm = new NSGAII();\n SPEA2 algorithm = new SPEA2();\n //SPEAHADKA algorithm = new SPEAHADKA();\n //AEMMT algorithm = new AEMMT();\n //AEMMD algorithm = new AEMMD();\n //MOEAD algorithm = new MOEAD();\n\n int x =1;\n int counter = 0;\n\n if (AEMMD.class.isInstance(algorithm) || AEMMT.class.isInstance(algorithm)){\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n }\n else{\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n }\n\n while (counter < x) {\n algorithm.runAlgorithm(problem);\n counter++;\n }\n }", "public int solution2(int[] nums, int k) {\n PriorityQueue<Integer> pq = new PriorityQueue<Integer>();\n \n for (int i : nums) {\n pq.offer(i);\n \n if (pq.size() > k) {\n pq.poll();\n }\n }\n \n \n return pq.peek();\n }", "private static List<Integer> getTopKFrequentElementsBestCase(int[] nums, int k) {\n if(k > nums.length) {\n return new ArrayList<>();\n }\n\n Map<Integer, Integer> numToCount = new HashMap<>();\n int max = 0;\n for(int i = 0; i < nums.length; i++) {\n numToCount.put(nums[i], numToCount.getOrDefault(nums[i], 0) + 1);\n max = Math.max(max, numToCount.get(nums[i]));\n }\n\n List<Integer>[] numsPerFrequency = new ArrayList[max + 1];\n for(int i = 1; i <= max; i++) {\n numsPerFrequency[i] = new ArrayList<>();\n }\n\n for(Map.Entry<Integer, Integer> entry : numToCount.entrySet()) {\n numsPerFrequency[entry.getValue()].add(entry.getKey());\n }\n\n List<Integer> result = new ArrayList<>();\n\n for(int i = max; i >= 0; i--) {\n List<Integer> numsWithThisFreq = numsPerFrequency[i];\n\n for(int num : numsWithThisFreq) {\n result.add(num);\n if(result.size() == k) {\n return result;\n }\n }\n }\n\n return new ArrayList<>();\n }", "private void sortByWeight()\n\t{\n\t\tfor(int i=1; i<circles.size(); i++)\n\t\t{\n\t\t\tPVCircle temp = circles.get(i);\n\t\t\tint thisWeight = circles.get(i).getWeight();\n\t\t\tint j;\n\t\t\tfor(j=i-1; j>=0; j--)\n\t\t\t{\n\t\t\t\tint compWeight = circles.get(j).getWeight();\n\t\t\t\tif(thisWeight < compWeight)\n\t\t\t\t\tbreak;\n\t\t\t\telse\n\t\t\t\t\tcircles.set(j+1, circles.get(j));\n\t\t\t}\n\t\t\tcircles.set(j+1, temp);\n\t\t}\n\t\t\n\t}", "public int getWeightedBucket() {\n float val = (float)(new Float((Math.random() * 100)));\n int totalWeight = 0;\n int i = 0;\n for (i = 0; i < weights.length; i++) {\n totalWeight += weights[i];\n if (val <= totalWeight)\n break;\n }\n return(i);\n }", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(new FileReader(\"talent.in\"));// new InputStreamReader(System.in)); //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"talent.out\")));\n int N = sc.nextInt();\n int minWeight = sc.nextInt();\n int[] weight = new int[N];\n int[] value = new int[N];\n int totalTalent = 0;\n for (int i = 0; i < N; i++) {\n int wt = sc.nextInt();\n int val = sc.nextInt();\n weight[i] = wt;\n value[i] = val;\n totalTalent += val;\n }\n\n // Store, for a given talent, what is the smallest weight used to achieve it?\n int[] dp = new int[totalTalent + 1];\n Arrays.fill(dp, (int) 1e9);\n dp[0] = 0;\n // the min weight to produce 0 talent is 0. However,\n // it is necessary to make everything else big because we can only BUILD\n // from 0\n double bestRatio = 0;\n for (int cow = 0; cow < N; cow++) {\n // look at each cow, and go DOWN THROUGH THE dp array, updating the\n // best weight achievable BEHIND US. This countercurrent motion ensures no repeated\n // counting of a single cow's talents\n int contribution = value[cow];\n int wt = weight[cow];\n for (int talent = totalTalent; talent >= 0; talent--) {\n int boostedTalent = contribution + talent;\n int boostedWeight = dp[talent] + wt;\n // with the min weight of a certain talent,\n // is it possible to get a smaller boostedWeight for a boostedTalent\n if (boostedTalent <= totalTalent) {\n // If we are in bounds,\n if (boostedWeight < dp[boostedTalent]) {\n // and the attempted team has a better weight value\n // then update it!\n // Initially, when everything is 1 billion, this cannot\n // happen except for from the base cases, building outward\n dp[boostedTalent] = boostedWeight;\n\n // At the same time, we can be more efficient by constantly\n // checking if we had enough weight first of all, and\n // second of all had a better talent/weight ratio!\n double ratio = (double) boostedTalent / boostedWeight;\n if (ratio > bestRatio && boostedWeight >= minWeight) {\n bestRatio = ratio;\n }\n }\n }\n }\n }\n\n out.println((int) (1000 * bestRatio));\n out.close();\n }", "private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }", "private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }", "private static List<Integer> getTopKFrequentElementsAverageCase(int[] nums, int k) {\n if(k > nums.length) {\n return new ArrayList<>();\n }\n\n Map<Integer, Integer> numToCount = new HashMap<>();\n\n for(int num : nums) {\n numToCount.put(num, numToCount.getOrDefault(num, 0) + 1);\n }\n\n PriorityQueue<Integer> queue = new PriorityQueue<>(new Comparator<Integer>() {\n @Override\n public int compare(Integer i1, Integer i2) {\n return numToCount.get(i1) - numToCount.get(i2);\n }\n });\n\n for(int num : numToCount.keySet()) {\n queue.add(num);\n\n if(queue.size() > k) {\n queue.poll();\n }\n }\n\n List<Integer> result = new ArrayList<>();\n\n while(!queue.isEmpty()) {\n result.add(queue.poll());\n }\n\n // queue will add the nums in reverse order\n Collections.reverse(result);\n return result;\n }", "public List<List<Integer>> highestRankedKItems(int[][] grid, int[] pricing, int[] start, int k) {\n\n // BFS - calculate distances\n List<int[]> nodes = bfs(grid, start, pricing);\n\n return nodes.stream()\n .sorted((o1, o2) -> o1[2] == o2[2] ? o1[3] == o2[3] ? o1[0] == o2[0] ? o1[1] - o2[1] : o1[0] - o2[0] : o1[3] - o2[3] : o1[2] - o2[2])\n .map(node -> List.of(node[0], node[1]))\n .limit(k)\n .collect(Collectors.toList());\n }", "public Bag getGreedyBag() {\r\n bag = super.getBag();\r\n List<Integer> auxiliarHand = new LinkedList<Integer>(hand);\r\n\r\n for (int i = 0; i < bag.getCardsIds().size(); i++) {\r\n if (auxiliarHand.contains(bag.getCardsIds().get(i))) {\r\n auxiliarHand.remove(bag.getCardsIds().get(i));\r\n }\r\n }\r\n\r\n if (this.roundNumber % 2 == 0) {\r\n highestProfitIllegalCard = 0;\r\n if (bag.getCards().size() < MAX_CARDS_IN_BAG) {\r\n for (Integer cardId : auxiliarHand) {\r\n if (cardId > MAX_LEGAL_INDEX\r\n && goodsFactory.getGoodsById(cardId).getProfit()\r\n > goodsFactory.getGoodsById(highestProfitIllegalCard).getProfit()) {\r\n highestProfitIllegalCard = cardId;\r\n }\r\n }\r\n if (highestProfitIllegalCard != 0\r\n && (coins - goodsFactory\r\n .getGoodsById(highestProfitIllegalCard)\r\n .getPenalty()) > 0) {\r\n bag.addCard(goodsFactory.getGoodsById(highestProfitIllegalCard));\r\n }\r\n }\r\n }\r\n return bag;\r\n }", "public static ArrayList<Integer> kSmallest(int n, int[] input, int k) {\n PriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());\r\n for (int i = 0; i < k; i++) {\r\n pq.add(input[i]);\r\n }\r\n for (int i = k; i < input.length; i++) {\r\n int temp = pq.peek();\r\n if (temp > input[i]) {\r\n pq.poll();\r\n pq.add(input[i]);\r\n }\r\n }\r\n\r\n ArrayList<Integer> ans = new ArrayList<>();\r\n Iterator iterator = pq.iterator();\r\n\r\n while (iterator.hasNext()) {\r\n ans.add((int) iterator.next());\r\n }\r\n return ans;\r\n\r\n }", "private boolean feasible() {\n\t\tint weight = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tassert x[i] == 0 || x[i] == 1;\n\t\t\tweight += w[i] * x[i];\n\t\t}\n\t\treturn weight <= k;\n\t}", "private Pair[] bribeCalculateBag(final int maxCards,\n final HashMap<String, Integer> association) {\n final int minMoney = 5;\n final int maxBagSize = 3;\n if (getInventory().getMoney() < minMoney || numberOfIllegals(association) == 0) {\n return calculateBag(maxCards, association);\n }\n Pair[] result;\n if (numberOfIllegals(association) <= 2 || getInventory().getMoney() < minMoney * 2) {\n getInventory().getBagToGive().setBribe(minMoney);\n getInventory().setMoney(getInventory().getMoney() - minMoney);\n int duplicate = findIllegal(association);\n removeOneAsset(findIllegal(association));\n if (duplicate == findIllegal(association)) {\n result = new Pair[1];\n result[0] = new Pair<>(findIllegal(association), 2);\n getInventory().setNumberOfDeclared(2);\n } else {\n if (findIllegal(association) == -1) {\n result = new Pair[1];\n result[0] = new Pair<>(duplicate, 1);\n getInventory().setNumberOfDeclared(1);\n } else {\n result = new Pair[2];\n result[0] = new Pair<>(duplicate, 1);\n result[1] = new Pair<>(findIllegal(association), 1);\n getInventory().setNumberOfDeclared(2);\n }\n }\n removeOneAsset(findIllegal(association));\n getInventory().setDeclaredAssets(0);\n return result;\n } else {\n getInventory().getBagToGive().setBribe(minMoney * 2);\n getInventory().setMoney(getInventory().getMoney() - (minMoney * 2));\n int contor = maxCards - 1;\n final int contorStart = contor;\n int[] resultAux = new int[maxBagSize];\n getInventory().setDeclaredAssets(0);\n while (contor > 0 && findIllegal(association) != -1) {\n resultAux[findIllegal(association) % maxBagSize]++;\n removeOneAsset(findIllegal(association));\n contor--;\n }\n getInventory().setNumberOfDeclared(contorStart - contor);\n getInventory().setDeclaredAssets(0);\n contor = 0;\n for (int it : resultAux) {\n if (it != 0) {\n contor++;\n }\n }\n result = new Pair[contor];\n if (contor == maxBagSize) {\n result = new Pair[maxBagSize];\n result[0] = new Pair<>(association.get(\"Silk\"), resultAux[1]);\n result[1] = new Pair<>(association.get(\"Pepper\"), resultAux[2]);\n result[2] = new Pair<>(association.get(\"Barrel\"), resultAux[0]);\n } else {\n if (contor == 1) {\n result = new Pair[1];\n if (resultAux[0] > 0) {\n result[0] = new Pair<>(association.get(\"Barrel\"), resultAux[0]);\n }\n if (resultAux[1] > 0) {\n result[0] = new Pair<>(association.get(\"Silk\"), resultAux[1]);\n }\n if (resultAux[2] > 0) {\n result[0] = new Pair<>(association.get(\"Pepper\"), resultAux[2]);\n }\n } else {\n result = new Pair[2];\n int i = 0;\n if (resultAux[0] > 0) {\n result[i] = new Pair<>(association.get(\"Barrel\"), resultAux[0]);\n i++;\n }\n if (resultAux[1] > 0) {\n result[i] = new Pair<>(association.get(\"Silk\"), resultAux[1]);\n i++;\n }\n if (resultAux[2] > 0) {\n result[i] = new Pair<>(association.get(\"Pepper\"), resultAux[2]);\n }\n }\n }\n return result;\n }\n\n }", "private static void maxDuffelBagValue(JSONArray cakeTypes, int capacity) {\n for (int i = 0; i < cakeTypes.length(); i++) {\n \tJSONObject cakeType = (JSONObject) cakeTypes.remove(i);\n \tif (cakeType.getInt(\"weight\") <= capacity) {\n \t\tval += cakeType.getInt(\"value\");\n \t\tcapacity -= cakeType.getInt(\"weight\");\n \t\tmaxDuffelBagValue(cakeTypes, capacity);\n\t\t\t}\n }\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\n }", "protected void print_knapsack(Knapsack knapsack) {\n System.out.println(\"iteration:\"+iteration+\" time:\"+System.currentTimeMillis()+\n \" best_value:\"+best_value+\" \"+knapsack);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tint T = sc.nextInt();\r\n\t\t\r\n\t\tfor (int z = 1; z <= T; z++) {\r\n\t\t\tint N = sc.nextInt();\r\n\t\t\tint[] input = new int[N+1];\r\n\t\t\t\r\n\t\t\tfor (int j = 1; j <= N; j++) {\r\n\t\t\t\tinput[j] = sc.nextInt();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint[] weight = new int[N+1];\r\n\t\t\tint[] memWeight = new int[N+1];\r\n\t\t\t\r\n\t\t\tint cnt = 1;\r\n\t\t\tweight[1] = 1;\r\n\t\t\tmemWeight[1] = input[1]; \r\n\t\t\tfor (int j = 2; j <= N; j++) {\r\n\t\t\t\tfor (int k = cnt; k >= 1 ; k--) {\r\n\t\t\t\t\tif(input[j] > memWeight[k] && k == cnt) {\r\n\t\t\t\t\t\tmemWeight[++cnt] = input[j];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(input[j] > memWeight[k] && k < cnt) {\r\n\t\t\t\t\t\tmemWeight[k+1] = input[j];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(k == 1) {\r\n\t\t\t\t\t\tmemWeight[k] = input[j] < memWeight[k] ? input[j] : memWeight[k];\r\n\t\t\t\t\t\tweight[j] = cnt;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// result\r\n\t\t\tint maxV = -1;\r\n\t\t\tfor (int i = 1; i <= N; i++) {\r\n\t\t\t\tif(maxV < weight[i]) {\r\n\t\t\t\t\tmaxV = weight[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"#\"+z+\" \"+maxV);\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t}", "static int nonDivisibleSubset(int k, int[] S) {\n\t\tint result = 0;\n\n\t\tArrayList < ArrayList < Integer >> solutions = new ArrayList < ArrayList < Integer >>();\n\t\tArrayList < HashSet < Integer >> minSets = new ArrayList < HashSet < Integer >>();\n\n\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( S [ 0 ])));\n\t\tminSets.add (new HashSet <Integer > ( ));\n\t\tminSets.get(0).add ( S [ 0 ] % k);\n\n\n\t\t// Go over all the numbers\n\t\tfor ( int i = 1; i < S.length; i++ ){\n\t\t\tint n = S [ i ]; \n\t\t\tint m = S [ i ] % k; // Number we will add to all the elements of all the minSets.\n\n\t\t\t// Go over all the minSets.\n\t\t\t// For each one, check that each element plus m is not divisible by k.\n\n\t\t\tboolean workedForASet = false;\n\t\t\tfor ( int j = 0; j < minSets.size(); j++){\n\t\t\t\t// For each set, check all the elements of the set.\n\n\t\t\t\tHashSet < Integer > minSet = minSets.get(j);\n\t\t\t\tIterator < Integer > iter = minSet.iterator();\n\n\t\t\t\tboolean works = true;\n\t\t\t\twhile ( iter.hasNext() && works ){\n\t\t\t\t\tint num = iter.next();\n\t\t\t\t\tif ( (num + m) % k == 0 ){\n\t\t\t\t\t\tworks = false;\n\t\t\t\t\t\tworkedForASet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( works ){\n\t\t\t\t\tsolutions.get(j).add(n);\n\t\t\t\t\tminSet.add(m);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( !workedForASet ){\n\t\t\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( n )));\n\t\t\t\tminSets.add (new HashSet <Integer > ( ));\n\t\t\t\tminSets.get (minSets.size() - 1).add ( m ); \n\t\t\t} \n\t\t}\n\n\t\t// Find the solution with the most elements.\n\n\t\tfor ( ArrayList <Integer > solution : solutions ){\n\t\t\tresult = Math.max ( result, solution.size() );\n\t\t\tSystem.out.println ( solution );\n\t\t}\n\n\t\tif ( result == 1 ) result = 0;\n\t\treturn result;\n\t}", "public static int cache_solution(int[][] cache_array,int objects,int capacity){\r\n\r\n //base cases\r\n if(capacity <= 0)\r\n return 0;\r\n if(objects < 0)\r\n return 0;\r\n\r\n if(cache_array[objects][capacity] != -1)\r\n return cache_array[objects][capacity];\r\n else{\r\n if(randvariables[objects] > capacity) // check if the weight is more than capacity\r\n return cache_solution(cache_array,objects-1,capacity);\r\n else{\r\n // recursive calls 1. to take the item(add the value,subtract the weight) 2. Dont take the value(subtract the weight)\r\n int do_take = randvalues[objects] + cache_solution(cache_array,objects-1, capacity-randvariables[objects]);\r\n int dont_take = cache_solution(cache_array,objects - 1, capacity);\r\n\r\n // Returning the highest value\r\n if(do_take > dont_take){\r\n cache_array[objects][capacity] = do_take;\r\n return do_take;\r\n }\r\n else{\r\n cache_array[objects][capacity] = dont_take;\r\n return dont_take;\r\n }\r\n }\r\n }\r\n\r\n }", "private int find_bestSplit(KnowledgeBase kb, int attIndex, ArrayList<ArrayList<ArrayList<Integer>>> multiple_counters) {\r\n\t\tif(multiple_counters.size() >0){\r\n\t\t\tfloat best_Gini = calculImpurity2D(kb.getSamples().size(),multiple_counters.get(0));; // it's a minimum!!\r\n\t\t\tint index_Best_Gini =0;\r\n\t\t\tfloat tmp_gini;\r\n\t\t\tfor(int i=1;i<multiple_counters.size();i++){\r\n\t\t\t\ttmp_gini = calculImpurity2D(kb.getSamples().size(),multiple_counters.get(i));\r\n\t\t\t\tif(tmp_gini<best_Gini){\r\n\t\t\t\t\tbest_Gini = tmp_gini;\r\n\t\t\t\t\tindex_Best_Gini = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn index_Best_Gini;\r\n\t\t}\r\n\t\treturn 0;\r\n\t\t\r\n\t\t\r\n\t}", "public static int findChannelWeight()\n {\n for (int i = 0; i < DCService.wifiScanList.size(); i++) {\n\n allFrequency.add(convertFrequencyToChannel(DCService.wifiScanList.get(i).frequency));\n Log.v(\"Channel + AP: \", String.valueOf(convertFrequencyToChannel(DCService.wifiScanList.get(i).frequency)) + \"->\" + String.valueOf(DCService.wifiScanList.get(i).SSID));\n }\n Log.v(\"All frequency:\",allFrequency.toString());\n\n double channelArray[] = new double[13];\n\n // Fill all the elements with 0\n Arrays.fill(channelArray,0);\n\n double factor = 0.20;\n\n for (int band:allFrequency)\n {\n for (int i=band-5 ;i<= band+6 ;i++)\n {\n if (i<1 || i>13)\n continue;\n channelArray[i-1] = (channelArray[i-1] + (6-Math.abs(i-band))*factor);\n }\n }\n Log.v(\"Channel Array:\",Arrays.toString(channelArray));\n\n // Minimum value of channel array\n int bestFoundChannel;\n\n // Find minimum value from the channel array\n double small = channelArray[0];\n int index = 0;\n for (int i = 0; i < channelArray.length; i++) {\n if (channelArray[i] < small) {\n small = channelArray[i];\n index = i;\n }\n }\n\n // Find in channel array the elements with minimum channel value\n ArrayList<Integer> bestFoundAvailableChannels = new ArrayList();\n for(int items = 0;items < channelArray.length;items++)\n {\n if(channelArray[items] == small)\n {\n bestFoundAvailableChannels.add(items);\n }\n }\n if(channelArray[6] < channelArray[0] && channelArray[6] <channelArray[11] )\n return 6;\n if(channelArray[11] < channelArray[0] && channelArray[11] < channelArray[6])\n return 11;\n //Log.v(\"Minimum Channel Value,Best Found Channel:\", String.valueOf(small) + \",\" + String.valueOf(bestFoundChannel));\n // Find a random available channel from best found available channels\n /* Random rand = new Random();\n Integer randGeneratedBestFoundChannel = (Integer) bestFoundAvailableChannels.get(rand.nextInt(bestFoundAvailableChannels.size())) + 1;\n Log.v(\"Generated Random Available Channel:\" ,randGeneratedBestFoundChannel.toString());\n *///return (randGeneratedBestFoundChannel + 1);\n\n return 1;\n\n }", "private void initialState() {\n forEach(item -> item.setInKnapsack(false));\n\n for (final Item item : this) {\n if (wouldOverpack(item)) {\n break;\n }\n item.switchIsKnapsack();\n }\n }", "private void combinationSum3(int[] candidates, int k, int i, int currentSum, int target, List<List<Integer>> response, List<Integer> temp) {\n if (temp.size() == k) {\n\n if (currentSum == target)\n response.add(new ArrayList<>(temp));\n\n\n return;\n }\n\n if (i == candidates.length)\n return;\n\n\n //1. Our choices: We can choose a number from the list any number of times and all the numbers\n for (int s = i; s < candidates.length; s++) {\n\n //if this element is greater than target, then adding it to current sum make bigger than target\n //since,elements are sorted, then all the element after this element are > target\n if (candidates[s] > target)\n break;\n\n //Our constraints : We can't go beyond target, we can take more element than available in array\n if (currentSum + candidates[s] <= target) {\n currentSum += candidates[s];\n temp.add(candidates[s]);\n\n combinationSum3(candidates, k, s + 1, currentSum, target, response, temp);\n\n //backtrack\n temp.remove(temp.size() - 1);\n currentSum -= candidates[s];\n }\n }\n\n }", "k value.\nFor 2nd tallest group (and the rest), insert each one of them into (S) by k value. So on and so forth.\n\npublic class Solution {\n public int[][] reconstructQueue(int[][] people) {\n Arrays.sort(people,new Comparator<int[]>() {\n @Override\n public int compare(int[] o1, int[] o2){\n return o1[0] != o2[0]? -o1[0] + o2[0]: o1[1] - o2[1];\n }\n });\n\n List<int[]> res = new ArrayList<>();\n for (int[] cur : people) {\n res.add(cur[1], cur); \n }\n return res.toArray(new int[people.length][]);\n }", "static int dynamicProgramming(int problem) {\r\n\t\tint items = problems.get(problem).size();\r\n\t\tint cap = capacities.get(problem);\r\n\r\n\t\tint x = 0;\r\n\t\tfor(int i = 1; i < items + 1; i++, x++) {\r\n\t\t\tweights[i] = problems.get(problem).get(x).weight;\r\n\t\t\tprofits[i] = problems.get(problem).get(x).profit;\r\n\t\t}\r\n\r\n\t\tint[][] P = new int[items + 1][cap + 1];\r\n\r\n\t\tfor(int i = 0; i < items + 1; i++) {\r\n\t\t\tfor(int j = 0; j < cap + 1; j++) {\r\n\t\t\t\tP[i][j] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(int c = 0; c < cap + 1; c++) {\r\n\t\t\tP[0][c] = 0;\r\n\t\t}\r\n\r\n\t\tfor(int i = 1; i < items + 1; i++) {\r\n\t\t\tP[i][0] = 0;\r\n\t\t\tfor(int c = 1; c < cap + 1; c++) {\r\n\t\t\t\tif(i >= 2 && c >= 2) {\r\n\t\t\t\t\tP[i-2][c-2] = -1;\r\n\t\t\t\t}\r\n\t\t\t\tif(weights[i] <= c && P[i-1][c-weights[i]] + profits[i] > P[i-1][c]) {\r\n\t\t\t\t\tP[i][c] = P[i-1][c-weights[i]] + profits[i];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tP[i][c] = P[i-1][c];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn P[items][cap];\r\n\t}", "private static int solve(int[] wt, int[] val, int n, int w) {\n int[][] dp = new int[n+1][w + 1];\n\n for (int i = 1; i <= n; ++i) {\n for (int j = 1; j <= w; ++j) {\n if (wt[i-1] <= j) dp[i][j] = Math.max(dp[i-1][j] , val[i-1]+dp[i-1][j-wt[i-1]]);\n else dp[i][j] = dp[i-1][j];\n }\n }\n return dp[n][w];\n }", "static int dfsTopToBottom(int[] weight, int[] value, int W, int cur) {\r\n\t\t\tif(W < 0 || cur >= weight.length)\r\n\t\t\t\treturn 0;\r\n\t\t\tif(weight[cur] > W)\r\n\t\t\t\treturn dfsTopToBottom(weight, value, W, cur+1);\r\n\t\t\tint curVal = value[cur];\r\n\t\t\tint curWeight = weight[cur];\r\n\t\t\tint include = curVal + dfsTopToBottom(weight,value, W-curWeight, cur+1);\r\n//\t\t\tSystem.out.println(\"Include : \"+include);\r\n\t\t\tint noInclude = dfsTopToBottom(weight,value, W, cur+1);\r\n\t\t\tint res = Math.max(include, noInclude);\r\n\t\t\treturn res;\r\n\t\t}", "long getMaxItemFindings();", "private void shrinkChangeCombinationSearchSpace(int usedBanknoteIndex, int remainingAmount,\n\t\t\tList<Integer> tempSearchSpace) {\n\t\ttempSearchSpace.remove(usedBanknoteIndex);\n\t\t// eliminate denominations larger than remaining amount\n\t\tfor (Iterator<Integer> iterator = tempSearchSpace.iterator(); iterator.hasNext();) {\n\t\t\tif (iterator.next() > remainingAmount) {\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7635779", "0.75842863", "0.7561966", "0.75566524", "0.7547006", "0.7509507", "0.73695", "0.73446727", "0.73301125", "0.7208419", "0.7140853", "0.7135628", "0.71141905", "0.7063722", "0.69728845", "0.69377655", "0.6916896", "0.6906188", "0.6889062", "0.68423337", "0.67591816", "0.67580926", "0.66947025", "0.66791594", "0.6666618", "0.66476893", "0.6616777", "0.65418595", "0.651167", "0.6490161", "0.6486757", "0.64777535", "0.6419853", "0.64096695", "0.63857454", "0.6373361", "0.6369566", "0.63421303", "0.6333301", "0.6292846", "0.62540835", "0.62509805", "0.62138534", "0.6177651", "0.61755043", "0.61656415", "0.61369413", "0.6126439", "0.61009157", "0.60617954", "0.6047055", "0.6031707", "0.5973963", "0.59214014", "0.59175456", "0.5911976", "0.58867955", "0.58781666", "0.5873523", "0.58711106", "0.5861884", "0.58573747", "0.5814615", "0.58132285", "0.5808239", "0.57776296", "0.5776528", "0.57533497", "0.57005244", "0.5659169", "0.562562", "0.5605198", "0.560461", "0.55961925", "0.5576597", "0.55693036", "0.5549336", "0.5515275", "0.5425639", "0.54190254", "0.54108596", "0.5403621", "0.53800637", "0.5379881", "0.5357738", "0.53544587", "0.53496635", "0.53458196", "0.534222", "0.5341702", "0.53373355", "0.5279926", "0.5274382", "0.5273112", "0.52620053", "0.5260289", "0.5226251", "0.52189994", "0.52121764", "0.51891714" ]
0.7493392
6
Indicates which items were put into the knapsack Complexity: O( k ) where k is the number of items
private static void buildSolution(int weight, int currentItem, Item[] items, long[][] DP, boolean[] used) { if (currentItem == 0) { return; } int itemIndex = currentItem - 1; if (DP[weight][currentItem] == DP[weight][currentItem - 1]) { used[itemIndex] = false; buildSolution(weight, currentItem - 1, items, DP, used); return; } used[currentItem - 1] = true; buildSolution(weight - items[itemIndex].getWeight(), currentItem - 1, items, DP, used); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int knapSack(int totalWeight, int wt[], int val[], int n) {\n\t\t// Base Case\n\t\tif (n == 0 || totalWeight == 0)\n\t\t\treturn 0;\n\n\t\t// If weight of the nth item is more than Knapsack capacity W, then\n\t\t// this item cannot be included in the optimal solution\n\t\tif (wt[n - 1] > totalWeight)\n\t\t\treturn knapSack(totalWeight, wt, val, n - 1);\n\n\t\t// Return the maximum of two cases:\n\t\t// (1) nth item included\n\t\t// (2) not included\n\t\telse\n\t\t\treturn max(\n\t\t\t\t\tval[n - 1]\n\t\t\t\t\t\t\t+ knapSack(totalWeight - wt[n - 1], wt, val, n - 1),\n\t\t\t\t\tknapSack(totalWeight, wt, val, n - 1));\n\t}", "void ksUnbounded(int targetWeight, int nItems, int[] iWeights, int[] iValues) {\n\r\n\t\tint[][] ksItemCapacity = new int[nItems + 1][targetWeight + 1];\r\n\t\tint[][] ksTrack = new int[nItems + 1][targetWeight + 1];\r\n\r\n\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\tksItemCapacity[0][w] = 0;\r\n\t\t}\r\n\r\n\t\tfor (int item = 1; item < nItems; item++) {\r\n\t\t\tfor (int w = 0; w <= targetWeight; w++) {\r\n\t\t\t\t// last known Maximum value of KS contents s.t. their weight\r\n\t\t\t\t// totals to atmost w-iWeights[item]\r\n\t\t\t\tint eItemValue = (iWeights[item] <= w) ? ksItemCapacity[item - 1][w\r\n\t\t\t\t\t\t- iWeights[item]]\r\n\t\t\t\t\t\t: 0;\r\n\t\t\t\tif ((iWeights[item] <= w)\r\n\t\t\t\t\t\t&& (iValues[item] + eItemValue) > ksItemCapacity[item - 1][w]) {\r\n\t\t\t\t\tksItemCapacity[item][w] = eItemValue + iValues[item];\r\n\t\t\t\t\t// current item included\r\n\t\t\t\t\tksTrack[item][w] = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tksItemCapacity[item][w] = ksItemCapacity[item - 1][w];\r\n\t\t\t\t\t// current item not included\r\n\t\t\t\t\tksTrack[item][w] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Print KS contents\r\n\t\tArrayList<Integer> ksContents = new ArrayList<Integer>();\r\n\t\tint tW = targetWeight;\r\n\t\tfor (int item = nItems; item >= 0; item--) {\r\n\t\t\tif (ksTrack[item][tW] == 1) {\r\n\t\t\t\ttW -= iWeights[item];\r\n\t\t\t\tksContents.add(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Items choosen are:\");\r\n\t\tint W = 0, V = 0;\r\n\t\tfor (Integer e : ksContents) {\r\n\t\t\tW += iWeights[e];\r\n\t\t\tV += iValues[e];\r\n\t\t\tSystem.out.println(\"Weight: \" + iWeights[e] + \", Value: \"\r\n\t\t\t\t\t+ iValues[e]);\r\n\t\t}\r\n\t\tSystem.out.println(\"Total weight: \" + W + \" Total value: \" + V);\r\n\t}", "public static void knapsackDynamicProgramming(objects[] items, int capacity, int n) \r\n { \r\n\t\t//use bubble sort to sort item by their weight\t\t\t\t\r\n\t\tfor (int i = 0; i < n-1; i++) \t\t\t\t\r\n\t\t{ \t\t \r\n\t\t\tfor (int j = 0; j < (n-i-1); j++) \t\t \r\n\t\t\t{\t\t \r\n\t\t\t\tif (items[j].weight < items[j+1].weight) \t\t \r\n\t\t\t\t{ \t\t \t\r\n\t\t\t\t\tobjects temp = items[j]; \t\t \r\n\t\t\t\t\titems[j] = items[j+1]; \t\t \r\n\t\t\t\t\titems[j+1] = temp; \t\t \t\t\t\t\t\r\n\t\t\t\t}\t\t \r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n \tif(n <= 0 || capacity <= 0)\r\n \t{\r\n \t\tSystem.out.print(\"Error capacity and object numbers can't be 0\");\r\n \t}\r\n \r\n \tint matrixTable[][] = new int[n+1][capacity+1]; \r\n \r\n \tfor (int i = 0; i <= n; i++) \r\n \t{ \r\n \t\tfor (int j = 0; j <= capacity; j++) \r\n \t\t{ \r\n \t\t\t//Preset row 0 value and column value to 0\r\n \t\t\tif (i==0 || j==0) \r\n \t {\r\n \t\t\t\tmatrixTable[i][j] = 0; \r\n \t }\r\n \r\n \t\t\t//If current row number is greater than current weight number\r\n \t\t\telse if (items[i-1].weight <= j) \r\n \t\t\t{\r\n \t\t\t\t//Compare the top value with top value plus value(use weight as the value to go left)result\r\n \t\t\t\t//and use the greatest value for the current one.\r\n \t\t\t\tmatrixTable[i][j] = Math.max(items[i-1].profit + matrixTable[i-1][j-items[i-1].weight], matrixTable[i-1][j]); \r\n \t\t\t}\r\n \t\t\t//If row number is less than current weight number just use the top value\r\n \t\t\telse \r\n \t\t\t{ \t \r\n \t\t\t\tmatrixTable[i][j] = matrixTable[i-1][j];\r\n \t\t\t}\r\n \t\t} \t\r\n \t} \r\n \t\r\n\t\tint totalProfit = matrixTable[n][capacity]; \t\t\r\n\t\tint temp = matrixTable[n][capacity];\r\n\t\tint [] itemInKnapsack = new int [n];\r\n\t\t\r\n\t\t//solving which item is in the knapsack\r\n for (int i = n; i > 0 && temp > 0; i--) { \r\n \r\n \r\n \tif (temp == matrixTable[i - 1][capacity]) \r\n \t{\r\n continue;\r\n \t}\r\n \t//if the top value is different than it is include in the knapsack\r\n else \r\n { \r\n itemInKnapsack[i-1] = items[i-1].index; //Save item number\r\n temp = temp - items[i - 1].profit; \r\n capacity = capacity - items[i - 1].weight; \r\n } \r\n } \r\n \r\n printResult(itemInKnapsack, totalProfit, 2); //Call print result\r\n }", "public static int zeroOneKnapsack(int[] weight, int[] value, int capacity) {\n\t\tint[][] dp = new int[weight.length + 1][capacity + 1];\n\n\t\tfor (int i = 0; i < weight.length + 1 ; i++) {\n\t\t\t for (int j = 0; j < capacity + 1; j++) {\n\t\t\t\t\n\t\t\t\t // base condition for memoization\n\t\t\t\t // first row and first column for 2d matrix is initialised to 0\n\t\t\t\t // profit = 0 when number of items = 0 or bag capacity = 0 \n\t\t\t\t if (i == 0 || j == 0) { \n\t\t\t\t\t dp[i][j] = 0;\n\t\t\t\t } \n\t\t\t\t \n\t\t\t\t // weight of item under consideration is less than capacity of bag\n\t\t\t\t // value of i in 2d matrix corresponds to (i-1)th element in weight and value arrays\n\t\t\t\t // hence, weight(i-1) is compared with the corresponding matrix cell capacity(i.e.column)\n\t\t\t\t \n\t\t\t\t else if (weight[i-1] <= j){\n\t\t\t\t\t \n\t\t\t\t\t // possibility 1: when item having weight(i-1) is added to bag\n\t\t\t\t\t // item having weight(i-1) has value(i-1)\n\t\t\t\t\t // this value added to array value for (i-1)th row and (j-weight[i-1])th column\n\t\t\t\t\t // because :\n\t\t\t\t\t // 1) the total capacity reduced by weight(i-1) after deciding item inclusion\n\t\t\t\t\t // 2) total no.of elements reduced by 1 after deciding item inclusion\n\t\t\t\t\t \n\t\t\t\t\t int a = value[i-1] + dp[i-1][j-weight[i-1]];\n\t\t\t\t\t \n\t\t\t\t\t// possibility 1: when item having weight(i-1) is not added to bag\n\t\t\t\t\t// 1) the total capacity remains as is after deciding item exclusion\n\t\t\t\t\t// 2) total no.of elements reduced by 1 after deciding item exclusion\n\t\t\t\t\t \n\t\t\t\t\t int b = dp[i-1][j];\n\t\t\t\t\t \n\t\t\t\t\t // max of a and b taken to find maximum profit value \n\t\t\t\t\t dp[i][j] = Math.max(a, b);\t \n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t // weight of item under consideration is more than capacity of bag\n\t\t\t\t // hence item having weight(i-1) is not added to bag\n\t\t\t\t else {\n\t\t\t\t\t \n\t\t\t\t\t// 1) the total capacity remains as is after deciding item exclusion\n\t\t\t\t\t// 2) total no.of elements reduced by 1 after deciding item exclusion\n\t\t\t\t\t \n\t\t\t\t\t dp[i][j] = dp[i-1][j];\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dp[weight.length][capacity];\n\t\t\n\t}", "public Knapsack bruteForceCalc (ArrayList <Item> items,int capacity, int num_items) {\n\t\tif (num_items <= 0) {\n\t\t\tKnapsack knapsack = new Knapsack(0);\n\t\t\treturn knapsack;\n\t\t} \n\t\telse if (items.get(num_items -1).getWeight() > capacity) {\n\t\t\treturn bruteForceCalc(items, capacity, num_items - 1);\n\t\t} else {\n\n\t\t\tKnapsack ignore = bruteForceCalc(items,capacity, num_items - 1);\n\t\t\tKnapsack take = bruteForceCalc(items,capacity - items.get(num_items -1).getWeight(), num_items - 1);\n\t\t\t\n\t\t\tint ignoreVal = ignore.getValue();\n\t\t\tint takeVal = items.get(num_items - 1).getValue() + take.getValue();\n\t\t\t \n\t\t\tif( Math.max(ignoreVal, takeVal) == ignoreVal ) \n\t\t\t\treturn ignore;\n\t\t\telse {\n\t\t\t\ttake.addItem(items.get(num_items - 1));\n\t\t\t\treturn take;\n\t\t\t}\n\t\t}\n\t}", "static int knapsack(int W, int wt[], int val[], int n)\n\t{\n\t\t// base case\n\t\tif (n==0 || W==0)\n\t\t\treturn 0;\n\t\t\n\t\t// If weight of nth item is more than knapsack capacity W, then\n\t\t// this item cannot be included in optimal solution\n\t\tif (wt[n-1] > W)\n\t\t\treturn knapsack(W, wt, val, n-1);\n\t\t\n\t\t// return maximum of two cases\n\t\t// nth item included\n\t\t// not included\n\t\telse return max(val[n-1] + knapsack(W-wt[n-1],wt,val,n-1),\n\t\t\t\tknapsack(W,wt,val,n-1)\n\t\t\t\t);\n\t}", "static int knapsackDP(int weights[],int values[],int noOFitems,int capacityOfKnapsack){\n int dp[][] = new int[noOFitems+1][capacityOfKnapsack+1];\n\n for(int i=1;i<noOFitems+1;i++){\n for(int w=1;w<capacityOfKnapsack+1;w++){\n\n int inc = 0;\t\n if(weights[i] <= w){\n inc = values[i] + dp[i-1][w-weights[i]];\n }\n int exc = dp[i-1][w];\n dp[i][w] = Math.max(inc,exc);\n\n }\n }\n \n for (int i = 0; i < noOFitems+1; i++) {\n\t\t\tfor (int j = 0; j < capacityOfKnapsack+1; j++) {\n\t\t\t\tSystem.out.print(dp[i][j]+ \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n \n return dp[noOFitems][capacityOfKnapsack];\n\t}", "static int knapsack(Item[] items, int maxWeight) {\n return knapsack(items, maxWeight, 0);\n }", "static int knapSack(int W, int wt[], int val[], int n, List<Integer> incl, List<Integer> v) {\r\n\tList<Integer> v1 = new ArrayList<>();\r\n\tList<Integer> v2 = new ArrayList<>();\r\n\t// Base Case\r\n\tif (n == 0 || W == 0)\r\n\t return 0;\r\n\t// If weight of the nth item is more than Knapsack capacity W, then\r\n\t// this item cannot be included in the optimal solution\r\n\tif (wt[n - 1] > W) {\r\n\t return knapSack(W, wt, val, n - 1, incl, v1);\r\n\t}\r\n\r\n\t// Return the maximum of two cases:\r\n\t// (1) nth item included\r\n\t// (2) not included\r\n\telse {\r\n\t System.out.println(wt[n - 1]);\r\n\t v1.add(n - 1);\r\n\t int m = val[n - 1] + knapSack(W - wt[n - 1], wt, val, n - 1, incl, v1);\r\n\t int n1 = knapSack(W, wt, val, n - 1, incl, v2);\r\n\t if (Math.max(m, n1) == m) {\r\n\t\tv.addAll(v1);\r\n\t } else {\r\n\t\tv.addAll(v2);\r\n\t }\r\n\t return Math.max(m, n1);\r\n\t}\r\n }", "private int optimize() {\n\t\t// items: Items sorted by value-to-weight ratio for linear relaxation\n\t\t// t: the decision vector being tested at each node\n\t\t// ws, vs, is, bs: stacks of weight, value, item id, whether bring item\n\t\t// p: stack pointer; i, b, weight, value: loop caches; best: max search\n\t\t// ss: stack size: Always <=2 children on stack for <=n-1 parents\n\t\tItem[] items = new Item[n];\n\t\tint ss = 2 * n;\n\t\tint[] itemsSorted = new int[n], t = new int[n], ws = new int[ss],\n\t\t\tvs = new int[ss], is = new int[ss], bs = new int[ss];\n\t\tint i, b, weight, value, best = 0, p = 0;\n\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titems[j] = new Item(j);\n\t\tArrays.sort(items);\n\t\tfor (int j = 0; j < n; j++)\n\t\t\titemsSorted[j] = items[j].i();\n\t\titems = null; // For garbage collection.\n\n\t\t// Push item 0 onto the stack with and without bringing it.\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 1; p++;\n\t\tws[p] = 0; vs[p] = 0; is[p] = 0; bs[p] = 0; p++;\n\n\t\twhile (p > 0) {\n\t\t\tp--; // Pop the latest item off the stack\n\t\t\ti = is[p]; b = bs[p];\n\t\t\tweight = ws[p] + w[i] * b;\n\t\t\tif (weight > k)\n\t\t\t\tcontinue;\n\t\t\tvalue = vs[p] + v[i] * b;\n\t\t\tif (bound(i, weight, value, itemsSorted) < best)\n\t\t\t\tcontinue;\n\t\t\tbest = Math.max(value, best);\n\t\t\tt[i] = b;\n\t\t\tif (i < n - 1) { // Push children onto stack w/ & w/o bringing item\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 1; p++;\n\t\t\t\tws[p] = weight; vs[p] = value; is[p] = i + 1; bs[p] = 0; p++;\n\t\t\t}\n\t\t\telse if (value >= best)\n\t\t\t\tSystem.arraycopy(t, 0, x, 0, n);\n\t\t}\n\t\treturn best;\n\t}", "static int knapsack(int[] weight, int[] value, int n, int maxWeight) {\n int[][] dp = new int[n+1][maxWeight+1];\n for (int i=0;i<=n;i++) {\n for (int j =0;j<=maxWeight;j++) {\n dp[i][j] = -1;\n }\n }\n int ans= knapsack(weight,value,n,maxWeight,dp);\n return ans;\n\n }", "public int howManyAvailable(Item i){/*NOT IMPLEMENTED*/return 0;}", "public static void main(String[] args) {\n\t\t\n\t\tint max_size,n; \n \n ArrayList<item> items=new ArrayList();\n\t\t// item 1, value 6, size 1\n items.add(new item(1, 6, 1));\n\t\t// item 2, value 10, size 2\n\t\titems.add(new item(2, 10, 2));\n\t\t// item 3, value 12, size 3\n\t\titems.add(new item(3, 12, 3));\n\t\t// the size of your knapsack\n max_size=5; \n\t\t// sort items by density\n\t\tsortitems(items);\n \n System.out.println(\"The maximum value we can place into the knapsack is \"+ greedyfractionalknapsack(items, max_size));\n\n\n\n}", "public static int knapSackWithDP(int expectedWeight) {\n\t\tint N = values.length;\n\t\tint[][] dP = new int[N + 1][expectedWeight + 1];\n\t\tboolean[][] takeSoln = new boolean[N + 1][expectedWeight + 1];\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= expectedWeight; j++) {\n\t\t\t\tif (weights[i - 1] > j) {\n\t\t\t\t\tdP[i][j] = dP[i - 1][j];\n\t\t\t\t} else {\n\t\t\t\t\tint option1 = dP[i - 1][j], option2 = values[i - 1] + dP[i - 1][j - weights[i - 1]];\n\t\t\t\t\tdP[i][j] = Math.max(option2, option1);\n\t\t\t\t\ttakeSoln[i][j] = (option2 > option1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"Selected items are: \");\n\t\tint totalWt = 0, totalValue = 0;\n\t\tfor (int k = N, wt = expectedWeight; k > 0; k--) {\n\t\t\tif (takeSoln[k][wt]) {\n\t\t\t\ttotalWt += weights[k - 1];\n\t\t\t\ttotalValue += values[k - 1];\n\t\t\t\tSystem.out.printf(\"\tItem %d with weight %d and value %d\\n\", k, weights[k - 1], values[k - 1]);\n\t\t\t\twt -= weights[k - 1];\n\t\t\t}\n\t\t}\n\t\tSystem.out.printf(\"Calculated total weight= %d and total value= %d\\n\", totalWt, totalValue);\n\t\treturn dP[N][expectedWeight];\n\t}", "private void ObjectsKnapsack(int[] vol, int[][] M, int n, int V, int[] objects)\r\n {\r\n int i,W;\r\n W = V;\r\n \r\n for(i=n; i>=1; i--) {\r\n if(M[i][W] == M[i-1][W]) {\r\n objects[i] = 0;\r\n } else {\r\n \tobjects[i] = 1;\r\n W = W - vol[i];\r\n }\r\n }\r\n }", "public static void main(String[] args){ w = the total weight\n\t\t// i = item i\n\t\t// m[i, w] = maximum value attained with weight <= w using items up to i\n\t\t//\n\t\t// recurrence relation:\n\t\t// m[0, w] = 0, if there's zero items, the sum is zero\n\t\t// m[i, w] = m[i-1, w], if w(i) > w, the new item's weight > current weight limit\n\t\t// m[i, w] = max(m[i-1, w],\n\t\t// \t\t\t\t m[i-1, w-w(i)] + v(i), if w(i) <= w\n\t\t//\n\t\t//\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\n\t\titems.add(new Item(10, 60));\n\t\titems.add(new Item(20, 100));\n\t\titems.add(new Item(30, 120));\n\n\t\tSystem.out.println(knapsack(items.size()-1, 50, items));\n\t}", "int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}", "private int calculateInputStock_Items() {\n\t\tint total = 0;\n\t\tArrayList<Integer> stock = getAllStockValues();\n\t\tif (!stock.isEmpty()) {\n\t\t\t// get for all K\n\t\t\ttotal += (stock.get(0) * getSetUpMachine().getVending_item().get(\"K\"));\n\t\t\t// get for all S\n\t\t\ttotal += (stock.get(1) * getSetUpMachine().getVending_item().get(\"S\"));\n\t\t\t// get for all F\n\t\t\ttotal += (stock.get(2) * getSetUpMachine().getVending_item().get(\"F\"));\n\t\t\t// get for all N\n\t\t\ttotal += (stock.get(3) * getSetUpMachine().getVending_item().get(\"N\"));\n\t\t}\n\t\treturn total;\n\t}", "private void Knapsack(int[] vol, int[] ben, int n, int V, int[][] M)\r\n {\r\n int i,j;\r\n \r\n for (i=1; i<n; i++) {\r\n M[i][0] = 0;\r\n }\r\n \r\n for (j=1; j<V; j++) {\r\n M[0][j] = 0;\r\n }\r\n\r\n for (i=1; i<=n; i++) {\r\n for (j=1; j<=V; j++) {\r\n if(vol[i] > j) {\r\n M[i][j] = M[i-1][j];\r\n } else {\r\n M[i][j] = max(M[i-1][j], M[i-1][j-vol[i]] + ben[i]);\r\n }\r\n }\r\n }\r\n }", "int knapsack01(int[] v, int[] w, int capacity) {\n return knapsack01(v, w, capacity, 0, 0);\n }", "int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}", "@Test\n\tpublic void when_provided_maximum_size_list_with_all_elements_that_can_be_added_then_return_sum_in_allowable_amount_of_time() {\n\t\tfinal int[] elements = Fixture.initializeRandomList(MAX_NUM_ELEMENTS, MIN_ELEMENT_SIZE, 5);\n\t\tfinal int elementSum = IntStream.of(elements).sum();\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal int result = Knapsack.getOptimalWeight(elementSum, elements);\n\n\t\tassertThat(result, is(elementSum));\n\t\tassertThat(System.currentTimeMillis() - startTime < Fixture.MAX_ALLOWABLE_CALCULATION_TIME, is(true));\n\t}", "protected abstract void solve(Items items,Knapsack knapsack);", "static int unboundedKnapsack(int [] val,int[] wt, int W){\n int n = val.length;\n int[][] dp = new int[n+1][W+1];\n for (int i =0;i<=n;i++){\n dp[i][0] = 0;\n }\n for (int j = 0;j<=W;j++){\n dp[0][j] = 0;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=W;j++){\n if (wt[i-1] <= j){\n dp[i][j] = Math.max(dp[i-1][j], val[i-1] + dp[i][j - wt[i-1]]);\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][W];\n }", "public double knapsack(double[] valuePass, double[] weightPass, double capacity) {\n\n if (valuePass.length == 0) { return 0; }\n value = valuePass;\n weight = weightPass;\n double[] subsets = new double[value.length];\n double takenValue = 0;\n double takenWeight = 0;\n double selection = 0;\n\n // look at each subset of the entire set\n for (int i = 0; i < Math.pow(2, value.length); i++) {\n\n /* INVARIANT: the value/weight values are greater than 0 */\n if (KnapsackMain.debug)\n assert assertionValueWeightGreaterThanZero(takenValue, takenWeight);\n\n // variables for the inner loop\n int itemToTake = value.length - 1;\n double temporaryValue = 0;\n double temporaryWeight = 0;\n\n // wh\n while (subsets[itemToTake] != 0 && itemToTake > 0) {\n subsets[itemToTake] = 0;\n itemToTake = itemToTake - 1;\n }\n\n subsets[itemToTake] = 1;\n\n for (int j = 0; j < value.length; j++) {\n\n // if the item is marked in the subset, then add it to the takenValue\n if (subsets[j] == 1 ) {\n temporaryValue = temporaryValue + value[j];\n temporaryWeight = temporaryWeight + weight[j];\n }\n }\n\n if (temporaryValue > takenValue && temporaryWeight <= capacity) {\n takenValue = temporaryValue;\n takenWeight = temporaryWeight;\n }\n }\n return takenValue;\n }", "public static int dynamic_p(int objects,int capacity){\r\n // Array to accommodate dynamic programming solutions\r\n int dp_array[][] = new int[objects+1][capacity+1];\r\n // filling the 2D array\r\n for(int i=0; i<= objects;i++){\r\n for(int j=0; j<= capacity;j++){\r\n if(i == 0)\r\n dp_array[i][j]=0; // base case(number of objects are zero)\r\n else if(j == 0)\r\n dp_array[i][j]=0; // base case(capacity is zero)\r\n else if(randvariables[i-1] <= j){ // checking if the wight of object is less than the current knapsack capacity\r\n int included = randvalues[i-1]+dp_array[i-1][j-randvariables[i-1]]; // object is included\r\n int not_included = dp_array[i-1][j]; // object is not included\r\n\r\n //taking the max of these two\r\n if(included > not_included)\r\n dp_array[i][j] = included;\r\n else\r\n dp_array[i][j]= not_included;\r\n }\r\n else // weight is more than capacity .. not including the object\r\n dp_array[i][j] = dp_array[i-1][j];\r\n }\r\n }\r\n\r\n //System.out.println(Arrays.deepToString(dp_array));\r\n int solution = dp_array[objects][capacity];\r\n boolean[] optimalset = solution_used(dp_array,objects,capacity);\r\n System.out.println(Arrays.toString(optimalset));\r\n dp_array = null;\r\n return solution; // return the final solution\r\n\r\n }", "public Solution solve(KnapsackData data);", "long getMaxItemFindings();", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "static int webknapSackRecur(int W, int wt[], int val[], int n) {\n // Base Case\n if (n == 0 || W == 0)\n return 0;\n\n // wt[i] represents the weight of the ith item\n // If weight of the nth item is more than Knapsack capacity W, then\n // this item cannot be included in the optimal solution\n if (wt[n - 1] > W)\n return webknapSackRecur(W, wt, val, n - 1);\n\n // Return the maximum of two cases:\n // (1) nth item included\n // (2) not included\n else return max(val[n - 1] + webknapSackRecur(W - wt[n - 1], wt, val, n - 1),\n webknapSackRecur(W, wt, val, n - 1)\n );\n }", "public void\tgetData() throws IOException{\n\t\tint i,j, val;\n\t\tint profitOfItems[], weight[];\n\t\t\n\t\tSystem.out.println(\"Enter the weight of the Knapsack ( must be positive):\");\n\t\tknapsackWeight = KnapsackAlgorithmImplementation.getNumber();\n\t\t\n\t\tSystem.out.println(\"\\nEnter the number of items to put in knapsack ( must be positive):\");\n\t\tnumberOfItems = KnapsackAlgorithmImplementation.getNumber();\n\t\t\n\t\tprofitOfItems = new int[numberOfItems + 1];\n\t\tfor ( i = 1 ; i <= numberOfItems ; i++) {\n\t\t\tSystem.out.println(\"Enter profit of item \" + String.valueOf(i));\n\t\t\tprofitOfItems[i] = KnapsackAlgorithmImplementation.getNumber();\n\t\t}\t\n\t\t\n\t\tweight = new int[numberOfItems + 1];\n\t\tfor ( i = 1 ; i <= numberOfItems ; i++) {\n\t\t\tSystem.out.println(\"Enter weight of item \" + String.valueOf(i));\n\t\t\tweight[i] = KnapsackAlgorithmImplementation.getNumber();\n\t\t}\t\n\t\t\n\t\tProfit = new int[numberOfItems + 1][knapsackWeight + 1];\n\t\tDir\t = new int[numberOfItems + 1][knapsackWeight + 1];\n\t\t\n\t\tfor ( j = 0 ; j <= knapsackWeight; j++) {\n\t\t\tProfit[0][j] = 0;\t\n\t\t}\t\n\t\tfor ( i = 0 ; i <= numberOfItems; i++) {\n\t\t\tProfit[i][0] = 0;\t\n\t\t}\n\t\tfor ( i = 1 ; i <= numberOfItems; i++) { \n\t\t\tfor ( j = 1 ; j <= knapsackWeight; j++) {\n\t\t\t\tif ( weight[i] > j) {\n\t\t\t\t\tProfit[i][j] = Profit[i-1][j];\n\t\t\t\t\tDir[i][j] = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tval = profitOfItems[i] + Profit[i-1][j - weight[i]];\n\t\t\t\t\tProfit[i][j] = Find_Max( Profit[i-1][j] , val); \n\t\t\t\t\tif ( Profit[i][j] == val)\n\t\t\t\t\t\tDir[i][j] = 2;\n\t\t\t\t\telse\n\t\t\t\t\t\tDir[i][j] = 1;\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Maximum profit that can fit in the knapsack is :\" + Profit[numberOfItems][knapsackWeight]);\n\t\tPrint_KnapsackItems(Dir,weight);\t\t\n\t}", "public int knapSack(int wt[], int val[], int w) {\n return helper(wt, val, wt.length ,w);\n }", "public Integer getInterestedInItemsCount();", "protected void print_knapsack(Knapsack knapsack) {\n System.out.println(\"iteration:\"+iteration+\" time:\"+System.currentTimeMillis()+\n \" best_value:\"+best_value+\" \"+knapsack);\n }", "public int getAddItems(int totalCollected, int totalItemInGame);", "public UnboundedKnapsack(int[] vol, int[] ben, int n, int V)\r\n {\r\n\r\n M = new int[n+1][V+1];\r\n objects = new int[n+1];\r\n Knapsack(vol, ben, n, V, this.M);\r\n ObjectsKnapsack(vol, this.M, n, V, this.objects);\r\n res = result(this.objects, vol, ben);\r\n }", "public static boolean[] solution_used(int[][] dp_array,int objects,int capacity){\r\n\r\n boolean[] opt_set = new boolean[objects+1]; // to store solutions\r\n int Items = 0;\r\n int i = dp_array.length-1;\r\n for (int j = dp_array[0].length - 1; j >= 0 && i > 0;i--) {\r\n if (dp_array[i][j] != dp_array[i-1][j]) { // trace back algorithm\r\n opt_set[i-1] = true ; // set the array value true if the values are used\r\n j -= randvariables[i-1];\r\n Items++;\r\n }\r\n }\r\n return Arrays.copyOfRange(opt_set, 0, objects); //return the items\r\n }", "public boolean canPartition(int[] nums) {\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n // sum cannot be splitted evenly\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n \n // dp[i][j] represents whether 0~i-1 numbers can reach\n // weight capacity j\n boolean[][] dp = new boolean[n+1][target+1];\n \n for (int i = 1; i <= n; i++) dp[i][0] = true;\n for (int j = 1; j <= target; j++) dp[0][j] = false;\n dp[0][0] = true;\n \n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= target; j++) {\n // if don't pick current number\n dp[i][j] = dp[i-1][j];\n if (j >= nums[i-1]) {\n dp[i][j] = dp[i][j] || dp[i-1][j-nums[i-1]];\n }\n }\n }\n return dp[n][target];\n \n \n // Solution2: optimizing to save space\n // https://leetcode.com/problems/partition-equal-subset-sum/discuss/90592/01-knapsack-detailed-explanation/94996\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n boolean[] dp = new boolean[target+1];\n dp[0] = true;\n for (int num : nums) {\n // here is the trick to save space\n // because we have to update dp[j] based on \n // previous dp[j-num] and dp[j] from previous loop.\n // if we update dp from left to right\n // we first update smaller dp which is dp[j-num]\n // then we won't be able to get original dp[j-num] and dp[j]\n // from previous loop, and eventually we get the wrong\n // answer. But if we update dp from right to left\n // we can assure everything is based on previous state\n for (int j = target; j >= num; j--) {\n // if (j >= num) {\n dp[j] = dp[j] || dp[j-num];\n // }\n }\n }\n return dp[target];\n }", "int sizeOfStockArray();", "public Knapsack(int k, int[] v, int[] w) {\n\t\tif (v.length != w.length)\n\t\t\tthrow new IllegalArgumentException(\"ambiguous problem size\");\n\t\tn = v.length;\n\t\tif (n < 1)\n\t\t\tthrow new IllegalArgumentException(\"no items to put in knapsack\");\n\t\tthis.k = k;\n\t\tthis.v = new int[n];\n\t\tthis.w = new int[n];\n\t\tSystem.arraycopy(v, 0, this.v, 0, n);\n\t\tSystem.arraycopy(w, 0, this.w, 0, n);\n\t\tx = new int[n];\n\t\tint max = optimize(); // sets x\n\t\tassert feasible();\n\t\toptimal = objective() == max;\n\t}", "static int zeroOneKnapsack(int []val,int [] wt,int W){\n// initialize\n int[][] dp = new int[val.length+1][W+1];\n\n int n = val.length;\n for (int i = 0;i<=n;i++){\n dp[i][0] = 0;\n }\n for (int j = 0;j<=W;j++){\n dp[0][j] = 0;\n }\n\n for (int i = 1;i<=n;i++){\n for(int j = 1;j<=W;j++){\n if (wt[i-1] <= j){\n dp[i][j] = Math.max(val[i-1] + dp[i-1][j - wt[i-1]], dp[i-1][j]);\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][W];\n }", "@Override\n public int summarizeQuantity() {\n int sum = 0;\n\n for ( AbstractItem element : this.getComponents() ) {\n sum += element.summarizeQuantity();\n }\n\n return sum;\n }", "private static int partition3(int[] A) {\n \tint sum = 0;\r\n \tfor (int i = 0; i < A.length; i++) \r\n sum += A[i]; \r\n \r\n if (sum%3 != 0) \r\n return 0; \r\n \r\n int weight[][] = new int[sum/3+1][A.length+1];\r\n \r\n // initialize top row as true \r\n for (int i = 0; i <= A.length; i++) \r\n \tweight[0][i] = 0; \r\n \r\n // initialize leftmost column, except part[0][0], as 0 \r\n for (int i = 1; i <= sum/3; i++) \r\n \tweight[i][0] = 0; \r\n //The logic of Discrete Knapsack with no repetitions\r\n int count = 0;\r\n for(int i=1; i<=sum/3; i++){\r\n \tfor(int j=1;j<=A.length;j++){\r\n \t\tweight[i][j] = weight[i][j-1];\r\n \t\tint weight1 = 0;\r\n \t\tif(A[j-1]<=i)\r\n \t\t\tweight1 = weight[i-A[j-1]][j] + A[j-1];\r\n \t\tweight[i][j] = Math.max(weight1, weight[i][j]);\r\n \t\tif(weight[i][j] == sum/3)\r\n \t\t\tcount++;\r\n \t\t\r\n \t}\r\n }\r\n if(count < 3)\r\n \treturn 0;\r\n else\r\n \treturn 1;\r\n }", "public static int[][] neighborhoodSearch(float[] benefit, float[] weight, int[] knapsackWeight){\n\n /*\n Using greedy algorithm to put items in knapsacks\n */\n\n // number of items\n int itemLen = benefit.length;\n // number of knapsacks\n int knapsackLen = knapsackWeight.length;\n // key: index of item, value: benefit / weight of item\n Map<Integer, Float> benefitPerWeightToIndexMap = new TreeMap<>();\n // if item i is included in knapsack j, result[i][j] = 1, otherwise result[i][j] = 0\n int[][] result = new int[itemLen][knapsackLen];\n // initialize the map\n for (int i = 0; i < itemLen; i++) {\n benefitPerWeightToIndexMap.put(i, (benefit[i] / weight[i]));\n }\n\n // the value comparator for sorting the entrySet in the map by value in descending order (using lambda)\n Comparator<Map.Entry<Integer, Float>> valueComparator = (o1, o2) -> o2.getValue().compareTo(o1.getValue());\n // convert the map to list to sort it by value comparator\n List<Map.Entry<Integer, Float>> benefitPerWeightToIndexList = new ArrayList<>(benefitPerWeightToIndexMap.entrySet());\n benefitPerWeightToIndexList.sort(valueComparator);\n\n printBenefitPerWeightList(benefitPerWeightToIndexList);\n\n int greedyTotalBenefit = 0;\n\n // put items in list into knapsacks\n for (int j = 0; j < knapsackLen; j++) {\n // the items have been put in and ready to be delete\n List<Map.Entry<Integer, Float>> deleteList = new ArrayList<>();\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightToIndexList) {\n int i = entry.getKey();\n if (weight[i] <= knapsackWeight[j]) {\n result[i][j] = 1;\n greedyTotalBenefit += benefit[i];\n deleteList.add(entry);\n knapsackWeight[j] -= weight[i];\n }\n }\n // delete the items have been put in\n benefitPerWeightToIndexList.removeAll(deleteList);\n }\n // After greedy algorithm\n System.out.println(\"------After greedy algorithm------\");\n printKnapsackWeight(knapsackWeight);\n printItemsNotIncluded(benefitPerWeightToIndexList);\n System.out.println(\"Total benefit:\" + greedyTotalBenefit);\n printResult(result);\n\n /*\n Search neighborhood\n */\n\n int neighborTotalBenefit = greedyTotalBenefit;\n\n // traversing knapsacks\n for (int j1 = 0; j1 < knapsackLen - 1; j1++) {\n for (int j2 = j1 + 1; j2 < knapsackLen; j2++) {\n // traversing items in the two knapsacks\n for (int i1 = 0; i1 < itemLen; i1++) {\n for (int i2 = 0; i2 < itemLen; i2++) {\n // judge if item i1 and item i2 exists in knapsack j1 and j2 respectively\n if (result[i1][j1] == 1 && result[i2][j2] == 1) {\n // tempList for update benefitPerWeightToIndexList in iteration\n List<Map.Entry<Integer, Float>> tempList = new ArrayList<>(benefitPerWeightToIndexList);\n // traversing items that have not been included\n for (Map.Entry<Integer, Float> entry:\n benefitPerWeightToIndexList) {\n int i3 = entry.getKey();\n // judge if the neighborhood solution is feasible\n if (knapsackWeight[j2] + weight[i2] - weight[i1] >= 0\n && knapsackWeight[j1] + weight[i1] - weight[i3] >= 0) {\n // judge if the neighborhood solution is better\n if (neighborTotalBenefit - benefit[i2] + benefit[i3] > neighborTotalBenefit) {\n // change the current solution to the neighborhood solution\n result[i1][j1] = 0;\n result[i1][j2] = 1;\n\n result[i2][j2] = 0;\n\n result[i3][j1] = 1;\n\n tempList.remove(entry);\n int finalI2 = i2;\n tempList.add(new Map.Entry<Integer, Float>() {\n @Override\n public Integer getKey() {\n return finalI2;\n }\n\n @Override\n public Float getValue() {\n return benefit[finalI2] / weight[finalI2];\n }\n\n @Override\n public Float setValue(Float value) {\n return null;\n }\n });\n\n knapsackWeight[j1] += weight[i1] - weight[i3];\n knapsackWeight[j2] += weight[i2] - weight[i1];\n\n neighborTotalBenefit = (int) (neighborTotalBenefit - benefit[i2] + benefit[i3]);\n\n System.out.println(\"------Find a better solution------\");\n System.out.println(\"Remove item\" + i2 + \" in \" + \"knapsack\" + j2 + \", move item\" + i1 + \" from knapsack\" + j1 + \" to \" + \"knapsack\" + j2 + \" and put item\" + i3 + \" in knapsack\" + j1);\n printKnapsackWeight(knapsackWeight);\n printItemsNotIncluded(tempList);\n System.out.println(\"Total benefit:\" + neighborTotalBenefit);\n printResult(result);\n }\n }\n }\n // update the list after traversing the list\n benefitPerWeightToIndexList = tempList;\n }\n }\n }\n }\n }\n\n return result;\n }", "public int reservedBeanBagsInStock() {\n int ReservedStock = 0;\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the current beanBag in the \"stockList\"ches reserved state boolean is true.\r\n if (((BeanBag) stockList.get(i)).getReserved()) {\r\n // Increment the \"ReservedStock\" integer by 1.\r\n ReservedStock = ReservedStock + 1;\r\n }\r\n }\r\n // Return the value of the \"ReservedStock\" integer.\r\n return ReservedStock;\r\n }", "int calculateCapacity(int[] vesselArray);", "static int numOfSubsets(int[] arr, int n, int k) {\n List<Integer> vect1 = new ArrayList<Integer>(); \n List<Integer> vect2 = new ArrayList<Integer>(); \n List<Integer> subset1 = new ArrayList<Integer>(); \n List<Integer> subset2 = new ArrayList<Integer>(); \n \n // ignore element greater than k and divide\n // array into 2 halves\n for (int i = 0; i < n; i++) {\n \n // ignore element if greater than k\n if (arr[i] > k)\n continue;\n if (i <= n / 2)\n vect1.add(arr[i]);\n else\n vect2.add(arr[i]);\n }\n \n // generate all subsets for 1st half (vect1)\n for (int i = 0; i < (1 << vect1.size()); i++) {\n int value = 1;\n for (int j = 0; j < vect1.size(); j++) {\n if (i & (1 << j))\n value *= vect1[j];\n }\n \n // add only in case subset product is less\n // than equal to k\n if (value <= k)\n subset1.add(value);\n }\n \n // generate all subsets for 2nd half (vect2)\n for (int i = 0; i < (1 << vect2.size()); i++) {\n int value = 1;\n for (int j = 0; j < vect2.size(); j++) {\n if (i & (1 << j))\n value *= vect2[j];\n }\n \n // add only in case subset product is\n // less than equal to k\n if (value <= k)\n subset2.add(value);\n }\n \n // sort subset2\n sort(subset2.begin(), subset2.end());\n \n int count = 0;\n for (int i = 0; i < subset1.size(); i++)\n count += upper_bound(subset2.begin(), subset2.end(),\n (k / subset1[i]))\n - subset2.begin();\n \n // for null subset decrement the value of count\n count--;\n \n // return count\n return count;\n }", "public static double greedyfractionalknapsack(ArrayList<item> svd, int S){\n\t\tint totalSize = 0;\n\t\tdouble totalValue = 0;\n\t\tint count = 0;\n\t\twhile(S > totalSize && count < 3) {\n\t\t\t\tif(totalSize + svd.get(count).size <= S) {\n\t\t\t\t\ttotalValue += svd.get(count).value;\n\t\t\t\t\ttotalSize += svd.get(count).size;\n\t\t\t\t}\n\t\t\t\telse if(S - totalSize < svd.get(count).size) {\n\t\t\t\t\ttotalValue = totalValue + (svd.get(count).value * ((double)(S - totalSize)/svd.get(count).size));\n\t\t\t\t\ttotalSize = S;\n\t\t\t\t\t}\n\n\t\t\tcount++;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn totalValue;\n\t\t\n\t\t\n\t}", "public int solution2(int[] nums, int k) {\n PriorityQueue<Integer> pq = new PriorityQueue<Integer>();\n \n for (int i : nums) {\n pq.offer(i);\n \n if (pq.size() > k) {\n pq.poll();\n }\n }\n \n \n return pq.peek();\n }", "@Override\n\tpublic int size() {\n\t\tint nr = 0;\n\t\tfor (int i = 0; i < nrb; i++) {\n\t\t\t// pentru fiecare bucket numar in lista asociata acestuia numarul de\n\t\t\t// elemente pe care le detine si le insumez\n\t\t\tfor (int j = 0; j < b.get(i).getEntries().size(); j++) {\n\t\t\t\tnr++;\n\t\t\t}\n\t\t}\n\t\treturn nr;// numaru total de elemente\n\t}", "private static int getSmallerThanOrEqualToKCount(int[] a, int k){\n int left=0, right=a.length-1;\n while(left<right){\n int mid=left+(right+1-left)/2;\n if(a[mid]>k){\n right=mid-1;\n } else{\n left=mid;\n }\n }\n return left-0+1;\n }", "private Pair[] bribeCalculateBag(final int maxCards,\n final HashMap<String, Integer> association) {\n final int minMoney = 5;\n final int maxBagSize = 3;\n if (getInventory().getMoney() < minMoney || numberOfIllegals(association) == 0) {\n return calculateBag(maxCards, association);\n }\n Pair[] result;\n if (numberOfIllegals(association) <= 2 || getInventory().getMoney() < minMoney * 2) {\n getInventory().getBagToGive().setBribe(minMoney);\n getInventory().setMoney(getInventory().getMoney() - minMoney);\n int duplicate = findIllegal(association);\n removeOneAsset(findIllegal(association));\n if (duplicate == findIllegal(association)) {\n result = new Pair[1];\n result[0] = new Pair<>(findIllegal(association), 2);\n getInventory().setNumberOfDeclared(2);\n } else {\n if (findIllegal(association) == -1) {\n result = new Pair[1];\n result[0] = new Pair<>(duplicate, 1);\n getInventory().setNumberOfDeclared(1);\n } else {\n result = new Pair[2];\n result[0] = new Pair<>(duplicate, 1);\n result[1] = new Pair<>(findIllegal(association), 1);\n getInventory().setNumberOfDeclared(2);\n }\n }\n removeOneAsset(findIllegal(association));\n getInventory().setDeclaredAssets(0);\n return result;\n } else {\n getInventory().getBagToGive().setBribe(minMoney * 2);\n getInventory().setMoney(getInventory().getMoney() - (minMoney * 2));\n int contor = maxCards - 1;\n final int contorStart = contor;\n int[] resultAux = new int[maxBagSize];\n getInventory().setDeclaredAssets(0);\n while (contor > 0 && findIllegal(association) != -1) {\n resultAux[findIllegal(association) % maxBagSize]++;\n removeOneAsset(findIllegal(association));\n contor--;\n }\n getInventory().setNumberOfDeclared(contorStart - contor);\n getInventory().setDeclaredAssets(0);\n contor = 0;\n for (int it : resultAux) {\n if (it != 0) {\n contor++;\n }\n }\n result = new Pair[contor];\n if (contor == maxBagSize) {\n result = new Pair[maxBagSize];\n result[0] = new Pair<>(association.get(\"Silk\"), resultAux[1]);\n result[1] = new Pair<>(association.get(\"Pepper\"), resultAux[2]);\n result[2] = new Pair<>(association.get(\"Barrel\"), resultAux[0]);\n } else {\n if (contor == 1) {\n result = new Pair[1];\n if (resultAux[0] > 0) {\n result[0] = new Pair<>(association.get(\"Barrel\"), resultAux[0]);\n }\n if (resultAux[1] > 0) {\n result[0] = new Pair<>(association.get(\"Silk\"), resultAux[1]);\n }\n if (resultAux[2] > 0) {\n result[0] = new Pair<>(association.get(\"Pepper\"), resultAux[2]);\n }\n } else {\n result = new Pair[2];\n int i = 0;\n if (resultAux[0] > 0) {\n result[i] = new Pair<>(association.get(\"Barrel\"), resultAux[0]);\n i++;\n }\n if (resultAux[1] > 0) {\n result[i] = new Pair<>(association.get(\"Silk\"), resultAux[1]);\n i++;\n }\n if (resultAux[2] > 0) {\n result[i] = new Pair<>(association.get(\"Pepper\"), resultAux[2]);\n }\n }\n }\n return result;\n }\n\n }", "int getNumItems();", "int getSellQuantity();", "public static int maxSum(int[] a, int k) \n {\n PriorityQueue<Integer> pq = new PriorityQueue<>(); \n for (int x : a) \n pq.add(x); \n \n // Do k negations by removing a minimum element k times \n while (k-- > 0) \n { \n // Retrieve and remove min element \n int temp = pq.poll(); \n \n // Modify the minimum element and add back \n // to priority queue \n temp *= -1; \n pq.add(temp); \n } \n \n // Compute sum of all elements in priority queue. \n int sum = 0; \n for (int x : pq) \n sum += x; \n return sum; \n }", "public int getHeuristic(){\n\t\tint count = 0;\n\t\tfor (int i = 0; i < getRows(); i++) {\n\t\t\tfor (int j = 0; j < getColumns(); j++) {\n\t\t\t\tif (cells[i][j].getSand() != getK()) \n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t} \n\t\treturn count;\n\t}", "double fractionalKnapsack(int W, Item arr[], int n) \n {\n Arrays.sort(arr, new Comparator<Item>() {\n \n public int compare(Item a, Item b)\n {\n return b.value*a.weight - a.value*b.weight;\n }\n });\n \n double ans = 0.0;\n \n for(Item it : arr )\n {\n int wt = it.weight;\n int val = it.value;\n \n if( W > wt )\n {\n W -= wt;\n ans += val;\n }\n \n else\n {\n ans += (val*W)/(double)wt;\n break;\n }\n }\n \n return ans;\n }", "private void createBitStremMap(){\n itemListMap = new HashMap<>();\n \n for (ArrayList<Integer> transactions_set1 : transactions_set) {\n ArrayList curr_tr = (ArrayList) transactions_set1;\n if(curr_tr.size() >= min_itemset_size_K) \n for (Object curr_tr1 : curr_tr) {\n int item = (int) curr_tr1;\n itemListMap.put(item, itemListMap.getOrDefault(item, 0)+1);\n }\n }\n \n // 3. Remove items without minimum support\n itemListMap.values().removeIf(val -> val<min_sup);\n \n // 4. Sort the map to a set of entries\n Set<Map.Entry<Integer, Integer>> set = itemListMap.entrySet();\n frequentItemListSetLenOne = new ArrayList<>(set);\n Collections.sort( frequentItemListSetLenOne, new Comparator<Map.Entry<Integer, Integer>>(){\n @Override\n public int compare( Map.Entry<Integer, Integer> o1, Map.Entry<Integer, Integer> o2 )\n {\n return (o2.getValue()).compareTo( o1.getValue() );\n }\n });\n\n // 5.\n itemIndex = new HashMap<>();\n for(Map.Entry<Integer, Integer> entry : frequentItemListSetLenOne){\n itemIndex.put(entry.getKey(), itemIndex.size());\n }\n\n // 6.\n bitsetLen = frequentItemListSetLenOne.size();\n }", "public int knapsack01(int[] w, int[] v, int C) {\n //dp[i] = Math.max(v[i] + dp[i - 1, c - w[i]], dp[i - 1, c])\n int[][] dp = new int[w.length][C];\n for (int i = 0; i <= C; i++) {\n if (i >= w[0])\n dp[0][i] = v[0];\n }\n for (int i = 1; i < w.length; i++) {\n for (int j = 0; j <= C; j++) {\n if (j >= w[i]) {\n dp[i][j] = Math.max(v[i] + dp[i - 1][C - w[i]], dp[i - 1][C]);\n } else {\n dp[i][j] = dp[i - 1][C];\n }\n }\n }\n return dp[w.length - 1][C];\n }", "static void knapsack(int problem, int i, int profit, int weight) {\r\n\t\tif(weight <= capacities.get(problem) && profit > maxProfit) {\r\n\t\t\tmaxProfit = profit;\r\n\t\t\tnumbest = i;\r\n\t\t\tfor(int j = 0; j < include.length; j++){\r\n\t\t\t\tbestset[j] = include[j];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(promising(problem, weight, profit, i)) {\r\n\t\t\tinclude[i+1] = \"yes\";\r\n\t\t\tknapsack(problem, i+1, profit + profits[i+1], weight + weights[i+1]);\r\n\t\t\tinclude[i+1] = \"no\";\r\n\t\t\tknapsack(problem, i+1, profit, weight);\r\n\t\t}\r\n\t}", "private int find_bestSplit(KnowledgeBase kb, int attIndex, ArrayList<ArrayList<ArrayList<Integer>>> multiple_counters) {\r\n\t\tif(multiple_counters.size() >0){\r\n\t\t\tfloat best_Gini = calculImpurity2D(kb.getSamples().size(),multiple_counters.get(0));; // it's a minimum!!\r\n\t\t\tint index_Best_Gini =0;\r\n\t\t\tfloat tmp_gini;\r\n\t\t\tfor(int i=1;i<multiple_counters.size();i++){\r\n\t\t\t\ttmp_gini = calculImpurity2D(kb.getSamples().size(),multiple_counters.get(i));\r\n\t\t\t\tif(tmp_gini<best_Gini){\r\n\t\t\t\t\tbest_Gini = tmp_gini;\r\n\t\t\t\t\tindex_Best_Gini = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn index_Best_Gini;\r\n\t\t}\r\n\t\treturn 0;\r\n\t\t\r\n\t\t\r\n\t}", "public int size(K lo, K hi);", "public int beanBagsInStock() {\n int counter = 0;\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the current beanBag in the \"stockList\" sold state boolean is true.\r\n if (!((BeanBag) stockList.get(i)).isSold()) {\r\n // Increment the \"counter\" integer by 1.\r\n counter++;\r\n }\r\n }\r\n // Return the value of the \"counter\" integer.\r\n return counter;\r\n }", "private void setWinningTuples() {\n\t\tWINS = new ArrayList<Set<CMNMove>>();\n\t\tSet<CMNMove> winSet = new TreeSet<CMNMove>();\n\t\tfor (int i = MM; i > 0; i--) {\n\t\t\tknapsack(winSet, CC, i, NN);\n\t\t}// end for\n\n\t}", "public static void main(String[] args) {\n System.out.println(\"------Random items and knapsacks------\");\n int itemLen = 10;\n int knapsackLen = 4;\n float[] benefit = new float[itemLen];\n float[] weight = new float[itemLen];\n int[] knapsackWeight = new int[knapsackLen];\n\n Random random = new Random();\n for (int i = 0; i < itemLen; i++) {\n // random benefit: 1 ~ 10\n benefit[i] = random.nextInt(9) + 1;\n // random weight: 1 ~ 10\n weight[i] = random.nextInt(9) + 1;\n }\n for (int i = 0; i < knapsackLen; i++) {\n // random knapsack weight: 5 ~ 15\n knapsackWeight[i] = random.nextInt(10) + 5;\n }\n\n /*\n Print items and knapsacks\n */\n System.out.print(\"Items benefit:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(benefit[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Items weight:\");\n for (int i = 0; i < itemLen; i++) {\n System.out.print(weight[i] + \" \");\n }\n System.out.println();\n\n System.out.print(\"Knapsacks weight:\");\n for (int i = 0; i < knapsackLen; i++) {\n System.out.print(knapsackWeight[i] + \" \");\n }\n System.out.println();\n\n // neighborhood search\n neighborhoodSearch(benefit, weight, knapsackWeight);\n\n }", "private static long calculateBestPickWithoutRepetition(int weight, Item[] items, long[][] DP) {\n\n for(int w = 1; w <= weight; w++) {\n for(int i = 1; i <= items.length; i++) {\n DP[w][i] = DP[w][i-1];\n Item item = items[i-1];\n\n if (item.getWeight() <= w) {\n DP[w][i] = Math.max(DP[w][i], DP[w - item.getWeight() ][i-1] + item.getValue());\n }\n }\n }\n\n return DP[DP.length -1][DP[0].length - 1];\n }", "public int get_nrBags() {\r\n return this.nr_bags;\r\n }", "private static Integer packDPRec(Integer capacity, List<Integer> weights, List<ItemDTO> items, Integer n, Integer[][] mem, List<Integer> optimalChoice) {\n // Base condition\n if (n == 0 || capacity <= 0)\n return 0;\n\n if (mem[n][capacity] != -1) {\n return mem[n][capacity];\n }\n\n if (weights.get(n - 1) > capacity) {\n // Store the value of function call\n // stack in table before return\n List<Integer> subOptimalChoice = new ArrayList<>();\n mem[n][capacity] = packDPRec(capacity, weights, items, n - 1, mem, subOptimalChoice);\n optimalChoice.addAll(subOptimalChoice);\n return mem[n][capacity];\n } else {\n // Return value of table after storing\n List<Integer> optimalChoiceIncluded = new ArrayList<>();\n List<Integer> optimalChoiceExcluded = new ArrayList<>();\n Integer valueIncluded = items.get(n - 1).getValue() + packDPRec(capacity - weights.get(n - 1), weights, items, n - 1, mem, optimalChoiceIncluded);\n Integer valueExcluded = packDPRec(capacity, weights, items, n - 1, mem, optimalChoiceExcluded);\n if (valueIncluded > valueExcluded) {\n optimalChoice.addAll(optimalChoiceIncluded);\n optimalChoice.add(items.get(n - 1).getId());\n mem[n][capacity] = valueIncluded;\n }else{\n optimalChoice.addAll(optimalChoiceExcluded);\n mem[n][capacity] = valueExcluded;\n }\n return mem[n][capacity];\n }\n }", "private void initialState() {\n forEach(item -> item.setInKnapsack(false));\n\n for (final Item item : this) {\n if (wouldOverpack(item)) {\n break;\n }\n item.switchIsKnapsack();\n }\n }", "public int getWeightedBucket() {\n float val = (float)(new Float((Math.random() * 100)));\n int totalWeight = 0;\n int i = 0;\n for (i = 0; i < weights.length; i++) {\n totalWeight += weights[i];\n if (val <= totalWeight)\n break;\n }\n return(i);\n }", "static int numberOfWays(int[] arr, int k) {\n\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < arr.length; i++) {\n if (!map.containsKey(arr[i])) {\n map.put(arr[i], 1);\n } else {\n map.put(arr[i], map.get(arr[i]) + 1);\n }\n }\n int result = 0;\n Iterator<Map.Entry<Integer, Integer>> iter = map.entrySet().iterator();\n while (iter.hasNext()) {\n Map.Entry<Integer, Integer> e = iter.next();\n int curNum = (int) e.getKey();\n int countOfOccurance = (int) e.getValue();\n int complement = k - curNum;\n\n if (map.containsKey(complement)) {\n // found target value\n if (curNum == complement) {\n // 3 + 3 = 6\n // add combination of them. count choose 2. For example [3, 3, 3, 3] = 4 choose 2\n result += getCombinationCount(countOfOccurance, 2);\n } else {\n // 1 + 5 = 6\n result += countOfOccurance;\n }\n }\n iter.remove();\n }\n\n return result;\n }", "private boolean feasible() {\n\t\tint weight = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tassert x[i] == 0 || x[i] == 1;\n\t\t\tweight += w[i] * x[i];\n\t\t}\n\t\treturn weight <= k;\n\t}", "private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }", "public List<List<Integer>> highestRankedKItems(int[][] grid, int[] pricing, int[] start, int k) {\n\n // BFS - calculate distances\n List<int[]> nodes = bfs(grid, start, pricing);\n\n return nodes.stream()\n .sorted((o1, o2) -> o1[2] == o2[2] ? o1[3] == o2[3] ? o1[0] == o2[0] ? o1[1] - o2[1] : o1[0] - o2[0] : o1[3] - o2[3] : o1[2] - o2[2])\n .map(node -> List.of(node[0], node[1]))\n .limit(k)\n .collect(Collectors.toList());\n }", "private static void maxDuffelBagValue(JSONArray cakeTypes, int capacity) {\n for (int i = 0; i < cakeTypes.length(); i++) {\n \tJSONObject cakeType = (JSONObject) cakeTypes.remove(i);\n \tif (cakeType.getInt(\"weight\") <= capacity) {\n \t\tval += cakeType.getInt(\"value\");\n \t\tcapacity -= cakeType.getInt(\"weight\");\n \t\tmaxDuffelBagValue(cakeTypes, capacity);\n\t\t\t}\n }\n\t}", "public static int optimalWeight(int W, int[] w) {\n int[][] knapsackMaxValues = new int[W+1][w.length+1];\n for(int i=1; i<=W; i++) {\n for(int j=1;j<=w.length; j++) {\n int keepItem;\n try {\n keepItem = w[j-1] + knapsackMaxValues[i-w[j-1]][j-1];\n } catch (ArrayIndexOutOfBoundsException exception) {\n keepItem = 0;\n }\n int leaveItem;\n try {\n leaveItem = knapsackMaxValues[i][j-1];\n } catch (ArrayIndexOutOfBoundsException exception) {\n leaveItem = 0;\n }\n if(keepItem > leaveItem)\n knapsackMaxValues[i][j] = keepItem;\n else\n knapsackMaxValues[i][j] = leaveItem;\n }\n //printKnapsack(knapsackMaxValues);\n }\n\n return knapsackMaxValues[W][w.length];\n }", "public static int knapsack(int[] weights, int[] values, int n, int maxWeight) {\n return knapSack(maxWeight, weights, values, n);\r\n }", "public static void main(String args[]) {\r\n\tList<Integer> list = new ArrayList<>();\r\n\tint id[] = new int[] { 38, 21, 13, 15 };\r\n\tint val[] = new int[] { 500, 1800, 1500, 50 };\r\n\tint wt[] = new int[] { 130, 280, 120, 50 };\r\n\tint W = 300;\r\n\tint n = val.length;\r\n\tSystem.out.println(knapSack(W, wt, val, n, list, list));\r\n\tSystem.out.println(Arrays.toString(list.toArray()));\r\n }", "public int currentCapacity() {\n\t\tList<Item> items = super.getItems();\n\n\t\tItem item;\n\t\tint sumCapacity = 0;\n\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\titem = items.get(i);\n\t\t\tsumCapacity += item.getCapacity();\n\t\t}\n\t\treturn sumCapacity;\n\t}", "public static int getRealTopK(int k, long items){\n return (int)(k > items ? items : k);\n }", "private int h(K k) {\r\n return (k.hashCode() + capacity()) % capacity();\r\n }", "static int nonDivisibleSubset(int k, int[] S) {\n\t\tint result = 0;\n\n\t\tArrayList < ArrayList < Integer >> solutions = new ArrayList < ArrayList < Integer >>();\n\t\tArrayList < HashSet < Integer >> minSets = new ArrayList < HashSet < Integer >>();\n\n\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( S [ 0 ])));\n\t\tminSets.add (new HashSet <Integer > ( ));\n\t\tminSets.get(0).add ( S [ 0 ] % k);\n\n\n\t\t// Go over all the numbers\n\t\tfor ( int i = 1; i < S.length; i++ ){\n\t\t\tint n = S [ i ]; \n\t\t\tint m = S [ i ] % k; // Number we will add to all the elements of all the minSets.\n\n\t\t\t// Go over all the minSets.\n\t\t\t// For each one, check that each element plus m is not divisible by k.\n\n\t\t\tboolean workedForASet = false;\n\t\t\tfor ( int j = 0; j < minSets.size(); j++){\n\t\t\t\t// For each set, check all the elements of the set.\n\n\t\t\t\tHashSet < Integer > minSet = minSets.get(j);\n\t\t\t\tIterator < Integer > iter = minSet.iterator();\n\n\t\t\t\tboolean works = true;\n\t\t\t\twhile ( iter.hasNext() && works ){\n\t\t\t\t\tint num = iter.next();\n\t\t\t\t\tif ( (num + m) % k == 0 ){\n\t\t\t\t\t\tworks = false;\n\t\t\t\t\t\tworkedForASet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( works ){\n\t\t\t\t\tsolutions.get(j).add(n);\n\t\t\t\t\tminSet.add(m);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( !workedForASet ){\n\t\t\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( n )));\n\t\t\t\tminSets.add (new HashSet <Integer > ( ));\n\t\t\t\tminSets.get (minSets.size() - 1).add ( m ); \n\t\t\t} \n\t\t}\n\n\t\t// Find the solution with the most elements.\n\n\t\tfor ( ArrayList <Integer > solution : solutions ){\n\t\t\tresult = Math.max ( result, solution.size() );\n\t\t\tSystem.out.println ( solution );\n\t\t}\n\n\t\tif ( result == 1 ) result = 0;\n\t\treturn result;\n\t}", "int cardinality();", "static int dynamicProgramming(int problem) {\r\n\t\tint items = problems.get(problem).size();\r\n\t\tint cap = capacities.get(problem);\r\n\r\n\t\tint x = 0;\r\n\t\tfor(int i = 1; i < items + 1; i++, x++) {\r\n\t\t\tweights[i] = problems.get(problem).get(x).weight;\r\n\t\t\tprofits[i] = problems.get(problem).get(x).profit;\r\n\t\t}\r\n\r\n\t\tint[][] P = new int[items + 1][cap + 1];\r\n\r\n\t\tfor(int i = 0; i < items + 1; i++) {\r\n\t\t\tfor(int j = 0; j < cap + 1; j++) {\r\n\t\t\t\tP[i][j] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(int c = 0; c < cap + 1; c++) {\r\n\t\t\tP[0][c] = 0;\r\n\t\t}\r\n\r\n\t\tfor(int i = 1; i < items + 1; i++) {\r\n\t\t\tP[i][0] = 0;\r\n\t\t\tfor(int c = 1; c < cap + 1; c++) {\r\n\t\t\t\tif(i >= 2 && c >= 2) {\r\n\t\t\t\t\tP[i-2][c-2] = -1;\r\n\t\t\t\t}\r\n\t\t\t\tif(weights[i] <= c && P[i-1][c-weights[i]] + profits[i] > P[i-1][c]) {\r\n\t\t\t\t\tP[i][c] = P[i-1][c-weights[i]] + profits[i];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tP[i][c] = P[i-1][c];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn P[items][cap];\r\n\t}", "public static List<List<Integer>> gen_size_k_candidate(Map<List<Integer>, Float> oldCandidate, Integer k){\n\n List<List<Integer>> sizeKPlusCandidate = new ArrayList<>();\n\n // size 2 candidate\n if( k <= 1){\n List<Integer> size1Candidate = new ArrayList<>();\n for (List<Integer> size1: oldCandidate.keySet()){\n size1Candidate.addAll(size1);\n }\n // sort\n Collections.sort(size1Candidate);\n // Generate\n sizeKPlusCandidate = CombinationGenerator.findsort(size1Candidate, 2);\n\n }else {\n List<List<Integer>> oldList = new ArrayList<>();\n oldList.addAll(oldCandidate.keySet());\n\n for(int iOld = 0; iOld < oldList.size()-1; iOld ++){\n for(int jOld =iOld+1; jOld < oldList.size(); jOld++){\n // check k element of feature is the same\n List<Integer> formerList = new ArrayList<>();\n List<Integer> laterList = new ArrayList<>();\n\n for (int fl=0; fl < k-1; fl++){\n formerList.add(oldList.get(iOld).get(fl));\n laterList.add(oldList.get(jOld).get(fl));\n }\n\n if (formerList.equals(laterList)){\n\n HashSet<Integer> tempCandidate = new HashSet<>();\n\n tempCandidate.addAll(oldList.get(iOld));\n tempCandidate.addAll(oldList.get(jOld));\n\n List<Integer> tempCandidateList = new ArrayList<>();\n tempCandidateList.addAll(tempCandidate);\n\n Collections.sort(tempCandidateList);\n // Prunning\n List<List<Integer>> prunningCandidate = CombinationGenerator.findsort(tempCandidateList, k);\n\n int flag = 0;\n for(List<Integer> checkPrun: prunningCandidate){\n if(oldCandidate.containsKey(checkPrun)){\n flag++;\n }\n }\n if (flag == k+1){\n sizeKPlusCandidate.add(tempCandidateList);\n }\n }\n }\n }\n }\n return sizeKPlusCandidate;\n }", "private void knapsack(Set<CMNMove> winSet, int count, int maxnum, int target) {\n\t\tint i;\n\t\ttarget -= maxnum; /* use maxnum in sum */\n\t\tcount--; /* now need one less summand */\n\n\t\tSet<CMNMove> tempSet = new TreeSet<CMNMove>(winSet);\n\t\ttempSet.add(moveList.get(maxnum)); /* adding the winning element */\n\n\t\tif (target == 0 && count == 0) { /* we have a win */\n\t\t\tWINS.add(tempSet);\n\t\t\treturn;\n\t\t}\n\n\t\tif (target < 0 || count == 0) { /* hopeless in either case */\n\t\t\treturn;\n\t\t}\n\n\t\tfor (i = maxnum - 1; i > 0; i--) { /* try to finish recursively */\n\t\t\tknapsack(tempSet, count, i, target);\n\t\t}\n\t\treturn;\n\t}", "private int findFreeSlot(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "int getBuyQuantity();", "private int[] bestFitModified(int[] chromosome) {\n\t\tint[] bins = new int[binCount];\n\t\tArrayList<Integer> cannotPackList = new ArrayList<Integer>();\n\n\t\t//honor chromosome listing when possible\n\t\tfor (int i = 0; i < chromosome.length; i++) {\n\t\t\t//if this bin isnt full & won't be after placement & this chrom hasnt gone off the end \n\t\t\t//(VERY RARE, only happens when binCount is reduced w/ elitism)\n\t\t\tif (chromosome[i] < bins.length && bins[chromosome[i]] + packageWeights[i] <= binSize) {\n\t\t\t\tbins[chromosome[i]] += packageWeights[i]; //put package into bin\n\t\t\t} else { //store those we can't honor\n\t\t\t\tchromosome[i] = -1;\n\t\t\t\tcannotPackList.add(new Integer(i)); //save all those packages whos original bins were full\n\t\t\t}\n\t\t}\n\n\t\t//best fit on all the rest whos bins were full up\n\t\tint tries = 0;\n\t\tfor (int j = 0; j < cannotPackList.size(); j++) {\n\t\t\tint i = cannotPackList.get(j);\n\t\t\tint bestBinIndex = -1;\n\n\t\t\twhile (bestBinIndex < 0 && tries < bins.length * 2) { //while we still havent found a bin to put this in and time isn't up\n\n\t\t\t\tint bestBinLeftOverSpace = binSize * 100; //how much space is left in the bin when the packages is placed in it (ideally 0 = full bin)\n\n\t\t\t\tfor (int bin = 0; bin < bins.length; bin++) {\n\t\t\t\t\t//if this bin is closer to full than the best bin and not overfilled save it\n\t\t\t\t\tif ((binSize - (bins[bin] + packageWeights[i])) >= 0 && (binSize - (bins[bin] + packageWeights[i])) < bestBinLeftOverSpace) {\n\t\t\t\t\t\tbestBinIndex = bin;\n\t\t\t\t\t\tbestBinLeftOverSpace = binSize - (bins[bin] + packageWeights[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (bestBinIndex < 0) { //if could not pack, dump out a bin (mutation)\n\t\t\t\t\tj = 0;\n\t\t\t\t\tint dumpBin = rand.nextInt(binCount);\n\t\t\t\t\tfor (int binIndex = dumpBin; binIndex < binCount; binIndex++) {\n\t\t\t\t\t\tbins[binIndex] = 0;\n\t\t\t\t\t\tfor (int chromIndex = 0; chromIndex < chromosome.length; chromIndex++) {\n\t\t\t\t\t\t\tif (chromosome[chromIndex] == binIndex) {\n\t\t\t\t\t\t\t\tchromosome[chromIndex] = -1;\n\t\t\t\t\t\t\t\tcannotPackList.add(new Integer(chromIndex));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\ttries++;\n\t\t\t}\n\n\t\t\tif (tries >= bins.length * 2) {\n\t\t\t\treturn null; //this chromosome is unsalvageable because it is impossible to fit the packages in the bins\n\t\t\t}\n\n\n\t\t\tbins[bestBinIndex] += packageWeights[i];\n\t\t\tchromosome[i] = bestBinIndex;\n\t\t\tcannotPackList.remove(j);\n\t\t\tj--;\n\t\t}\n\n\t\treturn chromosome;\n\t}", "private static int[] topKFrequent(int[] nums, int k) {\n HashMap<Integer, Integer> map = new HashMap<>();\n for (int n: nums){\n map.put(n, map.getOrDefault(n, 0) + 1);\n }\n\n // Step2: Build max heap.\n PriorityQueue<Integer> pq = new PriorityQueue<>();\n for (int value: map.values()){\n pq.add(value);\n if (pq.size() > k){\n pq.poll();\n }\n }\n\n // Step3: Build result list.\n ArrayList<Integer> retList = new ArrayList<>();\n for (int n: pq){\n for (Map.Entry<Integer, Integer> entry: map.entrySet()){\n if (n == entry.getValue()){\n retList.add(entry.getKey());\n }\n }\n }\n\n return retList.stream().distinct().mapToInt(x -> x).toArray();\n }", "int getSlotsCount();", "private int totalInfeasibility(int[] chromosome) {\n\t\tint infeasibility = 0;\n\t\tint[] bins = new int[binCount];\n\t\tfor (int i = 0; i < chromosome.length; i++) {\n\t\t\tif (chromosome[i] >= bins.length) {\n\t\t\t\tinfeasibility += 10;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tbins[chromosome[i]] += packageWeights[i]; //put package into bin\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"noooo\");\n\t\t\t}\n\n\t\t}\n\n\t\tfor (int i = 0; i < bins.length; i++) {\n\t\t\tif (bins[i] > binSize)\n\t\t\t\tinfeasibility += bins[i] - binSize;\n\t\t}\n\t\treturn infeasibility;\n\t}", "public int size() {\n return bag.size();\n }", "public int getSizeInventory()\n {\n return this.slotsCount;\n }", "public static ArrayList<Integer> kSmallest(int n, int[] input, int k) {\n PriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());\r\n for (int i = 0; i < k; i++) {\r\n pq.add(input[i]);\r\n }\r\n for (int i = k; i < input.length; i++) {\r\n int temp = pq.peek();\r\n if (temp > input[i]) {\r\n pq.poll();\r\n pq.add(input[i]);\r\n }\r\n }\r\n\r\n ArrayList<Integer> ans = new ArrayList<>();\r\n Iterator iterator = pq.iterator();\r\n\r\n while (iterator.hasNext()) {\r\n ans.add((int) iterator.next());\r\n }\r\n return ans;\r\n\r\n }", "private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }", "static int webknapSackDyna(int W, int wt[], int val[], int n) {\n int i, w;\n int K[][] = new int[n + 1][W + 1];\n //K[i][w] represents the max value for weight w by using i elements\n // row i represents using i values\n // col w represents the current weight\n // Build table K[][] in bottom up manner\n // n is the number of values available to use\n // for each available value\n for (i = 0; i <= n; i++) {\n // for each weight until target weight is achieved\n for (w = 0; w <= W; w++) {\n\n if (i == 0 || w == 0)\n K[i][w] = 0;\n // if the previous weight is still less than the target weight it can potentially be included\n // to calculate the max val for current weight\n else if (wt[i - 1] <= w)\n // val[i-1]: value for the i th weight\n // K[i-1][w-wt[i-1]]: max value using i-1 values to achieve weight target weight - wt of i-1 element\n // val[i-1] + K[i-1][w-wt[i-1]] -> used ith weight add val[i-] and use the remaining i-1 weights to\n // get to the target weight w-wt of ith element -> wt-wt[i-1]\n // K[i-1][w] => max value using i-1 elements to achieve weight w i.e. not using ith element\n K[i][w] = max(val[i - 1] + K[i - 1][w - wt[i - 1]], K[i - 1][w]);\n // wt[i-1] > w\n else\n K[i][w] = K[i - 1][w];\n }\n }\n\n return K[n][W];\n }", "private void apriori(){\n HashMap<BitSet, Integer> frequentItemsBit = new HashMap<>();\n HashMap<BitSet, Integer> allAssociations = new HashMap<>();\n \n // Put all the 1-itemsets in frequent item hashmap. It will be scanned\n // for getting k-itemsets and cleared iteratively. \n for (int i = 0; i < frequentItemListSetLenOne.size(); i++) {\n BitSet bitSet = new BitSet(bitsetLen);\n bitSet.set(i, true);\n frequentItemsBit.put(bitSet, frequentItemListSetLenOne.get(i).getValue());\n }\n\n int currentK = 1;\n boolean emptyFrequentSet = false;\n \n while (!emptyFrequentSet) {\n \n // create candidates\n if(currentK > 1){\n HashMap<BitSet, Integer> frequentItemsBitT = (HashMap)frequentItemsBit.clone();\n frequentItemsBit.clear();\n frequentItemsBit = candidate_gen(frequentItemsBitT, currentK);\n }\n \n // If no frequent itemSet in current level break\n if(frequentItemsBit.isEmpty())\n break;\n \n // if currentK >= minimumK insert into final list\n if (currentK >= min_itemset_size_K) {\n for (Map.Entry<BitSet, Integer> entry : frequentItemsBit.entrySet()) {\n allAssociations.put(entry.getKey(), entry.getValue());\n }\n }\n currentK++;\n }\n \n printAssociations(allAssociations);\n }", "private void combinationSum3(int[] candidates, int k, int i, int currentSum, int target, List<List<Integer>> response, List<Integer> temp) {\n if (temp.size() == k) {\n\n if (currentSum == target)\n response.add(new ArrayList<>(temp));\n\n\n return;\n }\n\n if (i == candidates.length)\n return;\n\n\n //1. Our choices: We can choose a number from the list any number of times and all the numbers\n for (int s = i; s < candidates.length; s++) {\n\n //if this element is greater than target, then adding it to current sum make bigger than target\n //since,elements are sorted, then all the element after this element are > target\n if (candidates[s] > target)\n break;\n\n //Our constraints : We can't go beyond target, we can take more element than available in array\n if (currentSum + candidates[s] <= target) {\n currentSum += candidates[s];\n temp.add(candidates[s]);\n\n combinationSum3(candidates, k, s + 1, currentSum, target, response, temp);\n\n //backtrack\n temp.remove(temp.size() - 1);\n currentSum -= candidates[s];\n }\n }\n\n }", "int getReservePokemonCount();", "int getItemsCount();" ]
[ "0.6814134", "0.6752773", "0.6582675", "0.65573466", "0.65077454", "0.6493687", "0.6417622", "0.6408065", "0.6336889", "0.63176775", "0.62365514", "0.6189791", "0.6171577", "0.6149882", "0.6135665", "0.6122113", "0.61021745", "0.6062911", "0.6034205", "0.6027372", "0.5996795", "0.599428", "0.59640807", "0.5963725", "0.58878917", "0.5871589", "0.58443516", "0.5802467", "0.5796293", "0.57921964", "0.5762028", "0.57435644", "0.57255924", "0.5723063", "0.57201785", "0.5714234", "0.5704639", "0.56576127", "0.5650199", "0.5636314", "0.5635342", "0.56194323", "0.56193596", "0.5616525", "0.5587266", "0.55854905", "0.5582474", "0.5569668", "0.5556633", "0.5541996", "0.5541714", "0.55390424", "0.55192655", "0.55180687", "0.5516324", "0.5494277", "0.5467055", "0.5453901", "0.5451997", "0.5442133", "0.54385895", "0.543581", "0.5433665", "0.5431115", "0.5422804", "0.5414661", "0.54074734", "0.5401726", "0.53976727", "0.5396706", "0.53954875", "0.5382929", "0.5379631", "0.5376728", "0.5375508", "0.53693646", "0.5368593", "0.53618634", "0.53612757", "0.53607434", "0.5359707", "0.5342796", "0.5338713", "0.53111684", "0.53092504", "0.5291344", "0.5288178", "0.5282657", "0.5275705", "0.5269155", "0.5267527", "0.5266894", "0.52608687", "0.52601254", "0.5259171", "0.5254932", "0.5254915", "0.5251425", "0.5250588", "0.5248897", "0.5240607" ]
0.0
-1
Encuentra y retorna una disponibilidad de una habitacion
public DisponibilidadEntity find(Long idHabitacion, Long id) { TypedQuery<DisponibilidadEntity> q = em.createQuery("select p from DisponibilidadEntity p where (p.habitacion.id = :idHabitacion) and (p.id = :id)", DisponibilidadEntity.class); q.setParameter("idHabitacion", idHabitacion); q.setParameter("id", id); return q.getSingleResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getAvailability(){\n return availabile;\n }", "public boolean getDispoLibro()\n {\n return disponibilidad;\n }", "float getVacationAccrued();", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "public boolean isAvalible() {\n return available;\n }", "boolean getIsOccupation();", "public int getAvailability() {\r\n\t\treturn this.availability;\r\n\t}", "public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }", "public boolean isOccupied(){\n \t\treturn occupiedSeconds > 0;\n \t}", "public boolean isVacant() {\r\n\treturn !isOccupied() || !isAvailable();\r\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "public void setDisponibilita( String disponibilita ) {\n this.disponibilita = disponibilita;\n }", "public boolean estaVacia(){\n if(darTamanio==0){\n return true;\n } \n else{\n return false;\n }\n}", "public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}", "int getActivacion();", "public void evaluaVisibilidad(int posX, int posY)\n {\n \n /** Contiene todas las posibles casillas visibles.\n * Si en el proceso una casilla tapa, pasa a modo 'oclusion, y ocluye las demás hasta que llega al punto final (Las quita del Array)\n */\n this.casillasVisibles=new TreeSet<>();\n \n //Realizar la interpolacion\n boolean visible=true;\n CoordCasilla origen=new CoordCasilla(posX , posY);\n CoordCasilla destino;\n List<CoordCasilla>camino;\n \n /* Cell cell = new Cell();\n cell.setTile(mapaActual.getTileSets().getTileSet(0).getTile(138));*/\n \n //Calcular las interpolaciones\n for(CoordCasilla cc:MATRIZ_INTERPOLACION)\n {\n visible=true;\n destino=new CoordCasilla(origen.x +cc.x,origen.y+cc.y);\n camino= Analizador.interpola(origen, destino);\n \n \n for(CoordCasilla casillaEstudio:camino)\n {\n //Si la celda está fuera de limites no tiene sentido realizar el analisis de las casillas siguientes\n if(casillaEstudio.x<0 || casillaEstudio.x>this.anchoMapa-1 || casillaEstudio.y<0 || casillaEstudio.y>this.altoMapa - 1)\n break;\n \n \n if(!visible ) //No hay visibilidad, quitamos la casilla si la hay del TreeSet\n {\n //posibleVisibilidad.remove(celdaEstudio);\n continue;\n }\n else if(visible && this.capaViibilidad.getCell(casillaEstudio.x,casillaEstudio.y)!=null) //La casilla es limite de visibilidad\n visible=false;\n \n //TEST: Marcamos esta casilla como visible\n //this.capaAux.setCell(celdaEstudio.x, celdaEstudio.y,cell);\n \n //Llegados a este punto, quitamos la niebla de guerra de la casilla\n quitaNieblaDeGuerra(casillaEstudio);\n \n this.casillasVisibles.add(casillaEstudio);\n }\n }\n }", "public String check_not_ready(Operator op){\n String positive = \"соблюдено\";\n String negative = \"не соблюдено\";\n int not_ready_time_seconds = (int) get_seconds(op.getLoged_out());\n int not_ready_value;\n if(op.getShift()==Shift.nine) {\n not_ready_value = (int) get_seconds(not_ready_9);\n if(not_ready_time_seconds<= not_ready_value)\n return positive;\n else\n {\n op.setBonus(op.getBonus()-500);\n return negative;\n }\n }\n if(op.getShift()==Shift.twelve) {\n not_ready_value = (int) get_seconds(not_ready_12);\n if(not_ready_time_seconds<= not_ready_value)\n return positive;\n else\n {\n op.setBonus(op.getBonus()-500);\n return negative;\n }\n }\n\n return positive;\n }", "public boolean isOccuped(){\n return this.occuped;\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public int probabilidadesHastaAhora(){\n return contadorEstados + 1;\n }", "@Test\r\n public void testVerificaPossibilidade9() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(250);\r\n usucapiao.setPrazo(2);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"possivel-agora\", result);\r\n }", "boolean estaAcabado();", "void updateOccupancy() {\n\t\toccupied = !occupied;\n\t}", "public boolean isAvailable() {\n return available;\n }", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "public boolean isAvailable() {\r\n\treturn available;\r\n }", "public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }", "public int askPermitToGetBetweenVisible();", "public BoundCodeDt<InstanceAvailabilityEnum> getAvailability() { \n\t\tif (myAvailability == null) {\n\t\t\tmyAvailability = new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myAvailability;\n\t}", "public BoundCodeDt<InstanceAvailabilityEnum> getAvailability() { \n\t\tif (myAvailability == null) {\n\t\t\tmyAvailability = new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myAvailability;\n\t}", "public int getEtat() {\n\t\tint libres = this.nbLibres();\n\t\tint disponibles = this.nbDisponibles();\n\t\tif(disponibles > 0 && libres == 0) {\n\t\t\treturn 2; // toutes les voitures dispo\n\t\t} else if(disponibles > 0 && libres > 0) {\n\t\t\treturn 1; // voitures dispo et places libres\n\t\t} else {\n\t\t\treturn 0; // aucune voiture disponible\n\t\t}\n\t}", "Boolean isAvailable();", "public void setAvailable(boolean x){\n availabile = x;\n }", "public boolean vacio(){\n\t\treturn esVacio;\n\t}", "public BigDecimal getAvailable() {\n return available;\n }", "@Override\n\tpublic void reservar(Habitacion habitacion) {\n\t\t\n\t}", "@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}", "public boolean isOccupied(){\n return this.occupied;\n }", "int getOccupation();", "int getOccupation();", "int getOccupation();", "int getOccupation();", "int getOccupation();", "public boolean vacio() {\r\n return (tamaño == 0);\r\n }", "public Integer getIsAvailable() {\r\n\t\treturn isAvailable;\r\n\t}", "boolean isAvailable() {\r\n\t\treturn available;\r\n\t}", "@Override\n public void subida(){\n // si es mayor a la eperiencia maxima sube de lo contrario no\n if (experiencia>(100*nivel)){\n System.out.println(\"Acabas de subir de nivel\");\n nivel++;\n System.out.println(\"Nievel: \"+nivel);\n }else {\n\n }\n }", "@Override\n public int status() {\n if (currentLoad <= maxLoad && currentLoad >= 0.6 * maxLoad) return GOOD;\n if (currentLoad < 0.6 * maxLoad && currentLoad >= 0.1 * maxLoad) return CHECK;\n else return BAD;\n }", "public void CheckRegStatus(long electCode) {\n }", "public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}", "int available() {\n return numAvailable;\n }", "@Override\n\tpublic void verVehiculosDisponibles() {\n\t\tif(getCapacidad() > 0) {\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 1 \" + \" Carro disponible, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 0 \" + \" Carro disponibles, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}\n\t\t\n\t}", "public boolean isAvailable()\n {\n return available;\n }", "public boolean is_full(){\n return this.habitant.size() >= Constantes.HOUSE_FULL;\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public boolean PilaVacia() {\r\n return UltimoValorIngresado == null;\r\n }", "public String[] disponibilidad(){\n\t\tString[] devolucion = null;\n\t\tdevolucion = new String[almacen.length];\n\t\t\n\t\tfor (int i = 0; i < devolucion.length; i++) {\n\t\t\tif(almacen[i]!=null){\n\t\t\t\tdevolucion[i]=almacen[i].getEtiqueta();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn devolucion;\n\t}", "public void aumentaInSitu(){\n if(quantidade_in_situ<quantidade_disponivel)\n quantidade_in_situ++;\n else\n return;\n }", "@Test\r\n public void testVerificaPossibilidade6() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public abstract boolean isAvailable();", "public abstract boolean isAvailable();", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "@Override\n\tpublic void pagar(Habitacion habitacion) {\n\t\tif(dinero>habitacion.getPrecio()){\n\t\t\tSystem.out.println(\"reservada\");\n\t\t}\n\t}", "protected boolean isAvailable() {\r\n\t\treturn true;\r\n\t}", "public boolean tieneRepresentacionGrafica();", "public boolean isAvailable() {\n return available;\n }", "@Override\n\tpublic boolean estaVivo() {\n\t\treturn estadoVida;\t\t\n\t}", "@Test\r\n public void testVerificaPossibilidade7() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(251);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public boolean estValide() {\n\t\treturn ( estDedans() && estImpaire() ); \n }", "private int obtieneEstatusBateria() {\n\t\t\n\t\ttry \n { \n IntentFilter batIntentFilter = \n new IntentFilter(Intent.ACTION_BATTERY_CHANGED); \n Intent battery = \n this.registerReceiver(null, batIntentFilter); \n int nivelBateria = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); \n return nivelBateria; \n } \n catch (Exception e) \n { \n Toast.makeText(getApplicationContext(), \n \"Error al obtener estado de la bateria\",\n Toast.LENGTH_SHORT).show(); \n return 0; \n } \n\t}", "public int available() {\n return numAvailable;\n }", "public void getBookAvailability() {\n getBookReservationEligibility();\n }", "public int getAvailableCount();", "public boolean isAvailable() {\n return available;\n }", "public boolean isAvailable() {\n return available;\n }", "public void liquidarEmpleado(Fecha fechaLiquidacion) {\n //COMPLETE\n double prima=0; \n boolean antiguo=false;\n double aniosEnServicio=fechaLiquidacion.getAnio()-this.fechaIngreso.getAnio();\n if(aniosEnServicio>0&&\n fechaLiquidacion.getMes()>this.fechaIngreso.getMes())\n aniosEnServicio--; \n \n //System.out.println(\"A:\"+aniosEnServicio+\":\"+esEmpleadoLiquidable(fechaLiquidacion));\n if(esEmpleadoLiquidable(fechaLiquidacion)){\n this.descuentoSalud=salarioBase*0.04;\n this.descuentoPension=salarioBase*0.04;\n this.provisionCesantias=salarioBase/12;\n if(fechaLiquidacion.getMes()==12||fechaLiquidacion.getMes()==6)\n prima+=this.salarioBase*0.5; \n if(aniosEnServicio<6&&\n fechaLiquidacion.getMes()==this.fechaIngreso.getMes())prima+=((aniosEnServicio*5)/100)*this.salarioBase;\n if(aniosEnServicio>=6&&fechaLiquidacion.getMes()==this.fechaIngreso.getMes()) prima+=this.salarioBase*0.3;\n\n this.prima=prima;\n this.setIngresos(this.salarioBase+prima);\n \n this.setDescuentos(this.descuentoSalud+this.descuentoPension);\n this.setTotalAPagar(this.getIngresos()-this.getDescuentos());\n }\n\n }", "public void anterior() {\n canalAtual--;\n televisao.mudarCanal(canalAtual);\n }", "@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }", "public Boolean getMoreAvailable() {\n return moreAvailable;\n }", "public Integer getCantidadDisponible() {\n return cantidadDisponible;\n }", "public boolean isAvailable() {\r\n return isavailable;\r\n }", "protected boolean isOccupied(){\n\t\treturn occupied;\n\t}", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }", "@Test\r\n public void testVerificaPossibilidade8() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(250);\r\n usucapiao.setPrazo(1);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"possivel-depois\", result);\r\n }", "public void comprobarEstado() {\n if (ganarJugadorUno = true) {\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (ganarJugadorDos = true) {\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tirar == 9 && !ganarJugadorUno && !ganarJugadorDos) {\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\n }", "boolean isAvailable( long millis );", "public int cargarCombustible(){ //creamos metodo cargarCombustible\r\n return this.getNivel();//retornara el nivel de ese mecanico\r\n }", "private void actualizaEstadoMapa() {\n if(cambiosFondo >= 0 && cambiosFondo < 10){\n estadoMapa= EstadoMapa.RURAL;\n }\n if(cambiosFondo == 10){\n estadoMapa= EstadoMapa.RURALURBANO;\n }\n if(cambiosFondo > 10 && cambiosFondo < 15){\n estadoMapa= EstadoMapa.URBANO;\n }\n if(cambiosFondo == 15 ){\n estadoMapa= EstadoMapa.URBANOUNIVERSIDAD;\n }\n if(cambiosFondo > 15 && cambiosFondo < 20){\n estadoMapa= EstadoMapa.UNIVERSIDAD;\n }\n if(cambiosFondo == 20){\n estadoMapa= EstadoMapa.UNIVERSIDADSALONES;\n }\n if(cambiosFondo > 20 && cambiosFondo < 25){\n estadoMapa= EstadoMapa.SALONES;\n }\n\n }", "public boolean estaVacio(){\n\t\treturn raiz==null;\n\t}", "public boolean estaVacia(){\n return inicio == null;\n }", "public void ativa()\n\t{\n\t\tativado = true;\n\t}", "public boolean getComingMore() {\n return (comingVehicle+depoVehicle) <= getPart().intValue()+1;\n }" ]
[ "0.6306298", "0.61177903", "0.59541494", "0.5884437", "0.58028", "0.57387173", "0.57251656", "0.5714737", "0.56965804", "0.566669", "0.5637932", "0.56249577", "0.56149894", "0.5613036", "0.56055015", "0.5601195", "0.5598979", "0.55834574", "0.55814123", "0.5578369", "0.55769217", "0.55757767", "0.5572187", "0.5570181", "0.5547558", "0.5547558", "0.5547558", "0.5547558", "0.5547558", "0.55141765", "0.55141765", "0.55141765", "0.55141765", "0.5511942", "0.5509057", "0.5503677", "0.5502622", "0.5502622", "0.54978925", "0.54874754", "0.54819185", "0.54785246", "0.54711133", "0.5458723", "0.54578316", "0.5457499", "0.54570174", "0.54570174", "0.54570174", "0.54570174", "0.54570174", "0.54512", "0.544853", "0.5446748", "0.5434728", "0.54333925", "0.54136926", "0.5410436", "0.54099816", "0.5409169", "0.54033387", "0.53930014", "0.5389537", "0.53851086", "0.5380868", "0.53803474", "0.53785324", "0.53763986", "0.53763986", "0.5373917", "0.5370764", "0.536845", "0.53633034", "0.5362097", "0.5359965", "0.53598315", "0.5358907", "0.5357555", "0.5351192", "0.5348529", "0.5333861", "0.5333211", "0.5333211", "0.5333194", "0.5329192", "0.5327718", "0.53270704", "0.5323536", "0.53222245", "0.5320986", "0.5320147", "0.53180486", "0.5315311", "0.5305177", "0.5303074", "0.5302742", "0.5297824", "0.52941376", "0.5289315", "0.5284324", "0.52821934" ]
0.0
-1
Encuentra y retorna todas las disponibilidades de un habitacion
public List<DisponibilidadEntity> findAll(Long idHabitacion) { Query q = em.createQuery("select u from DisponibilidadEntity u where (u.habitacion.id = :idHabitacion) ", DisponibilidadEntity.class); q.setParameter("idHabitacion", idHabitacion); return q.getResultList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] disponibilidad(){\n\t\tString[] devolucion = null;\n\t\tdevolucion = new String[almacen.length];\n\t\t\n\t\tfor (int i = 0; i < devolucion.length; i++) {\n\t\t\tif(almacen[i]!=null){\n\t\t\t\tdevolucion[i]=almacen[i].getEtiqueta();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn devolucion;\n\t}", "public boolean getAvailability(){\n return availabile;\n }", "@Override\n\tpublic void verVehiculosDisponibles() {\n\t\tif(getCapacidad() > 0) {\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 1 \" + \" Carro disponible, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 0 \" + \" Carro disponibles, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}\n\t\t\n\t}", "public void preencherDisponibilidadesOferta() {\n\n //List<Disponibilidade> disponibilidades;\n List<Disp> disponibilidades;\n \n if (oferta != null) {\n //disponibilidades = new ArrayList<>(oferta.getDisponibilidades());\n disponibilidades = new ArrayList<>(oferta.getDispo());\n } else {\n disponibilidades = new ArrayList<>();\n }\n //dispDataModel = new DisponibilidadeDataModel(disponibilidades);\n dispDataModel = new DispDataModel(disponibilidades);\n }", "private void getEncuestaSatisfaccions(){\n mEncuestaSatisfaccions = estudioAdapter.getEncuestaSatisfaccionSinEnviar();\n //ca.close();\n }", "List<Boolean> assertVehiclePlanningHomepage() {\n\t\tList<Boolean> assertValue= new ArrayList<>();\n\n\t\tassertValue.add(0,SeleniumUtility.checkElementIsVisible(driver, \n\t\t\t\thomepageVehiclePlanning.buttonTagRefreshButtonHomepageVehiclePlanning));\n\t\tassertValue.add(1,SeleniumUtility.checkElementIsVisible(driver,\n\t\t\t\thomepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning));\n\t\tassertValue.add(2,SeleniumUtility.checkElementIsVisible(driver,\n\t\t\t\thomepageVehiclePlanning.divTagSelectSitesHomepageVehiclePlanning));\n\t\tassertValue.add(3,SeleniumUtility.checkElementIsVisible(driver,\n\t\t\t\thomepageVehiclePlanning.buttonTagDaysArrowHomepageVehiclePlanning));\n\t\tassertValue.add(4,SeleniumUtility.checkElementIsVisible(driver,\n\t\t\t\thomepageVehiclePlanning.inputTagSelectDateHomepageVehiclePlanning));\n\t\treturn assertValue;\n\t}", "@Test\r\n public void testVerificaPossibilidade9() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(250);\r\n usucapiao.setPrazo(2);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"possivel-agora\", result);\r\n }", "public void checkAvaliableElevators()\r\n\t{\r\n\t\tSystem.out.println(\"--------- Checking Elevators Current Status ------\");\t\r\n\t\t\r\n\t\tif(availableElevadors.isEmpty())\r\n\t\t{\r\n\t\t\tfor(int i=0; i <numberOfElevators-3; i++) {\r\n\t\t\t\tavailableElevadors.add(occupiedElevadors.remove(i));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"--------- Elevators are available again ------\");\r\n\t\t\r\n\t\t}else {\r\n\t\t\tfor(int i=0;i<availableElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + availableElevadors.get(i).getElevatorNumber() +\" ready for Requests\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<occupiedElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + occupiedElevadors.get(i).getElevatorNumber() +\" is Occupied\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\r\n\t}", "@GetMapping(\"/table/checkAvailabilityList\")\n\tpublic List<TableRestaurant> getAvailabilityList()\n\t{\n\t\tList<TableRestaurant> availableTime = tableRepo.checkTableAvailabilityList();\n\t\tif(availableTime.equals(null))\n\t\t{\n\t\t\tthrow new UniquoNotFoundException(\"The waiting time cannot be calculated\");\n\t\t}\n\t\treturn availableTime;\n\t}", "public Map<String, Integer> verCarritoConCantidades(){\n\t\treturn this.datosCompras;\n\t}", "public void consultasSeguimiento() {\r\n try {\r\n switch (opcionMostrarAnalistaSeguim) {\r\n case \"Cita\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(2, mBsesion.codigoMiSesion());\r\n break;\r\n case \"Entrega\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(3, mBsesion.codigoMiSesion());\r\n break;\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".consultasSeguimiento()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public double[] getElegibilidad() {\r\n return elegibilidad;\r\n }", "float getVacationAccrued();", "public boolean getDispoLibro()\n {\n return disponibilidad;\n }", "public void getBookAvailability() {\n getBookReservationEligibility();\n }", "public void reporteHabitacionMasPopular(TablaModelo modelo){\n ArrayList<ControlVeces> control = new ArrayList<>();\n ControlVeces controlador;\n try {// pago de alojamiento en rango fchas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio, RESERVACION.Id_Habitacion FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Check_In=1;\");\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// pago de alojamiento en rango fchas\n String nombre = Integer.toString(resultado.getInt(6));\n int casilla = numeroObjeto(control,nombre);\n if(casilla>=0){// maneja el resultado// pago de alojamiento en rango fchas\n control.get(casilla).setVeces(control.get(casilla).getVeces()+1);\n }else{// maneja el resultado\n controlador = new ControlVeces(nombre);// pago de alojamiento en rango fchas\n control.add(controlador);\n }\n } // maneja el resultado \n ordenamiento(control);\n int numero = control.size()-1;// el de hasta arriba es el que mas elementos tiene \n String idHabitacionMasPopular = control.get(numero).getNombre();\n this.habitacionPopular= idHabitacionMasPopular;\n introducirDatosHabitacionMasPopular(modelo, idHabitacionMasPopular);\n } catch (SQLException ex) {\n ex.printStackTrace();\n } catch(Exception e){\n \n }\n }", "@Test\r\n public void testVerificaPossibilidade8() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(250);\r\n usucapiao.setPrazo(1);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"possivel-depois\", result);\r\n }", "@Test\r\n public void testVerificaPossibilidade7() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(251);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public ArrayList<Tour_Guide> guidesAvailable() {\n ArrayList<Tour_Guide> avGuide = new ArrayList<>();\n for (int i = 0; i < Guide.size(); i++) {\n if (Guide.get(i).getAvailable() == true) {\n avGuide.add(Guide.get(i));\n }\n }\n return avGuide;\n }", "public int[] computeAvailabilities(Building selected, Calendar selectedDate, Calendar now) {\n if (selected == null) {\n return null;\n }\n int day = selectedDate.get(Calendar.DAY_OF_WEEK);\n //some modulo shenanigans because weekDays[0] is monday but Calendar doesn't have the same\n day = day + 5;\n day = day % 7;\n Weekdays openingHoursWeek = new Weekdays(selected.getOpeningHours());\n String openingHoursDay = openingHoursWeek.getWeekdays().get(day);\n //if closed\n if (openingHoursDay.equals(Weekdays.CLOSED)) {\n return null;\n }\n int nowDay = now.get(Calendar.DAY_OF_WEEK);\n int nowMonth = now.get(Calendar.DAY_OF_MONTH);\n int dayClean = selectedDate.get(Calendar.DAY_OF_WEEK);\n int month = selectedDate.get(Calendar.DAY_OF_MONTH);\n int hours = now.get(Calendar.HOUR_OF_DAY);\n int minutes = now.get(Calendar.MINUTE);\n if (minutes != 0) {\n hours++;\n }\n String begin = openingHoursDay.split(\"-\")[0];\n String end = openingHoursDay.split(\"-\")[1];\n int beginTime = Integer.parseInt(begin.split(\":\")[0]);\n int endTime = Integer.parseInt(end.split(\":\")[0]);\n int[] res = new int[2];\n if (nowDay == dayClean\n && nowMonth == month && hours > beginTime) {\n beginTime = hours;\n }\n res[0] = beginTime;\n res[1] = endTime;\n return res;\n }", "@Test\r\n public void testVerificaPossibilidade6() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }", "public void evaluaVisibilidad(int posX, int posY)\n {\n \n /** Contiene todas las posibles casillas visibles.\n * Si en el proceso una casilla tapa, pasa a modo 'oclusion, y ocluye las demás hasta que llega al punto final (Las quita del Array)\n */\n this.casillasVisibles=new TreeSet<>();\n \n //Realizar la interpolacion\n boolean visible=true;\n CoordCasilla origen=new CoordCasilla(posX , posY);\n CoordCasilla destino;\n List<CoordCasilla>camino;\n \n /* Cell cell = new Cell();\n cell.setTile(mapaActual.getTileSets().getTileSet(0).getTile(138));*/\n \n //Calcular las interpolaciones\n for(CoordCasilla cc:MATRIZ_INTERPOLACION)\n {\n visible=true;\n destino=new CoordCasilla(origen.x +cc.x,origen.y+cc.y);\n camino= Analizador.interpola(origen, destino);\n \n \n for(CoordCasilla casillaEstudio:camino)\n {\n //Si la celda está fuera de limites no tiene sentido realizar el analisis de las casillas siguientes\n if(casillaEstudio.x<0 || casillaEstudio.x>this.anchoMapa-1 || casillaEstudio.y<0 || casillaEstudio.y>this.altoMapa - 1)\n break;\n \n \n if(!visible ) //No hay visibilidad, quitamos la casilla si la hay del TreeSet\n {\n //posibleVisibilidad.remove(celdaEstudio);\n continue;\n }\n else if(visible && this.capaViibilidad.getCell(casillaEstudio.x,casillaEstudio.y)!=null) //La casilla es limite de visibilidad\n visible=false;\n \n //TEST: Marcamos esta casilla como visible\n //this.capaAux.setCell(celdaEstudio.x, celdaEstudio.y,cell);\n \n //Llegados a este punto, quitamos la niebla de guerra de la casilla\n quitaNieblaDeGuerra(casillaEstudio);\n \n this.casillasVisibles.add(casillaEstudio);\n }\n }\n }", "public int askPermitToGetBetweenVisible();", "public int probabilidadesHastaAhora(){\n return contadorEstados + 1;\n }", "long getExpirations();", "public int qdtDocentesDisponibilidade(OfertaDisciplina of){\n \n of = ofertaDisciplinaFacade.inicializarColecaoDisponibilidades(of);\n \n //Set<Disponibilidade> disponibilidades = of.getDisponibilidades();\n Set<Disp> disponibilidades = of.getDispo();\n \n return disponibilidades.size(); \n }", "public Integer plazasDisponibles() {\n\t\treturn cupo;\n\t}", "public int getEtat() {\n\t\tint libres = this.nbLibres();\n\t\tint disponibles = this.nbDisponibles();\n\t\tif(disponibles > 0 && libres == 0) {\n\t\t\treturn 2; // toutes les voitures dispo\n\t\t} else if(disponibles > 0 && libres > 0) {\n\t\t\treturn 1; // voitures dispo et places libres\n\t\t} else {\n\t\t\treturn 0; // aucune voiture disponible\n\t\t}\n\t}", "private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}", "public int getAvailableCount();", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "@Test\r\n public void testVerificaPossibilidade5() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "static private void showMissions() {\n\n Iterator iteratorMissionStatus = allMissions.missionStatus.entrySet().iterator();\n\n while (iteratorMissionStatus.hasNext()) {\n HashMap.Entry entry = (HashMap.Entry) iteratorMissionStatus.next();\n System.out.println((String) entry.getKey() + \": \");\n\n if ((boolean) (entry.getValue()) == false) {\n System.out.print(\"mission in progress\");\n System.out.println(\"\");\n }\n if ((boolean) (entry.getValue()) == true) {\n System.out.print(\"mission is complete\");\n System.out.println(\"\");\n }\n System.out.println(\"\");\n\n }\n }", "public ResultadoEvaluacionTecnica validarAccesibilidadPorTecnica(Parseador parseador) {\r\n\t\tthis.setParseador(parseador);\r\n\t\tResultadoEvaluacionTecnica resultadoEvaluacionTecnica = new ResultadoEvaluacionTecnica(this);\r\n\t\tResultadoEvaluacionTecnicaItem comprobacionInexistenciaElementoH1 = new ResultadoEvaluacionTecnicaItem(\r\n\t\t\t\tTipologia.ESTRUCTURA_Y_SEMANTICA, \r\n\t\t\t\t\"Inexistencia del elemento \\\"h1\\\".\",\r\n\t\t\t\t\"Verificar que heading markup se utiliza cuando el contenido es un encabezado.\",\r\n\t\t\t\t\"Comunica la informaci�n y sus relaciones mediantes la estructura de la p�gina web: los elementos \\\"h1-h6\\\" para identificar encabezados.\");\r\n\t\tResultadoEvaluacionTecnicaItem comprobacionInexistenciaElementoH2 = new ResultadoEvaluacionTecnicaItem(\r\n\t\t\t\tTipologia.ESTRUCTURA_Y_SEMANTICA, \r\n\t\t\t\t\"Inexistencia del elemento \\\"h2\\\".\",\r\n\t\t\t\t\"Verificar que heading markup se utiliza cuando el contenido es un encabezado.\",\r\n\t\t\t\t\"Comunica la informaci�n y sus relaciones mediantes la estructura de la p�gina web: los elementos \\\"h1-h6\\\" para identificar encabezados.\");\r\n\t\tResultadoEvaluacionTecnicaItem comprobacionInexistenciaElementoH3 = new ResultadoEvaluacionTecnicaItem(\r\n\t\t\t\tTipologia.ESTRUCTURA_Y_SEMANTICA, \r\n\t\t\t\t\"Inexistencia del elemento \\\"h3\\\".\",\r\n\t\t\t\t\"Verificar que heading markup se utiliza cuando el contenido es un encabezado.\",\r\n\t\t\t\t\"Comunica la informaci�n y sus relaciones mediantes la estructura de la p�gina web: los elementos \\\"h1-h6\\\" para identificar encabezados.\");\r\n\t\tResultadoEvaluacionTecnicaItem comprobacionInexistenciaElementoH4 = new ResultadoEvaluacionTecnicaItem(\r\n\t\t\t\tTipologia.ESTRUCTURA_Y_SEMANTICA, \r\n\t\t\t\t\"Inexistencia del elemento \\\"h4\\\".\",\r\n\t\t\t\t\"Verificar que heading markup se utiliza cuando el contenido es un encabezado.\",\r\n\t\t\t\t\"Comunica la informaci�n y sus relaciones mediantes la estructura de la p�gina web: los elementos \\\"h1-h6\\\" para identificar encabezados.\");\r\n\t\tResultadoEvaluacionTecnicaItem comprobacionInexistenciaElementoH5 = new ResultadoEvaluacionTecnicaItem(\r\n\t\t\t\tTipologia.ESTRUCTURA_Y_SEMANTICA, \r\n\t\t\t\t\"Inexistencia del elemento \\\"h5\\\".\",\r\n\t\t\t\t\"Verificar que heading markup se utiliza cuando el contenido es un encabezado.\",\r\n\t\t\t\t\"Comunica la informaci�n y sus relaciones mediantes la estructura de la p�gina web: los elementos \\\"h1-h6\\\" para identificar encabezados.\");\r\n\t\tInteger [] cantidades = new Integer[] {0, 0, 0, 0, 0, 0};\r\n\t\tcantidades[0] = this.getParseador().getElementos(HTMLElementName.H1).size();\r\n\t\tcantidades[1] = this.getParseador().getElementos(HTMLElementName.H2).size();\r\n\t\tcantidades[2] = this.getParseador().getElementos(HTMLElementName.H3).size();\r\n\t\tcantidades[3] = this.getParseador().getElementos(HTMLElementName.H4).size();\r\n\t\tcantidades[4] = this.getParseador().getElementos(HTMLElementName.H5).size();\r\n\t\tcantidades[5] = this.getParseador().getElementos(HTMLElementName.H6).size();\r\n\t\tif ((cantidades[0] == 0) && ((cantidades[1] > 0) || (cantidades[2] > 0) || (cantidades[3] > 0) || (cantidades[4] > 0) || (cantidades[5] > 0)))\r\n\t\t\tcomprobacionInexistenciaElementoH1.procesar();\r\n\t\tif ((cantidades[1] == 0) && ((cantidades[2] > 0) || (cantidades[3] > 0) || (cantidades[4] > 0) || (cantidades[5] > 0)))\r\n\t\t\tcomprobacionInexistenciaElementoH2.procesar();\r\n\t\tif ((cantidades[2] == 0) && ((cantidades[3] > 0) || (cantidades[4] > 0) || (cantidades[5] > 0)))\r\n\t\t\tcomprobacionInexistenciaElementoH3.procesar();\r\n\t\tif ((cantidades[3] == 0) && ((cantidades[4] > 0) || (cantidades[5] > 0)))\r\n\t\t\tcomprobacionInexistenciaElementoH4.procesar();\r\n\t\tif ((cantidades[4] == 0) && (cantidades[5] > 0))\r\n\t\t\tcomprobacionInexistenciaElementoH5.procesar();\r\n\t\tresultadoEvaluacionTecnica.agregarResultadoEvaluacionTecnicaItem(comprobacionInexistenciaElementoH1);\t\r\n\t\tresultadoEvaluacionTecnica.agregarResultadoEvaluacionTecnicaItem(comprobacionInexistenciaElementoH2);\t\r\n\t\tresultadoEvaluacionTecnica.agregarResultadoEvaluacionTecnicaItem(comprobacionInexistenciaElementoH3);\t\r\n\t\tresultadoEvaluacionTecnica.agregarResultadoEvaluacionTecnicaItem(comprobacionInexistenciaElementoH4);\t\r\n\t\tresultadoEvaluacionTecnica.agregarResultadoEvaluacionTecnicaItem(comprobacionInexistenciaElementoH5);\t\r\n\t\treturn resultadoEvaluacionTecnica;\r\n\t}", "public int getHabitantes(){\n return habitantes;\n }", "private void showLeyendas(){\n\t\tint status;\n\t\t\n\t\tif(!CuentaUtils.isCuentaPro() || CuentaUtils.isDowngrade()){\n\t\t\tlabelMaxImagenes.setText(R.string.txtMaxImagenes1);\n\t\t\tstatus = View.VISIBLE;\n\t\t}\t\t\t\t\t\n\t\telse{\n\t\t\tlabelMaxImagenes.setText(R.string.txtMaxImagenes2);\n\t\t\tstatus = View.GONE;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<layoutGaleria.getChildCount();i++){\n\t\t View child=layoutGaleria.getChildAt(i);\n\t\t if(child.getId() != R.id.labelMaxImagenes){\n\t\t \t child.setVisibility(status);\n\t\t }\n\t\t}\n\t\t\n\t}", "public int cargarCombustible(){ //creamos metodo cargarCombustible\r\n return this.getNivel();//retornara el nivel de ese mecanico\r\n }", "public AvailabilityChart() {\n chart = new HashMap<>();\n\n\n //initializing the chart so that the person is completely unavailable\n for (int i = 1; i < 8; i++)\n chart.put((Integer) i, false);\n\n }", "public void distribuirAportes1(){\n\n if(null == comprobanteSeleccionado.getAporteuniversidad()){\n System.out.println(\"comprobanteSeleccionado.getAporteuniversidad() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getAporteorganismo()){\n System.out.println(\"comprobanteSeleccionado.getAporteorganismo() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getMontoaprobado()){\n System.out.println(\"comprobanteSeleccionado.getMontoaprobado() >> NULO\");\n }\n\n try{\n if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){\n comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));\n comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);\n }\n } catch(NullPointerException npe){\n System.out.println(\"Error de NullPointerException\");\n npe.printStackTrace();\n }\n\n }", "public void ReservaEfetivadas () {\n Date hoje = new Date ();\n for (int z = 0; z < vecReserva.size(); z++) {\n if (((int) ((((entReserva)vecReserva.elementAt(z)).getDatain().getTime() - (hoje.getTime())) / 86400000L)) == 0){// Reserva será relaizada hj\n if (((entReserva)vecReserva.elementAt(z)).getPagamento().getSituacao() == 0){//Cliente fez todo o pagamento e o quarto será\n vecReservaEfetivadas.add(vecReserva.elementAt(z));\n }\n \n }\n }\n }", "public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }", "public void verificarMatriculado() {\r\n\t\ttry {\r\n\t\t\tif (periodo == null)\r\n\t\t\t\tMensaje.crearMensajeERROR(\"ERROR AL BUSCAR PERIODO HABILITADO\");\r\n\t\t\telse {\r\n\t\t\t\tif (mngRes.buscarNegadoPeriodo(getDniEstudiante(), periodo.getPrdId()))\r\n\t\t\t\t\tMensaje.crearMensajeWARN(\r\n\t\t\t\t\t\t\t\"Usted no puede realizar una reserva. Para más información diríjase a las oficinas de Bienestar Estudiantil.\");\r\n\t\t\t\telse {\r\n\t\t\t\t\testudiante = mngRes.buscarMatriculadoPeriodo(getDniEstudiante(), periodo.getPrdId());\r\n\t\t\t\t\tif (estudiante == null) {\r\n\t\t\t\t\t\tMensaje.crearMensajeWARN(\r\n\t\t\t\t\t\t\t\t\"Usted no esta registrado. Para más información diríjase a las oficinas de Bienestar Universitario.\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmngRes.generarEnviarToken(getEstudiante());\r\n\t\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('dlgtoken').show();\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tMensaje.crearMensajeERROR(\"Error verificar matrícula: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}", "public void distribuirAportes2(){\n\n if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){\n comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));\n }\n }", "public boolean isAvalible() {\n return available;\n }", "public java.lang.Integer getCableres() throws java.rmi.RemoteException;", "public int getAvailability() {\r\n\t\treturn this.availability;\r\n\t}", "private void getLactanciasMaternas() {\n mLactanciasMaternas = estudioAdapter.getListaLactanciaMaternasSinEnviar();\n //ca.close();\n }", "@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}", "public int getNumberOfDefeats() {\r\n\t\tint numDefeats = 0;\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tfor (int j = 1; j <= 3; j++) {\r\n\t\t\t\tif (militaryVPS[i][j] == -1)\r\n\t\t\t\t\tnumDefeats++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn numDefeats;\r\n\t}", "private void cargarNotasAclaratorias() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"tipo\", INotas.NOTAS_ACLARATORIAS);\r\n\t\ttabboxContendor\r\n\t\t\t\t.abrirPaginaTabDemanda(false, \"/pages/nota_aclaratoria.zul\",\r\n\t\t\t\t\t\t\"NOTAS ACLARATORIAS\", parametros);\r\n\t}", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "final void habilitarcampos(boolean valor){\n TXT_CodCliente.setEnabled(valor);\n TXT_Aparelho.setEnabled(valor);\n TXT_Valor.setEnabled(valor);\n TXT_Informacao.setEnabled(valor); \n TXT_CodServico.setEnabled(valor); \n TXT_Clientes.setEnabled(valor); \n TXT_Serial.setEnabled(valor);\n TXT_Data.setEnabled(valor);\n}", "@Nonnull\n public Set<OccupationType> getVisibleOccupationTypes() {\n if (occupationTypes.contains(OccupationType.SEURAN_YHDYSHENKILO)) {\n final Set<OccupationType> result = new HashSet<>(occupationTypes);\n result.add(OccupationType.SEURAN_JASEN);\n result.add(OccupationType.RYHMAN_JASEN);\n result.add(OccupationType.RYHMAN_METSASTYKSENJOHTAJA);\n\n return result;\n }\n\n // Hunting leader should see all messages for normal members\n if (occupationTypes.contains(OccupationType.RYHMAN_METSASTYKSENJOHTAJA)) {\n final Set<OccupationType> result = new HashSet<>(occupationTypes);\n result.add(OccupationType.RYHMAN_JASEN);\n\n return result;\n }\n\n return occupationTypes;\n }", "public Integer cantidadCompras(){\n\t\t// Implementar\n\t\treturn this.compras.size();\n\t}", "private String getSeatsAvailable(){\n int Available= CourseCapacity - RegisteredStudents.size();\n return Available+\"/\"+ CourseCapacity;\n }", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "public int getDiasVacaciones() {\r\n\t\treturn super.getDiasVacaciones()/2;\r\n\t}", "int getActivacion();", "public BoundCodeDt<InstanceAvailabilityEnum> getAvailability() { \n\t\tif (myAvailability == null) {\n\t\t\tmyAvailability = new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myAvailability;\n\t}", "public BoundCodeDt<InstanceAvailabilityEnum> getAvailability() { \n\t\tif (myAvailability == null) {\n\t\t\tmyAvailability = new BoundCodeDt<InstanceAvailabilityEnum>(InstanceAvailabilityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myAvailability;\n\t}", "public int getAtracciones(){\n return atracciones.size(); \n }", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Scheduled(fixedDelay = 86400000)\n\tpublic void contabilizarDiarias() {\n\t\t\n\t\t// Obtem apenas os hospedes que estao no hotel (Data de saida como null)\n\t\tList<Hospede> hospedes = hospedeRepository.obterHospedes();\n\t\t\n\t\tfor(Hospede hospede : hospedes) {\n\t\t\t\n\t\t\t// Verifica se houve alguma cobrança do hospede na data atual\n\t\t\tList<Diaria> diarias = diariaRepository.obterDiariasContabilizadas(LocalDate.now(), hospede.getId());\n\t\t\t\n\t\t\t// Se nao houve nenhuma cobrança ainda, sera contabilizado a cobrança da diaria do hospede\n\t\t\tif(diarias.isEmpty()) {\n\t\t\t\t\n\t\t\t\tCheckIn checkIn = checkInRepository.obterCheckIn(hospede.getId());\n\t\t\t\t\n\t\t\t\tLocalDateTime dataAtual = LocalDateTime.now();\n\t\t\t\t\n\t\t\t\tif(dataAtual.getDayOfWeek() == DayOfWeek.SATURDAY || dataAtual.getDayOfWeek() == DayOfWeek.SUNDAY) { // SABADO OU DOMINGO\n\t\t\t\t\t\n\t\t\t\t\tif(checkIn.getAdicionalVeiculo()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_FINAL_SEMANA + Constantes.ADICIONAL_VEICULO_FINAL_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_FINAL_SEMANA + Constantes.ADICIONAL_VEICULO_FINAL_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_FINAL_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_FINAL_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse { // ALGUM DIA DA SEMANA\n\t\t\t\t\t\n\t\t\t\t\tif(checkIn.getAdicionalVeiculo()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_SEMANA + Constantes.ADICIONAL_VEICULO_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_SEMANA + Constantes.ADICIONAL_VEICULO_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcheckIn.setTotal(checkIn.getTotal() + Constantes.DIARIA_SEMANA);\n\t\t\t\t\t\t\n\t\t\t\t\t\thospede.setValorGasto(hospede.getValorGasto() + Constantes.DIARIA_SEMANA);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\thospedeRepository.save(hospede);\n\t\t\t\t\n\t\t\t\tcheckInRepository.save(checkIn);\n\t\t\t\t\n\t\t\t\t// REGISTRA QUE O HOSPEDE JA FOI COBRADO NO DIA, EVITA DUPLICIDADE NAS COBRANÇAS\n\t\t\t\tdiariaRepository.save(new Diaria(LocalDate.now(), hospede.getId(), true));\n\t\t\t\t\n\t\t\t\tlog.info(\"DIARIA DO HOSPEDE ID = \" + hospede.getId() + \"FOI CONTABILIZADA!\");\n\t\t\t}\n\t\t}\n\t}", "boolean getProbables();", "@Test\r\n public void testVerificaPossibilidade4() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public List<Expirator> getBusyExpirators()\n \t{\n \t\tList<Expirator> busy=new LinkedList<Expirator>();\n \t\tfor (Expirator current : this.expirators)\n \t\t{\n \t\t\tif (current.isBusy())\n \t\t\t{\n \t\t\t\tbusy.add(current);\n \t\t\t}\n \t\t}\n \t\treturn busy;\n \t}", "Boolean isAvailable();", "public synchronized void pistesOccupee() {\n\t\tSystem.out.println(Thread.currentThread().getName() + \"[PisteDeDanse][les pistes sont occupée]\");\n\t\tthis.pisteLibre = false;\n\t\tnotify();\n\t}", "private Integer[] mantieniAbilitati(int da, int a){\n List<Integer> caselleDisabilitate = new ArrayList<>();\n for (int i = 0; i < listaCaselle.size(); i++) {\n if(!listaCaselle.get(i).isDisattiva() && (i<da || i>a)) {\n listaCaselle.get(i).disabilita();\n caselleDisabilitate.add(i);\n }\n }\n return caselleDisabilitate.toArray(new Integer[caselleDisabilitate.size()]);\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public PanelInformesYEstadisticas() {\r\n\t\tinitComponents();\r\n\t\t//Util.personaSinResultados(lbSinResultados, true);\r\n\t}", "@Override\n //Metodo para retornar una lista de los equipos que avanzan\n public List<Equipo> getEquiposQueAvanzan(){\n List<Equipo> equipos = new ArrayList<>();\n //Recorremos la lista de partidos de la etapa mundial\n for (Partido partidito : getPartidos()){\n /*Si en el partido que estamos parados gano el local, agregamos ese equipo\n local a la lista de equipos*/\n if (partidito.getResultado().ganoLocal()){\n equipos.add(partidito.getLocal());\n }\n /*Si NO gano el local, agregamos el equipo visitante a la lista de equipos*/\n if (!partidito.getResultado().ganoLocal()){\n equipos.add(partidito.getVisitante());\n }\n }\n //Retornamos la nueva lista con los equipos que avanzan\n return equipos;\n }", "private int obtieneEstatusBateria() {\n\t\t\n\t\ttry \n { \n IntentFilter batIntentFilter = \n new IntentFilter(Intent.ACTION_BATTERY_CHANGED); \n Intent battery = \n this.registerReceiver(null, batIntentFilter); \n int nivelBateria = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); \n return nivelBateria; \n } \n catch (Exception e) \n { \n Toast.makeText(getApplicationContext(), \n \"Error al obtener estado de la bateria\",\n Toast.LENGTH_SHORT).show(); \n return 0; \n } \n\t}", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "private void atualizarBandeirasIa() {\n\t\tnumeroBombas = mapa.getBombas();\r\n\t\tfor(int i = 0; i < this.mapa.getCampo().length; i++) {\r\n\t\t\tfor(int j = 0; j < this.mapa.getCampo().length; j++) {\r\n\t\t\t\tif(celulaEscolhida(botoes[i][j]).isBandeira()) {\r\n\t\t\t\t\tbotoes[i][j].setEnabled(false);\r\n\t\t\t\t\tnumeroBombas--;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbotoes[i][j].setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(numeroBombas);\r\n\t}", "public Boolean getAdicionais() {\n\t\treturn adicionais;\n\t}", "public boolean isAvailable() {\n return available;\n }", "@Override\n\tpublic long getRegantes() {\n\t\treturn model.getRegantes();\n\t}", "private void checkin() {\r\n\t\tif (admittedinterns < 20) {\r\n\t\t\tDoctorManage();\r\n\t\t\taddinterns(1);\r\n\t\t\tScreentocharge();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Por el dia no se admiten mas pacientes\");\r\n\t\t\t\r\n\t\t}\r\n\t}", "public int getResponsables(){\n return responsables; \n }", "public visibleObject[][] getVisibility() {\n\n\t\tvisibleObject visiblility[][] = new GridCell.visibleObject[2 * visionRange + 1][2 * visionRange + 1];\n\t\tGridCell[][] cellArray = MazeGame.worldGraph.cellArray;\n\n\t\tfor (int i = (-visionRange); i < visionRange + 1; i++) {\n\t\t\tfor (int j = (-visionRange); j < visionRange + 1; j++) {\n\n\t\t\t\tGridCell cell = MazeGame.worldGraph.cellArray[currentCell.rowIndex + i][currentCell.columnIndex + j];\n\n\t\t\t\tfor (int k = currentCell.rowIndex - visionRange; k < currentCell.rowIndex + visionRange + 1; k++) {\n\t\t\t\t\tfor (int l = (currentCell.columnIndex - visionRange); l < currentCell.columnIndex + visionRange\n\t\t\t\t\t\t\t+ 1; l++) {\n\n\t\t\t\t\t\tif (!cellArray[k][l].hasEastEdge) {\n\n\t\t\t\t\t\t\tBoolean isIntersected = isIntersected(\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + j + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.rowIndex + i + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + 0.5, \n\t\t\t\t\t\t\t\t\tcurrentCell.rowIndex + 0.5, \n\t\t\t\t\t\t\t\t\tcellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex, \n\t\t\t\t\t\t\t\t\tcellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex + 1);\n\n\t\t\t\t\t\t\tif (isIntersected != null) {\n\t\t\t\t\t\t\t\tif (isIntersected.booleanValue()) {\n\t\t\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.NULL;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!cellArray[k][l].hasSouthEdge) {\n\n\t\t\t\t\t\t\tBoolean isIntersected = isIntersected(currentCell.columnIndex + j + 0.5, currentCell.rowIndex + i + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + 0.5, currentCell.rowIndex + 0.5, cellArray[k][l].columnIndex,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex +1 , cellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex + 1);\n\n\t\t\t\t\t\t\tif (isIntersected != null) {\n\t\t\t\t\t\t\t\tif (isIntersected.booleanValue()) {\n\t\t\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.NULL;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tif(visiblility[i + visionRange][j + visionRange] != visibleObject.NULL){\n//\n//\t\t\t\t\tif (cell.cheese != null) {\n//\t\t\t\t\t\tif (cell.jerry != null) {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.JERRY_AND_CHEESE;\n//\t\t\t\t\t\t} else if (cell.tom != null) {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.TOM_AND_CHEESE;\n//\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.CHEESE;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} else if (cell.jerry != null) {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.JERRY;\n//\t\t\t\t\t} else if (cell.tom != null) {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.TOM;\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.EMPTY_SPACE;\n//\t\t\t\t\t}\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.visiblility = visiblility;\n\t\treturn visiblility;\n\t}", "private void setAvailableButtons(int gamePosition){\n ButtonClass[] availableButtons = getGame(gamePosition).getAllButtons();\n ButtonClass[] notAvailableButtons = getNotAvailableButtons(gamePosition);\n for (ButtonClass b: availableButtons) {\n b.setAvailable(true);\n }\n for (ButtonClass b: notAvailableButtons){\n b.setAvailable(false);\n }\n }", "public void consulterBoiteVocale() {\n for (int i = 0; i < this.boiteVocale.getListeMessagesVocaux().size(); i++) {\n //on passe l'attribut consulte à true pour savoir qu'il a été vu pour la facturation\n this.boiteVocale.getListeMessagesVocaux().get(i).setConsulte(true);\n }\n }", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public int verificarCantidadGanadores() {\n\t\t if(ganador.size() == 1 && !ganador.contains(\"dealer\")) {\n\t\t\t return 20;\n\t\t }else if(ganador.size() == 2 && !ganador.contains(\"dealer\")) {\n\t\t\t return 10;\n\t\t }else if(ganador.size() == 3 && !ganador.contains(\"dealer\")){\n\t\t\t return 0;\n\t\t }else if(ganador.size() == 1 && ganador.contains(\"dealer\")) {\n\t\t\t return 30;\n\t\t }\n\t\t return 0;\n\t }", "public Integer getCantidadDisponible() {\n return cantidadDisponible;\n }", "@Override\r\n\tpublic final String[] getHabilidadesRaza() {\r\n\t\treturn new String[] {\"Golpe Defensa\", \"Mordisco de Vida\"};\r\n\t}", "boolean getIsOccupation();", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "private static ArrayList<Map> checkAvailability(ArrayList<Map> res) {\n\t\tArrayList<Map> availableSlot = new ArrayList<Map>();\r\n\t\tfor (Map center : res) {\r\n\t\t\tint age = (int) center.get(\"min_age_limit\");\r\n\t\t\tif(age == AGE) {\r\n\t\t\t\tint dose1 = (int) center.get(\"available_capacity_dose1\");\r\n\t\t\t\tif(dose1>0) {\r\n\t\t\t\t\tSystem.out.println(\"available for 45+ :\" + center);\r\n\t\t\t\t\tavailableSlot.add(center);\r\n\t\t\t\t\t//END = true;\r\n\t\t\t\t}\r\n\t\t\t}else if( age == 18) {\r\n\t\t\t\tint dose1 = (int) center.get(\"available_capacity_dose1\");\r\n\t\t\t\tif(dose1>0) {\r\n\t\t\t\t\tSystem.out.println(\"available for 18+ :\" +center);\r\n\t\t\t\t\tavailableSlot.add(center);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn availableSlot;\r\n\t}", "public BigDecimal getAvailable() {\n return available;\n }", "private void revisaOtorgaPermisos(ResultSet rs) {\n try {\n if(rs.last()){\n if((Integer.parseInt(rs.getString(\"otorgaPermisosConfig\"))==(0))){\n desHabilita(jcbConf, hijos.get(0));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosSistema\"))==(0))){\n desHabilita(jcbSistema,hijos.get(1));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosModulos\"))==(0))){\n desHabilita(jcbModulos, hijos.get(2));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosCompras\"))==(0))){\n desHabilita(jcbCompras,hijos.get(3));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosProvee\"))==(0))){\n desHabilita(jcbProve, hijos.get(4));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosPrevio\"))==(0))){\n desHabilita(jcbPrevioCompra, hijos.get(5));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosInventario\"))==(0))){\n desHabilita(jcbInventario, hijos.get(6));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosClientes\"))==(0))){\n desHabilita(jcbClientes, hijos.get(7));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosVentas\"))==(0))){\n desHabilita(jcbVentas, hijos.get(8));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosCotiza\"))==(0))){\n desHabilita(jcbCotizaciones, hijos.get(9));\n }\n }\n } catch (SQLException ex) {\n Logger.getLogger(PermsEstacs.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public synchronized void setStatusOfSeatTypes() throws SQLException{\n\t\tConnection con=null;\n\t\t\n\t\ttry{\n\t\tcon=this.datasource.getConnection();\n\t\tStatement statement= con.createStatement();\n\t\tPreparedStatement pstate= con.prepareStatement(\"INSERT INTO statusderplätze VALUES(?,0,0)\");\n\t\tPreparedStatement pstate1=con.prepareStatement(\"SELECT COUNT(*) FROM statusderplätze\");\n\t\tPreparedStatement pstate2=con.prepareStatement(\"SELECT * FROM statusderplätze\");\n\t\tResultSet resSet= null;\n\t\t\n\t\tresSet=pstate1.executeQuery();\n\t\tresSet.first();\n\t\tint count= resSet.getInt(1);\n\t\tif(count==0){\n\t\t\t\t\tpstate.setInt(1, allSeats);\n\t\t\t\t\tpstate.execute();\n\t\t}else{\n\t\t\tresSet=pstate2.executeQuery();\n\t\t\tresSet.first();\n\t\t\tint counter=0;\n\t\t\t\n\t\t\twhile(resSet.next()){\n\t\t\t\tthis.freeSeats= resSet.getInt(\"freiePlätze\");\n\t\t\t\tthis.reservationSeats= resSet.getInt(\"reserviertePlätze\");\n\t\t\t\tthis.soldSeats= resSet.getInt(\"verkauftePlätze\");\t\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t\t}finally{\n\t\t\ttry{\n\t\t\tcon.close();\n\t\t\t}catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Schwerwiegender Datenbankfehler! Versuchen Sie es Später noch einmal!\");\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6392571", "0.6028195", "0.60218275", "0.59331477", "0.57588077", "0.5732421", "0.57110816", "0.56717896", "0.56613094", "0.56576604", "0.5648778", "0.5648209", "0.56380665", "0.5579328", "0.5570894", "0.55644786", "0.55313075", "0.55198056", "0.5517354", "0.54988396", "0.5481655", "0.547961", "0.54776615", "0.54733896", "0.546172", "0.54443973", "0.54420984", "0.5432749", "0.54314554", "0.5426945", "0.5419089", "0.53974825", "0.5386489", "0.5382758", "0.5374516", "0.53731465", "0.5372204", "0.53642803", "0.5361458", "0.53526986", "0.533294", "0.53306246", "0.5327411", "0.5325439", "0.53249425", "0.5323367", "0.531899", "0.53175706", "0.53141993", "0.53129435", "0.52911496", "0.5290795", "0.52864856", "0.5285421", "0.52849555", "0.5280062", "0.5273774", "0.5263149", "0.52597654", "0.5251202", "0.5251202", "0.5251202", "0.5251202", "0.52424157", "0.5240455", "0.52398515", "0.52398515", "0.5236928", "0.5233851", "0.5231992", "0.5228091", "0.5227922", "0.52245474", "0.52221596", "0.5215178", "0.5211213", "0.52094126", "0.5197417", "0.5195994", "0.5193813", "0.5192224", "0.51848125", "0.51782423", "0.517153", "0.5170645", "0.51659817", "0.51653665", "0.51651525", "0.5162858", "0.51565695", "0.5154833", "0.51544875", "0.5154182", "0.51509184", "0.5150224", "0.5147781", "0.51436037", "0.5141254", "0.5140512", "0.51398534" ]
0.52042574
77
Crea una nueva disponibilidad
public DisponibilidadEntity create(DisponibilidadEntity entity) { em.persist(entity); return entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean create() {\n if (removed) return false;\n else if (tag != null) return true;\n else {\n tag = DOM.getElementById(STATUS_TAG_NAME);\n if (tag != null) {\n return true;\n } else {\n removed = true;\n return false;\n }\n } \n }", "public void makeAvailable() {\n\t\tavailable = true;\n\t}", "void create_MB(String nombre){\n if (Globales.UltimoIndiceMailbox == 6){\r\n PantallaError pe = new PantallaError(\"Ya hay 6 buzones (mailbox) en ejecución, no puede crear más.\");\r\n }\r\n else{\r\n Mailbox mb = new Mailbox(\"MB\"+nombre);\r\n Globales.mails[Globales.UltimoIndiceMailbox]=mb;\r\n //System.out.println(\"Globales.mails[\"+Globales.UltimoIndiceMailbox+\"] = \"+Globales.mails[Globales.UltimoIndiceMailbox].nombre);\r\n Globales.UltimoIndiceMailbox++;\r\n //System.out.println(\"creó el mb: \"+mb.nombre+\" y lo insertó el el arreglo global de mb\");\r\n }\r\n }", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "Compuesta createCompuesta();", "public void create() {\n\t\t\n\t}", "Secuencia createSecuencia();", "public void inicializar() {\r\n\t\tthis.bloqueado = false;\r\n\t}", "Negacion createNegacion();", "public void testCrearDispositivo() {\n\t\tString referencia = \"A0021R\";\n\t\tString nombre = \"Motorola G primera generacion\";\n\t\tString descripcion = \"1 GB de RAM\";\n\t\tint tipo = 1;\n\t\tString foto = \"url\";\n\t\tString emailAdministrador = \"sebasj14@gmail.com\";\n\t\ttry {\n\t\t\tdispositivoBL.crearDispositivo(referencia, nombre, descripcion, tipo, foto, emailAdministrador);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public void create(){}", "OperacionColeccion createOperacionColeccion();", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "Operacion createOperacion();", "Compleja createCompleja();", "private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "public FMISComLocal create() throws javax.ejb.CreateException;", "Vaisseau_longueur createVaisseau_longueur();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}", "public void inizializza() {\n Navigatore nav;\n Portale portale;\n\n super.inizializza();\n\n try { // prova ad eseguire il codice\n\n Modulo modulo = getModuloRisultati();\n modulo.inizializza();\n// Campo campo = modulo.getCampoChiave();\n// campo.setVisibileVistaDefault(false);\n// campo.setPresenteScheda(false);\n// Vista vista = modulo.getVistaDefault();\n// vista.getElement\n// Campo campo = vista.getCampo(modulo.getCampoChiave());\n\n\n\n /* aggiunge il Portale Navigatore al pannello placeholder */\n nav = this.getNavigatore();\n portale = nav.getPortaleNavigatore();\n this.getPanNavigatore().add(portale);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void createUnclaimed()\r\n\t{\r\n\t\t\r\n\ttry{\t\t\t\r\n\t\t\r\n\t\tint i=0;\r\n\t\tString data=getTestData(\"CreateUnclaimed\");\r\n\t\tString[] values=data.split(\",\");\r\n\t\tString loginId=values[i++],securePin=values[i++]; \r\n\t\t\r\n\t\tWelcomePage wp=new WelcomePage(driver);\r\n\t\twp.selectUser(loginId);\r\n\t\t\r\n\t\tLoginNewPage lnp=new LoginNewPage(driver);\r\n\t\tlnp.login(securePin);\r\n\t\t\r\n\t\tGeneric.verifyLogin(driver,data);\t\r\n\t\t\r\n\t\tHomePage hp=new HomePage(driver);\r\n\t\thp.addSend();\r\n\r\n\t\tAddSendPage asp=new AddSendPage(driver);\r\n\t\tasp.sendMoneyThroughMobile();\t\t\r\n\t\t\r\n\t\tSendMoneyPage smp = new SendMoneyPage(driver);\r\n\t\tsmp.enterValues(data);\r\n\t\tsmp.verifyFundTransferSuccessMsg();\r\n\t\t\r\n\t\tGeneric.logout(driver);\r\n\t\tGeneric.wait(3);\r\n\t\t\r\n\t\t}catch(Exception e){Log.info(\"Create Unclaimed unsuccessful\\n\"+e.getMessage());}\r\n\t}", "private void inicializarFicha(){\n \tTypeface tfBubleGum = Util.fontBubblegum_Regular(this);\n \tTypeface tfBenton = Util.fontBenton_Boo(this);\n \tTypeface tfBentonBold = Util.fontBenton_Bold(this);\n\t\tthis.txtNombre.setTypeface(tfBubleGum);\n\t\tthis.txtDescripcion.setTypeface(tfBenton);\n\t\tthis.lblTitulo.setTypeface(tfBentonBold);\n \tpanelCargando.setVisibility(View.GONE);\n \t\n \t//cargar los datos de las informaciones\n \tif(DataConection.hayConexion(this)){\n \t\tpanelCargando.setVisibility(View.VISIBLE);\n \t\tInfo.infosInterface = this;\n \t\tInfo.cargarInfo(this.app, this.paramIdItem);\n \t}else{\n \t\tUtil.mostrarMensaje(\n\t\t\t\t\tthis, \n\t\t\t\t\tgetResources().getString(R.string.mod_global__sin_conexion_a_internet), \n\t\t\t\t\tgetResources().getString(R.string.mod_global__no_dispones_de_conexion_a_internet) );\n \t}\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public void createFailure() {\n\t\tgetController().changeFree(true);\t\t\n\t\tdisplayAdvertisement(\"opponent failure\");\n\t\tvalidate();\n\t}", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "private void añadirEnemigo() {\n\t\t\n\t\tif(enemigo.isVivo()==false){\n\t\t\tint k;\n\t\t\tk = (int)(Math.random()*1000)+1;\n\t\t\tif(k<=200){\n\t\t\t\tif(this.puntuacion<10000){\n\t\t\t\t\tenemigo.setTipo(0);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tenemigo.setTipo(1);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void inicializarJuego() {\n\t\tList<VerboIrregular> lista = utilService.getVerbosIrregulares(faciles, normales, dificiles);\n\n\t\trealmService.cambiarMostrarRespuestasVerbosIrregulares(lista, false);\n\n\t\tverbosIrregularesDesordenadas.clear();\n\n\t\tfor (VerboIrregular x : lista) {\n\t\t\tverbosIrregularesDesordenadas.add(x);\n\t\t}\n\n\t\tCollections.shuffle(verbosIrregularesDesordenadas);\n\t\t// --------------------------------------------------------------\n\n\t\t//------- Esto es por si el usuario quita una palabra problematica y se resetea el juego\n\t\tif (cantidadItems > verbosIrregularesDesordenadas.size()) {\n\t\t\tcantidadItems = verbosIrregularesDesordenadas.size();\n\t\t}\n\t\t// ---------------------------------------------------------------------------------\n\n\t\tverbosIrregularesDesordenadas = verbosIrregularesDesordenadas.subList(0, cantidadItems);\n\n\t\tindice = 0;\n\t\tsetearTitulo();\n\n\t\tbtRestart.setVisibility(View.INVISIBLE);\n\t\tivCongratulations.setVisibility(View.INVISIBLE);\n\t\tmbNext.setVisibility(View.VISIBLE);\n\t\tbtPrevious.setVisibility(View.INVISIBLE);\n\t\ttvJuegoCantidadPalabras.setVisibility(View.VISIBLE);\n\t\tbtMostrarRespuestaJuego.setVisibility(View.VISIBLE);\n\t\ttvInfinitivo.setVisibility(View.VISIBLE);\n\t\tbtDificultad.setVisibility(View.VISIBLE);\n\t\tlyRespuestaJuego.setVisibility(View.INVISIBLE);\n\t\tbtVolver.setVisibility(View.INVISIBLE);\n\n\t\tsetearTextoArribaYColorDeBoton();\n\t}", "private void prepareForNewVehicle() {\n\t\tbtnActVehUpdate.setVisibility(View.INVISIBLE);\n\t\tbtnActVehCreate.setVisibility(View.VISIBLE);\n\t\ttxtActVehAutonumberId.setText(getResources().getString(R.string.act_vehicle_id) + \": *\");\n\t\teTxtActVehLicenseplate.setText(\"\");\n\t\tautComplActVehCountry.setText(\"\");\n\t\teTxtActVehNoOfPassengers.setText(\"\");\n\t\tautComplActVehBrand.setText(\"\");\n\t\teTxtActVehVehicleType.setText(\"\");\n\t\tbtnActVehUpdate.setText(CREATE);\n\t\tvh = null;\n\t}", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public void inicializar(String negocio) {\n\t\t\n\t\tSystem.out.println(\"Estoy incializando...\");\n\t}", "public IEstadoLectura crearEstado();", "Long crear(Espacio espacio);", "public void setDisponibilita( String disponibilita ) {\n this.disponibilita = disponibilita;\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "Not createNot();", "Not createNot();", "private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}", "SpacesInvaders_aUnVaisseau createSpacesInvaders_aUnVaisseau();", "SpacesInvaders_positionnerUnNouveauVaisseau createSpacesInvaders_positionnerUnNouveauVaisseau();", "SpacesInvaders_positionnerUnNouveauVaisseau createSpacesInvaders_positionnerUnNouveauVaisseau();", "public void nuevo(){\n switch(tipoDeOperaciones){\n case NINGUNO:\n activarControles();\n btnNuevo.setText(\"Guardar\");\n btnEliminar.setDisable(false);\n btnEliminar.setText(\"Cancelar\");\n btnEditar.setDisable(true);\n btnReporte.setDisable(true);\n tipoDeOperaciones = operaciones.GUARDAR;\n break;\n case GUARDAR:\n guardar();\n \n desactivarControles();\n limpiarControles();\n btnNuevo.setText(\"Nuevo\");\n btnEliminar.setText(\"Eliminar\");\n btnEliminar.setDisable(true);\n btnEditar.setDisable(true);\n btnReporte.setDisable(true);\n tipoDeOperaciones = operaciones.NINGUNO;\n break;\n } \n \n }", "ProjetoRN createProjetoRN();", "public void nuevaRestriccion(RestricionPredio cd) {\n Map<String, List<String>> params = null;\n List<String> p = null;\n if (cd != null) {\n params = new HashMap<>();\n p = new ArrayList<>();\n p.add(cd.getId() + \"\");\n params.put(\"idRestriccion\", p);\n if (ver) {\n p = new ArrayList<>();\n p.add(ver.toString());\n params.put(\"ver\", p);\n ver = false;\n }\n } else {\n\n }\n Utils.openDialog(\"/restricciones/restriccionPredio\", params, \"500\", \"80\");\n }", "private void createNewLab(){\n String newLabName = NewLabNameTextfield.getText();\n // If lab doesn't exist make the new lab\n if(!Arrays.asList(labsPath.list()).contains(newLabName)){ \n try{\n LabExistLabel.setVisible(false);\n NewLabDialog.revalidate();\n //call python new_lab_script: new_lab_setup.py -b basename \n File labdir = new File(labsPath+File.separator+newLabName);\n labdir.mkdir();\n this.labName = newLabName;\n String cmd = \"new_lab_setup.py -b \"+NewLabBaseImageComboBox.getSelectedItem();\n doLabCommand(cmd);\n \n // Close the new lab dialog and open the new lab\n NewLabDialog.setVisible(false);\n openLab(new File(labsPath+File.separator+newLabName));\n } \n catch (IOException e){\n System.out.println(e);\n }\n }\n else{\n LabExistLabel.setVisible(true);\n NewLabDialog.revalidate();\n System.out.println(\"Lab already exists. Make the lab with a different name other than:\");\n printExistingLabs();\n }\n }", "public void creation(){\n\t for(int i=0; i<N;i++) {\r\n\t\t for(int j=0; j<N;j++) {\r\n\t\t\t tab[i][j]=0;\r\n\t\t }\r\n\t }\r\n\t resDiagonale(); \r\n \r\n\t //On remplit le reste \r\n\t conclusionRes(0, nCarre); \r\n \t\t\r\n\t \r\n\t isDone=true;\r\n }", "public synchronized void makeAvailable(){\n isBusy = false;\n }", "@Override\n\tpublic void create() {\n\n\t}", "private void inicializarPartida(int nivel) {\r\n\t\tif(nivel == PRINCIPIANTE) {\r\n\t\t\tcasillas = new Casilla [FILAS_PRINCIPIANTE] [COLUMNAS_PRINCIPIANTE];\r\n\t\t\tcantidadMinas = CANTIDAD_MINAS_PRINCIPANTE;\r\n\t\t\t\r\n\t\t}\r\n\t\tif(nivel == INTERMEDIO) {\r\n\t\t\tcasillas = new Casilla [FILAS_INTERMEDIO] [COLUMNAS_INTERMEDIO];\r\n\t\t\tcantidadMinas = CANTIDAD_MINAS_INTERMEDIO;\r\n\t\t}\r\n\t\tif(nivel == EXPERTO) {\r\n\t\t\tcasillas = new Casilla [FILAS_EXPERTO] [COLUMNAS_EXPERTO] ;\r\n\t\t\tcantidadMinas = CANTIDAD_MINAS_EXPERTO;\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public void preencherDisponibilidadesOferta() {\n\n //List<Disponibilidade> disponibilidades;\n List<Disp> disponibilidades;\n \n if (oferta != null) {\n //disponibilidades = new ArrayList<>(oferta.getDisponibilidades());\n disponibilidades = new ArrayList<>(oferta.getDispo());\n } else {\n disponibilidades = new ArrayList<>();\n }\n //dispDataModel = new DisponibilidadeDataModel(disponibilidades);\n dispDataModel = new DispDataModel(disponibilidades);\n }", "private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }", "private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }", "@Override\n\tpublic void create () {\n\n\t}", "public boolean createPalvelupiste(Palvelupiste palvelupiste);", "@Override\n public boolean isInstantiable() {\n return false;\n }", "private void newGame() {\n try {\n toServer.writeInt(READY);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public void newQuest() {\n\t\tList <String> quests;\n\t\tif (activeQuest == null) {\n\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t} else {\n\t\t\tquests = activeQuest.getSuccessors();\n\t\t\tif (quests == null) {\n\t\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t\t}\n\t\t}\n\t\tbakeInstance.getLogger().info(\"[BAKE] Choosing new quest. Quests available: \" + quests.toString());\n\t\tint questID = (int) Math.round(Math.random()*(quests.size()-1));\n\t\tactiveQuest = new Quest(QuestCfg, quests.get(questID));\n\t}", "SpaceInvaderTest_test_VaisseauImmobile_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauImmobile_DeplacerVaisseauVersLaDroite();", "@Override\r\n\tpublic void create() {\n\r\n\t}", "@Override\n\tpublic boolean create(Langues obj) {\n\t\treturn false;\n\t}", "@Override\n \t\t\t\tpublic void doNew() {\n \n \t\t\t\t}", "private Nota criarNota(){\n\n Nota nota = new Nota();\n nota.setTitulo(edtTituloNota.getText().toString());\n nota.setValor(Float.parseFloat(edtNotaAluno.getText().toString()));\n\n return nota;\n }", "private void inicializarVista() {\n this.vista.jtfNombreRol.setText(this.modelo.getRol().getDescripcion());\n this.vista.jbAgregar.setEnabled(false);\n this.vista.jbQuitar.setEnabled(false);\n this.vista.jtPermisosDisponibles.setModel(modelo.obtenerAccesosDispon());\n this.vista.jtPermisosSeleccionados.setModel(modelo.obtenerAccesoSelecc());\n Utilities.c_packColumn.packColumns(this.vista.jtPermisosDisponibles, 1);\n Utilities.c_packColumn.packColumns(this.vista.jtPermisosSeleccionados, 1);\n }", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "SpaceInvaderTest_VaisseauImmobile_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauImmobile_DeplacerVaisseauVersLaGauche();", "public void inicializar();", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;", "public static void makeReservation(int i){\n setChanged(i,\"reserved\");\n setReserved(true);\n }", "public void activeRegraJogadaDupla() {\n this.RegraJogadaDupla = true;\n }", "public void newGameJBJ() {\n newGame();\n min = 0; max = 1000;\n myctr.setMinMaxLabel();\n myctr.setLabels();\n }", "public void setNew();", "CurrentReservation createCurrentReservation();", "private void crearDimensionContable()\r\n/* 201: */ {\r\n/* 202:249 */ this.dimensionContable = new DimensionContable();\r\n/* 203:250 */ this.dimensionContable.setIdOrganizacion(AppUtil.getOrganizacion().getId());\r\n/* 204:251 */ this.dimensionContable.setIdSucursal(AppUtil.getSucursal().getId());\r\n/* 205:252 */ this.dimensionContable.setNumero(getDimension());\r\n/* 206:253 */ verificaDimension();\r\n/* 207: */ }", "public static void init(){\n\t\t\n\t\tif(!daoRol.existeRol(cliente.getNombre()))daoRol.save(cliente);\n\t\t\n\t\tif(!daoRol.existeRol(analista.getNombre()))daoRol.save(analista);\n\t\t\n\t\tif(!daoUsuario.existeUsuario(admin.getEmail(), admin.getMd5()))daoUsuario.save(admin);\n\t\t\n\t\t\n\t\tfor(TipoAccionPublicitaria t : TipoAccionPublicitaria.values()){\n\t\t\t\n\t\t\tif(daoPrecio.getCurrentPriceOf(t) == null){\n\t\t\t\tPrecioAccionPublicitaria p = new PrecioAccionPublicitaria();\n\t\t\t\tp.setCurrent(true);\n\t\t\t\tp.setFechaCreacion(DateTime.now());\n\t\t\t\tp.setMonto(\"0\");\n\t\t\t\tp.setObjetoValuable(t);\n\t\t\t\t\n\t\t\t\tdaoPrecio.save(p);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public co.com.telefonica.atiempo.vpistbba.actividades.df.configuracion.ejb.sb.AGenerarReciboLocal create()\n\t\tthrows javax.ejb.CreateException;", "private void newResposta(int respostaUtilizador, int idQuestao, String mailUtilizador) {\n\t\tdbconn.newResposta(respostaUtilizador, idQuestao, mailUtilizador);\r\n\t}", "public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//hazlo como mas facil te sea.Yo no se cuantos distintos puede haber.\r\n\t\r\n\t//para añadir el Dpto en la BBDD no se necesita el Nombre del Jefe\r\n\t//pero si su numero de vendedor (por eso lo he puesto como int) que forma parte de la PK \r\n\t\t\r\n\t\tint n= Integer.parseInt(num);\r\n\t\tString horaapertura=aplicacion.utilidades.Util.horaminutosAString(horIn, minIn);\r\n\t\tString horacierre=aplicacion.utilidades.Util.horaminutosAString(horCi, minCi);\r\n\t\tTime thI= Time.valueOf(horaapertura);\r\n\t\tTime thC=Time.valueOf(horacierre);\r\n\t\tthis.controlador.insertDepartamentoPruebas(nombredep, nvJefe,thI,thC); //tabla DEPARTAMENTO\r\n\t\tthis.controlador.insertNumerosDepartamento(n, nombredep); //tabla NumerosDEPARTAMENTOs\r\n\t\tthis.controlador.insertDepartamentoUsuario(nvJefe, nombredep); //tabla DepartamentoUsuario\r\n\r\n\t\t//insertamos en la cache\r\n\t\t//Departamento d=new Departamento(nombredep,Integer.parseInt(num),getEmpleado(nvJefe),null,null);\r\n\t\t//departamentosJefe.add(d);\r\n\t\t/*ArrayList<Object> aux=new ArrayList<Object>();\r\n\t\taux.add(nombredep);\r\n\t\taux.add(n);\r\n\t\taux.add(nvJefe);\r\n\t\tinsertCache(aux,\"crearDepartamento\");*///no quitar el parseInt\r\n\t}", "AliciaLab createAliciaLab();", "private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}", "public void createValue() {\n value = new AES_GetBusa_Lib_1_0.AES_GetBusa_Request();\n }", "public CrearQuedadaVista() {\n }", "Obligacion createObligacion();", "public VistaInicial crearventanaInicial(){\n if(vistaInicial==null){\n vistaInicial = new VistaInicial();\n }\n return vistaInicial;\n }", "public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }", "protected void inicializar(){\n kr = new CreadorHojas(wp);\n jPanel1.add(wp,0); // inserta el workspace en el panel principal\n wp.insertarHoja(\"Hoja 1\");\n //wp.insertarHoja(\"Hoja 2\");\n //wp.insertarHoja(\"Hoja 3\");\n }", "SpaceInvaderTest_test_VaisseauAvancePartiellement_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauAvancePartiellement_DeplacerVaisseauVersLaDroite();", "UsabilityRequirement createUsabilityRequirement();", "private static void dbempresasNotExists(){\n new Thread(() -> {\n \n try {\n \n //Grt the connection params to dbempresas\n final ConfigFileModel ConfigFileModel = ConfigFileUtil.getSingleton().getConfigFileModel();\n \n //Create the jdbc datanase\n MysqlScriptsUtil.getInstance().creaDBJDBC(ConfigFileModel.getDb(), ConfigFileModel.getUser(), ConfigFileModel.getPassword(), ConfigFileModel.getInstance(), Integer.valueOf(ConfigFileModel.getPort()));\n \n //Create hibernate schemes and initial connection for dbempresas\n HibernateUtil.getSingleton().createDbEmpresas(); \n \n //Insert base catalogs in dbempresa\n MysqlScriptsUtil.getInstance().loadDBEmpresasCatalogFileIntoDatabase(ConfigFileModel.getDb(), ConfigFileModel.getUser(), ConfigFileModel.getPassword(), ConfigFileModel.getInstance(), Integer.valueOf(ConfigFileModel.getPort()));\n \n //Continue with the normal system flow\n veryLicense();\n \n } catch (Exception ex) {\n LoggerUtility.getSingleton().logError(Start.class, ex);\n\n try {\n //Rollback\n final HibernateConfigModel HibernateConfigModel_ = HibernateUtil.getSingleton().getHibernateConfigModelDbempresas();\n MysqlScriptsUtil.getInstance().rollbackDBEmpresas(HibernateConfigModel_.getUser(), HibernateConfigModel_.getPassword(), HibernateConfigModel_.getInstance(), HibernateConfigModel_.getPort());\n \n } catch (Exception ex1) {\n LoggerUtility.getSingleton().logError(Start.class, ex1);\n }\n \n ViewsFactory.getSingleton().getDialogJFrame(ex.getMessage()).setVisible();\n \n System.exit(-1);\n }\n \n }).start();\n }", "public static void createMissions() {\n allMissions.addMission(airport, \"Find your boardingpass\");\n allMissions.addMission(airport, \"Picking up first item\");\n allMissions.addMission(beach, \"Pick up food\");\n allMissions.addMission(jungle, \"Find survivors\");\n allMissions.addMission(cave, \"Eat the shrooms\");\n allMissions.addMission(camp, \"Escape the island\");\n }", "public void agregarAlInicio(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario va agregando los nodos al inicio de la lista.\r\n } else{\r\n // Une el nuevo nodo con la lista existente.\r\n nuevo.setSiguiente(inicio);\r\n // Renombra al nuevo nodo como el inicio de la lista.\r\n inicio = nuevo;\r\n }\r\n // Incrementa el contador de tamaño de la lista.\r\n tamanio++;\r\n }", "private Ambulancia() {\n this.estado = new DisponibleState(this);\n }", "public void createChallenger() {\n\n Random random = new Random();\n if(currentTurn.getActivePlayers().size() != 1) {\n currentTurn.setCurrentPlayer(currentTurn.getActivePlayers().get(random.nextInt(currentTurn.getActivePlayers().size() - 1)));\n } else {\n currentTurn.setCurrentPlayer(currentTurn.getActivePlayers().get(0));\n }\n int i = onlinePlayers.indexOf(currentTurn.getCurrentPlayer());\n stateList.set(i, new Initialized(getCurrentTurn().getCurrentPlayer(), this));\n\n }", "@Override\r\n\tpublic void inicializar() {\n\t\tproveedorDatamanager.setProveedorSearch(new Tcxpproveedor());\r\n\t\tproveedorDatamanager.getProveedorSearch().setTsyspersona(new Tsyspersona());\r\n\t\tproveedorDatamanager.setTipoIdColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_tipoid_persona\")));\r\n\t\tproveedorDatamanager.setGrupoProvColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_grupo_prov\")));\r\n\t\tproveedorDatamanager.setEstadoProvColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_estado_persona\")));\r\n\t\tproveedorDatamanager.setProveedorComponente(new ProveedorComponent(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania()));\r\n\t}", "public Partie creerNouvellePartie(String nom) {\r\n Partie p = new Partie();\r\n p.setNom(nom);\r\n daocrud.save(p);\r\n return p;\r\n }" ]
[ "0.59307075", "0.5911417", "0.5856861", "0.57754225", "0.5754734", "0.5722772", "0.5701485", "0.5684055", "0.5680254", "0.56275266", "0.5581736", "0.5568089", "0.5519914", "0.55178756", "0.54924625", "0.544856", "0.5441311", "0.54401225", "0.5429086", "0.5425803", "0.5417839", "0.54081327", "0.5407131", "0.5398773", "0.5396953", "0.5390131", "0.53900135", "0.53885895", "0.537534", "0.5374106", "0.53669506", "0.5363659", "0.53522336", "0.5351483", "0.5343136", "0.5341547", "0.5326693", "0.5304469", "0.5301164", "0.5301164", "0.52952486", "0.5294891", "0.5291562", "0.5291562", "0.5283419", "0.52790356", "0.5273216", "0.5270267", "0.52686876", "0.5263294", "0.52626646", "0.52594227", "0.5253968", "0.5253177", "0.5251284", "0.52274907", "0.5226203", "0.5220589", "0.522041", "0.52184165", "0.5210917", "0.5203194", "0.5199023", "0.5189593", "0.51857233", "0.51845694", "0.5181104", "0.5172199", "0.5171225", "0.51667196", "0.51655847", "0.5165514", "0.51448953", "0.5144593", "0.51438016", "0.5138128", "0.51363564", "0.5132688", "0.5129009", "0.5128141", "0.51276463", "0.51271915", "0.51253045", "0.511853", "0.5102556", "0.51021016", "0.5099318", "0.50931406", "0.5087059", "0.5079947", "0.50770813", "0.50736785", "0.5069349", "0.5067671", "0.5061043", "0.5060588", "0.50598747", "0.5053188", "0.5049999", "0.5048827" ]
0.53364336
36
Modifica una disponibilidad ya existente
public DisponibilidadEntity update(DisponibilidadEntity entity) { return em.merge(entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean estaEnModoAvion();", "public boolean getDispoLibro()\n {\n return disponibilidad;\n }", "public void setAvailable(boolean x){\n availabile = x;\n }", "public void changeAvailability() {\n\t\tavailability = !availability;\n\t}", "public void setDisponibilita( String disponibilita ) {\n this.disponibilita = disponibilita;\n }", "public void makeAvailable() {\n\t\tavailable = true;\n\t}", "protected boolean isAvailable() {\r\n\t\treturn true;\r\n\t}", "private void checkAvailability() {\n if (productList != null) {\n if (productList.size() == 0) {\n noProductText.setVisibility(View.VISIBLE);\n } else {\n noProductText.setVisibility(View.GONE);\n }\n }\n }", "public void activeRegraJogadaDupla() {\n this.RegraJogadaDupla = true;\n }", "public abstract boolean isAvailable();", "public abstract boolean isAvailable();", "private void isAbleToBuild() throws RemoteException {\n int gebouwdeGebouwen = speler.getGebouwdeGebouwen();\n int bouwLimiet = speler.getKarakter().getBouwLimiet();\n if (gebouwdeGebouwen >= bouwLimiet) {\n bouwbutton.setDisable(true); // Disable button\n }\n }", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "@Override\n\tpublic void adaugaWiFi() {\n\t\t// TODO adaugare reguli proprii de validare a modulului\n\t\tdispozitiv.hasWiFi();\n\t}", "private void checkUpdateAvailability() {\n\t\t\n\t\t// Grab the data from the device and manifest\n\t\tString currentVersion = Utils.getProp(\"ro.ota.version\");\n\t\tcurrentVersion = currentVersion.replaceAll(\"[^0-9]\", \"\"); // Strip anyhting not a number\n\t\tString manifestVer = results.getVersion();\n\t\tmanifestVer = manifestVer.replaceAll(\"[^0-9]\", \"\");\n\n\t\t// Parse ints\n\t\tint manifestNumber = Integer.parseInt(manifestVer);\n\t\tint currentNumber = Integer.parseInt(currentVersion);\n\t\t\n\t\t// Pad out to be at least 5 digits long\n\t\t// That way, 1.2 shows bigger than 1.1.1\n\t\t// Because 12000 > 11100\n\t\t// Without this it would show 12 > 111\n\t\tif(manifestVer.length() <= 2){\n\t\t\tmanifestNumber *= 1000;\n\t\t} else if(manifestVer.length() <= 3) {\n\t\t\tmanifestNumber *= 100;\n\t\t} else if(manifestVer.length() <= 4) {\n\t\t\tmanifestNumber *= 10;\n\t\t}\n\t\t\n\t\t// Same again\n\t\tif(currentVersion.length() <= 2){\n\t\t\tcurrentNumber *= 1000;\n\t\t} else if(currentVersion.length() <= 3) {\n\t\t\tcurrentNumber *= 100;\n\t\t} else if(currentVersion.length() <= 4) {\n\t\t\tcurrentNumber *= 10;\n\t\t}\n\t\t\n\t\t// Set pref\n\t\tPreferences.setUpdateAvailable(mContext, manifestNumber > currentNumber);\n\t}", "private void foundNonExistent() {\n\t\tstate = BridgeState.NON_EXISTENT;\n\t}", "public boolean getAvailability(){\n return availabile;\n }", "Boolean isAvailable();", "public boolean update(Contribuyente contribuyente){\n return true;\n }", "@Override\n\tpublic void exist() {\n\t\t\n\t}", "public void setAvailable(boolean a)\n {\n this.available = a;\n }", "private boolean checkiforiginal(int copynum) {\n boolean isAvailable = false;\n if (copynum == 0) {\n isAvailable = true;\n }\n return isAvailable;\n }", "public boolean update(Panier nouveau) {\n\t\treturn false;\r\n\t}", "public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }", "@Override\r\n\tpublic boolean isExisting() {\n\t\treturn false;\r\n\t}", "public void setDispoLibro(boolean estadoLibro)\n {\n this.disponibilidad = estadoLibro;\n }", "public void verSelecionarReglaConocimiento(String accion)\r\n\t{\r\n\t\tselecionarreglaconocimiento = new SelecionarReglaConocimiento(this, accion);\r\n\t\tselecionarreglaconocimiento.setVisible(true);\r\n\t}", "@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}", "private void habilitarCamposModif() {\n\n listarPromotoresModif();\n //limpiarListaCrear();\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "boolean isUsed();", "boolean isUsed();", "boolean updateEnabling();", "boolean hasNewConfig();", "public void verModificarReglaConocimiento(String desdeentidad, String hastaentidad)\r\n\t{\r\n\t\tmodificarregla = new ModificarReglaConocimiento(this, desdeentidad, hastaentidad);\r\n\t\tmodificarregla.setVisible(true);\r\n\t}", "public synchronized void pisteLiberee() {\n\t\tSystem.out.println(\"[PisteDeDanse][Une piste est libérée]\");\n\t\tthis.pisteLibre = true;\n\t\tnotify();\n\t}", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "public void inicializar() {\r\n\t\tthis.bloqueado = false;\r\n\t}", "public void reiniciarLista(){\n lista_inicializada = false;\n }", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "public abstract boolean isNetbeansKenaiRegistered();", "private void habilitarBtnActualizar(){\n if(this.txtCodigoPlatDia.getText().isEmpty() \n || this.txtValueModified.getText().isEmpty()\n || this.cbxTypeModified.getSelectedIndex() == 0){\n this.btnActualizar.setEnabled(false);\n }else{\n this.btnActualizar.setEnabled(true);\n }\n }", "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "final void habilitarcampos(boolean valor){\n TXT_CodCliente.setEnabled(valor);\n TXT_Aparelho.setEnabled(valor);\n TXT_Valor.setEnabled(valor);\n TXT_Informacao.setEnabled(valor); \n TXT_CodServico.setEnabled(valor); \n TXT_Clientes.setEnabled(valor); \n TXT_Serial.setEnabled(valor);\n TXT_Data.setEnabled(valor);\n}", "public void setAvailable(boolean available) {\r\n isAvailable = available;\r\n }", "public boolean isRegist(int no) {\n\t\treturn repository.isContract(no);\n\t}", "private boolean dataAvailableOffline() {\n return false;\n }", "boolean hasPakringFree();", "boolean hasPakringFree();", "public void setUsed(){\n\t\talreadyUsed = true;\n\t}", "boolean hasSoftware();", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "public static boolean exists(){\n \t\treturn everbie != null;\n \t}", "boolean hasDeprecatedBookNo();", "boolean hasResMineInstanceID();", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "private static boolean create() {\n if (removed) return false;\n else if (tag != null) return true;\n else {\n tag = DOM.getElementById(STATUS_TAG_NAME);\n if (tag != null) {\n return true;\n } else {\n removed = true;\n return false;\n }\n } \n }", "private boolean checkFirstRun(Context context) {\n\n final String PREFS_NAME = \"com.zgsoft.prefs\";\n final String PREF_VERSION_CODE_KEY = \"version_code\";\n final int DOESNT_EXIST = -1;\n // String packageName=null;\n\n\n // Get current version code\n int currentVersionCode = 0;\n try {\n PackageInfo packageInfo =context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n currentVersionCode =packageInfo.versionCode;\n //packageName = packageInfo.packageName;\n\n } catch (android.content.pm.PackageManager.NameNotFoundException e) {\n // handle exception\n e.printStackTrace();\n return false;\n }\n\n\n // Get saved version code\n SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, android.content.Context.MODE_PRIVATE);\n int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\n\n // Check for first run or upgrade\n if (currentVersionCode == savedVersionCode) {\n\n // This is just a normal run\n return false;\n\n } else {\n // Update the shared preferences with the current version code\n prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\n return true;\n }\n\n }", "public boolean isHotLoadable();", "private void IsAbleToGebruikEigenschap() throws RemoteException {\n boolean eigenschapGebruikt = speler.EigenschapGebruikt();\n if (eigenschapGebruikt == true) {\n gebruikEigenschap.setDisable(true);\n }\n }", "public void cambiarVisibilidad(int opcion){\n if(opcion==1){\n vistaInicial.jpCentral.setVisible(true);\n vistaInicial.jpDerecha.setVisible(true);\n vistaInicial.jpCentralGeneral.setVisible(false);\n }else{\n vistaInicial.jpCentral.setVisible(false);\n vistaInicial.jpDerecha.setVisible(false);\n vistaInicial.jpCentralGeneral.setVisible(true);\n }\n }", "public boolean isAvailable() {\r\n\treturn available;\r\n }", "@Override\n\tpublic boolean vender(String placa) {\n\t\treturn false;\n\t}", "private void iniciarNovaVez() {\n this.terminouVez = false;\n }", "public boolean vacia()\n {\n return this.repositorio.isEmpty();\n \n }", "public void updateCount(){\n TextView newCoupons = (TextView) findViewById(R.id.counter);\n //couponsCount.setText(\"Pocet pouzitych kuponov je: \" + SharedPreferencesManager.getUsedCoupons());\n if(SharedPreferencesManager.getNew()>0) {\n newCoupons.setVisibility(View.VISIBLE);\n newCoupons.setText(String.valueOf(SharedPreferencesManager.getNew()));\n }\n else {\n newCoupons.setVisibility(View.GONE);\n }\n }", "public void updateGIUnoResponse()\n {\n updateInfo.setText( \"Server is not up :(\" );\n }", "protected void pokazOblicz() {\n if (czyImie && czyNazwisko && czyLiczby)\n oblicz.setVisibility(Button.VISIBLE);\n\n else\n oblicz.setVisibility(Button.INVISIBLE);\n }", "public void verAdicionarDatosCaracteristica()\r\n\t{\r\n\t\tadicionarcaracteristica = new AdicionarDatosCaracteristica(this);\r\n\t\tadicionarcaracteristica.setVisible(true);\r\n\t}", "public boolean exist() {\n\t\treturn false;\n\t}", "private void updateOnlineStorageDetails(boolean loginSuccess) {\n onlineStorageAccountLabel.setIcon(null);\n AccountDetails ad = client.getAccountDetails();\n boolean active = false;\n boolean showBuyNow = ProUtil.isTrial(getController());\n String username = client.getUsername();\n if (username == null || username.trim().length() == 0) {\n onlineStorageAccountLabel.setText(Translation\n .getTranslation(\"status_tab.online_storage.not_setup\"));\n onlineStorageAccountLabel.setToolTipText(Translation\n .getTranslation(\"status_tab.online_storage.not_setup.tips\"));\n } else {\n if (client.isPasswordEmpty()) {\n onlineStorageAccountLabel.setText(Translation\n .getTranslation(\"status_tab.online_storage.no_password\"));\n onlineStorageAccountLabel\n .setToolTipText(Translation\n .getTranslation(\"status_tab.online_storage.no_password.tips\"));\n } else if (client.isConnected()) {\n if (client.isLoggedIn()) {\n OnlineStorageSubscription storageSubscription = client\n .getAccount().getOSSubscription();\n if (storageSubscription.isDisabled()) {\n Date expirationDate = storageSubscription\n .getDisabledExpirationDate();\n if (storageSubscription.isDisabledExpiration()\n && expirationDate != null)\n {\n onlineStorageAccountLabel\n .setText(Translation\n .getTranslation(\n \"status_tab.online_storage.account_disabled_expiration\",\n username,\n Format\n .formatDateCanonical(expirationDate)));\n } else if (storageSubscription.isDisabledUsage()) {\n onlineStorageAccountLabel\n .setText(Translation\n .getTranslation(\n \"status_tab.online_storage.account_disabled_usage\",\n username));\n } else {\n onlineStorageAccountLabel\n .setText(Translation\n .getTranslation(\n \"status_tab.online_storage.account_disabled\",\n username));\n }\n onlineStorageAccountLabel\n .setToolTipText(Translation\n .getTranslation(\"status_tab.online_storage.account_disabled.tips\"));\n showBuyNow = true;\n } else {\n if (ConfigurationEntry.SERVER_CONNECT_CHANGE_LOGIN_ALLOWED\n .getValueBoolean(getController()))\n {\n onlineStorageAccountLabel.setText(Translation\n .getTranslation(\n \"status_tab.online_storage.account\",\n username));\n onlineStorageAccountLabel\n .setToolTipText(Translation\n .getTranslation(\"status_tab.online_storage.account.tips\"));\n } else {\n onlineStorageAccountLabel.setText(username);\n onlineStorageAccountLabel.setToolTipText(\"\");\n }\n active = true;\n showBuyNow = !ad.getAccount().isProUser();\n }\n } else if (loginSuccess) {\n onlineStorageAccountLabel.setText(Translation\n .getTranslation(\n \"status_tab.online_storage.account_connecting\",\n username));\n onlineStorageAccountLabel\n .setToolTipText(Translation\n .getTranslation(\"status_tab.online_storage.account_connecting.tips\"));\n } else {\n onlineStorageAccountLabel.setIcon(Icons\n .getIconById(Icons.WARNING));\n onlineStorageAccountLabel.setText(Translation\n .getTranslation(\n \"status_tab.online_storage.account_login_failed\",\n username));\n onlineStorageAccountLabel\n .setToolTipText(Translation\n .getTranslation(\"status_tab.online_storage.account_login_failed.tips\"));\n }\n } else {\n onlineStorageAccountLabel.setText(Translation.getTranslation(\n \"status_tab.online_storage.account_connecting\", username));\n onlineStorageAccountLabel\n .setToolTipText(Translation\n .getTranslation(\"status_tab.online_storage.account_connecting.tips\"));\n }\n }\n\n // Don't show if PowerFolder is disabled.\n onlineStorageAccountLabel.getUIComponent().setVisible(\n getController().getNodeManager().isStarted());\n\n if (active) {\n OnlineStorageSubscription storageSubscription = ad.getAccount()\n .getOSSubscription();\n long totalStorage = storageSubscription.getStorageSize();\n long spaceUsed = ad.getSpaceUsed();\n if (spaceUsed > (double) totalStorage * 0.8) {\n showBuyNow = true;\n }\n onlineStorageSection.getUIComponent().setVisible(true);\n onlineStorageSection.setInfo(totalStorage, spaceUsed);\n } else {\n onlineStorageSection.getUIComponent().setVisible(false);\n }\n\n // Show Buy now link if: Disabled OR >80% OR isTrial\n updateBuyNowLink(\n Translation.getTranslation(\"pro.status_tab.upgrade_powerfolder\"),\n showBuyNow);\n // Make sure to display buy now if license is about to expire.\n updateLicenseDetails();\n }", "public void consulterBoiteVocale() {\n for (int i = 0; i < this.boiteVocale.getListeMessagesVocaux().size(); i++) {\n //on passe l'attribut consulte à true pour savoir qu'il a été vu pour la facturation\n this.boiteVocale.getListeMessagesVocaux().get(i).setConsulte(true);\n }\n }", "boolean isPermanent();", "private void modificarReserva() throws Exception {\r\n\t\tif (mngRes.existeReservaPeriodo(getSitio().getId())) {\r\n\t\t\tif (mayorEdad) {\r\n\t\t\t\tmngRes.modificarReserva(getEstudiante(), periodo.getPrdId(), getSitio(), null);\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t} else {\r\n\t\t\t\tmngRes.modificarReserva(getEstudiante(), periodo.getPrdId(), getSitio(),\r\n\t\t\t\t\t\tgetDniRepresentante() + \";\" + getNombreRepresentante());\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t}\r\n\t\t\tMensaje.crearMensajeINFO(\"Reserva realizada correctamente, no olvide descargar su contrato.\");\r\n\t\t} else {\r\n\t\t\tMensaje.crearMensajeWARN(\"El sitio seleccionado ya esta copado, favor eliga otro.\");\r\n\t\t}\r\n\t}", "public boolean isAvailable() {\n return available;\n }", "public boolean instaladorEjecutado(HttpServletRequest rq) {\n Boolean valorFlag = false;\n ServletContext srvContext = null;\n if (rq != null) {\n valorFlag = (Boolean) rq.getServletContext().getAttribute(ConstantesManagedBean.NOMBRE_OBJ_FLAG_INSTALADOR);\n srvContext = rq.getServletContext();\n } else {\n valorFlag = super.findApplicationObject(Boolean.class, ConstantesManagedBean.NOMBRE_OBJ_FLAG_INSTALADOR);\n srvContext = super.getServletContext();\n }\n\n if (valorFlag == null || !valorFlag) {\n final boolean instalado = StringUtils.equalsIgnoreCase(\n parametrosEjb.consultarValorParametroSeguridad(EnumParametro.INSTALADOR_EJECUTADO),\n ConstantesSeguridad.VALOR_SI);\n srvContext.setAttribute(ConstantesManagedBean.NOMBRE_OBJ_FLAG_INSTALADOR, valorFlag);\n valorFlag = instalado;\n }\n logger.debugv(\"El asistente de instalacion de la aplicacion ha sido ejecutado? : {0}\", valorFlag);\n return valorFlag;\n }", "private void cargarNotasEnfermeria() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/notas_enfermeria.zul\", \"NOTAS DE ENFERMERIA\",\r\n\t\t\t\tparametros);\r\n\t}", "public void ingresaAdministrativo() {\n\tEstableceDatosAdministrativos();\n\tint cambio=0;\n\tdo {\n\t\t\n\t\ttry {\n\t\t\tsetMontoCredito(Double.parseDouble(JOptionPane.showInputDialog(\"Ingrese el monto del credito (�3 600 000 maximo)\")));\n\t\t\tcambio=1;\n\t\t\tif(getMontoCredito()<0||getMontoCredito()>3600000) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El monto debe ir de �0 a �3600000\");\n\t\t\t}\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Ingrese solo numeros\");\n\t\t}\n\t}while(getMontoCredito()<0||getMontoCredito()>3600000||cambio==0);\n\tsetInteres(12);\n\tsetPlazo(60);\n\tsetCuotaPagar(calculoCuotaEspecialOrdinario());\n\testableceEquipoComputo();\n}", "public void verAdicionarReglaConocimiento(String desdeentidad, String hastaentidad)\r\n\t{\r\n\t\tadicionarregla = new AdicionarReglaConocimiento(this, desdeentidad, hastaentidad);\r\n\t\tadicionarregla.setVisible(true);\r\n\t}", "public void verDatosAdministrador()\r\n\t{\r\n\t\tcrearadmin = new CrearAdministrador(this);\r\n\t\tcrearadmin.setVisible(true);\r\n\t}", "@Test\r\n public void testVerificaPossibilidade2() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Override\r\n\tpublic boolean seLanceSurServiteurProprietaire() {\n\t\treturn false;\r\n\t}", "public void inicjalizujRynek()\n\t{\n\t\tif (!Stale.cenyZGeneratora)\n\t\t{\n\t\t\tlistaCenWczytanaZPliku=loader.loadPrices();\n\t\t}\n\t}", "public void setAvalible(boolean val) {\n this.available = val;\n }", "boolean isAvailable() {\r\n\t\treturn available;\r\n\t}", "public void updateVisible(){\n if (serviceManager.isCustomerQueMode() == true && serviceManager.isManagerMode() == false) {\n this.setVisible(true);\n } else {\n this.setVisible(false);\n }\n// System.out.println(serviceManager.isCustomerQueMode());\n }", "@Test\r\n public void testVerificaPossibilidade() {\r\n usucapiao.setAnimusDomini(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public synchronized void makeAvailable(){\n isBusy = false;\n }", "boolean hasAutomatic();", "private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}", "@Override\n\tpublic boolean updateStatus() {\n\t\treturn false;\n\t}", "public void setIsExist(boolean value) {\n this.isExist = value;\n }", "public void setAvailable(boolean available) {\n this.available = available;\n }", "public void setAvailable(boolean available) {\n this.available = available;\n }", "boolean hasReplacePlayerResponse();", "private void updateStatusNandflash(){\n\t\tString status = StorageUtils.getFlashState();\n\t\tString readOnly = \"\";\n\t\tif (status.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {\n\t\t\tstatus = Environment.MEDIA_MOUNTED;\n\t\t\treadOnly = getResources().getString(R.string.read_only);\n\t\t}\n\n\t\t// Calculate the space of SDcard\n\t\tif (status.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\ttry {\n\t\t\t\tString path = StorageUtils.getFlashDir();\n\t\t\t\tStatFs stat = new StatFs(path);\n\t\t\t\tlong blockSize = stat.getBlockSize();\n\t\t\t\tlong totalBlocks = stat.getBlockCount();\n\t\t\t\tlong availableBlocks = stat.getAvailableBlocks();\n\t\t\t\tmNANDTotalSpace=formatSize(totalBlocks * blockSize);\n\t\t\t\tmNANDAvailableSpace=formatSize(availableBlocks * blockSize) + readOnly;\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tstatus = Environment.MEDIA_REMOVED;\n\t\t\t\tmNANDTotalSpace=getResources().getString(R.string.nand_unavailable);\n\t\t\t\tmNANDAvailableSpace=getResources().getString(R.string.nand_unavailable);\n\t\t\t}\n\t\t}else{\n\t\t\tmNANDTotalSpace=getResources().getString(R.string.nand_unavailable);\n\t\t\tmNANDAvailableSpace=getResources().getString(R.string.nand_unavailable);\n\t\t}\n\t}", "private void atualizarBotoes() {\r\n\t\tbtIncluir.setDisable(cliente.getId() != null);\r\n\t\tbtAlterar.setDisable(cliente.getId() == null);\r\n\t\tbtExcluir.setDisable(cliente.getId() == null);\r\n\t}", "boolean hasUknown();" ]
[ "0.6190234", "0.6114835", "0.605322", "0.5941904", "0.5857075", "0.5833363", "0.57985806", "0.5778549", "0.56675756", "0.5658153", "0.5658153", "0.56080616", "0.5604705", "0.5604705", "0.5604705", "0.5604705", "0.5583374", "0.55798024", "0.5559077", "0.55511475", "0.5535156", "0.5531461", "0.5481727", "0.5468023", "0.54541945", "0.5441992", "0.5426865", "0.5396071", "0.539383", "0.5389956", "0.5382773", "0.5382075", "0.53779846", "0.5371", "0.5371", "0.53699094", "0.53697145", "0.5361512", "0.5351056", "0.53439057", "0.5337688", "0.533692", "0.531257", "0.53107446", "0.5310167", "0.53090173", "0.5300626", "0.52815264", "0.5270192", "0.5258312", "0.5257797", "0.5257797", "0.5249869", "0.5247272", "0.5222669", "0.52222407", "0.5218468", "0.52170515", "0.5212731", "0.5209503", "0.52089113", "0.5205866", "0.52039665", "0.5203712", "0.5190084", "0.5188957", "0.51854753", "0.518428", "0.518197", "0.51815796", "0.5177631", "0.51759607", "0.51735973", "0.5170215", "0.5166143", "0.5157199", "0.51482564", "0.51478374", "0.5145209", "0.5133609", "0.5127776", "0.512475", "0.5123847", "0.511848", "0.511696", "0.5116174", "0.51068425", "0.5106303", "0.5105095", "0.5104525", "0.5104363", "0.510244", "0.51017195", "0.50996816", "0.5092392", "0.5091158", "0.5091158", "0.5089525", "0.5086444", "0.5075989", "0.5074906" ]
0.0
-1
Elimina una disponibilidad ya existente
public void delete(Long id) { DisponibilidadEntity entity = em.find(DisponibilidadEntity.class, id); em.remove(entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean eliminaDipendente() {\n\t\treturn false;\n\t}", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public void eliminaBD() {\r\n CBD.openConexion();\r\n //------Reune los datos de producto con id--------------//\r\n String A = CBD.getInveID(II.lblid.getText());\r\n String B[] = A.split(\",\");\r\n //------Reune los datos de producto con id--------------//\r\n //------Verifica si la cantidad es 0--------------//\r\n if (Integer.parseInt(B[5]) == 0) {\r\n //------Elimina--------------//\r\n if(CBD.deleteDBProd(\"[ID PRODUCTO]\", B[7])){\r\n JOptionPane.showMessageDialog(II, \"Producto eliminado\");\r\n }else{\r\n JOptionPane.showMessageDialog(II, \"Error producto no pudo ser eliminado\");\r\n }\r\n //------Elimina--------------//\r\n } else {\r\n JOptionPane.showMessageDialog(II, \"No puedes eliminar un producto si su existencia es mayor a 0\");\r\n }\r\n CBD.closeConexion();\r\n }", "public boolean deletePalvelupisteet();", "@Override\n\tpublic void checkBotonEliminar() {\n\n\t}", "public void removerCarro() {\n\n if (carrosCadastrados.size() > 0) {//verifica se existem carros cadastrados\n listarCarros();\n System.out.println(\"Digite o id do carro que deseja excluir\");\n int idCarro = verifica();\n for (int i = 0; i < carrosCadastrados.size(); i++) {\n if (carrosCadastrados.get(i).getId() == idCarro) {\n if (carrosCadastrados.get(i).getEstado()) {//para verificar se o querto está sendo ocupado\n System.err.println(\"O carrp está sendo utilizado por um hospede nesse momento\");\n } else {\n carrosCadastrados.remove(i);\n System.err.println(\"cadastro removido\");\n }\n }\n\n }\n } else {\n System.err.println(\"Não existem carros cadastrados\");\n }\n }", "public static void excluir(int numCompra){\r\n lerXml();\r\n for(int i=0; i < lista.size(); i++){\r\n Estoque cadaEstoque = lista.get(i);\r\n \r\n //procura o estoque que tem o CPF igual \r\n //à variável \"cpf\", que tá chegando entre\r\n //os parênteses\r\n if (cadaEstoque.getNumCompra()==numCompra){\r\n lista.remove(i);\r\n }\r\n }\r\n salvarXml();\r\n }", "public void supprimerInaccessibles(){\n grammaireCleaner.nettoyNonAccGramm();\n setChanged();\n notifyObservers(\"3\");\n }", "public boolean delete (int val) throws DifferentOrderTrees {\r\n \tboolean supprime = false;\r\n \tMonceau monceauTemp = new Monceau();\r\n \t\r\n \t//recherche de la valeur a supprimer\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tif (arbres.get(i).findValue(val) == null)\r\n \t\t\tcontinue;\r\n \t\telse {\r\n \t\t\tmonceauTemp.arbres = arbres.get(i).findValue(val).delete();\r\n \t\t\tarbres.remove(arbres.get(i)); //supprime noeud\r\n \t\t\tthis.fusion(monceauTemp); //fusionne les 2 monceaux\r\n \t\t\ti = (0-1); //on recommence (-1 car on fait i++ apres (boucle for))\r\n \t\t\tsupprime = true;\r\n \t\t}\r\n \t}\r\n \t\r\n return supprime;\r\n }", "public void eliminarVenta(int codVenta) throws Exception {\n if (this.ventas.containsKey(codVenta)) {\r\n this.ventas.remove(codVenta);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"La Venta no Existe\");\r\n }\r\n //return retorno;\r\n }", "public void darBaja() {\r\n for (int i = 0; i < coleccion.size(); i++) {\r\n if (coleccion.get(i).getUnidades() == 0) {\r\n String resumen = (\"Se ha dado de baja: \\n\" + coleccion.get(i).getTitulo() + \"\\npor falta de ejemplares\");\r\n JOptionPane.showMessageDialog(null, resumen);\r\n coleccion.remove(i);\r\n }\r\n\r\n }\r\n }", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "public void supprimerImproductifs(){\n grammaireCleaner.nettoyNonProdGramm();\n setChanged();\n notifyObservers(\"2\");\n }", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }", "private void excluirAction() {\r\n Integer i = daoPedido.excluir(this.pedidoVO);\r\n\r\n if (i != null && i > 0) {\r\n msg = activity.getString(R.string.SUCCESS_excluido, pedidoVO.toString());\r\n Toast.makeText(activity, msg + \"(\" + i + \")\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"DB_INFO\", \"Sucesso ao Alterar: \" + this.pedidoVO.toString());\r\n\r\n// this.adapter.remove(this.pedidoVO);\r\n this.refreshData(2);\r\n } else {\r\n msg = activity.getString(R.string.ERROR_excluir, pedidoVO.toString());\r\n Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show();\r\n Log.e(\"DB_INFO\", \"Erro ao Excluir: \" + this.pedidoVO.toString());\r\n }\r\n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "public void onClick(DialogInterface dialog, int which) {\n indivReservee.getRef().removeValue();\n\n //Remove reservation from user\n for(DataSnapshot indivSpace : snapshot.child(Keys.KEY_RESERVATIONS.name()).getChildren()) {\n if(spaceID.equals(indivSpace.child(\"id\").getValue().toString().trim())) {\n String key = indivSpace.getKey();\n bmDatabaseRef.child(Keys.KEY_RESERVATIONS.name()).child(key).removeValue();\n }\n }\n Toast.makeText(SpaceViewActivity.this, \"Unreserved a \" + type, Toast.LENGTH_SHORT).show();\n finish();\n //btnReserve.setText(\"Reserve\");\n }", "public void deleteAnio()\r\n {\r\n this._has_anio= false;\r\n }", "public void localizarEremoverProdutoCodigo(Prateleira prat){\r\n //instacia um auxiliar para procura\r\n Produto mockup = new Produto();\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser removido\" ));\r\n mockup.setCodigo(Codigo); \r\n \r\n //informa que caso encontre o produto remova o da arraylist\r\n boolean resultado = prat.getPrateleira().remove(mockup);\r\n if(resultado){\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" Removido\");\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" não encontrado\");\r\n }\r\n }", "public final void removeUnCompletedDoanload() {\n if (mUpdateInfo != null && mUpdateInfo.downId != -1) {\n if (mUpdateInfo.downId != -1) {\n Cursor c = null;\n try {\n c = mJDownloadManager.queryTask(mUpdateInfo.downId);\n if (c != null && c.moveToFirst()) {\n int status = c.getInt(JDownloadTaskColumnIndex.STATUS);\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"check delete task or not status=\" + status);\n }\n if (status != JDownloadManager.STATUS_SUCCESSFUL) {\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"removeDoanload \" + mUpdateInfo.downId);\n }\n mJDownloadManager.remove(mUpdateInfo.downId);\n }\n }\n } finally {\n if (c != null) {\n c.close();\n }\n }\n }\n }\n }", "@Override\n public boolean excluirRegistro() {\n this.produto.excluir();\n return true;\n }", "public boolean eliminar(){\n\t\tString query = \"DELETE FROM Almacen WHERE Id_Producto = \"+this.getId();\n\t\tif(updateQuery(query)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void deleteLUC() {\r\n/* 135 */ this._has_LUC = false;\r\n/* */ }", "private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {\n String delete = TabelSiswa.getValueAt(baris, 1).toString();\n try{\n Statement stmt = koneksi.createStatement();\n String query = \"DELETE FROM pasien WHERE nis = '\" + delete + \"'\";\n int berhasil = stmt.executeUpdate(query);\n if(berhasil == 1){\n JOptionPane.showMessageDialog(null, \"Data berhasil dihapus\");\n dtm.getDataVector().removeAllElements();\n showData();\n showStok();\n }else{\n JOptionPane.showMessageDialog(null, \"Data gagal dihapus\");\n }\n }catch(SQLException ex){\n ex.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Terjadi kesalahan\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public String eliminarDetalle()\r\n/* 340: */ {\r\n/* 341:400 */ this.cuentaContableDimensionContable = ((CuentaContableDimensionContable)this.dtCuentaContable.getRowData());\r\n/* 342:401 */ this.cuentaContableDimensionContable.setEliminado(true);\r\n/* 343:402 */ return \"\";\r\n/* 344: */ }", "public boolean eliminarLoteria(int codigo) {\n\n String instruccion = \"delete from loteria where codigo =\" + codigo;\n boolean val = false;\n PreparedStatement pre;\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n pre = con.prepareStatement(instruccion);\n pre.execute();\n val = true;\n } catch (SQLException ex) {\n ex.printStackTrace();\n\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return val;\n }\n\n }", "public void verEliminarReglaConocimiento(String desdeentidad, String hastaentidad)\r\n\t{\r\n\t\teliminarregla = new EliminarReglaConocimiento(this, desdeentidad, hastaentidad);\r\n\t\teliminarregla.setVisible(true);\r\n\t}", "public void despegar(){\n if(this.posicion == 1){\n this.setPosicion(2);\n this.indicarEstado(\"Volando\");\n } else{\n System.out.println(\"No estoy preparado para el despegue\");\n }\n }", "public void desactiveRegraJogadaDupla() {\n this.RegraJogadaDupla = true;\n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_nivel_funcion_programa.eliminar();\r\n\t\t\r\n\t}", "@Override\n\tpublic boolean eliminarPorId(Integer llave) {\n\t\treturn false;\n\t}", "public void sepulsaeliminar(View view) {\n\t\tif(posicionArrayList !=-1) {\n\t\t\tarrayList.get(posicionArrayList);\n\n\t\t\tfinal DatabaseReference referenciaUseraBorrar=FirebaseDatabase.getInstance().getReference(\"users\").child(arrayList.get(posicionArrayList));\n\n\t\t\treferenciaUseraBorrar.removeValue(); //Elimina el campo del User de la BD\n\t\t\tarrayList.remove(posicionArrayList); //Elimina la posición correspondiente del ArrayList\n\t\t\tarrayAdapter.notifyDataSetChanged(); //Función que actualiza el arrayAdapter y lo dibuja de nuevo.\n\t\t\tToast.makeText(getApplicationContext(),\"Usuario Cuidador eliminado\",Toast.LENGTH_LONG).show();\n\n\t\t}else{\n\t\t\tToast.makeText(getApplicationContext(),\"No se ha seleccionado ningún elemento\",Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "public void supprimerParcelle() {\n\t\tboolean isEmpty=false;\n\t\tint nbParcelleSup=0;\n\t\tList<String> nomParcellesNonSupprimees = new ArrayList<>();\n\t\tList<String> nomParcellesSupprimees = new ArrayList<>();\n\n\t\tfor (String emplacement : emplacementsSelectionneesFromJS.split(\"-\")) {\n\t\t\tnbParcelleSup++;\n\n\t\t\tif (!isEmpty(emplacement)){\n\t\t\t\tString[] refEmplacement= emplacement.split(\"_\");\n\t\t\t\tint numLigne = Integer.parseInt(refEmplacement[0]);\n\t\t\t\tint numColonne = Integer.parseInt(refEmplacement[1]);\n\t\t\t\tEmplacement e = obtenirEmplacement(numLigne,numColonne);\n\n\t\t\t\tif(e != null && notHaveTachePlanified(parcelle).equals(\"true\") ) {\n\t\t\t\t\t// Suppression de la parcelle \n\t\t\t\t\tthis.parcelle = e.getParcelle();\n\t\t\t\t\taffecterDateRetraitPuisMAJParcelleEnBase(parcelle);\n\t\t\t\t\tnomParcellesSupprimees.add(parcelle.getLibelleParcelle());\n\t\t\t\t\tSystem.out.println(\"Supprimer Parcelle OK \");\n\t\t\t\t}else {\n\t\t\t\t\tnomParcellesNonSupprimees.add(parcelle.getLibelleParcelle());\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t//Probleme de selection d'emplacement\n\t\t\t\tisEmpty=true;\n\t\t\t}\n\t\t}\n\n\t\tif(isEmpty&&nbParcelleSup==1) {\n\t\t\tmsgInfoActionGrilleJS=\"Erreur : La selection ne correspond à aucune parcelle !\";\n\t\t\tetatMsgInfoGrilleJS=\"color:red;\";\n\t\t\tSystem.out.println(\"Supprimer Parcelle KO : L'emplacement selectionnee n'est pas affecté à une parcelle \");\n\t\t}else {\n\t\t\tif(nbParcelleSup>1) {\n\t\t\t\tString listeLibelleParcellesSupprimees=\"\";\n\t\t\t\tString listeLibelleParcellesNonSupprimees=\"\";\n\n\t\t\t\tfor (String string : nomParcellesSupprimees) {\n\t\t\t\t\tlisteLibelleParcellesSupprimees+=string+\", \";\n\t\t\t\t}\n\t\t\t\tfor (String string : nomParcellesNonSupprimees) {\n\t\t\t\t\tlisteLibelleParcellesNonSupprimees+=string+\", \";\n\t\t\t\t}\n\t\t\t\tif(listeLibelleParcellesSupprimees.length()>0) {\n\t\t\t\t\tint i = listeLibelleParcellesSupprimees.length()-2;\n\t\t\t\t\tmsgInfoActionGrilleJS=\"Les parcelles ' \"+listeLibelleParcellesSupprimees.substring(0, i)+\" ' ont bien été retirées !\";\n\t\t\t\t}\n\t\t\t\tif(listeLibelleParcellesNonSupprimees.length()>0) {\n\t\t\t\t\tint j = listeLibelleParcellesNonSupprimees.length()-2;\n\n\t\t\t\t\tmsgInfoActionGrilleJS=\"\\n Attention : Les parcelles ' \"+listeLibelleParcellesNonSupprimees.substring(0, j)+\" ' n'ont pas pu être supprimées (Taches en cours ou emplamcement vide)!\";\n\t\t\t\t}\n\n\t\t\t}else {\n\t\t\t\tmsgInfoActionGrilleJS=\"La parcelle '\"+parcelle.getLibelleParcelle()+\"'a bien été retirée !\";\n\t\t\t}\n\t\t\tetatMsgInfoGrilleJS=\"color:green;\";\n\t\t}\n\t\tthis.clearForm();\n\t}", "public void carroNoEncontrado(){\n System.out.println(\"Su carro no fue removido porque no fue encontrado en el registro\");\n }", "void desalocar(Processo processo) {\n for (int r = 0; r < size(); r++) {\n if (get(r).idProcesso == processo.getId()) {\n //TODO Marcar o bloco como livre\n get(r).espaçoUsado = 0;\n get(r).idProcesso = -1;\n }\n }\n }", "public void eliminarMateria() {\n ejbFacade.remove(materia);\n items = ejbFacade.findAll();\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.update(\"MateriaListForm:datalist\");\n requestContext.execute(\"PF('Confirmacion').hide()\");\n departamento = new Departamento();\n materia = new Materia();\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se eliminó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n requestContext.update(\"MateriaListForm\");\n }", "@Override\n\tpublic boolean eliminar(Long id) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "private boolean noVacancy() {\r\n\t\t\treturn removed = false;\r\n\t\t}", "public void removerInicio() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n this.primeiro = this.primeiro.irParaProximo();\n this.total--;\n break;\n }\n }", "public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;", "public void eliminarCompraComic();", "private void enviarRequisicaoRemover() {\n servidor.removerPalito(nomeJogador);\n atualizarPalitos();\n }", "public void eliminarTipoPago(String codTipoPago) throws Exception {\n if (this.tiposPagos.containsKey(codTipoPago)) {\r\n this.generarAuditoria(\"BAJA\", \"TIPOPAGO\", codTipoPago, \"\", GuiIngresar.getUsuario());\r\n this.tiposPagos.remove(codTipoPago);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"El tipo pago no Existe\");\r\n }\r\n //return retorno;\r\n }", "private void unDeleteValoresPago() {\n CQChangeStateVP( MVALORPAGO.ANULADO,MVALORPAGO.EMITIDO);\n }", "private void eliminarDeMisPropiedades(Casilla casilla){\n if(esDeMipropiedad(casilla)){\n propiedades.remove(casilla.getTituloPropiedad());\n }\n \n }", "public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "private void eliminaAccount(HttpServletRequest request, HttpServletResponse response) {\r\n HttpSession session = request.getSession();\r\n Medico medico = (Medico) session.getAttribute(\"utente\");\r\n if (medico != null) {\r\n\r\n if (PazienteModel.getPazientiSeguiti(medico.getCodiceFiscale()).size() != 0) {\r\n // non è possibile effettuare l'eliminazione, notificare al medico che non può\r\n // proseguire con l'opeazione fino a che\r\n // segue dei pazienti.\r\n } else {\r\n MedicoModel.removeMedico(medico.getCodiceFiscale());\r\n request.setAttribute(\"notifica\", \"Account eliminato con successo\");\r\n session.removeAttribute(\"utente\");\r\n session.setAttribute(\"accessDone\", false);\r\n }\r\n\r\n }\r\n\r\n }", "public void domicilioElimina(){\r\n\t\tlog.info(\"DomicilioElimina()\");\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) { \t\t\r\n\t \tlog.info(\"\"+DomicilioPersonaList.get(i).getItem()+\" ,idd \"+getIdd() +\" \"+DomicilioPersonaList.get(i).getDomicilio());\r\n\r\n\t\tif((DomicilioPersonaList.get(i).getIddomiciliopersona()== 0 || DomicilioPersonaList.get(i).getIddomiciliopersona()== null) && DomicilioPersonaList.get(i).getItem()==\"Por Agregar\"){\r\n\t\t\tlog.info(\"N2----> DomicilioPersonaList.get(i).getIddomiciliopersona()\" +\" \" +DomicilioPersonaList.get(i).getIddomiciliopersona());\r\n\t\t\tDomicilioPersonaSie domtemp = new DomicilioPersonaSie();\r\n\t\t\tdomtemp.setIddomiciliopersona(idd);\r\n\t\t\tDomicilioPersonaList.remove(domtemp);\r\n\t\tfor (int j = i; j < DomicilioPersonaList.size(); j++) {\r\n\t\t\tlog.info(\" i \" +i+\" j \"+ j);\r\n\t\t\ti=i+1;\r\n\t\t\tDomicilioPersonaList.set(j, DomicilioPersonaList.get(j));\r\n\t\t}break;\r\n\t\t}\r\n\t\telse if(DomicilioPersonaList.get(i).getIddomiciliopersona() ==(getIdd()) && DomicilioPersonaList.get(i).getItem()==\"Agregado\"){\r\n\t\t\tlog.info(\"ALERTA WDFFFF\");\r\n\t\t\tDomicilioPersonaSie obj = new DomicilioPersonaSie();\r\n\t\t\tobj.setIddomiciliopersona(idd);\r\n\t\t\tlog.info(\"DENTRO LISTA DESHABILITADO\");\r\n\t\t\tDomicilioPersonaDeshabilitado.add(obj);\t\r\n\t\t\tFaceMessage.FaceMessageError(\"ALERTA\", \"Los Cambios se realizaran despues de hacer clic en el boton Guardar\");\t\t\t\r\n//\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_WARN,\r\n//\t\t\tConstants.MESSAGE_ERROR_TELEFONO_CLIENTE,mensaje);\r\n//\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void btnRemoverActionPerformed(java.awt.event.ActionEvent evt) {\n\n if (tblSecoes.getSelectedRow() >= 0){\n\n if (JOptionPane.showConfirmDialog(RootPane, \"Deseja Remover esta Seção?\") == 0){\n Secao secaoselect = (Secao) tblSecoes.getValueAt(tblSecoes.getSelectedRow(), 0);\n\n if (secoes.contains(secaoselect)){\n secoes.remove(secaoselect);\n secoesapagar.add(secaoselect);\n }\n\n JOptionPane.showMessageDialog(RootPane, \"Seção Removida com Sucesso!\");\n adicionasecaotable();\n }\n } else {\n JOptionPane.showMessageDialog(RootPane, \"Selecione uma Seção Por Favor!\");\n }\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Command\n\tpublic void eliminar(@BindingParam(\"documento\") TipoDocumento documentoSeleccionada){\n\n\t\tif (documentoSeleccionada == null) {\n\t\t\tClients.showNotification(\"Seleccione una opción de la lista.\");\n\t\t\treturn; \n\t\t}\n\n\t\tMessagebox.show(\"Desea eliminar el registro seleccionado?\", \"Confirmación de Eliminación\", Messagebox.YES | Messagebox.NO, Messagebox.QUESTION, new EventListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\tif (event.getName().equals(\"onYes\")) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().begin();\n\t\t\t\t\t\tdocumentoSeleccionada.setEstado(\"I\");\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().merge(documentoSeleccionada);\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().commit();;\n\t\t\t\t\t\t// Actualiza la lista\n\t\t\t\t\t\t//BindUtils.postGlobalCommand(null, null, \"Categoria.buscarPorPatron\", null);\n\t\t\t\t\t\tbuscar();\n\t\t\t\t\t\tClients.showNotification(\"Transaccion ejecutada con exito.\");\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().rollback();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t}", "@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}", "public void excluir(){\n\t\tSystem.out.println(\"\\n*** Excluindo Registro\\n\");\n\t\ttry{\n\t\t\tpacienteService.excluir(getPaciente());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(\"Registro Deletado com Sucesso!!\")); //Mensagem de validacao \n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(\"** Erro ao deletar: \"+e.getMessage());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Erro ao deletar o paciente: \"+e.getMessage(), \"\")); //Mensagem de erro \n\t\t\t\n\t\t}\n\t}", "private void eliminar(HttpServletRequest request, HttpServletResponse response) {\n\t\n\t\ttry {\n\t\t\tString numero =request.getParameter(\"idCliente\");//leo parametro numeroHabitacion de la vista\n\t\t\t\n\t\t\t//llamo a un metodo del modelo para que elimine el editorial de la bd y consulto si se pudo eliminar\n\t\t\tif(modelo.eliminarCliente(numero) > 0) {\n\t\t\t\t\n\t\t\t\t//paso un atributo de exito si se pudo eliminar\n\t\t\t\trequest.setAttribute(\"exito\", \"Cliente eliminado exitosamente\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//paso un atributo de fracaso. \n\t\t\t\trequest.setAttribute(\"fracaso\", \"No se puede eliminar Cliente\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//redirecciono sin importar si se pudo o no eliminar\n\t\t\trequest.getRequestDispatcher(\"/clientes.do?op=listar\").forward(request, response);\n\t\t} catch (SQLException | ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t}", "private void eliminarProducto(HttpServletRequest request, HttpServletResponse response) {\n\t\tString codArticulo = request.getParameter(\"cArticulo\");\n\t\t// Borrar producto de la BBDD\n\t\ttry {\n\t\t\tmodeloProductos.borrarProducto(codArticulo);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Volver al listado con la info actualizada\n\t\tobtenerProductos(request, response);\n\n\t}", "public void eliminarLista(){\n //se define la lista seleccionada y se elimina\n ListaCompras listaSeleccionada = ListasComprasTabla.getSelectionModel().getSelectedItem();\n if (listaSeleccionada!=null) {\n ListasComprasTabla.getItems().remove(listaSeleccionada);\n }else {\n System.out.println(\"No hay lista seleccionada\");\n }\n }", "private void supprimerPion(Position unePosition) {\n\t\tmesPions.remove(unePosition); \n }", "public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}", "@Test\n\tpublic void testRemovePregunta(){\n\t\tej1.addPregunta(pre);\n\t\tej1.removePregunta(pre);\n\t\tassertFalse(ej1.getPreguntas().contains(pre));\n\t}", "public void eliminar (String idSalida) {\r\n String query = \"UPDATE actividad SET eliminar = true WHERE id_salida = \\\"\" + idSalida + \"\\\"\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad eliminada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void removeClicked(View v){\n android.util.Log.d(this.getClass().getSimpleName(), \"remove Clicked\");\n String delete = \"delete from partner where partner.name=?;\";\n try {\n PartnerDB db = new PartnerDB((Context) this);\n SQLiteDatabase plcDB = db.openDB();\n plcDB.execSQL(delete, new String[]{this.selectedPartner});\n plcDB.close();\n db.close();\n }catch(Exception e){\n android.util.Log.w(this.getClass().getSimpleName(),\" error trying to delete partner\");\n }\n this.selectedPartner = this.setupselectSpinner1();\n this.loadFields();\n }", "public boolean RemoveSport(Sport sport){\n\n boolean noError = true;\n\n\n\n try {\n ConnectDB();\n\n\n preparedStatement=connection.prepareStatement(\"SELECT t_clubs.FK_Sport FROM t_clubs WHERE t_clubs.FK_Sport=?\");\n preparedStatement.setInt(1, sport.getPk_sport());\n result = preparedStatement.executeQuery();\n\n if(result.next()) {\n JOptionPane pane = new JOptionPane(\"le sport est affilié a un club impossible de le supprimer\", JOptionPane.ERROR_MESSAGE);\n JDialog dialog = pane.createDialog(null,\"error\");\n dialog.setAlwaysOnTop(true);\n dialog.setVisible(true);\n dialog.dispose();\n\n }else{\n\n preparedStatement = connection.prepareStatement(\"Delete FROM `t_sports` WHERE `PK_Sport`= ? \");\n preparedStatement.setInt(1, sport.getPk_sport());\n preparedStatement.executeUpdate();}\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n noError = false;\n } finally {\n CloseDB();\n }\n\n\n\n\n\n\n return noError;\n }", "public void deleteDAmtInvoValidAmount()\r\n {\r\n this._has_dAmtInvoValidAmount= false;\r\n }", "public boolean supprimerCompte(int id);", "public synchronized void eliminar(int nombre){\n\n elemento.remove(nombre);\n \n }", "@FXML\n public void excluiCidade(){\n\t\tCidade sel = tblCidade.getSelectionModel().getSelectedItem();\n\t\t\n \tif(sel!=null){\n \t\tif(Mensagens.msgExcluir()){\n \t\t\tsel.exclui(conn);\n \t\t\tattTblCidade();\n \t\t\tlimpaCidade();\n \t\t\tMensagens.msgInformacao(\"Sucesso\", \"Cidade excluída com êxito\");\n \t\t}else\n \t\t\tMensagens.msgInformacao(\"Cancelado\", \"Cidade não excluída\");\n \t}else\n \t\tMensagens.msgErro(\"FALHA\", \"Selecione uma Cidade\");\n }", "public static void deleteRam(String value){\r\n try {\r\n \r\n if(singleton.ram == 0){\r\n resetTableRam();\r\n }\r\n\r\n ResultSet rs = null;\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n for( int i=0; i<home_RegisterUser.panelRam.getComponentCount();i++) {\r\n if( home_RegisterUser.panelRam.getComponent(i) instanceof JCheckBox){\r\n JCheckBox checkBox = (JCheckBox)home_RegisterUser.panelRam.getComponent(i);\r\n if(checkBox.getToolTipText().equals(value)) {\r\n if(checkBox.getActionCommand().contains(\"ramType\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND tipo = '\"+value+\"'\");\r\n }else if(checkBox.getActionCommand().contains(\"ramCap\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND capacidad = \"+Integer.parseInt(value)+\"\");\r\n }else if(checkBox.getActionCommand().contains(\"ramVel\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND velocidad = \"+Integer.parseInt(value)+\"\");\r\n }\r\n }\r\n }\r\n }\r\n if(rs!=null){\r\n while(rs.next()){\r\n for(int i=0; i<singleton.dtm.getRowCount();i++){\r\n if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs.getInt(\"codigo\")){\r\n singleton.dtm.removeRow(i);\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(singleton.dtm.getRowCount() == 0){\r\n singleton.ram = 0;\r\n resetTableRam();\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String nama = String.valueOf(cbbNama.getSelectedItem());\n String pilihan2 = String.valueOf(cbbPilihan2.getSelectedItem());\n //dapetin nama nama table\n LinkedList<String> arrTable = DataAksesAdmin.listTable();\n //linked list buat nampung yg mau dihapus\n LinkedList<String> forDelete = new LinkedList<>();\n //pindahin ke array kalo ada namanya\n for(int i = 0; i < arrTable.size(); i++){\n for(int j = 1; j < 15; j++){\n if(arrTable.get(i).equals(nama+j)){\n forDelete.add(arrTable.get(i));\n }\n }\n }\n DataAksesAdmin.delUser(nama, pilihan2, forDelete);\n JOptionPane.showMessageDialog(null, \"Data Berhasil Dihapus!\");\n }", "public String vistaEliminar(String codaloja, String codactiv) {Alojamiento alojbusc = alojamientoService.find(codaloja);\n// Actividad actbusc = actividadService.find(codactiv);\n// Alojamiento_actividad aloact = new Alojamiento_actividad();\n// Alojamiento_actividad_PK aloact_pk = new Alojamiento_actividad_PK();\n// aloact_pk.setActividad(actbusc);\n// aloact_pk.setAlojamiento(alojbusc);\n// aloact.setId(aloact_pk);\n// \n// actividadAlojamientoService.remove(aloact);\n// \n// \n// \n return \"eliminarAsignacion\";\n }", "@Override\r\n\tpublic void eliminar(Long idRegistro) {\n\t\t\r\n\t}", "@Override\n\tpublic boolean eliminaRisposta(Long id) {\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\trisposte.remove(id);\n\t\tdb.commit();\n\t\t\n\t\tif(!risposte.containsKey(id))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}", "public void eliminarDetalleVenta(DetalleVenta dv) {\r\n\t\trestarTotalVenta(dv);\r\n\t\tinventariosEditar.remove(inventarioProductoComprar);\r\n\t\tinventarioProductoComprar.setCantidad(inventarioProductoComprar.getCantidad() + dv.getCantidad());\r\n\t\tproductosCompra.remove(dv);\r\n\t\t\r\n\t\treload();\r\n\t}", "public void deletar() {\n if(Sessao.isConfirm()){\n Usuario use = new Usuario();\n use.setId(Sessao.getId());\n Delete_Banco del = new Delete_Banco();\n del.Excluir_Usuario(use);\n this.setVisible(false);\n Sessao.setId(0);\n tela_Principal prin = Sessao.getPrin();\n prin.atualizar_Tela();\n }\n }", "public void eliminarEnIndice(int indice){\n if(irAIndice(indice)){\n eliminarBodegaActual();\n }\n }", "public void removeEmpleado(){\n //preguntar al empleado si realmente eliminar o no al objeto empleado\n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, \"<html>\"\n + \"¿Deseas remover el empleado del sistema?<br> \"\n + \"<b>OJO: EL EMPLEADO SERÁ ELIMINADO PERMANENTEMENTE.</b> \"\n + \"</html>\",\n new Callback<Boolean>(){\n @Override\n public void execute(Boolean[] answer) {\n //si la respuesta fue YES=true, remover al empleado y limpiar el formulario\n if(answer[0]){\n mEmpleado.remove();\n clear();\n }\n //si la respuesta es NO=false, no hacer nada\n }\n }\n );\n \n }", "public void eliminar(ListaConArreglo nodosMaquina){\n\t\tmodAdmin.eliminar( nodosMaquina);\n\t\tif(!ModAdmin.existe){\n\t\t\tSystem.err.println(\"El dominio indicado no existe en la base\");\n\t\t}\n\t\tModAdmin.existe=false;\n\t}", "@Override\n\tpublic boolean preDelete() {\n\t\teliminarCuentasHijas(instance);\n\t\treturn true;\n\t}", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "@Override\n\t\tpublic void eliminar() {\n\t\t\tutilitario.getTablaisFocus().eliminar();\n\t\t}", "public void removeFromLab(String lid) throws SQLException {\r\n\t\t\tthis.stmt=this.conn.createStatement();\r\n\t\t\t\r\n\t\t\tString deleteQuery=\"delete from \"+Subject.LAB_INFO_TABLE_NAME+\" where \"+Subject.LAB_ID+\"='\"+lid+\"'\";\r\n\t\t\tint i=stmt.executeUpdate(deleteQuery);\r\n\t\t\t/*if(i>0)\r\n\t\t\t\tSystem.out.println(\"Removed-> \"+lid);\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"NotAvailabel-> \"+lid);*/\r\n\t\t\t\r\n\t\t\tstmt.close();\r\n\t\t}", "public void eliminarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdGrado(17);\n \tString respuesta = negocio.eliminarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public void removerFinal() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n ElementoLista elementoTemporarioAnteriorAtual = this.primeiro;\n ElementoLista elementoTemporarioAtual = this.primeiro.irParaProximo();\n for (int i = 1; i < totalElementos(); i++) {\n elementoTemporarioAnteriorAtual = elementoTemporarioAtual;\n elementoTemporarioAtual = elementoTemporarioAtual.irParaProximo();\n }\n\n this.ultimo = elementoTemporarioAnteriorAtual;\n this.ultimo.definirProximo(null);\n this.total--;\n }\n //this.ultimo = this.ultimo.irParaAnterior();\n //this.ultimo.definirProximo(null);\n }", "public void eliminar(String sentencia){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(sentencia);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public void eliminarMarca(String nombreMarca) throws Exception {\n if (this.marcas.containsKey(nombreMarca)) {\r\n this.generarAuditoria(\"BAJA\", \"MARCA\", nombreMarca, \"\", GuiIngresar.getUsuario());\r\n this.marcas.remove(nombreMarca);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"La marca no Existe\");\r\n }\r\n //return retorno;\r\n }", "@Override\r\n\tpublic void eliminar(IndicadorActividadEscala iae) {\n\r\n\t}", "public boolean iliskMasaSil(int kullanici_no) {\n baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n String sorgu3 = \"delete ilisk_masa from ilisk_masa where kullanici_no=\" + kullanici_no + \"\";\r\n ps = vb.con.prepareStatement(sorgu3);\r\n ps.executeUpdate();\r\n vb.con.close();\r\n return true;\r\n } catch (Exception e) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, e);\r\n try {\r\n vb.con.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }\r\n }", "public void eliminarNovedadesRegistradas(Integer codigoCompania, Collection<Long> codigosProcesoLogistico) throws SICException;", "@Override\n\tpublic int deleteVisitaTecnica(String cod) {\n\t\treturn 0;\n\t}", "boolean excluir(long id);", "public void removeBydescricao(String descricao);", "public boolean eliminar() {\r\n if (colaVacia()) {\r\n return false;\r\n }\r\n\r\n if (ini == fin) {\r\n ini = fin = -1;\r\n } else {\r\n ini++;\r\n }\r\n\r\n return true;\r\n }", "@Override\n public void onClick(View view) {\n long result = typeBookDAO.deleteTypeBook(typeBook.id);\n\n if (result < 0) {\n\n Toast.makeText(context,\"Xoa ko thanh cong!!!\",Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(context,\"Xoa thanh cong!!!\",Toast.LENGTH_SHORT).show();\n // xoa typebook trong arraylist\n arrayList.remove(position);\n\n // f5 adapter\n notifyDataSetChanged();\n\n }\n\n\n\n }", "public static void apagarProduto(){\n if(ListaDProduto.size() == 0){\n SaidaDados(\"Nehum produto cadastrado!!\");\n return;\n }\n \n String pesquisarNome = Entrada(\"Informe o nome do produto que deseja deletar: \");\n for(int i =0; i < ListaDProduto.size(); i++){\n \n Produto produtoProcurado = ListaDProduto.get(i);\n \n if(pesquisarNome.equalsIgnoreCase(produtoProcurado.getNome())){\n ListaDProduto.remove(i);\n SaidaDados(\"Produto deletado com sucesso!!\");\n }\n \n }\n \n }", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}" ]
[ "0.6371611", "0.62223923", "0.6205256", "0.617476", "0.6150706", "0.6138213", "0.61208004", "0.6068492", "0.60669893", "0.600997", "0.5958757", "0.5944926", "0.59431976", "0.5931183", "0.5929796", "0.59290236", "0.59207684", "0.5896344", "0.58859444", "0.5873067", "0.5867039", "0.58651465", "0.5865121", "0.58617634", "0.5854191", "0.58358353", "0.58108187", "0.58080524", "0.58048207", "0.5781879", "0.5781236", "0.5767483", "0.5759165", "0.5757147", "0.5740434", "0.57371444", "0.57271314", "0.57241046", "0.5723165", "0.5718134", "0.5710297", "0.5704892", "0.5688409", "0.568838", "0.5681171", "0.56798047", "0.5679535", "0.5675173", "0.5673726", "0.56718105", "0.56694263", "0.56674916", "0.5666747", "0.5664638", "0.5662518", "0.5655747", "0.56390584", "0.5631875", "0.56299543", "0.5617383", "0.5613789", "0.56130177", "0.56114054", "0.5611125", "0.56095904", "0.5602884", "0.56013244", "0.5581196", "0.55783457", "0.5573536", "0.557009", "0.5568235", "0.556478", "0.5559469", "0.5557007", "0.55514383", "0.5547736", "0.5547527", "0.5546515", "0.5545407", "0.55412215", "0.5533317", "0.55314976", "0.5529259", "0.55290645", "0.5522797", "0.55223656", "0.5522011", "0.552078", "0.55199975", "0.5514412", "0.5509608", "0.55054903", "0.55046576", "0.55016756", "0.5494511", "0.5492822", "0.5482523", "0.54786456", "0.54786116", "0.5472824" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onResume() { super.onResume(); setProfileImage(); }
{ "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 getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "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.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
set up appium File classpathRoot = new File(System.getProperty("user.dir")); //? File appDir = new File(classpathRoot, "../../../apps/ContactManager"); //folder File app = new File("D:\\Projects\\Zappy\\ZappyBuilds", "apprelease.apk"); //testAppName new File("D:\\Projects\\Zappy\\ZappyBuilds\\ContactManager.apk");
@Before public void setUp() throws Exception { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName", "Google Nexus 5"); capabilities.setCapability("platformVersion", "4.4.4"); capabilities.setCapability("udid", "192.168.27.101:5555"); capabilities.setCapability("app", "D:\\Projects\\Zappy\\ZappyBuilds\\app-release.apk"); // capabilities.setCapability("appPackage", "com.example.android.contactmanager");//packageName capabilities.setCapability("appActivity", "com.compareking.zappy.ui.activity.UnauthorizedActivity"); //activi driver = new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeClass\n public static void startApp() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"platformName\", \"Android\");\n caps.setCapability(\"platformVersion\", \"5.0.1\"); //Replace this with your Android version\n caps.setCapability(\"deviceName\", \"Samsung Galaxy\"); //Replace this with your simulator/device \n Path currentRelativePath = Paths.get(\"\");\n String path = currentRelativePath.toAbsolutePath().toString() + \"/src/main/resources/Evernote.apk\";\n caps.setCapability(\"app\", path); //Replace this with app path in your system\n \n// caps.setCapability(\"appActivity\", \"com.evernote.ui.HomeActivity\");\n// caps.setCapability(\"appPackage\", \"com.evernote\");\n// appInstalled = true;\n\n AppiumServer server = new AppiumServer(serverAddress,port);//setup Appium server \n server.startAppiumServer();//open Appium server automatically\n \n driver = new AndroidDriver(server.getService(),caps);\n driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS);\n }", "@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithRelativeApplicationPath() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setApp(\"data/core/app.apk\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), \"\");\r\n\t\tlogger.info(\"app path: \" + capa.getCapability(\"app\"));\r\n\t\tAssert.assertTrue(capa.getCapability(\"app\").toString().contains(\"/data/core/app.apk\"));\r\n\t}", "@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithAbsoluteApplicationPath() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tString path = new File(\"data/core/app.apk\").getAbsolutePath();\r\n\t\tcontext.setApp(path);\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), \"\");\r\n\t\tAssert.assertEquals(capa.getCapability(\"app\"), path.replace(\"\\\\\", \"/\"));\r\n\t}", "@Test\n\tpublic void LaunchAppTest() throws MalformedURLException {\n\n\t\t// Appium Code to Launch the Calculator App without .apk File \n\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"emulator-5554\");\n\t\tcapabilities.setCapability(\"appPackage\", \"com.android.calculator2\");\n\t\tcapabilities.setCapability(\"appActivity\", \"com.android.calculator2.Calculator\");\n\t\tcapabilities.setCapability(\"autoLaunch\", true);\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(\n\t\t\t\tnew URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n\t\tdriver.quit();\n\t}", "private void intializeAppiumDriver() {\n File app = new File(\"src/main/resources\", CommonUtils.getCentralData(\"App\"));\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, CommonUtils.getCentralData(\"PlatformName\"));\n capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, CommonUtils.getCentralData(\"PlatformVersion\"));\n capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, CommonUtils.getCentralData(\"DeviceName\"));\n if (IS_ANDROID) {\n capabilities.setCapability(APPLICATION_NAME, app.getAbsolutePath());\n capabilities.setCapability(APP_PACKAGE, CommonUtils.getCentralData(\"AppPackage\"));\n capabilities.setCapability(APP_ACTIVITY, CommonUtils.getCentralData(\"AppActivity\"));\n }\n if (IS_IOS) {\n capabilities.setCapability(AUTOMATION_NAME, IOS_XCUI_TEST);\n capabilities.setCapability(\"app\", app.getAbsolutePath());\n }\n capabilities.setCapability(FULL_RESET, CommonUtils.getCentralData(\"FullReset\"));\n capabilities.setCapability(NO_RESET, CommonUtils.getCentralData(\"NoReset\"));\n capabilities.setCapability(\"udid\", CommonUtils.getCentralData(\"UDID\"));\n capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, CommonUtils.getCentralData(\"WaitTimeoutInSeconds\"));\n\n try {\n driver = new AppiumDriver(new URL(CommonUtils.getCentralData(\"URL\")), capabilities);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws Exception\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter contact name to call as it is you saved in ur contacts list\");\n\t\tString contactname=sc.nextLine();\n\t\tsc.close();\n\t\t//Start appium server\n\t\tRuntime.getRuntime().exec(\"cmd.exe /c start cmd.exe /k \\\"appium -a 127.0.0.1 -p 4723\\\"\");\n\t\t//Get address of appium Server\n\t\tURL u=new URL(\"http://127.0.0.1:4723/wd/hub\");\n\t\t//Details of app and device(AVD)\n\t\tDesiredCapabilities dc=new DesiredCapabilities();\n\t\tdc.setCapability(CapabilityType.BROWSER_NAME,\"\");\n\t\tdc.setCapability(\"deviceName\",\"ce081718334a5b0b05\");\n\t\tdc.setCapability(\"platformName\",\"android\");\n\t\tdc.setCapability(\"platformVersion\",\"8.0.0\");\n\t\tdc.setCapability(\"appPackage\",\"com.samsung.android.contacts\");\n\t\tdc.setCapability(\"appActivity\",\"com.android.contacts.activities.PeopleActivity\");\n\t\t//Create driver object\n\t\tAndroidDriver driver;\n\t\twhile(2>1)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdriver=new AndroidDriver(u,dc);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t//App Automation\n\t\ttry\n\t\t{\n\t\t\tWebDriverWait wait=new WebDriverWait(driver,5);\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@content-desc='Create contact']\")));\n\t\t\twhile(2>1)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@text='\"+contactname+\"']\")));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch(Exception exe)\n\t\t\t\t{\n\t\t\t\t\t//Get device dimensions\n\t\t\t\t\tint width=driver.manage().window().getSize().getWidth();\n\t\t\t\t\tint height=driver.manage().window().getSize().getHeight();\n\t\t\t\t\t//Vertical Swipe Logic\n\t\t\t\t\tPointerInput finger=new PointerInput(PointerInput.Kind.TOUCH,\"finger\");\n\t\t\t\t\tSequence swipe=new Sequence(finger,1);\n\t\t\t\t\tInteraction i1=finger.createPointerMove(Duration.ofMillis(0),PointerInput.Origin.viewport(),width/2,(int) (height*0.8));\n\t\t\t\t\tswipe.addAction(i1);\n\t\t\t\t\tInteraction i2=finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg());\n\t\t\t\t\tswipe.addAction(i2);\n\t\t\t\t\tInteraction i3=finger.createPointerMove(Duration.ofMillis(200),PointerInput.Origin.viewport(),width/2,(int) (height*0.3));\n\t\t\t\t\tswipe.addAction(i3);\n\t\t\t\t\tInteraction i4=finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg());\n\t\t\t\t\tswipe.addAction(i4);\n\t\t\t\t\tdriver.perform(Arrays.asList(swipe));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Get element dimensions\n\t\t\tMobileElement ele=(MobileElement) driver.findElement(By.xpath(\"//*[@text='\"+contactname+\"']/parent::*/parent::*\"));\n\t\t\tPoint source=ele.getCenter();\n\t\t\tint w=ele.getSize().getWidth();\n\t\t\tint h=ele.getSize().getHeight();\n\t\t\tint x=source.x;\n\t\t\tint y=source.y;\n\t\t\t//Horizontal Swipe Logic\n\t\t\tPointerInput finger=new PointerInput(PointerInput.Kind.TOUCH,\"finger\");\n\t\t\tSequence swipe=new Sequence(finger,1);\n\t\t\tInteraction i1=finger.createPointerMove(Duration.ofMillis(0),PointerInput.Origin.viewport(),(int) (x-w/2*0.8),y);\n\t\t\tswipe.addAction(i1);\n\t\t\tInteraction i2=finger.createPointerDown(PointerInput.MouseButton.LEFT.asArg());\n\t\t\tswipe.addAction(i2);\n\t\t\tInteraction i3=finger.createPointerMove(Duration.ofMillis(1000),PointerInput.Origin.viewport(),(int) (x+w/2*0.8),y);\n\t\t\tswipe.addAction(i3);\n\t\t\tInteraction i4=finger.createPointerUp(PointerInput.MouseButton.LEFT.asArg());\n\t\t\tswipe.addAction(i4);\n\t\t\tdriver.perform(Arrays.asList(swipe));\n\t\t\tThread.sleep(15000);\n\t\t\tdriver.findElementByAndroidUIAutomator(\"new UiSelector().description(\\\"End call\\\")\").click();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\tThread.sleep(5000);\n\t\t//Close app\n\t\tdriver.closeApp();\n\t\t//Stop appium server\n\t\tRuntime.getRuntime().exec(\"taskkill /F /IM node.exe\");\n\t\tRuntime.getRuntime().exec(\"taskkill /F /IM cmd.exe\");\n\t}", "@BeforeMethod\npublic void setUp() throws MalformedURLException, InterruptedException{\n\t\n\t File classpathRoot = new File(System.getProperty(\"user.dir\"));\n\t File appDir = new File(classpathRoot, \"/Apps/Pazo/\");\n\t File app = new File(appDir, \"app-ppz-debug.apk\");\n\t DesiredCapabilities capabilities = new DesiredCapabilities();\n\t capabilities.setCapability(CapabilityType.BROWSER_NAME, \"\");\n\t capabilities.setCapability(\"deviceName\", \"MI\");\n\t capabilities.setCapability(\"platformVersion\", \"7.0\");\n\t capabilities.setCapability(\"platformName\", \"Android\");\n\t capabilities.setCapability(\"app\", app.getAbsolutePath());\n\t capabilities.setCapability(\"appPackage\", \"com.pazo.ppz\");\n\t capabilities.setCapability(\"appPackage1\", \"com.google.android.packageinstaller\");\n\t capabilities.setCapability(\"appActivity\", \"com.tagtual.trackd.Activities.Splash\");\n\t capabilities.setCapability(\"appActivity1\", \"com.tagtual.trackd.Activities.LicenceLogin\");\n\t capabilities.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS,true);\n\t capabilities.setCapability(\"unicodeKeyboard\", true);\n\t capabilities.setCapability(\"resetKeyboard\", true);\n\t try{\n\t driver = new AppiumDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t }\n\t catch (ExceptionInInitializerError error){\n\t System.out.println(error.getCause());\n\t System.out.println(error.getMessage());\n\t System.out.println(error.getLocalizedMessage());\n\t System.out.println(error.getStackTrace().toString());\n\n\t }\n\t driver.manage().timeouts().pageLoadTimeout(80, TimeUnit.SECONDS);\n\t driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);\n\t// Thread.sleep(10000);\n\t\n}", "public static void main(String[] args) throws MalformedURLException {\n\t\tFile appDir = new File(\"src/test/java\");\n\t\tFile app = new File(appDir, \"com.google.android-2.3.apk\");\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t//capabilities.setCapability(\"browserName\", \"Chrome\");\n\n\t\t//capabilities.setCapability(\"device\",\"Android\");\n\t\tcapabilities.setCapability(\"deveiceName\",\"SimulatorGalaxy\" );\t\t\n\t\tcapabilities.setCapability(\"platformVersion\", \"5.0.1\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"app\",app.getAbsolutePath());\n\t\tcapabilities.setCapability(\"appPackage\",\"com.android.chrome\");\n\t\tcapabilities.setCapability(\"appActivity\",\"com.google.android.apps.chrome.\");\n\t\tdriver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\t\n\n\t\t/*driver.get(\"Url\");\n\t\tdriver.findElement(By.id(\"menu_projects\")).click();\n\t\tdriver.findElement(By.id(\"menu_about\")).click();\n\t\tdriver.findElement(By.id(\"menu_support\")).click();\n\t\tdriver.findElement(By.id(\"menu_documentation\")).click();\n\t\tdriver.findElement(By.id(\"menu_download\")).click();\n\n\t\tdriver.quit();*/\n\t}", "@BeforeClass\n\tpublic void appLaunch() throws IOException\n\t{\n\n\t\t/*String Appium_Node_Path=\"C:/Program Files (x86)/Appium/node.exe\"; \n\t\tString Appium_JS_Path=\"C:/Program Files (x86)/Appium/node_modules/appium/bin/appium.js\"; \n\t\tappiumService = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingPort(4723).usingDriverExecutable(new File(Appium_Node_Path)).withAppiumJS(new File(Appium_JS_Path))); \n\t\tappiumService.start();\n\t\t */\t\t\t\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM,Platform.ANDROID);\n\t\tcapabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT,3000);\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"PLATFORMNAME\"));\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"DeviceName\"));\n\t\tcapabilities.setCapability(MobileCapabilityType.VERSION,Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"PLATFORMVERSION\"));\n//\t\tcapabilities.setCapability(\"appPackage\", Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"packageName\"));\n//\t\tcapabilities.setCapability(\"appActivity\",Horoscope_GenericLib.readConfigPropFile(sPropFileName, \"activityName\"));\n\t\t\n\t\t// for testing\n\t\tcapabilities.setCapability(\"appPackage\", \"in.amazon.mShop.android.shopping\");\n\t\tcapabilities.setCapability(\"appActivity\", \"com.amazon.mShop.home.HomeActivity\");;\n\n\n\t\tURL url= new URL(\"http://0.0.0.0:4723/wd/hub\");\n\t\tdriver = new AndroidDriver<WebElement>(url, capabilities);\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t// testing purpose\n\t\tbackButton(driver);\n\t\tbackButton(driver);\n\t\t\n// in.amazon.mShop.android.shopping\n//\tcom.amazon.mShop.sso.SigninPromptActivity\n\n\t}", "public static void main(String[] args) throws MalformedURLException {\n\r\n\t\tDesiredCapabilities cap= new DesiredCapabilities();\r\n\t\tcap.setCapability(\"deviceName\", \"redmi\");\r\n\t\tcap.setCapability(\"platformName\", \"Android\");\r\n\t\t\r\n\t\t //can get from appium server inspector \r\n\t\t cap.setCapability(\"appPackage\",\"org.khanacademy.android\"); \r\n\t\t //Use apkAnalyzer app to get activity\r\n\t\t cap.setCapability(\"appActivity\", \"org.khanacademy.android.ui.library.MainActivity\");\r\n\t\t \r\n\r\n\t\t/*\r\n\t\t * //can get from appium server inspector \r\n\t\t * cap.setCapability(\"appPackage\", \"com.aranah.healthkart.plus\"); //Use apkAnalyzer app to get activity\r\n\t\t * cap.setCapability(\"appActivity\", \"com.aranah.healthkart.home.HomeActivity\");\r\n\t\t */\r\n\t\t/*\r\n\t\t * cap.setCapability(\"appPackage\", \"com.aranah.healthkart.plus\"); //Use\r\n\t\t * apkAnalyzer app to get activity cap.setCapability(\"appActivity\",\r\n\t\t * \"com.aranah.healthkart.home.HomeActivity\");\r\n\t\t */\t//To stop reseting aap\r\n\t\tcap.setCapability(\"noReset\", true);\r\n\r\n\t\tAndroidDriver<WebElement> driver = new AndroidDriver<WebElement>(new URL(\"http://localhost:4723/wd/hub\"), cap);\r\n\r\n\t\tdriver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);\r\n\t\t/*\r\n\t\t * driver.findElementByXPath(\"//*[@text='Health Products']\").click();\r\n\t\t * \r\n\t\t * //UiScrollable class String visibleText = \"Arts and humani\";\r\n\t\t * driver.findElementByAndroidUIAutomator\r\n\t\t * (\"new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(\\\"\"\r\n\t\t * + visibleText + \"\\\").instance(0))\").click();\r\n\t\t * \r\n\t\t */\r\n\t}", "public void androidDriver(String buildPath, String appPkg, String appAct) throws MalformedURLException {\n if (buildPath != \"\") {\n File app = new File(buildPath);\n capabilities.setCapability(\"app\", app.getAbsolutePath());\n }\n\n capabilities.setCapability(\"deviceName\", \"Android-Test\");\n capabilities.setCapability(\"platformName\", \"Android\");\n capabilities.setCapability(\"appPackage\", appPkg);\n capabilities.setCapability(\"appActivity\", appAct);\n capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 10000);\n capabilities.setCapability(\"noReset\", NO_RESET);\n capabilities.setCapability(\"automationName\", \"UiAutomator2\");\n if (System.getProperty(\"device.udid\") != null) {\n capabilities.setCapability(\"udid\", System.getProperty(\"device.udid\"));\n }\n driver = new AndroidDriver(new URL(APPIUM_SERVER_URL), capabilities);\n driver.manage().timeouts().implicitlyWait(DEFAULT_IMPLICIT_WAIT, TimeUnit.SECONDS);\n\n }", "@BeforeClass\npublic void setUp() throws MalformedURLException{\n\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t//capabilities.setCapability(\"BROWSER_NAME\", \"Android\");\n//\tcapabilities.setCapability(\"VERSION\", \"4.4.2\"); \n\tcapabilities.setCapability(\"deviceName\",\"NSM3Y18206000488\");\n\tcapabilities.setCapability(\"udid\",\"NSM3Y18206000488\");\n\tcapabilities.setCapability(\"platformName\",\"Android\");\n capabilities.setCapability(\"appPackage\", \"com.android.chrome\");\n// This package name of your app (you can get it from apk info app)\n\tcapabilities.setCapability(\"appActivity\",\"com.google.android.apps.chrome.Main\"); // This is Launcher activity of your app (you can get it from apk info app)\n//Create RemoteWebDriver instance and connect to the Appium server\n //It will launch the Calculator App in Android Device using the configurations specified in Desired Capabilities\n driver = new AndroidDriver<MobileElement>(new URL(\"http://localhost:4723/wd/hub\"), capabilities);\n \n // PageFactory.initElements(driver, this);\n}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tFile app= new File(\"E:/Testing/Drag_and_Drop/com.mobeta.android.demodslv.apk\");\n\t\t\n\t\t\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(\"deviceName\", \"XT1033\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\t//app details\n\t\tcapabilities.setCapability(\"app\",app.getAbsolutePath());\n\t\t\n\t\t//Appium details\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\n\t\tThread.sleep(12000);\n\t\t\n\t\tif(driver.isAppInstalled(\"com.mobeta.android.demodslv\"))\n\t\t{\n\t\t\tSystem.out.println(\"Successfully Installed\");\n\t\t\t\n\t\t\t//Remove thrugh code\n\t\t\tdriver.removeApp(\"com.mobeta.android.demodslv\");\n\t\t\tThread.sleep(8000);\n\t\t\tSystem.out.println(\"Removed sucessfully\");\n\t\t\t\n\t\t\t\n\t\t\tdriver.installApp(\"E:/Testing/Drag_and_Drop/com.mobeta.android.demodslv.apk\");\n\t\t\tThread.sleep(8000);\n\t\t\tSystem.out.println(\"Again Installed the app\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"NOT Installed the app\");\n\t\t}\n\n\t\t\n\n\t}", "@BeforeClass\npublic void beforeClass() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"deviceName\", \"Xiaomi Redmi Note 5 Pro\");\n caps.setCapability(\"platformName\", \"android\");\n caps.setCapability(\"automationName\", \"UiAutomator2\");\n caps.setCapability(\"appPackage\", \"com.google.android.keep\");\n caps.setCapability(\"appActivity\", \".activities.BrowseActivity\");\n caps.setCapability(\"noReset\", true);\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n \n}", "public void Launch_app() {\n\t\tDesiredCapabilities caps = new DesiredCapabilities();\r\n\t\tcaps.setCapability(\"deviceName\", \"My Phone\");\r\n\t\tcaps.setCapability(\"udid\", \"LE66A06190140096\"); //Give Device ID of your mobile phone\r\n\t\t\r\n\t\t/* caps.setCapability(\"udid\", \"emulator-5556\"); //Give Device ID of your mobile phone\r\n\t\t caps.setCapability(\"app\", \"C:\\\\Users\\\\Blue Otter HP2\\\\Downloads\\\\xemoto_staging_v1.0.0.apk\"); \r\n\t\t caps.setCapability(\"appWaitActivity\", \"*\");\r\n\t\t caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"UiAutomator2\");*/\r\n\t\t\r\n\t\tcaps.setCapability(\"platformName\", \"Android\");\r\n\t\tcaps.setCapability(\"platformVersion\", \"6.0\");\r\n\t\r\n\t\tcaps.setCapability(\"appPackage\", \"org.blueotter.motone\");\r\n\t\tcaps.setCapability(\"appActivity\", \"org.blueotter.motone.feature.main.view.ActivityMain\"); \r\n\t\t\r\n\t\tcaps.setCapability(\"noReset\", \"true\");\r\n\t\t\r\n\t\t//Instantiate Appium Driver\r\n\t\ttry {\r\n\t\t\t\t driver = new AndroidDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), caps);\t\t\r\n\r\n\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS) ;\r\n\t\tSystem.out.println(\"Launch motone successful!\");\r\n\r\n \t}", "RemoteWebDriver getDriver(String appName, String appPackage, String appActivity, String deviceName,\n\t\t\tString fileName) {\n\t\tDesiredCapabilities androidDcap = new DesiredCapabilities();\n\t\tandroidDcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"UIAutomator2\");\n\t\tandroidDcap.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Android\");\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS, true);\n\t\tandroidDcap.setCapability(MobileCapabilityType.NO_RESET, true);\n\t\tandroidDcap.setCapability(MobileCapabilityType.FULL_RESET, false);\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.NO_SIGN, true);\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.APP_WAIT_DURATION, 120);\n\t\tandroidDcap.setCapability(\"deviceName\", deviceName);\n\t\tandroidDcap.setCapability(\"browserName\", \"\");\n\t\tandroidDcap.setCapability(\"newCommandTimeout\", 1500);\n\t\tandroidDcap.setCapability(\"appPackage\", appPackage);\n\t\tandroidDcap.setCapability(\"appActivity\", appActivity);\n\t\tandroidDcap.setCapability(\"autoAcceptAlerts\", true);\n\t\tandroidDcap.setCapability(\"autoDismissAlerts\", true);\n\t\tandroidDcap.setCapability(\"app\", System.getProperty(\"user.dir\") + \"/src/main/resources\" + fileName);\n\t\ttry {\n\t\t\tif (System.getProperty(\"location\").equalsIgnoreCase(\"local\")) {\n\t\t\t\tdriver = new AndroidDriver<>(new URL(\"http://127.0.0.1:4651/wd/hub\"), androidDcap);\n\t\t\t\tlogger.info(\"Session ID of Android: \" + driver.getSessionId());\n\t\t\t} else if (System.getProperty(\"location\").equalsIgnoreCase(\"remote\")) {\n\t\t\t\tdriver = new AndroidDriver<>(new URL(PropertyHelper.getProperties(\"REMOTE_HUB_URL\")), androidDcap);\n\t\t\t\tlogger.info(\"Session ID of Android: \" + driver.getSessionId());\n\t\t\t}\n\t\t} catch (WebDriverException e) {\n\t\t\tlogger.error(\"Driver instantiating failed or app is not installed\", e);\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.error(e);\n\t\t}\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\tDriverFactory.getDriverPool().put(appName, driver);\n\t\treturn driver;\n\t}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\tString deviceName = \"VCan\";\r\n\t\tString platformVersion = \"4.4.2\";\r\n\t\tString apkName = \"微博.apk\";\r\n\t\tString appActivity = \"com.sina.weibo.SplashActivity\";\r\n\t\tString AppiumServerIP = \"http://127.0.0.1:4723/wd/hub\";\r\n\t\tAndroidDriver driver;\r\n\t\tFile apk = new File(System.getProperty(\"user.dir\")+File.separator+\"apps\"+File.separator+apkName);\r\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\t\tcapabilities.setCapability(\"deviceName\", deviceName);\r\n\t\tcapabilities.setCapability(\"platformVersion\", platformVersion);\r\n\t\tcapabilities.setCapability(\"app\", apk);\r\n\t\tcapabilities.setCapability(\"appActivity\", appActivity);\r\n\t\tcapabilities.setCapability(\"noSign\", true);\r\n\t\tcapabilities.setCapability(\"noReset\", true);\r\n\t\tdriver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"),capabilities);\r\n\t\tThread.sleep(3000);\r\n\t\tSystem.out.println(\"App启动等待时间\");\r\n\t\tThread.sleep(4000);\r\n\t\tdriver.findElementById(\"com.sina.weibo:id/plus_icon\").click();\r\n\t\tdriver.findElementById(\"com.sina.weibo:id/pop_control_bar_front_close_img\").click();\r\n\t\tThread.sleep(2000);\r\n\t\tdriver.close();\r\n\t\tdriver.quit();\r\n\t}", "void installApp(String appPath);", "@BeforeTest\n public void setUp() throws Exception {\n\t \n appiumStop();\n // Start appium server.\n appiumStart();\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setCapability(\"deviceName\", \"Android Emulator\");\n capabilities.setCapability(\"browserName\", \"Android\");\n capabilities.setCapability(\"platformVersion\", \"6.0\");\n capabilities.setCapability(\"platformName\", \"Android\");\n capabilities.setCapability(\"appPackage\", \"com.hmh.api\");\n capabilities.setCapability(\"appActivity\", \"com.hmh.api.ApiDemos\");\n driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n }", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tFile app= new File(\"D:\\\\Testing\\\\Drag_drop\\\\com.mobeta.android.demodslv.apk\");\n\t\t\n\t\t//Launch app\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\t//device details\n\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\tcapabilities.setCapability(\"app\", app.getAbsolutePath());\n\t\t\n\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\n\t\t//wait\n\t\tThread.sleep(4000);\n\t\t\n\t\tif(driver.isAppInstalled(\"com.mobeta.android.demodslv\"))\n\t\t{\n\t\t\tSystem.out.println(\"App installed Successfully\");\n\t\t\tThread.sleep(8000);\n\t\t\t\n\t\t\tdriver.removeApp(\"com.mobeta.android.demodslv\");\n\t\t\tSystem.out.println(\"Removed the app\");\n\t\t\tThread.sleep(8000);\n\t\t\t\n\t\t\tdriver.installApp(\"D:\\\\Testing\\\\Drag_drop\\\\com.mobeta.android.demodslv.apk\");\n\t\t\tSystem.out.println(\"App installed again\");\n\t\t\tThread.sleep(8000);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"NOT installed the app\");\n\t\t}\n\t\n\t}", "public static void main(String[] args) throws MalformedURLException {\n\t\tFile src = new File(\"src\");\r\n\t\tFile appsrc = new File(src,\"ApiDemos-debug.apk\");\r\n\t\t\r\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\r\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Device\");\r\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME,MobilePlatform.ANDROID);\r\n\t\tcap.setCapability(MobileCapabilityType.APP, appsrc.getAbsolutePath());\r\n\t\t\r\n\t\tAndroidDriver driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"),cap);\r\n\t\t\r\n\t}", "public void startAppiumServer(String os) throws ExecuteException, IOException, InterruptedException {\n if (os.contains(\"windows\")) {\n CommandLine command = new CommandLine(\"cmd\");\n command.addArgument(\"/c\");\n command.addArgument(\"C:/Program Files/nodejs/node.exe\");\n command.addArgument(\"C:/Appium/node_modules/appium/bin/appium.js\");\n command.addArgument(\"--address\", false);\n command.addArgument(\"127.0.0.1\");\n command.addArgument(\"--port\", false);\n command.addArgument(\"4723\");\n command.addArgument(\"--full-reset\", false);\n\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000);\n } else if (os.contains(\"mac\")) {\n CommandLine command = new CommandLine(\"/Applications/Appium.app/Contents/Resources/node/bin/node\");\n command.addArgument(\"/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js\", false);\n command.addArgument(\"--address\", false);\n command.addArgument(\"127.0.0.1\");\n command.addArgument(\"--port\", false);\n command.addArgument(\"4723\");\n command.addArgument(\"--full-reset\", false);\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000);\n } else if (os.contains(\"linux\")) {\n //Start the appium server\n System.out.println(\"ANDROID_HOME : \");\n System.getenv(\"ANDROID_HOME\");\n //\tSystem.out.println(\"PATH :\" +System.getenv(\"PATH\"));\n CommandLine command = new CommandLine(\"/bin/bash\");\n command.addArgument(\"-c\");\n command.addArgument(\"~/.linuxbrew/bin/node\");\n command.addArgument(\"~/.linuxbrew/lib/node_modules/appium/lib/appium.js\", true);\n DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n DefaultExecutor executor = new DefaultExecutor();\n executor.setExitValue(1);\n executor.execute(command, resultHandler);\n Thread.sleep(5000); //Wait for appium server to start\n\n } else {\n LOGGER.info(os + \"is not supported yet\");\n }\n }", "@BeforeClass\n public void beforeClass() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"deviceName\", \"bb9d156c\");\n caps.setCapability(\"platformName\", \"Android\");\n caps.setCapability(\"appPackage\", \"com.google.android.apps.tasks\");\n caps.setCapability(\"appActivity\", \".ui.TaskListsActivity\");\n // caps.setCapability(\"noReset\", true);\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n \n }", "@BeforeClass\npublic void beforeClass() throws MalformedURLException {\n\tDesiredCapabilities caps = new DesiredCapabilities();\n\tcaps.setCapability(\"deviceName\", \"Xiaomi Redmi Note 5 Pro\");\n caps.setCapability(\"platformName\", \"android\");\n caps.setCapability(\"automationName\", \"UiAutomator2\");\n caps.setCapability(\"appPackage\", \"com.android.chrome\");\n caps.setCapability(\"appActivity\", \"com.google.android.apps.chrome.Main\");\n caps.setCapability(\"noReset\", true);\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n \n}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\t\t\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\t\t\t\t\n\t\t\t\t\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\t\t\t\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\t\t\t\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//app details\n\t\t\t\t\t\tcapabilities.setCapability(\"appPackage\", \"com.mobeta.android.demodslv\");\n\t\t\t\t\t\tcapabilities.setCapability(\"appActivity\", \"com.mobeta.android.demodslv.Launcher\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Appium details\n\t\t\t\t\t\t\n\t\t\t\t\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\n\t\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\t\t//click on the element\n\t\t\t\t\t//\tdriver.findElementById(\"com.mobeta.android.demodslv:id/activity_title\").click();\n\t\t\t\t\t\n\t\t\t\t\t\tWebElement ele1 = driver.findElementById(\"com.mobeta.android.demodslv:id/activity_title\");\n\t\t\t\t\t\tele1.click();\n\t\t\t\t//drag and drop\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<WebElement> drag_ele = driver.findElementsById(\"com.mobeta.android.demodslv:id/drag_handle\");\n\t\t\t\t\t\tSystem.out.println(drag_ele.size());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Touch action\n\t\t\t\t\t\t\n\t\t\t\t\t\tTouchAction action= new TouchAction(driver);\n\t\t\t\t\t\t//action.longPress(drag_ele.get(0)).moveTo(drag_ele.get(5)).release().perform();\n\t\t\t\t\t\t\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\taction.longPress(drag_ele.get(6)).moveTo(drag_ele.get(2)).release().perform();\n\t\t\t\t\t\t\n\n\n\t}", "static File getAppDir(String app) {\n return Minecraft.a(app);\n }", "@BeforeTest\n public void appiumBrowserTestSetup() throws Exception{\n DesiredCapabilities capabilities = DesiredCapabilities.android();\n\n // set the capability to execute test in chrome browser\n capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, BrowserType.CHROME);\n\n // set the capability to execute our test in Android Platform\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);\n\n // Set the device name as well (you can give any name)\n capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"emulator-5554\");\n\n // set the android version as well\n capabilities.setCapability(MobileCapabilityType.VERSION, \"9\");\n\n // set the chromedriver\n capabilities.setCapability(\"chromedriverExecutable\",\"C:\\\\drivers\\\\chromedriver.exe\");\n\n // Create object of URL class and specify the appium server address\n URL url = new URL(\"http://127.0.0.1:4723/wd/hub\");\n\n // Create object of AndroidDriver class and pass the url and capability that we\n // created\n driver = new AppiumDriver(url, capabilities);\n\n driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n driver.get(\"https://www.amazon.co.uk/\");\n Thread.sleep(5000);\n }", "private static String createAppSpecificLocalDir(String baseDir, String applicationIdString,\n String user, int dagIdentifier) {\n return baseDir + File.separator + \"usercache\" + File.separator + user + File.separator +\n \"appcache\" + File.separator + applicationIdString + File.separator + dagIdentifier;\n }", "public void init() throws MalformedURLException {\n\n capabilities = new DesiredCapabilities();\n\n capabilities.setCapability(\"deviceName\", \"Nex5\");\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Android\");\n capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, \"8.0\");\n capabilities.setCapability(\"appPackage\", \"com.trello\");\n capabilities.setCapability(\"appActivity\", \".home.HomeActivity\");\n\n capabilities.setCapability(\"automationName\", \"Appium\");\n capabilities.setCapability(\"app\", \"C:/Users/Study/APK/trello_new.apk\");\n driver = new AppiumDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n welcomeActivity = new WelcomePage(driver);\n loginActivity = new LoginPage(driver);\n\n }", "public static AppiumDriverLocalService AppiumServerStart(){\n System.out.println(\"Into driver setup\");\n AppiumDriverLocalService service;\n\n AppiumServiceBuilder serviceBuilder = new AppiumServiceBuilder();\n\n serviceBuilder.usingAnyFreePort();\n // /usr/local/bin/node\n serviceBuilder.usingDriverExecutable(new File(\"/usr/local/bin/node\"));\n // /usr/local/bin/appium\n serviceBuilder.withAppiumJS(new File(\"/usr/local/bin/appium\"));\n serviceBuilder.withArgument(GeneralServerFlag.RELAXED_SECURITY);\n serviceBuilder.withArgument(GeneralServerFlag.SHELL);\n HashMap<String, String> environment = new HashMap();\n environment.put(\"PATH\", \"/usr/local/bin:\" + System.getenv(\"PATH\"));\n\n\n service = AppiumDriverLocalService.buildService(serviceBuilder);\n service.start();\n return service;\n }", "public static void main(String[] args) throws MalformedURLException {\n\t\tDesiredCapabilities cap=new DesiredCapabilities();\r\n\t\tcap.setCapability(\"deviceName\",\"abc\");\r\n\t\tcap.setCapability(\"platformName\", \"Android\");\r\n\t\t//cap.setCapability(\"udid\",\"emulator-5554\");\r\n\t\tcap.setCapability(\"appPackage\",\"com.udemy.android\");\r\n\t\tcap.setCapability(\"appActivity\",\"com.udemy.android.SplashActivity\");\r\n\t\tcap.setCapability(\"uiautomator2ServerLaunchTimeout\", 600000);\r\n\t\tcap.setCapability(\"adbExecTimeout\", 600000);\r\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"),cap);\r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/browse_button\")).click();\r\n\t\tdriver.findElement(MobileBy.AccessibilityId(\"Search tab\")).click();\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/search_bar_text\")).click();\r\n\t\tdriver.findElement(MobileBy.id(\"com.udemy.android:id/search_bar_text\")).sendKeys(\"selenium\");\r\n\t\tdriver.hideKeyboard();\r\n\r\n\t}", "public static AppiumDriver<MobileElement> setUp() {\n\t\ttry {\t\t\n\t\t\t\n\t\tDesiredCapabilities cap=new DesiredCapabilities();\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME,\"ANDROID\");\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION, \"10 QKQ1.190915.002\");\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"Redmi Note 7 Pro\");\n\t\tcap.setCapability(MobileCapabilityType.UDID, \"d9b3ca47\");\n//\t\tcap.setCapability(MobileCapabilityType.APP, \"\");\n\t\tcap.setCapability(\"appPackage\", \"com.swaglabsmobileapp\");\n\t\tcap.setCapability(\"appActivity\", \"com.swaglabsmobileapp.SplashActivity\");\n\t\t\n\t\tURL url=new URL(\"http://127.0.0.1:4723/wd/hub\");\n\t\tdriver =new AppiumDriver<MobileElement>(url, cap);\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n//\t\tlog.info(\"Launching the app\");\n//\t\tMobileElement loginbutton = driver.findElement(MobileBy.AccessibilityId(\"test-LOGIN\"));\n// loginbutton.click();\n\t\t\t\treturn driver;\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn driver;\n\t\t}\n\t}", "public File extractAndroidDriverAPK() {\n\t\t\n\t\tInputStream is = AndroidDriverAPKBuilder.class\n\t\t\t.getResourceAsStream(\"prebuild/android-driver-app-\"\n\t\t\t\t\t+\"0.11.0\" + \".apk\");\t\t\n\t\ttry {\n\t\t\tFile tmpAndroidDriver = File.createTempFile(\"android-driver\",\n\t\t\t\t\t\".apk\");\n\t\t\tIOUtils.copy(is, new FileOutputStream(tmpAndroidDriver));\n\t\t\tIOUtils.closeQuietly(is);\n\t\t\treturn tmpAndroidDriver;\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new RuntimeException(ioe);\n\t\t}\n\t}", "protected void NewApp(String name, String code, String file, String web,\n String dir) {\n String webRoot = UIHelper.getStoragePath(AppManagerActivity.this);\n webRoot = webRoot + constants.SD_CARD_TBSSOFT_PATH3 + \"/\";\n File newfile = new File(webRoot + dir + \"/\" + file);\n/*\t\tFile newfile2 = new File(webRoot + dir + \"/\"\n + constants.WEB_CONFIG_FILE_NAME);*/\n try {\n newfile.createNewFile();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\",\n \"defaultUrl\", web);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppCode\",\n code);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppName\",\n name);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppVersion\",\n \"1.0\");\n AppManagerActivity.myThread handThread = new AppManagerActivity.myThread(dir, file);\n handThread.run();\n }", "File getOsmdroidPath();", "public static void main(String[] args) throws Exception {\n File app = new File(\"/Users/wanghb/AndroidStudioProjects/myapp/app/build/outputs/apk/debug/app-debug.apk\");\n DesiredCapabilities capabilities = new DesiredCapabilities();\n// capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Emulator\");\n// capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Emulator\");\n// capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());\n //安卓通过appPackage及appActivity\n capabilities.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, \"com.example.myapp\");\n capabilities.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, \".MainActivity\");\n capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID);\n //you are free to set additional capabilities\n AppiumDriver<MobileElement> driver = new AppiumDriver<>(\n new URL(\"http://0.0.0.0:4723/wd/hub\"),\n //if it needs to use locally started server\n //then the target_ip is 127.0.0.1 or 0.0.0.0\n //the default port is 4723\n capabilities);\n MobileElement firstText = driver.findElement(By.id(\"textview_first\"));\n System.out.println(firstText.getText());\n System.out.println(firstText.getTagName());\n System.out.println(firstText.getSize());\n MobileElement firstButton = driver.findElement(By.id(\"button_first\"));\n firstButton.click();\n MobileElement secondtext = driver.findElement(By.id(\"textview_second\"));\n System.out.println(secondtext.getText());\n System.out.println(secondtext.getTagName());\n System.out.println(secondtext.getSize());\n MobileElement secondButton = driver.findElement(By.id(\"button_second\"));\n System.out.println(secondButton.getText());\n System.out.println(secondButton.getTagName());\n System.out.println(secondButton.getSize());\n System.out.println(\"success\");\n }", "private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }", "@Before\n public void setUp() throws MalformedURLException {\n DesiredCapabilities cap = new DesiredCapabilities();\n cap.setCapability(\"devicename\",\"MyTestDevice\");\n\n //It works with java-client-4.0.0.jar :)\n drive = new AndroidDriver<WebElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), cap);\n //Reset the cache!\n drive.resetApp();\n\n }", "public static void main(String[] args) throws Exception {\n// GameConfig gameConfig = new GameConfig();\n// gameConfig.setGameDir(\"G:\\\\amber2\\\\03_tools\\\\AndriodPackage\\\\Release\\\\GameApk\\\\product_anysdk-release.apk\");\n// gameConfig.setGameOutDir(\"G:\\\\amber2\\\\03_tools\\\\AndriodPackage\\\\Release\\\\GameFolder\");\n// gameConfig.setChannelDir(\"G:\\\\amber2\\\\03_tools\\\\AndriodPackage\\\\Release\\\\ChannelApk\\\\AnySDK_haima.apk\");\n// gameConfig.setChannelOutDir(\"G:\\\\amber2\\\\03_tools\\\\AndriodPackage\\\\Release\\\\ChannelFolder\");\n// gameConfig.setUnitDir(\"G:\\\\amber2\\\\03_tools\\\\AndriodPackage\\\\Release\\\\UniteFolder\");\n// gameConfig.setUnitOutDir(\"G:\\\\amber2\\\\03_tools\\\\AndriodPackage\\\\Release\\\\UniteApk\");\n// IniConfig iniConfig = new IniConfig();\n// gameConfig.setIniConfig(iniConfig);\n// Map<String, Config> configs = new HashMap<String, Config>(8);\n// iniConfig.setConfigs();\n\n decode(gameApk, gameFolder);\n decode(channelApk, channelFolder);\n mergeFolder(channelFolder, gameFolder);\n\n encodeApk(gameFolder, UniteApk + \"\\\\new.apk\");\n signApk(UniteApk + \"\\\\new.apk\");\n if (useAndroidSigner) {\n optimizeApk(UniteApk + \"\\\\new.apk\");\n } else {\n optimizeApk(UniteApk + \"\\\\Signed.apk\");\n }\n\n }", "public void setAppFolder(String file_name) {\n File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/Chitchato\");\n if (!file.exists()) {\n new File(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/Chitchato\").mkdir();\n }\n }", "@BeforeTest\n\tpublic void setUp() throws InterruptedException, IOException {\n\t\tAppiumServer appiumServer = new AppiumServer();\n\t\t\n\t\tint port = 4723;\n\t\tif(!appiumServer.checkIfServerIsRunnning(port)) {\n\t\t\tSystem.out.println(\"Port No.: \" + port + \" is available.\");\n\n\t\t\tappiumServer.startServer();\n\t\t\t\n\t\t} else {\n\t\t\tSystem.out.println(\"Appium Server already running on Port - \" + port);\n\t\t}\n\t\t\n\t\tFile appPath = new File(\"./app/eBay.apk\");\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\n\n\t\tcap.setCapability(MobileCapabilityType.APP, appPath.getAbsolutePath());\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"MI\");\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Android\");\n//\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION,\"9\");\n\t\t\n\t\tcap.setCapability(\"unicodeKeyboard\", \"true\"); \n\t\tcap.setCapability(\"resetKeyboard\", \"true\");\n\t\t\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_VERSION, DeviceVersionFinder.getDeviceVersion());\n\t\tcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"uiautomator2\");\n\t\tcap.setCapability(\"--session-override\", false);\n\t\t\n\t\tcap.setCapability(\"setWebContentsDebuggingEnabled\", true);\n\t\t\n\t\tdriver = new AndroidDriver<MobileElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"), cap);\n\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tPOM_LaunchHomeScreen homeScreen = new POM_LaunchHomeScreen(driver);\n\n\t\tif(homeScreen.btn_homeSignIn.isDisplayed()) {\n\t\t\t\n\t\t\tSystem.out.println(\"App has successfully loaded within the time provided!\");\n\t\t\t\n\t\t}\n\n\t\t\n//\t\tMobileElement element = driver.findElement(By.id(\"recycler_view_main\"));\n\t\t\n//\t\tTouchActions action = new TouchAction();\n//\t\taction.scroll(element, 10, 100);\n//\t\taction.perform();\n\t\t\n\t\t\n\n\t\tSystem.out.println(\"Setup successful!\");\n\n\n\t}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\nDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(\"deviceName\", \"GT-I9300I\");\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\n\t\tcapabilities.setCapability(\"platformVersion\", \"4.4.4\");\n\t\t\n\t\tcapabilities.setCapability(\"appPackage\", \"org.khanacademy.android\");\n\t\tcapabilities.setCapability(\"appActivity\", \"org.khanacademy.android.ui.library.MainActivity\");\n\t\t\n\t\tAndroidDriver driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\n\t\tThread.sleep(20000);\n\t\tSystem.out.println(driver.getContext());\n\t\t\n\t\tSet<String> contextNames = driver.getContextHandles();\n\t\tSystem.out.println(contextNames.size());\n\t\t //You can prints out something like NATIVE_APP , WEBVIEW_1 \n\t\t for (String contextName : contextNames) { \n\t\t System.out.println(contextName);\n//\t\t if (contextName.contains(\"WEBVIEW\")){\n//\t driver.context(contextName);\n//\t }\n\t\t }\n\n\t\t \n\n\t}", "@BeforeTest\n\t public void setup() throws MalformedURLException {\n\t DesiredCapabilities caps = new DesiredCapabilities();\n\t caps.setCapability(\"deviceName\", \"Pixel 4 API 28\");\n\t caps.setCapability(\"platformName\", \"Android\");\n\t caps.setCapability(\"appPackage\", \"com.google.android.apps.tasks\");\n\t caps.setCapability(\"appActivity\", \".ui.TaskListsActivity\");\n\t caps.setCapability(\"noReset\", true);\n\t \n\t // Instantiate Appium Driver\n\t driver = new AndroidDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), caps);\n\t wait = new WebDriverWait(driver, 10);\n\t }", "@BeforeClass\n public void beforeClass() throws MalformedURLException {\n\t DesiredCapabilities caps = new DesiredCapabilities();\n\t caps.setCapability(\"devicename\", \"Pixel\");\n\t caps.setCapability(\"platform\", \"Android\");\n\t caps.setCapability(\"addActivity\", \".ui.TaskListsActivity\");\n\t caps.setCapability(\"addPackage\", \"com.google.android.apps.tasks\");\n\t caps.setCapability(\"noReset\", true);\n\t caps.setCapability(\"webviewDevtoolsPort\", 9543);\n\t \n\t //instantiate appium driver\n\t URL appserver = new URL(\"http://0.0.0.0:4723/wd/hub\");\n\t driver = new AndroidDriver<MobileElement>(appserver,caps);\n\t wait = new WebDriverWait(driver, 5);\n }", "@SuppressWarnings(\"rawtypes\")\r\n\t@BeforeMethod\r\n\t public void setUp() throws MalformedURLException {\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\t\tcapabilities.setCapability(\"deviceName\", \"ZX1D63SFXH\");\r\n\t\tcapabilities.setCapability(\"platformName\", \"Android\");\r\n\t\t//capabilities.setCapability(\"app\", targetApp.getAbsolutePath());\r\n\t\t//capabilities.setCapability(\"fastReset\", \"true\");\r\n\t\t//capabilities.setCapability(\"fullReset\", \"true\");\r\n\t\tcapabilities.setCapability(\"appPackage\", \"com.testleaf.leaforg\");\r\n\t\tcapabilities.setCapability(\"appActivity\", \"com.testleaf.leaforg.MainActivity\");\r\n\t\t\r\n\t\tdriver = new AndroidDriver(new URL(\"http://0.0.0.0:4723/wd/hub\"), capabilities);\r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t}", "@BeforeClass\r\n public void beforeClass() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\r\n caps.setCapability(\"deviceName\", \"PixelEmulator\");\r\n caps.setCapability(\"platformName\", \"Android\");\r\n caps.setCapability(\"appPackage\", \"com.google.android.keep\");\r\n caps.setCapability(\"appActivity\", \".activities.BrowseActivity\");\r\n caps.setCapability(\"noReset\", true);\r\n\r\n // Instantiate Appium Driver\r\n URL remoteURL = new URL(\"http://localhost:4723/wd/hub\");\r\n driver = new AndroidDriver<MobileElement>(remoteURL, caps);\r\n \r\n }", "public static String getAppFolder(String file_name) {\n return Environment.getExternalStorageDirectory().getAbsolutePath() + \"/Chitchato/\";\n }", "@BeforeTest\n\t\tpublic void setUp() throws MalformedURLException {\n\t\t\t DesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t // Set android deviceName desired capability. Set your device name.\n\t\t\t capabilities.setCapability(\"deviceName\", \"Custom Phone - 4.2.2 API 17 - 768*1280\");\n\t\t\t // Set BROWSER_NAME desired capability. It's Android in our case here.\n\t\t\t capabilities.setCapability(\"browserName\", \"Android\");\n\n\t\t\t // Set android VERSION desired capability. Set your mobile device's OS version.\n\t\t\t capabilities.setCapability(\"platformVersion\", \"4.2.2\");\n\n\t\t\t // Set android platformName desired capability. It's Android in our case here.\n\t\t\t capabilities.setCapability(\"platformName\", \"Android\");\n\t\t\t // Created object of RemoteWebDriver will all set capabilities.\n\t\t\t // Set appium server address and port number in URL string.\n\t\t\t // It will launch calculator app in android device.\n\t\t\t // capabilities.setCapability(\"unicodeKeyboard\", true);\n\t\t\t // capabilities.setCapability(\"resetKeyboard\", true);\n\t\t\t driver = new RemoteWebDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\t driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n\t\t\t }", "@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithApplication() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setApp(\"com.covea.mobileapp\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), \"\");\r\n\t\tAssert.assertEquals(capa.getCapability(\"app\"), \"com.covea.mobileapp\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.AUTOMATION_NAME), \"Appium\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.PLATFORM_NAME), \"android\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.PLATFORM_VERSION), \"8.0\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.DEVICE_NAME), \"Samsung Galasy S8\");\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.FULL_RESET), true);\r\n\t\tAssert.assertEquals(capa.getCapability(AndroidMobileCapabilityType.APP_PACKAGE), \"appPackage\");\r\n\t\tAssert.assertEquals(capa.getCapability(AndroidMobileCapabilityType.APP_ACTIVITY), \"appActivity\");\r\n\t}", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\r\n\t\t\t\t\t\t\r\n\t\t\t\t//device details\r\n\t\t\t\tcapabilities.setCapability(\"deviceName\",\"GT-I9300I\");\r\n\t\t\t\tcapabilities.setCapability(\"platformName\",\"Android\");\r\n\t\t\t\tcapabilities.setCapability(\"platformVersion\",\"4.4.4\");\t\t\r\n\t\t\t\t\r\n\t\t\t\t//app details\r\n\t\t\t\tcapabilities.setCapability(\"appPackage\",\"com.emn8.mobilem8.nativeapp.bk\");\r\n\t\t\t\tcapabilities.setCapability(\"appActivity\",\"com.emn8.mobilem8.nativeapp.bk.BKNativeMobileApp\");\r\n\t\t\t\t\r\n\t\t\t\t//Appium Server details\r\n\t\t\t\tAndroidDriver driver= new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\r\n\t\t\t\t\r\n\t\t\t\t//wait\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\t\r\n\t\t\t\tSet<String> contextHandles = driver.getContextHandles();\r\n\t\t\t\tint size = contextHandles.size();\r\n\t\t\t\tSystem.out.println(size);\r\n\t\t\t\t\r\n\t\t\t\t//****************************************************\r\n\t\t\t\tfor(String contextname:contextHandles)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"First Page\");\r\n\t\t\t\t\tSystem.out.println(contextname);\r\n\t\t\t\t\tSystem.out.println(\"-------------------\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contextname.contains(\"NATIVE\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.context(contextname);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tWebDriverWait wait= new WebDriverWait(driver, 50);\r\n\t\t\t\tWebElement ele_voucher = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@index='9'][@content-desc='VOUCHERS'][@class='android.view.View']\")));\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Voucher is displayed \"+ele_voucher.isDisplayed());\r\n\t\t\t\t\r\n\t\t\t\tele_voucher.click();\r\n\t\t\t\t\r\n\t\t\t\t//**************************************************************\r\n\t\t\t\t//Second page\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\tfor(String contextname:contextHandles)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Second Page\");\r\n\t\t\t\t\tSystem.out.println(contextname);\r\n\t\t\t\t\tSystem.out.println(\"-------------------\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contextname.contains(\"NATIVE\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.context(contextname);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tWebDriverWait wait2= new WebDriverWait(driver, 50);\r\n\t\t\t\tWebElement ele_redeem = wait2.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@index='17'][@content-desc='REDEEM'][@class='android.view.View']\")));\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Redeem is displayed \"+ele_redeem.isDisplayed());\r\n\t\t\t\t\r\n\t\t\t\tele_redeem.click();\r\n\t\t\t\t//**************************************************************\r\n\t\t\t\t//Third page\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\tfor(String contextname:contextHandles)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Third Page\");\r\n\t\t\t\t\tSystem.out.println(contextname);\r\n\t\t\t\t\tSystem.out.println(\"-------------------\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contextname.contains(\"WEBVIEW\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.context(contextname);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tdriver.findElementByName(\"email\").sendKeys(\"nov@gmail.com\");\r\n\t\t\t\tWebElement ele_pwd = driver.findElementByName(\"password\");\r\n\t\t\t\tele_pwd.click();\r\n\t\t\t\t\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\tele_pwd.sendKeys(\"1234\");\r\n\t\t\t\t\r\n\t\t\t\t//********************************************************\r\n\t\t\t\t\r\n\t\t\t\tThread.sleep(4000);\r\n\t\t\t\t\r\n\t\t\t\tfor(String contextname:contextHandles)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Third Page\");\r\n\t\t\t\t\tSystem.out.println(contextname);\r\n\t\t\t\t\tSystem.out.println(\"-------------------\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contextname.contains(\"NATIVE\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.context(contextname);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tWebDriverWait wait3= new WebDriverWait(driver, 50);\r\n\t\t\t\tWebElement ele_Signin = wait3.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@index='33'][@content-desc='SIGN IN'][@class='android.view.View']\")));\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Signin is displayed \"+ele_Signin.isDisplayed());\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public void run(){\n\t\tGlobal.printer.print(\"\\ngetting resource from \"+apkName+\" ... \");\n\t\tString cmd = \"java -jar \\\"\"+this.apktoolPath+\"\\\" d \\\"\"+this.filePath+\"\\\" -f -o \\\"\"+ this.apkPath+\"\\\"\";\n\t\t//Global.copyDir(this.tmpResPath, this.apkPath);\n\t\ttry {\n\t\t\tGlobal.sysCmd(cmd );//,Global.printer);\n\t\t\tGlobal.printer.print(\"succeed!!\");\n\t\t} catch (Exception e) {\n\t\t\tGlobal.printer.print(\"error!!\");\n\t\t\t//Global.printer.print(e.getMessage());\n\t\t}\n\t}", "private void initFileSystem() {\n\tchkSD();\n\t appDirectory = new File(\"/sdcard/Subway/\");\n\n\t\tif(appDirectory.mkdirs()){\n\t\t\t//BRAND NEW PERSON PROJECT FIRST TIME THEY HAVE THE PHONE\n\t\t\tLog.e(\"SY\", \"First time with app!\");\n\t\t\tchangeUser();\n\t\t\n\t\t}\n\t\telse{\n\t\t\tappDirectory.mkdirs();\n\t\t\tLog.e(\"MYTT\", \"Used the App before\");\n\t\t\t\n\t\t\talreadyThereProjects = new ArrayList<String>();\n\n\t\t\t// Note that Arrays.asList returns a horrible fixed length list, Make\n\t\t\t// sure to cast to ArrayList\n\n\t\t\t\talreadyThereProjects = new ArrayList<String>(Arrays.asList(appDirectory.list()));\n\t\t\t\tif(alreadyThereProjects.size()>0)\n\t\t\t\t{\n\t\t\t\tuserID=Integer.parseInt( alreadyThereProjects.get(0).substring(5));\n\t\t\t\tmakeUser();\n\t\t\t\tloadUpAllPics();\n\t\t\t\tLog.e(\"SY\", \"THERE WAS ALREADY ONE:\"+alreadyThereProjects.get(0).substring(5));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchangeUser();\n\t\t\t\t}\n\t\t\t\n\t\t}\n\n\n\t\t\t\n}", "@Override\n public void onClick(View view) {\n\n File libdir = getDir(\"jniLibs\",Context.MODE_PRIVATE);\n File file = new File(libdir, \"arm64-v8a\");\n File[] files = file.listFiles();\n for(File file1:files){\n Log.e(\"files\",file1.getAbsolutePath());\n }\n //System.load(file.getAbsolutePath());\n }", "public static AppiumDriver getDriver(String platformtype, AppiumDriverLocalService service) throws IOException, TimeoutException, URISyntaxException {\n AppiumDriver driver;\n /* List<InterceptedMessage> messages = new ArrayList<InterceptedMessage>();\n\n\n MitmproxyJava proxy = new MitmproxyJava(\"/usr/local/bin/mitmdump\", (InterceptedMessage m) -> {\n System.out.println(\"intercepted request for \" + m.requestURL.toString());\n messages.add(m);\n return m;\n });\n //System.out.println(\"Hello World\");\n proxy.start();*/\n if (platformtype== \"Android\") {\n DesiredCapabilities options = new DesiredCapabilities();\n options.setCapability(\"deviceName\", propertyManager.getInstance().getdevicename()); //Pixel_XL_API_29\n options.setCapability(\"udid\",propertyManager.getInstance().getdeviceUDID());\n //options.setCapability(\"avd\",\"Pixel_XL_API_29\");\n options.setCapability(\"platformName\", propertyManager.getInstance().getplatformName());\n options.setCapability(\"platformVersion\", propertyManager.getInstance().getplatformVersion()); //emulator: 10.0.0\n options.setCapability(\"automationName\", \"UiAutomator2\");\n options.setCapability(\"autoGrantPermissions\",\"true\");\n options.setCapability(\"noReset\",\"true\");\n options.setCapability(\"autoAcceptAlerts\",\"true\");\n options.setCapability(\"app\",propertyManager.getInstance().getAndroidapp());\n options.setCapability(\"uiautomator2ServerInstallTimeout\", \"60000\");\n options.setCapability(\"abdExecTimeout\", \"60000\");\n options.setCapability(\"ACCEPT_SSL_CERTS\",true);\n options.setCapability(\"clearDeviceLogsOnStart\",\"true\");\n //options.setCapability(\"--set ssl_version_client\",\"all\");\n //options.setCapability(\"--proxy-server\",\"localhost:8080\");\n //options.setCapability(\"appWaitPackage\", \"com.clearchannel.iheartradio.controller.debug\");\n //options.setCapability(\"appWaitActivity\", \"com.clearchannel.iheartradio.controller.activities.NavDrawerActivity\");\n //options.setCapability(\"appPackage\", \"com.clearchannel.iheartradio.controller.debug\");\n //options.setCapability(\"appActivity\", \"com.clearchannel.iheartradio.controller.activities.NavDrawerActivity\");\n\n\n driver = new AndroidDriver<MobileElement>(service, options);\n return driver;\n }\n else if(platformtype== \"iOS\"){\n DesiredCapabilities options = new DesiredCapabilities();\n\n options.setCapability(\"platformName\", \"iOS\");\n options.setCapability(\"platformVersion\", propertyManager.getInstance().getiOSplatformVersion());\n options.setCapability(\"deviceName\", propertyManager.getInstance().getiOSdevicename());\n options.setCapability(\"udid\",propertyManager.getInstance().getiOSUDID());\n //options.setCapability(CapabilityType.BROWSER_NAME,\"safari\");\n //options.setCapability(\"automationName\", \"XCUITest\");\n options.setCapability(\"bundleId\",\"com.clearchannel.iheartradio.enterprise\");\n options.setCapability(\"startIWDP\",\"true\");\n options.setCapability(\"noReset\",\"true\");\n options.setCapability(\"useNewWDA\",\"false\");\n //options.setCapability(\"showIOSLog\",\"true\");\n //options.setCapability(\"app\",\"/Users/Shruti/Desktop/untitled folder/iHRiOSAppCenter/iHeartRadio.ipa\"); // /Users/Shruti/Downloads/iHeartRadio.ipa\n options.setCapability(\"xcodeOrgId\",\"BCN32U332R\");\n options.setCapability(\"xcodeSigningId\",\"iPhone Developer\");\n options.setCapability(\"autoAcceptAlerts\",\"true\");\n options.setCapability(\"SHOW_XCODE_LOG\",\"true\");\n //options.setCapability(\"updatedWDABundleId\",\"com.Shruti7505.WebDriverAgentRunner\");\n driver = new IOSDriver<MobileElement>(service,options);\n return driver;\n }\n return driver=null;\n\n }", "@BeforeMethod\n public void beforeTest() throws MalformedURLException {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(\"deviceId\", \"2fb5cf35\");\n caps.setCapability(\"deviceName\", \"OnePlus 6\");\n caps.setCapability(\"platformName\", \"Android\");\n caps.setCapability(\"appPackage\", \"com.oneplus.calculator\");\n caps.setCapability(\"appActivity\", \"Calculator\");\n caps.setCapability(\"noReset\", true);\n\n // Initialize driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, caps);\n }", "@BeforeClass\n public void beforeClass() throws MalformedURLException {\n DesiredCapabilities desiredCapabilities = new DesiredCapabilities();\n desiredCapabilities.setCapability(\"deviceName\", \"Pixel_4_emulator\");\n desiredCapabilities.setCapability(\"platformName\", \"android\");\n desiredCapabilities.setCapability(\"automationName\", \"UiAutomator2\");\n desiredCapabilities.setCapability(\"noReset\", true);\n desiredCapabilities.setCapability(\"appPackage\", \"com.google.android.apps.messaging\");\n desiredCapabilities.setCapability(\"appActivity\", \".ui.ConversationListActivity\");\n\n // Instantiate Appium Driver\n URL appServer = new URL(\"http://0.0.0.0:4723/wd/hub\");\n driver = new AndroidDriver<MobileElement>(appServer, desiredCapabilities);\n wait = new WebDriverWait(driver, 5);\n }", "@BeforeTest\r\n\tpublic void setup() {\n\t\t\t\tDesiredCapabilities caps = new DesiredCapabilities();\r\n\t\t\t\tcaps.setCapability(\"deviceName\", \"Abhi Phone\");\r\n\t\t\t\tcaps.setCapability(\"udid\", \"FXYDU17916004799\"); //Give Device ID of your mobile phone\r\n\t\t\t\tcaps.setCapability(\"platformName\", \"Android\");\r\n\t\t\t\tcaps.setCapability(\"platformVersion\", \"9.0\");\r\n\t\t\t\tcaps.setCapability(\"appPackage\", \"com.wdc.ibi\");\r\n\t\t\t\tcaps.setCapability(\"appActivity\", \"com.kamino.wdt.MainActivity\");\r\n\t\t\t\tcaps.setCapability(\"noReset\", \"true\");\r\n\t\t\t\tcaps.setCapability(\"unicodeKeyboard\", true);\r\n\t\t\t\tcaps.setCapability(\"resetKeyboard\", true);\r\n\t\t\t\t\r\n\t\t\t\t//Instantiate Appium Driver\r\n\t\r\n\t\t\t\ttry {\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tURL url= new URL(\"http://0.0.0.0:4723/wd/hub\");\r\n\t\t\t\t\t\tdriver = new AndroidDriver<MobileElement>(url, caps);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//WebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n\t\t\t\t\t\t//driver.findElementByClassName(\"android.widget.TextView\").click();\r\n\t\t\t\t\t\t//wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@text ='I Agree']\"))).click();\r\n\t\t\t\t\t\t//driver.findElement(By.xpath(\"//*[@text ='I Agree']\")).click();\r\n\t\t\t\t\t\t//wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[@text ='SIGN IN']\"))).click();\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@text ='SIGN IN']\")).click();\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@text ='Email address']\")).sendKeys(\"mobappw+abtest@gmail.com\");\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@text ='Password']\")).sendKeys(\"Admin@555\");\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\"//*[@text ='CONTINUE']\")).click();\r\n\t\t\t\t\t\tSystem.out.println(\"Signed In Successfuly\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\t}\t\t\r\n\t\t\t\r\n\t}", "public static void main (String[] args){\n\n DesiredCapabilities cap = new DesiredCapabilities();\n cap.setCapability(MobileCapabilityType.DEVICE_NAME,\"ZY223RZBJ9\");\n cap.setCapability(\"appActivity\",\"com.android.calculator2.CalculatorGoogle\");\n cap.setCapability(\"appPackage\", \"com.android.calculator2\");\n AndroidDriver driver = null;\n try{\n driver = new AndroidDriver(new URL(\"http://localhost:4793/wd/hub\"), cap);\n /* driver.manage().timeouts().implicitlyWait(10L,\nTimeUnit.SECONDS);\n //click 5 -- locate the android element\n\ndriver.findElementById(\"com.android.calculator2:id/digit_5\").click();\n //click +\n\n//driver.findElementByXPath(\"//android.widget.ImageButton[contains@resource-\nid=plus]\").click();\n\ndriver.findElementByXPath(\"//android.widget.Button[contains(@resource-id,'op\n_add')]\").click();\n //click 3 -- locate the android element\n driver.findElementByAndroidUIAutomator(\"new\nUiSelector().resourceId(\\\"com.android.calculator2:id/digit_3\\\")\").click();\n //driver.findElementByAndroidUIAutomator(\"new\nUiSelector().resourceID(\\\"com.android.calculator2:id/digit3\").click();\n\n // click =\n\ndriver.findElement(By.id(\"com.android.calculator2:id/eq\")).click();\n //capture result and print\n String text =\ndriver.findElement(By.className(\"android.widget.EditText\")).getText();\n System.out.println(\"text= \"+ text);*/\n }catch(Throwable t){\n t.printStackTrace();\n }finally{\n driver.quit();\n }\n }", "@Test\r\npublic void baseDirectory() throws Exception{\r\n\taccessdata.setAppguid(\"shiv223acharya\");\r\n\tSystem.out.println(accessdata.getAppguid()); \r\n\t/*primaryService.setAppurl(\"NodeJS/Authentication_Template\");\r\n\t\r\n\tJSONObject json=new JSONObject();\r\n\t\r\n\taccessdata.setParentdirectory(\"\");\r\n\taccessdata.setHookObj(json);\r\n\taccessdata.setRunningapp(\"Drishya\");\r\n\taccessdata.setEndpoint(\"\");\r\n\taccessdata.setDomainguid(\"\");\r\n\taccessdata.setHost(\"\");\r\n\taccessdata.setEnv_json(json);\r\n\t\r\n\tfb.setClientID(\"468331803360754\");\r\n\tfb.setClientSecret(\"8fc8690146770e0a637adcc7293280cc\");\r\n\tGoogle.setClientID(\"625227390094-m47bnlnuaguvq3phn5t5kmp503fsiagd.apps.googleusercontent.com\");\r\n\tGoogle.setClientSecret(\"k0vpP0Tp5dP2oqXmcF9v10G8\");\r\n\tprimaryProviders.setFacebook(fb);\r\n\tprimaryProviders.setGoogle(Google);*/\r\n\tassertNotNull(generateApp.baseDirectory());\r\n}", "public static String getWorkingDirectory(Context context) {\n String res;\n if (isSDCardMounted()) {\n String directory = \"For Happy\";\n res = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + directory;\n } else {\n res = context.getFilesDir().getAbsolutePath() + \"/\";\n }\n if (!res.endsWith(\"/\")) {\n res += \"/\";\n }\n File f = new File(res);\n if (!f.exists()) {\n boolean success = f.mkdirs();\n if (!success) {\n LogUtil.e(\"FileUtils create file failed\");\n }\n }\n return res;\n }", "@BeforeClass\n public void classLevelSetup() {\n\t\t \t\tcaps = new DesiredCapabilities();\n \t\t\tcaps.setCapability(\"deviceName\", \"My Phone\");\n \t\t\tcaps.setCapability(\"udid\", \"8f81d4e2\"); //Give Device ID of your mobile phone\n \t\t\tcaps.setCapability(\"platformName\", \"Android\");\n \t\t\tcaps.setCapability(\"platformVersion\", \"9\"); // The version of Android on your device\n \t\t\tcaps.setCapability(\"browserName\", \"Chrome\");\n \t\t\tcaps.setCapability(\"noReset\", true);\n \t\t\tcaps.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID);\n \t\t\tcaps.setCapability(\"chromedriverExecutable\", \"C:\\\\SeleniumGecko\\\\chromedriver78.exe\"); // Set ChromeDriver location\n \t\t\t\n\n \t\t\t//Instantiate Appium Driver or AndroidDriver\n \t\t\ttry {\n \t\t\t\tdriver = new AppiumDriver<>(new URL(appium_node), caps);\n \t\t\t\t\n \t\t\t} catch (MalformedURLException e) {\n \t\t\t\tSystem.out.println(e.getMessage());\n \t\t\t}\n \t\t\t\t\t\n\n\t\t\n }", "public static void testApp(String appName) throws Exception {\n Settings.OcrTextRead = true;\r\n Settings.OcrLanguage = \"en\";\r\n Settings.OcrTextSearch = true;\r\n\r\n\r\n ImagePath.add(TestRun.class.getCanonicalName() + \"/ImagesAPI.sikuli\");\r\n File fResults = new File(System.getProperty(\"user.home\"), \"TestResults\");\r\n String fpResults = fResults.getPath();\r\n FileManager.deleteFileOrFolder(fpResults);\r\n fResults.mkdirs();\r\n //TO DO: print logging to this directory eventually as well as Unit Test results\r\n\r\n App app = new App(appName);\r\n Boolean appOpened = false;\r\n\r\n\r\n// try {\r\n// appOpened = openChanalyzer(app);\r\n// } catch (Exception e) {\r\n// e.printStackTrace();\r\n// }\r\n\r\n //need to wait for Chanalyzer to start up\r\n sleep(1500);\r\n\r\n if (appOpened = true && app.isRunning()) {\r\n// Region currentWindow = App.focusedWindow();\r\n// clickOnTarget(currentWindow, \"help\");\r\n// clickOnTarget(currentWindow, \"register\");\r\n// readFromTopRightOfRegistration(currentWindow);\r\n //focusOnWindowJustBelowImageAndRead(currentWindow, \"registration_image_above_name_field\");\r\n }\r\n\r\n Screen screen = new Screen();\r\n doubleClickOnTarget(screen, \"installer_msi\");\r\n sleep(1200);\r\n Screen screen2 = new Screen();\r\n clickOnTarget(screen2, \"next\");\r\n\r\n\r\n }", "@Test\n public void AppFileError() {\n try{\n App.main(new String[]{TEST_PATH + \"asdfghjkl-nice.dot\",\"1\"});\n }catch(RuntimeException re){\n assertEquals(re.getMessage(),\"Input file does not exist\");\n }\n }", "public static void main(String[] args) throws MalformedURLException {\n\t\tAndroidDriver<AndroidElement> driver = capabilities();\r\n\t\t//Input Field\r\n\t\tdriver.findElement(By.id(\"com.androidsample.generalstore:id/nameField\")).sendKeys(\"Hello\");\r\n\t\t//Hiding the keyboard\r\n\t\tdriver.hideKeyboard();\r\n\t\t//CheckBox\r\n\t\tdriver.findElement(By.xpath(\"//*[@text='Female']\")).click();\r\n\t\t//DropDown 1.click 2.scrolltoView 3click\r\n\t\tdriver.findElement(By.id(\"android:id/text1\")).click();\r\n\t\tdriver.findElement(MobileBy.AndroidUIAutomator(\"new UiScrollable(new UiSelector()).scrollIntoView(text(\\\"India\\\"));\"));\r\n\t\tdriver.findElement(By.xpath(\"//*[@text='India']\")).click();\r\n\t\t//Click on Lets shop\r\n\t\tdriver.findElement(By.id(\"com.androidsample.generalstore:id/btnLetsShop\")).click(); \r\n\t\t\r\n\t\t//Capture error msg\r\n\t\ttry {\r\n\t\t\tString toastMsg = driver.findElement(By.xpath(\"//android.widget.Toast[1]\")).getAttribute(\"name\");\r\n\t\t\tSystem.out.println(toastMsg);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.out.println(\"No error message\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String args[]) throws MalformedURLException, InterruptedException {\n\n\tDesiredCapabilities caps = new DesiredCapabilities();\n\t//caps.setCapability(\"browserName\", \"\");\n\tcaps.setCapability(\"platform\", \"iOS\");\n\tcaps.setCapability(\"deviceName\", \"iPhone 6\");\n\tcaps.setCapability(\"platformVersion\", \"9.0\");\n\tcaps.setCapability(\"waitForAppScript\", \"$.delay(10000); $.acceptAlert();\");\n\t//caps.setCapability(\"autoWebview\", \"true\");\n\t//caps.setCapability(\"appPackage\", \"com.apptivateme.next.ct\");\n\t//caps.setCapability(\"appActivity\", \"com.tribune.universalnews.MainActivity\");\n\tcaps.setCapability(\"appiumVersion\", \"1.4.14\");\n\tcaps.setCapability(\"app\", \"sauce-storage:CT_iOS.zip\");\n\t\n\tURL sauceUrl = new URL(\"http://shnakeygarg:66c91399-8cfb-46ca-a2da-f09c2ce5f170@ondemand.saucelabs.com:80/wd/hub\");\n\n\tIOSDriver driver = new IOSDriver(sauceUrl, caps);\n\n\t// driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\tWebDriverWait waitvar = new WebDriverWait(driver,90);\n\n\tThread.sleep(5000);\n\n\twaitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".buttons()[0]\").click();\n\twaitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".buttons()[0]\").click();\n\twaitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".buttons()[0]\").click();\n\twaitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".buttons()[0]\").click();\n\n\tfinal Date date1 = new Date();\n System.out.println(\"findElementByIosUIAutomation\" );\n \n //UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]/UIACollectionCell[2]/UIATableView[1]/UIATableCell[2]\n waitvar.until(ExpectedConditions.elementToBeClickable(MobileBy.IosUIAutomation(\".collectionViews()[0].cells()[1].tableViews()[0].cells()[1].withPredicate(\\\"ALL staticTexts.isVisible == TRUE\\\")\")));\n //waitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".collectionViews()[0].cells()[1].tableViews()[0].cells()[1].withPredicate(\\\"ALL staticTexts.isVisible == TRUE\\\")\")));\n WebElement firstArtile = driver.findElementByIosUIAutomation(\".collectionViews()[0].cells()[1].tableViews()[0].cells()[1].withPredicate(\\\"ALL staticTexts.isVisible == TRUE\\\")\");\n firstArtile.click();\n System.out.println(\"clicked element1\");\n\n final Date date2 = new Date();\n\n //UIAApplication[1]/UIAWindow[1]/UIANavigationBar[1]/UIAButton[1]\n waitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByIosUIAutomation(\".navigationBars()[0].buttons()[0]\")));\n\tdriver.findElementByIosUIAutomation(\".navigationBars()[0].buttons()[0]\").click();\n final Date date3 = new Date();\n/*\n System.out.println(\"\\n\\n\\n\\nxpath\\n\\n\\n\\n\");\n\n waitvar.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]/UIACollectionCell[2]/UIATableView[1]/UIATableCell[2]\")));\n driver.findElement(By.xpath(\"//UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]/UIACollectionCell[2]/UIATableView[1]/UIATableCell[2]\")).click();\n\n final Date date4 = new Date();\n\n waitvar.until(ExpectedConditions.elementToBeClickable(driver.findElementByName(\"header back\")));\n\n driver.findElement(By.name(\"header back\")).click();\n */\n final Date date5 = new Date();\n System.out.println(\"IOS Automator :\" + (date2.getTime() - date1.getTime()));\n System.out.println(\"Back :\" + (date3.getTime() - date2.getTime()));\n\n //System.out.println(\"XPath :\" + (date4.getTime() - date3.getTime()));\n //System.out.println(\"Back :\" + (date5.getTime() - date4.getTime()));\n\tThread.sleep(5000);\n\tdriver.quit();\n\tSystem.out.println(\"done\");\n }", "public static void main(String[] args) {\r\n\t\tString appname=\"Miniz.apk\";\r\n\t\t\t\t\t\t\t\t\t//for creation of entrypoint providing the application and android jar\r\n\t//Options.v().setPhaseOption(\"cg.cha\",\"on\");\r\n\tSetupApplication app = new\tSetupApplication(\"android.jar\",appname);\r\n\ttry {\r\n\t \t\t app.calculateSourcesSinksEntrypoints(\"SourceAndSinks.txt\");\t\t \t\t\t\r\n\t} catch (Exception e) {\r\n\t\te.printStackTrace();\r\n }\r\n\tsoot.G.reset();\r\n\t//set soot options\r\n\tOptions.v().set_src_prec(Options.src_prec_apk);\r\n\tOptions.v().set_process_dir(Collections.singletonList(appname));\r\n\tOptions.v().set_force_android_jar(\"android.jar\");\r\n\tOptions.v().set_whole_program(true);\r\n\tOptions.v().set_allow_phantom_refs(true);\r\n\t//For Handling the Junit test cases output the result into Jimple files\r\n\tOptions.v().set_output_format(Options.output_format_J);\r\n\t//For the code execution \r\n\t//Options.v().set_output_format(Options.output_format_dex);\r\n\tOptions.v().setPhaseOption(\"cg.spark verbose:true\",\"on\");\r\n\tOptions.v().setPhaseOption(\"on-fly-cg\",\"true\");\r\n\t//Renaming dummy main method as void main(String args) for sending the cfg in VASCO\r\n\tList<Type> s = new ArrayList<Type>();\r\n\ts=Arrays.asList(new Type[]{\r\n\tsoot.ArrayType.v(soot.RefType.v(\"java.lang.String\"), 1)\r\n\t});\r\n\t//creating dummy main\r\n\tSootMethod entryPoint =app.getEntryPointCreator().createDummyMain();\r\n\tentryPoint.setName(\"main\");\r\n\tentryPoint.setParameterTypes(s);\r\n\tChain<Unit> u1=entryPoint.getActiveBody().getUnits();\r\n Unit first=u1.getFirst();\r\n //Replacing the constant intitialization of dummy main variable by randomnumber for VASCO doesnt remove any branches from dummy main\r\n Scene.v().loadClassAndSupport(\"java.lang.Math\");\r\n SootMethod sm=Scene.v().getMethod(\"<java.lang.Math: double random()>\");\r\n SootMethodRef smRef=sm.makeRef();\r\n if(first instanceof AssignStmt){\r\n \tValue lhsOp = ((AssignStmt) first).getLeftOp();\r\n Value rhsOp = ((AssignStmt) first).getRightOp();\r\n if(lhsOp instanceof Local && rhsOp instanceof Constant){\r\n \tu1.removeFirst();\r\n u1.addFirst(Jimple.v().newAssignStmt(lhsOp, Jimple.v().newStaticInvokeExpr(smRef)));\r\n }\r\n }\r\n\r\n Scene.v().loadNecessaryClasses();\r\n System.out.println(\"Class::--\"+entryPoint.getDeclaringClass()+\"\\n Dummy Main....-->\"+ entryPoint.getActiveBody());\r\n\tScene.v().setEntryPoints(Collections.singletonList(entryPoint));\r\n\tOptions.v().set_main_class(entryPoint.getDeclaringClass().getName());\r\n\tPackManager.v().runPacks();\r\n\tcg = Scene.v().getCallGraph();\r\n \t\r\n\t\r\n\t//function to get all the methods existing in the call graph\r\n\trecursive(entryPoint);\r\n\t//Printing the methods in the call graph \r\n\tfor(Entry<String, Boolean> eSet : visited.entrySet()){\r\n\t\t\tString value=eSet.getKey().toString();\r\n\t\t\tSystem.out.println(\"Methods in callg graph: \"+value);\r\n\t}\r\n\t\r\n\tList<SootMethod> unusedmethods=new ArrayList<SootMethod>();\t\r\n\tSystem.out.println(\"All::-->\");\r\n\t//Fetching all the methods in the Application and storing the unused methods in a list(unusedmethods)\r\n\tChain<SootClass> clas=Scene.v().getApplicationClasses();\r\n\tfor(SootClass abc1:clas){\r\n\t \tSootClass sClass=Scene.v().loadClassAndSupport(abc1.getName());\r\n\t \tList <SootMethod> methods=sClass.getMethods();\r\n\t\t\t \tfor(SootMethod a: methods){\r\n\t \t\tSystem.out.println( a.getSignature());\r\n\t \t\tif(visited.containsKey(a.getSignature()))\r\n\t \t\t\tcontinue;\r\n\t \t\telse{\r\n\t \t\t\t//Handling classes which extends View and the attributes are not defined in Layout.xml , Handling all init & access functions and Handler functions along with SQLiteDatabase Helper \r\n\t \t\t \t\t\tif(!(a.getSubSignature().contains(\"void <init>\") || a.getSubSignature().contains(\"void <clinit>\") || a.getSubSignature().contains(\"access$\") || a.getDeclaringClass().getSuperclass().getName().contains(\"SQLiteOpenHelper\"))){\r\n\t \t\t \t\t\t\tif(a.getDeclaringClass().getSuperclass().getName().equals(\"android.view.View\") || a.getDeclaringClass().getSuperclass().getName().contains(\"android.os.Handler\")){\r\n\t \t\t \t\t\t\t\tList<SootMethod> methodlist=a.getDeclaringClass().getSuperclass().getMethods();\r\n\t \t\t\t \t\t\t\tint flag=0;\r\n\t \t\t\t \t\t\t\tfor(SootMethod ab: methodlist){\r\n\t \t\t\t \t\t\t\t\tif(ab.getSubSignature()==a.getSubSignature()){// && !unusedmethods.contains(a))\r\n\t \t\t\t \t\t\t\t\t\tflag=1;\r\n\t \t\t\t \t\t\t\t\t\tbreak;\r\n\t \t\t\t \t\t\t\t\t}\r\n\t \t\t\t \t\t\t\t}\r\n\t \t\t\t \t\t\t\tif(flag!=1)\r\n\t \t\t\t \t\t\t\t\tunusedmethods.add(a);\r\n\t \t\t\t \t\t\t}\r\n\t \t\t \t\t\t\telse\r\n\t \t\t\t \t\t\t\tunusedmethods.add(a);\r\n\t \t\t\t\t}\r\n\t \t\t\t\t\r\n\t \t\t\t\r\n\t \t\t}\r\n\r\n\t \t}\r\n\t }\r\n\t \r\n\t //Handling the functions when the class implements interface\r\n\t List<SootMethod> delm = new ArrayList<SootMethod>();\r\n\t List<SootMethod> un=unusedmethods;\r\n\t for(SootMethod m:un){\r\n\t\t \t if(m.getDeclaringClass().getInterfaceCount()>0){\r\n\t\t\t\t\t Chain<SootClass> interfaces=m.getDeclaringClass().getInterfaces();\r\n\t\t\t\t\t for(SootClass c:interfaces){\r\n\t\t\t\t\t\t List<SootMethod> smi=c.getMethods();\r\n\t\t\t\t\t\t for(SootMethod m1:smi){\r\n\t\t\t\t\t\t\t if(m1.getName().contains(m.getName())){\r\n\t\t\t\t\t\t\t\t delm.add(m);\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t \r\n\t\t\t }\r\n\t }\r\n\t for(SootMethod m1:delm){\r\n\t\t unusedmethods.remove(m1);\r\n\t }\r\n\r\n\t //Handling Reflection methods\r\n\t for(SootMethod a: un){\r\n\t\t\tSootClass classWeNeedToLoad = a.getDeclaringClass();\r\n\t\t\tfor(Map.Entry<String,String> entry: Driver.runmethods.entrySet()){\r\n\t\t\t//\tif(!(entry.getKey().contains(classWeNeedToLoad.toString()) && a.getName().contains(entry.getValue())))\r\n\t\t\t\tif(entry.getValue().contains(a.getName()) && entry.getKey().contains(classWeNeedToLoad.toString())){\r\n\t\t\t\t\tunusedmethods.remove(a);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t \r\n\t //Remove the unused methods\t \r\n\t for(SootMethod a: unusedmethods){\r\n\t \tSootClass classWeNeedToLoad = a.getDeclaringClass();\r\n\t \tclassWeNeedToLoad.removeMethod(a);\r\n\t\t}\r\n\t\r\n\r\n\t//Calling Vasco for interprocedural analysis \r\n\tInterproceduralAnalysis ipa = new InterproceduralAnalysis(new EmptyReporter());\r\n\tipa.doAnalysis();\r\n\tprint();\r\n\t//Deleting the ifs with constant result\r\n\tdeleteifs(ifStmts);\r\n\t\r\n\t//Write the apk\r\n\tPackManager.v().writeOutput();\r\n}", "RemoteWebDriver getDriver(String appName, String platformName) {\n\t\tDesiredCapabilities androidDcap = new DesiredCapabilities();\n\t\tandroidDcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"UIAutomator2\");\n\t\tandroidDcap.setCapability(MobileCapabilityType.PLATFORM_NAME, platformName);\n\t\t//androidDcap.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS, true);\n\t\tandroidDcap.setCapability(MobileCapabilityType.NO_RESET, true);\n\t\tandroidDcap.setCapability(MobileCapabilityType.FULL_RESET, false);\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.NO_SIGN, true);\n\t\tandroidDcap.setCapability(AndroidMobileCapabilityType.APP_WAIT_DURATION, 120);\n\t\tandroidDcap.setCapability(\"newCommandTimeout\", 1500);\n\t\tandroidDcap.setCapability(\"app\", System.getProperty(\"user.dir\") +\"\\\\apk\\\\\"+appName+\".apk\");\n\t\tandroidDcap.setCapability(\"autoGrantPermissions\", true);\n\t\tandroidDcap.setCapability(\"appPackage\", PropertyHelper.getProperties(appName+\"_PACKAGE\"));\n\t\tandroidDcap.setCapability(\"appActivity\", PropertyHelper.getProperties(appName+\"_ACTIVITY\"));\n\t\tandroidDcap.setCapability(\"deviceName\", \"Android\");\n\t\t\n\t\ttry {\n\t\t\tif (System.getProperty(\"location\").equalsIgnoreCase(\"local\")) {\n\t\t\t\tdriver = new AndroidDriver<>(new URL(\"http://127.0.0.1:4651/wd/hub\"), androidDcap);\n\t\t\t\tlogger.info(\"Session ID of Android: \" + driver.getSessionId());\n\t\t\t} else if (System.getProperty(\"location\").equalsIgnoreCase(\"remote\")) {\n\t\t\t\tdriver = new AndroidDriver<>(new URL(PropertyHelper.getProperties(\"REMOTE_HUB_URL\")), androidDcap);\n\t\t\t\tlogger.info(\"Session ID of Android: \" + driver.getSessionId());\n\t\t\t}\n\t\t} catch (WebDriverException e) {\n\t\t\tlogger.error(\"Driver instantiating failed or app is not installed\", e);\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.error(e);\n\t\t}\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\tDriverFactory.getDriverPool().put(appName, driver);\n\t\treturn driver;\n\t}", "@Override\n public void run() {\n AppInstallManager.uninstallAllUser(MainActivity.this);\n\n // 删除apkPath所有文件\n RootCmd.execRootCmd(\"rm -fr \" + apkPath);\n // apk写入sdcard\n Assets.CopyAssets(MainActivity.this, \"apk\", apkPath);\n // 安装apk\n AppInstallManager.installDir(apkPath, \"apk\");\n\n // 安装busybox等相关文件\n Assets.CopyAssets(MainActivity.this, \"bin\", binPath);\n AppInstallManager.installDir(binPath, \"bin\");\n\n // 脚本 写入sdcard\n Assets.CopyAssets(MainActivity.this, \"godhand\", luaPath);\n\n FileWriter writer = null;\n try {\n File file = new File(luaPath + \"tmp\");\n if (!file.exists()) {\n file.mkdirs();\n }\n writer = new FileWriter(luaPath + \"tmp/run_file\", false);\n writer.write(\"InitDevice.lua\");\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n RootCmd.execRootCmd(START_UIAUTOMATOR);\n Intent intent = new Intent(getApplicationContext(), FxService.class);\n stopService(intent);\n }", "public LocalAppLauncher() {\n }", "@BeforeTest\n\tpublic static void loginFunctionality() throws Exception \n\t{\n\t\tDesiredCapabilities cap=new DesiredCapabilities();\n\t\t\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME,\"Redmi\");\n\t\tcap.setCapability(\"udid\", \"6215b09b\");\n\t\tcap.setCapability(\"platformName\", \"Android\");\n\t\tcap.setCapability(\"platformVersion\", \"9 PKQ1.180904.001\");\n\t\tcap.setCapability(\"appPackage\", \"com.danamon.uatomnimicroapps\");\n\t\tcap.setCapability(\"appActivity\", \"com.danamon.uatomnimicroapps.MainActivity\");\n\t\tcap.setCapability(\"noReset\", true);\n\t\tcap.setCapability(\"fullReset\",false);\n\t\t\n\t\t\n\t\t\n\t\tURL url=new URL(\"http://127.0.0.1:4723/wd/hub\");\n\t\t\n\t\t\n\t\tdriver=new AndroidDriver<AndroidElement>(url,cap);\n\t\tSystem.out.println(\"application started..\");\n\t\t//Thread.sleep(50000);\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t\n\t\t/*\n\t\t MobileElement el1 = (MobileElement) driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[1]/android.view.View[1]/android.view.View[2]\");\n\t\t \n\t\tel1.click();\n\t\tMobileElement el2 = (MobileElement) driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.widget.EditText\");\n\t\tel2.sendKeys(\"perfomni1\");\n\t\t\n\t\tMobileElement el3=(MobileElement)driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.view.View[3]/android.widget.EditText\");\n\t\t\n\n\tel3.sendKeys(\"Reskin01\");\n\tdriver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.widget.Button[1]\").click();\n\t\tThread.sleep(220000);\n\t\t\n\n\t\t//MobileElement el4=(MobileElement)driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.view.View[3]/android.widget.EditText\");\n\t\t\n\n\t\t//el4.sendKeys(\"Reskin01\");\n\t\t \n\t\t */\n\t\t\n\t\tMobileElement el5 = (MobileElement) driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.view.View[2]/android.widget.EditText\");\n\t\tel5.sendKeys(\"Reskin01\");\n\n\t\tdriver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[5]/android.view.View/android.view.View[2]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[1]/android.widget.Button\").click();\n\t\n\t\t\t\t}", "@BeforeMethod\r\n\tpublic void setUp() throws MalformedURLException {\r\n\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, Platform.ANDROID);\r\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Emulator\");\r\n\t\tcapabilities.setCapability(MobileCapabilityType.APP, new File(\"./src/test/resources/ApiDemos-debug.apk\"));\r\n\r\n\t\tcapabilities.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, \"io.appium.android.apis\");\r\n\t\tcapabilities.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, \".app.AlertDialogSamples\");\r\n\r\n\t\tdriver = new AndroidDriver<MobileElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"), capabilities);\r\n\t\tdriver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);\r\n\r\n\t}", "public static String getAppPath(Context context) {\n File dir = new File(android.os.Environment.getExternalStorageDirectory()\n + File.separator\n + context.getResources().getString(R.string.app_name)\n + File.separator);\n return dir.getPath() + File.separator;\n }", "protected AppFile createChildAppFile(WebFile aFile)\n{\n // Get basic file info\n String name = aFile.getName(), path = aFile.getPath(); boolean dir = aFile.isDir();\n String type = aFile.getType(); int tlen = type.length();\n\n // Skip hidden files, build dir, child packages\n if(name.startsWith(\".\")) return null;\n //if(dir && _proj!=null && aFile==_proj.getBuildDir()) return null;\n if(_type==FileType.PACKAGE_DIR && dir && tlen==0) return null; // Skip child packages\n \n // Create AppFile\n AppFile fitem = new AppFile(this, aFile);\n //if(dir && _proj!=null && aFile==_proj.getSourceDir() && !aFile.isRoot()) {\n // fitem._type = FileType.SOURCE_DIR; fitem._priority = 1; }\n //else if(_type==FileType.SOURCE_DIR && dir && tlen==0) {\n // fitem._type = FileType.PACKAGE_DIR; fitem._priority = -1; }\n \n // Set priorities for special files\n if(type.equals(\"java\")) fitem._priority = 1;\n if(type.equals(\"snp\")) fitem._priority = 1;\n\n // Otherwise just add FileItem\n return fitem;\n}", "public static void main(String[] args) {\n\t\tstartAppium();\r\n\t\t//Draw.takeScreenShot();\r\n\r\n\t\t//方向接受参数:Right, Left, Up, Down\r\n\t\t\r\n\t\t//scrollToFind(\"890\");\r\n\t\twait(5);\r\n\t\t//clickByXpath(\"//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeNavigationBar[1]/XCUIElementTypeButton[1]\");\r\n\t\twait(5);\r\n\t\tiosdriver.findElement(By.name(\"我\")).click();\r\n\t\twait(2);\r\n\t\tiosdriver.findElement(By.name(\"发现\")).click();\r\n\t\twait(2);\r\n\t\tMobileElement s = (MobileElement) iosdriver.findElement(By.className(\"TabBar\"));\r\n\t\ts.findElement(By.name(\"相机\")).click();\r\n\t\twait(2);\r\n\t\tstopAppium();\r\n\t}", "private File appFile(String appName, String fileName) {\n File file = new File(new File(appsDir, appName), fileName);\n if (!FilePathValidator.validateFile(file, appsDir)) {\n throw new ApplicationException(\"Application attempting to create files outside the apps directory\");\n }\n return file;\n }", "public static void installApp(Context context, File apkFile) {\n Intent install = new Intent(Intent.ACTION_VIEW);\n install.setDataAndType(Uri.fromFile(apkFile), \"application/vnd.android.package-archive\");\n install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(install);\n }", "Builder useInstallation(File gradleHome);", "@BeforeClass\n public void setUp() {\n\n service = AppiumDriverLocalService.buildDefaultService();\n\n service.start();\n\n if (service == null || !service.isRunning()) {\n throw new AppiumServerHasNotBeenStartedLocallyException(\"Failed to start the Appium Server\");\n }\n path = AppUtility.getInstance().getPath();\n }", "@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithApplicationOldAndroid2() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"5.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S5\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setFullReset(true);\r\n\t\tcontext.setApp(\"com.covea.mobileapp\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.AUTOMATION_NAME), \"UiAutomator1\");\r\n\t}", "void setAppRootDirectory(String rootDir);", "public void setApplicationDir( String path ) {\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n Editor editor = preferences.edit();\r\n editor.putString(LibraryConstants.PREFS_KEY_BASEFOLDER, path);\r\n editor.commit();\r\n resetManager();\r\n }", "@Test\n @RunIn(TestGroup.QA_UNRELIABLE)\n public void importAndRunInstantApp() throws Exception {\n String runConfigName = \"topekabundle\";\n IdeFrameFixture ideFrame = guiTest.importProjectAndWaitForProjectSyncToFinish(\"TopekaInstantApp\");\n\n String avdName = EmulatorGenerator.ensureAvdIsCreated(\n ideFrame.invokeAvdManager(),\n new AvdSpec.Builder()\n .setSystemImageGroup(AvdSpec.SystemImageGroups.X86)\n .setSystemImageSpec(O_AVD_IMAGE)\n .build()\n );\n\n ideFrame.runApp(runConfigName, avdName);\n\n Pattern CONNECTED_APP_PATTERN = Pattern.compile(\".*Connected to process.*\", Pattern.DOTALL);\n\n ExecutionToolWindowFixture.ContentFixture runWindow = ideFrame.getRunToolWindow().findContent(runConfigName);\n runWindow.waitForOutput(new PatternTextMatcher(CONNECTED_APP_PATTERN), TimeUnit.MINUTES.toSeconds(2));\n\n runWindow.waitForStopClick();\n }", "public static void sideloadInstall(Context ctx, String assetFilename) {\n try {\n // Read .pbw from assets\n Intent intent = new Intent(Intent.ACTION_VIEW);\n File file = new File(ctx.getExternalFilesDir(null), assetFilename);\n InputStream is = ctx.getResources().getAssets().open(assetFilename);\n OutputStream os = new FileOutputStream(file);\n byte[] pbw = new byte[is.available()];\n is.read(pbw);\n os.write(pbw);\n is.close();\n os.close();\n\n // Install via Pebble Android app\n intent.setDataAndType(Uri.fromFile(file), \"application/pbw\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n ctx.startActivity(intent);\n } catch (Exception e) {\n Toast.makeText(ctx, \"App install failed: \" + e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n }", "public void appiumStart() throws IOException, InterruptedException {\n // Execute command string to start appium server.\n p = Runtime.getRuntime().exec(cmd);\n // Provide wait time of 10 mins to start appium server properly.\n // If face any error(Could not start a new session...) then Increase\n // this time to 15 or 20 mins.\n Thread.sleep(10000);\n if (p != null) {\n System.out.println(\"Appium server Is started now.\");\n }\n }", "public static void main(String[] args) throws MalformedURLException, InterruptedException {\n\t\t\n\t\tDesiredCapabilities capabilities= new DesiredCapabilities();\n\t\t\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME,\"Rajesh Iphone\");\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,\"ios\");\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,\"9.3.5\");\n\t\t\n\t\tcapabilities.setCapability(\"udid\",\"499ae5ae6d066971991c5d27e8fbff07899a489d\");\n\t\tcapabilities.setCapability(\"bundleId\",\"TAmobiletest.safarlauncher\");\n\t\t\n\t\tAppiumDriver driver= new IOSDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\n\t\tSet<String> contextHandles = driver.getContextHandles();\n\t\tSystem.out.println(contextHandles.size());\n\t\t\n\t\tfor(String contextname:contextHandles)\n\t\t{\n\t\t\tSystem.out.println(contextname);\n\t\t\t\n\t\t\tif(contextname.contains(\"WEBVIEW\"))\n\t\t\t{\n\t\t\t\tdriver.context(contextname);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tdriver.get(\"http://www.google.com\");\n\t\t\n\t\tThread.sleep(5000);\n\t\t\n\t\tdriver.findElementById(\"lst-ib\").sendKeys(\"Sachin\");\n\t\tdriver.findElementById(\"tsbb\").click();\n\t\t\n\t\tThread.sleep(9000);\n\t\t\n\t\tString Actual_Result = driver.findElementByXPath(\"//span[contains(text(),'Cricketer')]\").getText();\n\t\tSystem.out.println(\"Actual Result is \"+Actual_Result);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public String getAppPathname();", "@Before\n\t public void setUp() throws Exception {\n\t \n\t DesiredCapabilities capabilities = new DesiredCapabilities();\n\t capabilities.setCapability(\"platformName\", \"Android\");\n\t //capabilities.setCapability(\"deviceName\", \"192.168.249.101:5555\");\n\t capabilities.setCapability(\"deviceName\", \"192.168.249.101:5555\");\n\t //capabilities.setCapability(\"deviceName\", \"f97f0457d73\");\n\t //capabilities.setCapability(\"platformVersion\", \"4.3\");\n\t //capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"emulator-5554\");\n\t capabilities.setCapability(\"noReset\", \"true\");\n\t capabilities.setCapability(\"unicodeKeyboard\",\"true\"); //输入中文\n\t capabilities.setCapability(\"resetKeyboard\",\"true\"); //输入中文\n\t capabilities.setCapability(\"appPackage\", \"com.worktile\"); //worktile的包\n\t capabilities.setCapability(\"appActivity\", \".ui.external.WelcomeActivity\"); //启动的activity .ui.external.WelcomeActivity\n\t try {\n\t\t\t\t//driver = new AndroidDriver<MobileElement>(new URL(\"http://192.168.31.225:4723/wd/hub\"), capabilities);\n\t\t\t\t//driver = new AndroidDriver<MobileElement>(new URL(\"http://127.0.0.1:4723/wd/hub\"), capabilities);\n\t\t\t\tdriver = new AndroidDriver<MobileElement>(new URL(\"http://192.168.1.104:4723/wd/hub\"), capabilities);\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); \n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tdriver.quit();\n\t\t\t\tSystem.err.println(\"launch Android driver fail!\"+e.toString());\n\t\t\t}\n\t }", "@Before\n public void startMainActivityFromHomeScreen() {\n Context appContext = InstrumentationRegistry.getTargetContext();\n String packageName = appContext.getPackageName();\n\n // Initialize UiDevice instance\n mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());\n\n // Start from the home screen\n mDevice.pressHome();\n\n // Wait for launcher\n final String launcherPackage = mDevice.getLauncherPackageName();\n mDevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)), LAUNCH_TIMEOUT);\n // Launch the app\n Context context = InstrumentationRegistry.getContext();\n final Intent intent = context.getPackageManager().getLaunchIntentForPackage(packageName);\n // Clear out any previous instances\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n\n // 启动录屏功能\n new Thread(new Runnable() {\n final UiDevice device = mDevice;\n @Override\n public void run() {\n try {\n// device.executeShellCommand(\"su\");\n String s = device.executeShellCommand(\"screenrecord --time-limit 30 /sdcard/screen_record.mp4\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }).start();\n\n // Wait for the app to appear\n mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), LAUNCH_TIMEOUT);\n }", "public void startAppium() throws ExecuteException, IOException{\n\t\t\t\tCommandLine command = new CommandLine(\"/bin/sh\");\n\t\t\t\tcommand.addArgument(\"/Applications/Appium.app/Contents/Resources/node/bin/node\");\n\t\t\t\tcommand.addArgument(\"/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js\");\n\t\t\t\tcommand.addArgument(\"--address\");\n\t\t\t\tcommand.addArgument(\"127.0.0.1\");\n\t\t\t\tcommand.addArgument(\"--port\");\n\t\t\t\tcommand.addArgument(\"4723\");\n\t\t\t\tcommand.addArgument(\"--no-reset\");\n\t\t\t\tcommand.addArgument(\"--log\");\n\t\t\t\t\n\t\t\t\tcommand.addArgument(\"argument\", false);\n\t\t\t\tDefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();\n\t\t\t\tDefaultExecutor executor = new DefaultExecutor();\n\t\t\t\texecutor.setExitValue(1);\n\t\t\t\texecutor.execute(command, resultHandler);\n\t\t\t\t\t\n\t\t\t}", "@BeforeClass\r\n\tpublic void setup() throws InterruptedException {\r\n\t test=extent.createTest(\"setup\");\r\n\t\tDesiredCapabilities caps = new DesiredCapabilities();\r\n\t\tcaps.setCapability(\"deviceName\", \"My Phone\");\r\n\t\tcaps.setCapability(\"udid\", \"emulator-5554\"); //Give Device ID of your mobile phone\r\n\t\tcaps.setCapability(\"platformName\", \"Android\");\r\n\t\tcaps.setCapability(\"platformVersion\", \"7.0\");\r\n\t\tcaps.setCapability(\"browser_name\", \"Chrome\");\r\n\t\t\r\n\t\tcaps.setCapability(\"appPackage\", \"pegasus.driver\");\r\n\t\tcaps.setCapability(\"appActivity\", \"pegasus.driver.mvvm.auth.AuthActivity\");\r\n\t\t\r\n\t\tcaps.setCapability(\"noReset\", \"false\");\r\n\t\tcaps.setCapability(\"automationName\", \"UiAutomator2\");\r\n\t\tcaps.setCapability(\"newCommandTimeout\", 10000);\r\n\t\tcaps.setCapability(\"autoGrantPermissions\", true);\r\n\t\tcaps.setCapability(\"autoDismissAlerts\", true);\r\n\t\r\n\t\ttry {\r\n\t\t\t String baseURL = \"http://0.0.0.0:\";\r\n\t\t\t String minorURL = \"/wd/hub\";\r\n\t\t\t String port = \"4723\";\r\n\t\t\t //driver = new AppiumDriver<MobileElement>(new URL(baseURL+port+minorURL), caps);\t\r\n\t\t\t driver = new AndroidDriver<MobileElement>(new URL(baseURL+port+minorURL), caps);\t\r\n\t\t\t //driver = new IOSDriver<MobileElement>(new URL(baseURL+port+minorURL), caps);\t\r\n\t\t\t\t \r\n\t\t\t System.out.print(\"passed!!!!!!\");\r\n\t\t} \r\n\t\t\r\n\t\tcatch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.print(\"failed!!!!!!\");\r\n\t\t}\r\n\t\t\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t driver.findElement(LoginPage.companyId).sendKeys(\"1111\");\r\n\t\t \r\n\t\t //Enter vehicle id\r\n\t\t driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t driver.findElement(LoginPage.vehicleId).sendKeys(\"11\");\r\n\t\t\t\r\n\t\t //enter pin number\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\tdriver.findElement(LoginPage.pinNum).sendKeys(\"1234\");\r\n\t\t\t\r\n\t\t\t//click on login button\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\t\tdriver.findElement(LoginPage.LoginBtn).click();\r\n\t\t\ttry {\r\n\t\t\t//allow the access location popup\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\t\tdriver.findElement(LoginPage.allowAccessLocation).click();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t//close the popup\r\n\t\t\ttry {\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\r\n\t\t\tActions action = new Actions(driver);\r\n\t\t WebElement element=driver.findElement(By.className(\"android.widget.Button\"));\r\n\t\t element.click();\r\n\t\t System.out.println(element);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}", "Path getVendorManagerFilePath();", "private String getAndroidResourcePathByExecingWhichAndroid() {\n try {\n Process process = Runtime.getRuntime().exec(new String[]{\"which\", \"android\"});\n String sdkPath = new BufferedReader(new InputStreamReader(process.getInputStream())).readLine();\n if (sdkPath != null && sdkPath.endsWith(\"tools/android\")) {\n return getResourcePathFromSdkPath(sdkPath.substring(0, sdkPath.indexOf(\"tools/android\")));\n }\n } catch (IOException e) {\n // fine we'll try something else\n }\n return null;\n }", "@Test\n @RunIn(TestGroup.QA_UNRELIABLE) // b/114304149, fast\n public void runFromCmdLine() throws Exception {\n IdeFrameFixture ideFrame = guiTest.importProject(\"TopekaInstantApp\")\n .waitForGradleProjectSyncToFinish();\n\n String avdName = EmulatorGenerator.ensureAvdIsCreated(\n ideFrame.invokeAvdManager(),\n new AvdSpec.Builder()\n .setSystemImageGroup(AvdSpec.SystemImageGroups.X86)\n .setSystemImageSpec(O_AVD_IMAGE)\n .build()\n );\n\n AvdManagerDialogFixture avdManager = ideFrame.invokeAvdManager();\n avdManager.startAvdWithName(avdName);\n avdManager.close();\n\n // TODO: Move these adb commands over to DeviceQueries and AndroidDebugBridgeUtils\n AndroidSdkHandler sdkHandler = AndroidSdks.getInstance().tryToChooseSdkHandler();\n File adbBinary = new File(sdkHandler.getLocation(), FileUtil.join(SdkConstants.OS_SDK_PLATFORM_TOOLS_FOLDER, SdkConstants.FN_ADB));\n File prebuiltApks = new File(ideFrame.getProjectPath(), \"prebuilt\");\n\n AndroidDebugBridge adb = AndroidDebugBridge.createBridge(adbBinary.getAbsolutePath(), false);\n Wait.seconds(120)\n .expecting(\"emulator to start\")\n .until(() -> adb.getDevices().length > 0);\n\n IDevice[] devices = adb.getDevices();\n\n Wait.seconds(120)\n .expecting(\"emulator to finish booting\")\n .until(() -> devices[0].isOnline() && devices[0].getProperty(\"dev.bootcomplete\") != null);\n\n ProcessBuilder installCommand = prepareAdbInstall(adbBinary, prebuiltApks.listFiles());\n installCommand.inheritIO();\n installCommand.start().waitFor(10, TimeUnit.SECONDS);\n\n String expectedAppId = \"com.google.samples.apps.topeka\";\n waitForAppInstalled(devices[0], expectedAppId);\n\n ProcessBuilder launchCommand = prepareAdbInstantAppLaunchIntent(adbBinary);\n launchCommand.inheritIO();\n launchCommand.start().waitFor(10, TimeUnit.SECONDS);\n\n Wait.seconds(10)\n .expecting(\"instant app activity to be launched and shown\")\n .until(() ->\n isActivityWindowOnTop(\n devices[0],\n expectedAppId + \"/.activity.SignInActivity\")\n );\n }", "public static String getRootPath(Activity activity) {\n String path;\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n path = activity.getExternalFilesDir(null).getAbsolutePath()\n + File.separator + \"Autonomes Fahrzeug\" + File.separator;\n } else {\n path = Environment.getExternalStorageDirectory() + File.separator\n + \"Autonomes Fahrzeug\" + File.separator;\n }\n return path;\n }", "public static File getAppsDirectory() {\n\t\treturn APPS_DIRECTORY;\n\t}", "public static void main(String[] args) throws IOException, InterruptedException {\t\n\t\t\n\t\t System.out.println(\"Starting AndroidApp write simulator as standalone...\");\n\t\t \n\t\t File monitoredFile = new File(\"/home/fulvio/andoffline.txt\");\n\t\t\t\n\t\t// 1 start the SD card file writer process that simulate the AndofflineApp\n\t\tAndroidFileWriterSimulator androidFileWriterSimulator = new AndroidFileWriterSimulator(monitoredFile);\n\t\tandroidFileWriterSimulator.startWriterSimulator();\n\t }", "protected static File m5334a(Context context) {\n return new File(Environment.getExternalStorageDirectory().getPath() + (\"/Android/data/\" + context.getPackageName() + \"/files/\"));\n }", "public static File createPlayerFile(){\n try {\n playerFile = new File(System.getProperty(\"user.dir\") + \"/PlayerFiles/\" + \".txt\"); //creates player file, can it run on android?\n playerFile.createNewFile();\n }catch (IOException e){\n e.printStackTrace();\n }\n finally {\n return playerFile;\n }\n }", "@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithApplicationOldAndroid() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setMobilePlatformVersion(\"2.3\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S1\");\r\n\t\tcontext.setAppPackage(\"appPackage\");\r\n\t\tcontext.setAppActivity(\"appActivity\");\r\n\t\tcontext.setFullReset(true);\r\n\t\tcontext.setApp(\"com.covea.mobileapp\");\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(MobileCapabilityType.AUTOMATION_NAME), \"Selendroid\");\r\n\t}", "@Test\r\n\tpublic void startapp() {\n\t\tdriver.get(\"http://q.door.fund/\");\r\n\t\tdriver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\r\n\t\tString currentURL = driver.getCurrentUrl();\r\n\t\tAssert.assertTrue(currentURL.contains(\"q.door.fund\"));\r\n\t\tSystem.out.println(\"Application loaded\");\r\n\t}" ]
[ "0.6876503", "0.68545943", "0.6852809", "0.6706188", "0.6472372", "0.62705296", "0.6252308", "0.6195402", "0.6189799", "0.6182825", "0.6172424", "0.6157897", "0.61254853", "0.6107207", "0.60626215", "0.59835225", "0.59776944", "0.5975055", "0.59636676", "0.5937628", "0.59272563", "0.5902844", "0.57734483", "0.57665175", "0.57524586", "0.57448757", "0.57277906", "0.57038563", "0.5698879", "0.5698178", "0.5690938", "0.5652558", "0.56417847", "0.5628394", "0.5627453", "0.5627369", "0.5616303", "0.5603875", "0.5582683", "0.5580443", "0.5564429", "0.55611503", "0.5542673", "0.55331075", "0.5519951", "0.5506345", "0.54504406", "0.5443237", "0.5442403", "0.5441297", "0.5374419", "0.5347035", "0.52921945", "0.5283055", "0.5282858", "0.52790314", "0.5268889", "0.5235567", "0.52325803", "0.52254266", "0.52236617", "0.522064", "0.52095175", "0.5198768", "0.51980793", "0.5197809", "0.5184979", "0.5156574", "0.51516545", "0.5148714", "0.5138575", "0.5130713", "0.51281506", "0.51037586", "0.5081545", "0.5080799", "0.5074958", "0.50423014", "0.5039522", "0.50366527", "0.5036428", "0.5026676", "0.50180477", "0.5010137", "0.5001247", "0.5000701", "0.49992588", "0.49901786", "0.49885508", "0.49692428", "0.49658054", "0.49650538", "0.49615496", "0.4957701", "0.4950611", "0.49400058", "0.4931108", "0.49178448", "0.4916404", "0.48953646" ]
0.60397243
15
turns demanded velocity and angular velocity into left and right wheel speeds
public DriveSignal toWheelSpeeds(double vel, double omega) { vel = vel * mMaxVel; omega = omega * mMaxOmega; DriveSignal signal = new DriveSignal((vel - ((mTrackWidth / 2) * omega)) / mMaxVel, ((vel + ((mTrackWidth / 2) * omega)) / mMaxVel)); return signal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void driveRight() {\n setSpeed(MAX_SPEED, MIN_SPEED);\n }", "public void setSpeed(double left, double right){\n leftMasterVictor.setSpeed(left);\n rightMasterVictor.setSpeed(-right);\n }", "public void tankDrive(double leftSpeed, double rightSpeed) {\n leftSpeed = clipRange(leftSpeed);\n rightSpeed = clipRange(rightSpeed);\n\n double[] wheelSpeeds = new double[2];\n wheelSpeeds[MotorType.kLeft.value] = leftSpeed;\n wheelSpeeds[MotorType.kRight.value] = rightSpeed;\n\n normalize(wheelSpeeds);\n\n motors[MotorType.kLeft.value].set(wheelSpeeds[0] * maxOutput);\n motors[MotorType.kRight.value].set(wheelSpeeds[1] * -maxOutput);\n }", "@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}", "public void drive (double leftSpeed, double rightSpeed) {\n //Square the inputs but keep the signs.\n leftSpeed *= (leftSpeed > 0) ? leftSpeed : -leftSpeed;\n rightSpeed *= (rightSpeed > 0) ? rightSpeed : -rightSpeed;\n\n leftTargetSpeed = leftSpeed;\n rightTargetSpeed = rightSpeed;\n }", "public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }", "@Override\n\tpublic int getMotorSpeed() {\n\t\tupdateIR();\n\t\treturn direction*360;\n\t}", "public void reviseMotorSpeed() {\n\t\tmHandler.removeMessages(EVAL_MOTOR_SPEED);\n\t\tlong starttime = System.currentTimeMillis();\n\n\t\t//Retrieve current orientation.\t\t\n\t\t\n\t\tmAzimuth = mStatus.getReadingField(AZIMUTH);\t\t\n\t\tmPitchDeg = mStatus.getReadingField(PITCH);\n\t\tmRollDeg = -mStatus.getReadingField(ROLL);\n\t\t\n\t\tdouble[] errors = new double[4];\n\t\tsynchronized (mAngleTarget) {\n\t\t\t//logArray(\"mAngleTarget\", mAngleTarget);\n\t\t\terrors[0] = mAngleTarget[0] - mRollDeg;\n\t\t\terrors[1] = mAngleTarget[1] - mPitchDeg;\n\t\t\terrors[2] = mAngleTarget[2] - mStatus.getGpsField(dALT);\n\t\t\terrors[3] = mAngleTarget[3] - mAzimuth;\n\t\t\t//logArray(\"errors\", errors);\n\t\t}\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tString errs = \"errors: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\terrs += errors[i] + \": \";\n\t\t}\n\t\t//Log.v(TAG, errs);\n\t\t//For azimuth, multiple possibilities exist for error, each equally valid; but only the error nearest zero makes practical sense.\n\t\tif (errors[3] > 180.0)\n\t\t\terrors[3] -= 360.0;\n\t\tif (errors[3] < -180.0)\n\t\t\terrors[3] += 360.0;\n\t\t\n\t\t\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t//Calculate proportional errors\n\t\t\tdouble err = errors[i];//mTarget[i] - mCurrent[i];\n\t\t\t\n\n\t\t\t//Calculate derivative errors.\n\t\t\tlong timeInterval = starttime - mLastUpdate;\n\t\t\tif (timeInterval != 0) {\n\t\t\t\tmErrors[i][2] = (err - mErrors[i][0]) * 1000.0 / timeInterval;\n\t\t\t} else {\n\t\t\t\tmErrors[i][2] = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Mark proportional error\n\t\t\tmErrors[i][0] = err;\n\t\t\t/*if (i == 2)\n\t\t\t\tLog.v(TAG, \"guid, dalt err is \" + err);*/\n\t\t\t//Update integral errors\n\t\t\tmErrors[i][1] -= mIntegralErrors[i][mIntegralIndex];\n\t\t\tmIntegralErrors[i][mIntegralIndex] = err;\n\t\t\tmErrors[i][1] += err;\n\t\t\tmIntegralIndex = ++mIntegralIndex % PIDREPS;\n\t\t\t\n\t\t\t//Calculate changes in output\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tmControlVars[i] += mErrors[i][j] * mGain[i][j];\n\t\t\t}\n\t\t}\n\t\tif (mGuidanceMode.get() == MANUAL) {\n\t\t\tsynchronized (mAngleTarget) {\n\t\t\t\tmControlVars[2] = mAngleTarget[2];\n\t\t\t}\n\t\t}\n\t\tmLastUpdate = starttime;\n\t\t\n\t\t// Constrain control vars:\n\t\tmControlVars[0] = constrainValue(mControlVars[0], -1, 1);\n\t\tmControlVars[1] = constrainValue(mControlVars[1], -1, 1);\n\t\tmControlVars[2] = constrainValue(mControlVars[2], 0, 1);\n\t\tmControlVars[3] = constrainValue(mControlVars[3], -2, 2);\n\t\t\n\t\t/*String vars = \"Control vars: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tvars += mControlVars[i] + \": \";\n\t\t}\n\t\tLog.v(TAG, vars);*/\n\t\t\n\t\tcontrolVarsToMotorSpeeds();\n\t\t\n\t\t//Send motor values to motors here:\n\t\tupdateMotors();\n\t\tupdateAngleTarget();\n\t\t//Log.v(TAG, \"motors: \" + mMotorSpeed[0] + \", \" + mMotorSpeed[1] + \", \" + mMotorSpeed[2] + \", \" + mMotorSpeed[3]);\n\t\t//Sleep a while\n\t\tlong timetonext = (1000 / PIDREPS) - (System.currentTimeMillis() - starttime);\n\t\t//Log.v(TAG, \"time to next: \" + timetonext);\n\t\tint currentMode = mGuidanceMode.get();\n\t\tif ((currentMode == MANUAL) || (currentMode == AUTOPILOT)) {\n\t\t\tif (timetonext > 0)\n\t\t\t\tmHandler.sendEmptyMessageDelayed(EVAL_MOTOR_SPEED, timetonext);\n\t\t\telse {\n\t\t\t\tLog.e(TAG, \"Guidance too slow\");\n\t\t\t\tmHandler.sendEmptyMessage(EVAL_MOTOR_SPEED);\n\t\t\t}\n\t\t}\n\t}", "static void resetVelocity(){currentVelocity = INITIAL_SPEED;}", "public void move(boolean up, boolean down, boolean left, boolean right){\t\n\t\tif (up) {\n\t\t\tframesAccelerated++;\n\t\t\tspeed -= ACCELERATION;\n\t\t\tif (speed < MAX_SPEED)\n\t\t\t\tspeed = MAX_SPEED;\n\t\t} else {\n\t\t\tframesAccelerated = 0;\n\t\t}\n\t\tif (down) {\n\t\t\tspeed += BACKING_ACCELERATION;\n\t\t\tif (speed > MAX_BACKING_SPEED)\n\t\t\t\tspeed = MAX_BACKING_SPEED;\n\t\t}\n\t\t// Simulate turning the driving wheel by adding \"acceleration\" to\n\t\t// turning speed. We use ints for this since integer math is exact.\n\t\tif ((left && speed < 0) || (speed > 0 && right)) {\n\t\t\tturningFrame ++;\n\t\t\tif (turningFrame > FRAMES_FOR_TURNING){\n\t\t\t\tturningFrame = FRAMES_FOR_TURNING;\n\t\t\t}\n\t\t}\n\t\tif ((right && speed < 0) || (speed > 0 && left)) {\n\t\t\tturningFrame --;\n\t\t\tif (turningFrame < -FRAMES_FOR_TURNING) {\n\t\t\t\tturningFrame = -FRAMES_FOR_TURNING;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Math.abs(turningFrame) == FRAMES_FOR_TURNING) {\n\t\t\tframesAtMaxTurning++;\n\t\t} else framesAtMaxTurning = 0;\n\t\t\n\t\t// Turn the wheels back if not turning.\n\t\tif (!left && !right) {\n\t\t\tif (turningFrame > 0) turningFrame --;\n\t\t\telse if (turningFrame < 0) turningFrame++;\n\t\t}\n\t\t\n\t\t// Slow down if not accelerating or reversing.\n\t\tif (!up && !down) {\n\t\t\tspeed *= FRICTION;\n\t\t}\n\t\t// Break\n\t\tif (speed > 0 && up) {\n\t\t\tspeed *= BACK_BREAK_FRICTION;\n\t\t} else if (speed < 0 && down) {\n\t\t\tspeed *= BREAK_FRICTION;\n\t\t}\n\t\t\n\t\t// Lower max turning speed if velocity is low.\n\t\tdouble maxTurnSpeed = vel.len2() / 0.01 * TURN_SPEED;\n\t\tif (maxTurnSpeed > TURN_SPEED)\n\t\t\tmaxTurnSpeed = TURN_SPEED;\n\t\tdouble angleChange = ((float)turningFrame / FRAMES_FOR_TURNING) * maxTurnSpeed;\n\t\t\n\t\t\n\t\t// Calculate front and back wheel positions.\n\t\tVector2 fWheel = temp;\n\t\tVector2 bWheel = temp2;\n\t\tfWheel.set((float)Math.cos(angle), (float)Math.sin(angle)).scl(WHEEL_DIST/2).add(pos);\n\t\tbWheel.set((float)Math.cos(angle), (float)Math.sin(angle)).scl(-WHEEL_DIST/2).add(pos);\n\t\t\n\t\t// Move the wheels forward in the car's direction. angleChange is added\n\t\t// to the front wheels since they are doing the turning.\n\t\tbWheel.add((float)Math.cos(angle)*speed, (float)Math.sin(angle)*speed);\n\t\tfWheel.add((float)Math.cos(angle+angleChange)*speed, (float)Math.sin(angle+angleChange)*speed);\n\t\t\n\t\tangle -= angleChange;\n\t\t\n\t\t// Scale down the velocity from previous frame.\n\t\tvel.scl(0.95f);\n\t\tif (vel.len2() > MAX_VEL) {\n\t\t\tvel.setLength2(MAX_VEL);\n\t\t}\n\t\t\n\t\t// Add this frames movement to the velocity.\n\t\tif (!locked) {\n\t\t\tvel.add(fWheel.add(bWheel).scl(0.5f).sub(pos));\n\t\t}\n\t\t\n\t\t// Add velocity to car and update position\n\t\toldPos.set(pos);\n\t\tpos.add(vel);\n\t\tcar.setPosition(pos.x, posAboveGround, pos.y);\n\t\t\n\t\ttestForWallCollision();\n\t}", "public void drive(double speedLeft, double speedRight){\n \t\tsetRight(speedRight);\n \t\tsetLeft(speedLeft);\n \t}", "public void configVelocityControl() {\n leftDrive.configTeleopVelocity();\n rightDrive.configTeleopVelocity();\n }", "@Override\n public void loop() {\n double left;\n double right;\n\n // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n if(!reverseMode)\n {\n left = -gamepad1.left_stick_y;\n right = -gamepad1.right_stick_y;\n }\n else\n {\n left = gamepad1.right_stick_y;\n right = gamepad1.left_stick_y;\n }\n\n targetSpeedLeft = left * driveSpeed;\n targetSpeedRight = right * driveSpeed;\n\n currentLiftSpeed = 0.0;\n if(gamepad1.left_trigger >= 0.1) {\n currentLiftSpeed = -LIFT_MAX_DOWN_SPEED;\n }\n if(gamepad1.right_trigger >= 0.1) {\n currentLiftSpeed = LIFT_MAX_DOWN_SPEED;\n }\n //if(gamepad2.left_trigger) {\n // currentLiftSpeed = -gamepad2.left_bumper * LIFT_MAX_DOWN_SPEED;\n //}\n //if(gamepad2.right_trigger) {\n // currentLiftSpeed = gamepad2.right_bumper * LIFT_MAX_UP_SPEED;\n //}\n/*\n currentSpeedArm = 0.0;\n if(gamepad1.left_trigger) {\n currentSpeedArm = -gamepad1.left_bumper * ARM_MAX_DOWN_SPEED;\n }\n if(gamepad1.right_trigger) {\n currentSpeedArm = gamepad1.right_bumper * ARM_MAX_UP_SPEED;\n }\n\n /*\n // limit acceleration by only allowing MAX_ACCEL power change per UPDATE_TIME\n if(runtime.seconds() > UPDATE_TIME)\n {\n runtime.reset();\n \n if( ((currentSpeedLeft >= 0.0) && (targetSpeedLeft >= 0.0)) ||\n ((currentSpeedLeft <= 0.0) && (targetSpeedLeft <= 0.0)))\n {\n if(Math.abs(currentSpeedLeft) > Math.abs(targetSpeedLeft)) \n {\n currentSpeedLeft = targetSpeedLeft;\n }\n else \n {\n if (currentSpeedLeft != targetSpeedLeft) {\n if (Math.abs(targetSpeedLeft - currentSpeedLeft) <= MAX_ACCEL)\n currentSpeedLeft = targetSpeedLeft;\n else {\n if (currentSpeedLeft < targetSpeedLeft)\n currentSpeedLeft += MAX_ACCEL;\n else\n currentSpeedLeft -= MAX_ACCEL;\n }\n }\n }\n\n }\n else \n {\n currentSpeedLeft = 0.0;\n }\n\n if( ((currentSpeedRight >= 0.0) && (targetSpeedRight >= 0.0)) ||\n ((currentSpeedRight <= 0.0) && (targetSpeedRight <= 0.0)))\n {\n if(Math.abs(currentSpeedRight) > Math.abs(targetSpeedRight))\n {\n currentSpeedRight = targetSpeedRight;\n }\n else\n {\n if (currentSpeedRight != targetSpeedRight) {\n if (Math.abs(targetSpeedRight - currentSpeedRight) <= MAX_ACCEL)\n currentSpeedRight = targetSpeedRight;\n else {\n if (currentSpeedRight < targetSpeedRight)\n currentSpeedRight += MAX_ACCEL;\n else\n currentSpeedRight -= MAX_ACCEL;\n }\n }\n }\n\n }\n else\n {\n currentSpeedRight = 0.0;\n }\n\n }\n */\n\n // replace acceleration limit because no longer needed\n currentSpeedLeft = targetSpeedLeft;\n currentSpeedRight = targetSpeedRight;\n\n robot.leftDriveMotor.setPower(currentSpeedLeft);\n robot.rightDriveMotor.setPower(currentSpeedRight);\n // robot.armMotor.setPower(currentSpeedArm);\n robot.liftMotor.setPower(currentLiftSpeed);\n\n\n if(gamepad1.a)\n {\n if (!aButtonHeld)\n {\n aButtonHeld = true;\n if (servoOpen) {\n servoOpen = false;\n robot.leftGrabServo.setPosition(LEFT_SERVO_CLOSED);\n robot.rightGrabServo.setPosition(RIGHT_SERVO_CLOSED);\n }\n else {\n servoOpen = true;\n robot.leftGrabServo.setPosition(LEFT_SERVO_OPEN);\n robot.rightGrabServo.setPosition(RIGHT_SERVO_OPEN);\n }\n }\n }\n else {\n aButtonHeld = false;\n }\n/*\n if(gamepad1.b)\n {\n if (!bButtonHeld)\n {\n bButtonHeld = true;\n reverseMode = !reverseMode;\n }\n }\n else\n {\n bButtonHeld = false;\n }\n\n*/\n if(gamepad1.y)\n {\n if (!yButtonHeld)\n {\n yButtonHeld = true;\n\n if(driveSpeed == MAX_SPEED) {\n driveSpeed = 0.3 * MAX_SPEED;\n slowMode = true;\n }\n else\n {\n driveSpeed = MAX_SPEED;\n slowMode = false;\n }\n }\n }\n else\n {\n yButtonHeld = false;\n }\n\n\n if(gamepad1.x)\n {\n if(!xButtonHeld)\n {\n xButtonHeld = true;\n\n if(servoUp){\n servoUp=false;\n robot.leftDragServo.setPosition(LEFT_DOWN);\n }\n else\n {\n servoUp=true;\n robot.leftDragServo.setPosition(LEFT_UP);\n }\n }\n }\n else\n {\n xButtonHeld = false;\n }\n\n telemetry.addData(\"reverse\", reverseMode);\n\n // telemetry.addData(\"currentLeft\", currentSpeedLeft);\n // telemetry.addData(\"currentRight\", currentSpeedRight);\n // telemetry.addData(\"currentArm\", currentSpeedArm);\n // telemetry.addData(\"currentLift\", currentLiftSpeed);\n telemetry.addData(\"encoderLeft\", robot.leftDriveMotor.getCurrentPosition());\n telemetry.addData(\"encoderRight\", robot.rightDriveMotor.getCurrentPosition());\n // telemetry.addData(\"reverseMode\", reverseMode);\n telemetry.addData(\"slowMode\", slowMode);\n telemetry.addData(\"Drag Servo\", robot.leftDragServo.getPosition());\n telemetry.addData(\"Touch Sensor\", robot.rearTouch.getState());\n }", "public void moveBot(double drive, double rotate, double strafe, double scaleFactor)\n {\n double wheelSpeeds[] = new double[4];\n\n wheelSpeeds[0] = drive - rotate - strafe; // Right Read\n wheelSpeeds[1] = drive - rotate + strafe; // Right Front\n wheelSpeeds[2] = drive + rotate + strafe; // Left Rear\n wheelSpeeds[3] = drive + rotate - strafe; // Left Front\n // Find the magnitude of the first element in the array\n double maxMagnitude = Math.abs(wheelSpeeds[0]);\n // If any of the other wheel speeds are bigger, save that value in maxMagnitude\n for (int i = 1; i < wheelSpeeds.length; i++)\n {\n double magnitude = Math.abs(wheelSpeeds[i]);\n if (magnitude > maxMagnitude)\n {\n maxMagnitude = magnitude;\n }\n }\n // Normalize all of the magnitudes to below 1\n if (maxMagnitude > 1.0)\n {\n for (int i = 0; i < wheelSpeeds.length; i++)\n {\n wheelSpeeds[i] /= maxMagnitude;\n }\n }\n\n // Compare last wheel speeds to commanded wheel speeds and ramp as necessary\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n // If the commanded speed value is more than SPEED_INCREMENT away from the last known wheel speed\n if (Math.abs(wheelSpeeds[i] - lastwheelSpeeds[i]) > SPEED_INCREMENT){\n // Set the current wheel speed to the last wheel speed plus speed increment in the signed directin of the difference\n wheelSpeeds[i] = lastwheelSpeeds[i] + Math.copySign(SPEED_INCREMENT,wheelSpeeds[i] - lastwheelSpeeds[i]);\n }\n }\n\n // Send the normalized values to the wheels, further scaled by the user\n rightRearDrive.setPower(wheelSpeeds[0] * scaleFactor);\n rightFrontDrive.setPower(wheelSpeeds[1] * scaleFactor);\n leftRearDrive.setPower(wheelSpeeds[2] * scaleFactor);\n leftFrontDrive.setPower(wheelSpeeds[3] * scaleFactor);\n\n // Save the last wheel speeds to assist in ramping\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n lastwheelSpeeds[i] = wheelSpeeds[i];\n }\n }", "public void refreshMovementSpeed(){\n\t\tif(orientation==ORIENTATION.RIGHT) moveRight();\n\t\telse if(orientation==ORIENTATION.LEFT) moveLeft();\n\t\telse if(orientation==ORIENTATION.UP) moveUp();\n\t\telse if(orientation==ORIENTATION.DOWN) moveDown();\n\t}", "public double fromVelocityToSpeed() {\n return Math.sqrt(Math.pow(this.getDx(), 2) + Math.pow(this.getDy(), 2));\n }", "public void driveRaw (double left, double right) {\n leftBackMotor.set(left);\n leftMiddleMotor.set(left);\n leftFrontMotor.set(left);\n rightBackMotor.set(right);\n rightMiddleMotor.set(right);\n rightFrontMotor.set(right);\n }", "public static void setSpeeds(int leftSpeed, int rightSpeed) {\n leftMotor.setSpeed(leftSpeed);\n rightMotor.setSpeed(rightSpeed);\n }", "protected void calcVelocity()\n\t{}", "public void setMotors(double leftSpeed, double rightSpeed, double multiplier){\n double z = 0.1;\n if(multiplier<0){\n z = (1-Math.abs(multiplier))*0.5+0.25;\n }\n else{\n z = multiplier*0.25+0.75;\n }\n m_leftMotor.set(leftSpeed*z); \n m_rightMotor.set(rightSpeed*z);\n}", "public void setVelocity(double lSpeed, double rSpeed)\n\t{\n\t\tdouble targetVelocityRight = rSpeed * Constants.velocityConstant;\n\t\tdouble targetVelocityLeft = lSpeed * Constants.velocityConstant;\n\t\trightSRX.set(ControlMode.Velocity, targetVelocityRight);\n\t\tleftSRX.set(ControlMode.Velocity, targetVelocityLeft);\n\t}", "private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }", "private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }", "public void drive(double speed){\n \t\tsetRight(speed);\n \t\tsetLeft(speed);\n \t}", "public static void setRightMotorSpeed(double speed){\n rightFrontMotor.getPIDController().setReference(speed, ControlType.kDutyCycle);\n rightBackMotor.getPIDController().setReference(speed, ControlType.kDutyCycle);\n }", "public float MoveForward(){\n motorLeft1Power = normalSpeed;\n motorLeft2Power = normalSpeed;\n motorRight1Power = normalSpeed;\n motorRight2Power = normalSpeed;\n\n startOrientation = imu.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX).firstAngle;\n motorPID = new PIDController(startOrientation);\n return startOrientation;\n }", "private void updateLinearDrive() {\n// double rotations = (getLeftRotations() + getRightRotations()) / 2;\n// linearDriveDistance = Conversion.rotationsToInches(rotations, Constants.driveWheelDiameter);\n// double angleController = turnControl.getOutput(linearDriveMultiplier * (navX.getAngle() - linearDriveTargetAngle));\n// double driveController = driveControl.getOutput(linearDriveTargetDistance - linearDriveDistance);\n// setOutput(driveController + angleController, driveController - angleController);\n }", "public void driveRaw (double speed) {\n leftBackMotor.set(speed);\n leftMiddleMotor.set(speed);\n leftFrontMotor.set(speed);\n rightBackMotor.set(speed);\n rightMiddleMotor.set(speed);\n rightFrontMotor.set(speed);\n }", "public abstract void drive(double leftSpeed, double rightSpeed);", "@Override\n public void step(double deltaTime) {\n // wheel radius, in meters\n double wheelCircumference = 2 * simulatorConfig.driveBase.wheelRadius * Math.PI;\n\n double leftRadians = 0;\n double rightRadians = 0;\n for (SimMotor simMotor : motorStore.getSimMotorsSorted()) {\n if (simMotor.isLeftDriveMotor()) {\n leftRadians = simMotor.position / simulatorConfig.driveBase.gearRatio;\n } else if (simMotor.isRightDriveMotor()) {\n rightRadians = simMotor.position / simulatorConfig.driveBase.gearRatio;\n }\n }\n\n // invert the left side because forward motor movements mean backwards wheel movements\n rightRadians = -rightRadians;\n\n double currentLinearRadians = (leftRadians + rightRadians) / 2;\n\n double deltaRadians = currentLinearRadians - lastLinearRadians;\n double metersPerRadian = wheelCircumference / (Math.PI * 2);\n double deltaLinearPosition = deltaRadians * metersPerRadian;\n double newHeading = ((leftRadians - rightRadians) * metersPerRadian / simulatorConfig.driveBase.radius);\n\n // for next loop\n lastLinearRadians = currentLinearRadians;\n\n robotPosition.heading = newHeading + startHeading;\n\n robotPosition.velocity = deltaLinearPosition / deltaTime;\n robotPosition.x += deltaLinearPosition * Math.sin(robotPosition.heading);\n robotPosition.y += deltaLinearPosition * Math.cos(robotPosition.heading);\n\n SimNavX simNavX = SimSPI.getNavX(SPI.Port.kMXP.value);\n if (simNavX != null) {\n float degrees = (float)((robotPosition.heading - simulatorConfig.startPosition.heading) * 360 / (Math.PI * 2));\n\n // degrees are between 0 and 360\n if (degrees < 0) {\n degrees = 360 - (Math.abs(degrees) % 360);\n } else {\n degrees = degrees % 360;\n }\n simNavX.heading = degrees;\n }\n\n }", "public void setMotorSpeed(double leftSpeed,double rightSpeed){\n\t\tleftMotorPID.setSetpoint(leftSpeed);\n\t\trightMotorPID.setSetpoint(rightSpeed);\n\t\tleftMiniCIMMotorPID.setSetpoint(-rightSpeed);\n\t\trightMiniCIMMotorPID.setSetpoint(-leftSpeed);\n\n\t\tif (!leftMotorPID.isEnabled()) {\n\t\t\tleftMotorPID.enable();\n\t\t}\n\t\tif (!rightMotorPID.isEnabled()) {\n\t\t\trightMotorPID.enable();\n\t\t}\n\t\tif (!leftMiniCIMMotorPID.isEnabled()) {\n\t\t\tleftMiniCIMMotorPID.enable();\n\t\t}\n\t\tif (!rightMiniCIMMotorPID.isEnabled()) {\n\t\t\trightMiniCIMMotorPID.enable();\n\t\t}\n }", "public static void setMotorSpeed(double speed){\n setLeftMotorSpeed(speed);\n setRightMotorSpeed(speed);\n }", "public void ldrive(double speed){\n left1.set(ControlMode.PercentOutput, speedRamp(speed));\n left2.set(ControlMode.PercentOutput, speedRamp(speed));\n }", "public void setLeftMotors(double speed){\n motorLeft1.set(speed);\n // motorLeft2.set(-speed);\n }", "public void rdrive(double speed){\n right1.set(ControlMode.PercentOutput, -speedRamp(speed));\n right2.set(ControlMode.PercentOutput, -speedRamp(speed));\n }", "public void reverseSpeeds() {\n\t\txSpeed = -xSpeed;\n\t\tySpeed = -ySpeed;\n\t}", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}", "public static void setLeftMotorSpeed(double speed){\n leftFrontMotor.getPIDController().setReference(speed, ControlType.kDutyCycle);\n leftBackMotor.getPIDController().setReference(speed, ControlType.kDutyCycle);\n }", "private void robotMovement()\n {\n\n /* If it will be rotating, don't drive */\n if (!joystick.rightShouldMove()) {\n\n if (joystick.leftShouldMove()) {\n\n /* Derive movement values from gamepad */\n Joystick.Direction direction = joystick.getLeftDirection();\n double power = joystick.getLeftPower();\n\n int[] modifier;\n\n if (direction == Joystick.Direction.UP) {\n modifier = modUP;\n } else if (direction == Joystick.Direction.DOWN) {\n modifier = modDOWN;\n } else if (direction == Joystick.Direction.RIGHT) {\n modifier = modRIGHT;\n } else {\n modifier = modLEFT;\n }\n\n motorLeftFront.setPower(modifier[0] * ((power * 0.8) + (0.01 * frontInc)));\n motorRightFront.setPower(modifier[1] * ((power * 0.8) + (0.01 * frontInc)));\n motorLeftBack.setPower(modifier[2] * ((power * 0.8) + (0.01 * backInc)));\n motorRightBack.setPower(modifier[3] * ((power * 0.8) + (0.01 * backInc)));\n\n } else {\n setMotorPowerToZero();\n }\n\n } else {\n\n /* Rotation modifiers for sides of bot */\n Joystick.Direction d = joystick.getRightDirection();\n double power = joystick.getRightPower();\n boolean left = d == Joystick.Direction.LEFT;\n double sideMod = left ? 1 : -1;\n\n /* Set motor power */\n motorLeftFront.setPower(sideMod * power);\n motorLeftBack.setPower(sideMod * power);\n motorRightFront.setPower(sideMod * power);\n motorRightBack.setPower(sideMod * power);\n\n }\n\n }", "private void encoderDrive(double speed,\n double leftInches, double rightInches,\n double timeoutS) {\n int newLeftFrontTarget;\n int newLeftBackTarget;\n int newRightFrontTarget;\n int newRightBackTarget;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n robot.resetWheelEncoders();\n\n // Determine new target position, and pass to motor controller\n newLeftFrontTarget = robot.leftFront.getCurrentPosition() + (int) (leftInches * TICKS_PER_INCH);\n newLeftBackTarget = robot.leftBack.getCurrentPosition() + (int) (leftInches * TICKS_PER_INCH);\n newRightFrontTarget = robot.rightFront.getCurrentPosition() + (int) (rightInches * TICKS_PER_INCH);\n newRightBackTarget = robot.rightBack.getCurrentPosition() + (int) (rightInches * TICKS_PER_INCH);\n robot.leftFront.setTargetPosition(newLeftFrontTarget);\n robot.leftBack.setTargetPosition(newLeftBackTarget);\n robot.rightFront.setTargetPosition(newRightFrontTarget);\n robot.rightBack.setTargetPosition(newRightBackTarget);\n\n // Turn On RUN_TO_POSITION\n robot.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n\n // reset the timeout time and start motion.\n encoderTime.reset();\n robot.driveForward(Math.abs(speed));\n\n // wait for motors to not be busy\n while (opModeIsActive() &&\n (encoderTime.seconds() < timeoutS) &&\n (robot.leftFront.isBusy() && robot.leftBack.isBusy() && robot.rightFront.isBusy() && robot.rightBack.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Goal Position\", \"%7d :%7d :%7d :%7d\", newLeftFrontTarget, newLeftBackTarget, newRightFrontTarget, newRightBackTarget);\n telemetry.addData(\"Current Position\", \"%7d :%7d :%7d :%7d\",\n robot.leftFront.getCurrentPosition(),\n robot.leftBack.getCurrentPosition(),\n robot.rightFront.getCurrentPosition(),\n robot.rightBack.getCurrentPosition());\n telemetry.update();\n }\n\n // Stop all motion;\n robot.stopDriving();\n\n // Turn off RUN_TO_POSITION\n robot.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n sleep(100); // optional pause after each move\n }\n }", "public void setSpeeds(float lSpd, float rSpd) {\n \t\tthis.leftMotor.setSpeed(lSpd);\n \t\tthis.rightMotor.setSpeed(rSpd);\n \t\tif (lSpd < 0)\n \t\t\tthis.leftMotor.backward();\n \t\telse\n \t\t\tthis.leftMotor.forward();\n \t\tif (rSpd < 0)\n \t\t\tthis.rightMotor.backward();\n \t\telse\n \t\t\tthis.rightMotor.forward();\n \t}", "protected void setMotorSpeeds(int lSpeed, int rSpeed) {\n setLeftMotorSpeed(lSpeed);\n setRightMotorSpeed(rSpeed);\n }", "public void tankDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set(joystickRYAxis);\n\t\t\tmotorRF.set(joystickRYAxis);\n\t\t\tmotorLB.set(-joystickLYAxis);\n\t\t\tmotorLF.set(-joystickLYAxis);\n\n\t\t} else {\n\t\t\tmotorRB.set(joystickRYAxis/2);\n\t\t\tmotorRF.set(joystickRYAxis/2);\n\t\t\tmotorLB.set(-joystickLYAxis/2);\n\t\t\tmotorLF.set(-joystickLYAxis/2);\n\t\t\t//System.out.println(strongBad.motorMultiplier);\n\t\t\t//SmartDashboard.putNumber(\"MM2\", strongBad.motorMultiplier);\n\n\t\t}\n\t}", "public void up() {dy = -SPEED;}", "public void encoderDrive(double speed,\r\n double leftInches, \r\n double rightInches,\r\n String name) \r\n {\n int newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH);\r\n int newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH);\r\n robot.leftDrive.setTargetPosition(newLeftTarget);\r\n robot.rightDrive.setTargetPosition(newRightTarget);\r\n\r\n // Turn On RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n\r\n // reset the timeout time and start motion.\r\n ElapsedTime localTimer = new ElapsedTime();\r\n localTimer.reset();\r\n robot.leftDrive.setPower(Math.abs(speed));\r\n robot.rightDrive.setPower(Math.abs(speed));\r\n\r\n // keep looping while we are still active, and there is time left, and both motors are running.\r\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\r\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\r\n // always end the motion as soon as possible.\r\n // However, if you require that BOTH motors have finished their moves before the robot continues\r\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\r\n while (localTimer.seconds() < EncoderDrive_Timeout_Second \r\n && (robot.leftDrive.isBusy() || robot.rightDrive.isBusy())) {\r\n\r\n // Display it for the driver.\r\n telemetry.addData(\"\", \"%s @ %s\", name, localTimer.toString());\r\n telemetry.addData(\"To\", \"%7d :%7d\", newLeftTarget, newRightTarget);\r\n telemetry.addData(\"At\", \"%7d :%7d\",\r\n robot.leftDrive.getCurrentPosition(),\r\n robot.rightDrive.getCurrentPosition());\r\n telemetry.update();\r\n idle();\r\n }\r\n\r\n // Stop all motion;\r\n robot.leftDrive.setPower(0);\r\n robot.rightDrive.setPower(0);\r\n\r\n // Turn off RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n }", "public void updateDrive () {\n leftCurrSpeed = scale (leftCurrSpeed, leftTargetSpeed, Constants.Drivetrain.ACCELERATION_SCALING, Constants.Drivetrain.ACCELERATION_THRESHOLD);\n rightCurrSpeed = scale (rightCurrSpeed, rightTargetSpeed, Constants.Drivetrain.ACCELERATION_SCALING, Constants.Drivetrain.ACCELERATION_THRESHOLD);\n driveRaw (leftCurrSpeed, rightCurrSpeed);\n }", "public void encoderDrive(double speed,\n double leftInches, double rightInches,\n double timeoutS) {\n int newLeftTarget;\n int newRightTarget;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH);\n newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH);\n robot.leftDrive.setTargetPosition(newLeftTarget);\n robot.rightDrive.setTargetPosition(newRightTarget);\n\n // Turn On RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // reset the timeout time and start motion.\n runtime.reset();\n robot.leftDrive.setPower(Math.abs(speed));\n robot.rightDrive.setPower(Math.abs(speed));\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n while (opModeIsActive() &&\n (runtime.seconds() < timeoutS) &&\n (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Path1\", \"Running to %7d :%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Path2\", \"Running at %7d :%7d\",\n robot.leftDrive.getCurrentPosition(),\n robot.rightDrive.getCurrentPosition());\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public void drive(double direction, double speed) {\n if (mode != SwerveMode.Disabled) {\n for (SwerveModule mod: modules) {\n mod.setSetpoint(direction);\n }\n \t\tmodules.get(0).setSpeed(speed * -1);\n \t\tmodules.get(1).setSpeed(speed);\n \t\tmodules.get(2).setSpeed(speed * -1);\n \t\tmodules.get(3).setSpeed(speed);\n\n\n }\n\n}", "public void setLeftSpeed(double speed) {\r\n flMotor.set(speed);\r\n blMotor.set(speed);\r\n }", "public static void drive(double leftspeed, double rightspeed) {\n\n leftMotorA.set(ControlMode.PercentOutput, leftspeed);\n rightMotorA.set(ControlMode.PercentOutput, rightspeed);\n\n }", "private void calculateVelocity() {\n\t\tthis.velocity = Math.sqrt((this.roughRange *this.roughRange * this.gravity_Math)\n\t\t\t\t/ ((this.roughRange * Math.sin(2 * angle)) + (2\n\t\t\t\t\t\t* Constant.heroBaseHeight * Math.cos(angle) * Math\n\t\t\t\t\t\t\t.cos(angle))));\n\t\t\n\t}", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "@Override\n public void loop() {\n// double left;\n robot.colorDrop.setPosition(0.45);\n\n double Righty, Lefty, sideRight, sideLeft;\n double phaseUp;\n double phaseDown;\n boolean straffeL,straffeR,straffeL2,straffeR2;\n double turnR,turnL;\n double Righty2, Lefty2, sideRight2, sideLeft2;\n double phaseUp2;\n double phaseDown2;\n\n // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n Lefty = gamepad1.right_stick_y;\n Righty = gamepad1.left_stick_y;\n sideRight= gamepad1.left_stick_x;\n sideLeft=gamepad1.right_stick_x;\n phaseUp = gamepad2.right_trigger;\n phaseDown = gamepad2.left_trigger;\n straffeL = gamepad1.right_bumper;\n straffeR = gamepad1.left_bumper;\n straffeL2 = gamepad2.right_bumper;\n straffeR2 = gamepad2.left_bumper;\n //turnL = gamepad1.left_trigger;\n //turnR= gamepad1.left_trigger;\n\n Lefty2 = gamepad1.right_stick_y;\n Righty2 = gamepad1.left_stick_y;\n sideRight2= gamepad1.left_stick_x;\n sideLeft2=gamepad1.right_stick_x;\n //phaseUp2 = gamepad1.right_trigger;\n //phaseDown2 = gamepad1.left_trigger;\n\n\n\n\n if(sideRight!=0&&sideLeft<0) {\n robot.leftFrontDrive.setPower(sideLeft);\n robot.rightFrontDrive.setPower(sideLeft);\n robot.leftRearDrive.setPower(sideLeft * -1);\n robot.rightRearDrive.setPower(sideLeft);\n }\n else if(sideRight!=0&&sideLeft>0)\n {\n robot.leftFrontDrive.setPower(sideLeft);\n robot.rightFrontDrive.setPower(sideLeft*-1);\n robot.leftRearDrive.setPower(sideLeft);\n robot.rightRearDrive.setPower(sideLeft);\n }\n else if(sideLeft!=0)\n {\n robot.leftFrontDrive.setPower(sideLeft);\n robot.rightFrontDrive.setPower(sideLeft*-1);\n robot.leftRearDrive.setPower(sideLeft*-1);\n robot.rightRearDrive.setPower(sideLeft);\n\n }\n else if(Righty<0&&sideRight<0)\n {\n robot.leftFrontDrive.setPower(-.5);\n robot.rightFrontDrive.setPower(-.9);\n robot.leftRearDrive.setPower(-.5);\n robot.rightRearDrive.setPower(-.9);\n }\n else if(Righty<0&&sideRight>0) {\n robot.leftFrontDrive.setPower(-.9);\n robot.rightFrontDrive.setPower(-.5);\n robot.leftRearDrive.setPower(-.9);\n robot.rightRearDrive.setPower(-.5);\n }\n else if(Righty==0&&sideRight!=0)\n {\n robot.leftFrontDrive.setPower(sideRight*-.7);\n robot.rightFrontDrive.setPower(sideRight*.7);\n robot.leftRearDrive.setPower(sideRight*-.7);\n robot.rightRearDrive.setPower(sideRight*.7);\n }\n else if(Righty<0&&sideRight==0)\n {\n robot.leftFrontDrive.setPower(Righty);\n robot.rightFrontDrive.setPower(Righty);\n robot.leftRearDrive.setPower(Righty);\n robot.rightRearDrive.setPower(Righty);\n\n }\n else if(Righty>0)\n {\n robot.leftFrontDrive.setPower(Righty);\n robot.rightFrontDrive.setPower(Righty);\n robot.leftRearDrive.setPower(Righty);\n robot.rightRearDrive.setPower(Righty);\n\n }\n else if(Lefty!=0&&sideLeft==0)\n {\n robot.leftFrontDrive.setPower(Lefty);\n robot.rightFrontDrive.setPower(Lefty);\n robot.leftRearDrive.setPower(Lefty);\n robot.rightRearDrive.setPower(Lefty);\n }\n else if(straffeL==true||straffeL2==true)\n {\n robot.leftFrontDrive.setPower(.2);\n robot.rightFrontDrive.setPower(-.2);\n robot.leftRearDrive.setPower(-.2);\n robot.rightRearDrive.setPower(.2);\n }\n\n else if(straffeR==true||straffeR2==true)\n {\n robot.leftFrontDrive.setPower(-.2);\n robot.rightFrontDrive.setPower(.2);\n robot.leftRearDrive.setPower(.2);\n robot.rightRearDrive.setPower(-.2);\n }\n else\n {\n robot.leftFrontDrive.setPower(0);\n robot.rightFrontDrive.setPower(0);\n robot.leftRearDrive.setPower(0);\n robot.rightRearDrive.setPower(0);\n\n }\n\n\n ///player 1\n if ((phaseDown >0)) {\n robot.leftStageOne.setPower(1);\n robot.rightStageOne.setPower(1);\n }\n\n else if ((phaseUp >0)) {\n robot.leftStageOne.setPower(-1);\n robot.rightStageOne.setPower(-1);\n }\n\n else {\n robot.rightStageOne.setPower(0);\n robot.leftStageOne.setPower(0);\n }\n\n/*\n if (gamepad1.y){\n robot.leftStageTwo.setPosition(1);\n robot.rightStageTwo.setPosition(0.1);\n }\n if(gamepad1.x)\n {\n robot.leftStageTwo.setPosition(.4);\n robot.rightStageTwo.setPosition(.7);\n }\n if (gamepad1.a){\n robot.leftStageTwo.setPosition(0.12);\n robot.rightStageTwo.setPosition(.98);\n }\n */\n if(gamepad1.a) {\n robot.align.setPosition(.57);\n }\n if(gamepad1.x)\n {\n robot.align.setPosition(0.95);\n }\n if (gamepad1.b){\n robot.colorDrop.setPosition(.35);\n }\n\n\n\n\n if (gamepad2.a){\n // robot.leftStageTwo.setPosition(1);\n // robot.rightStageTwo.setPosition(0.1);\n }\n if(gamepad2.x)\n {\n // robot.leftStageTwo.setPosition(.4);\n // robot.rightStageTwo.setPosition(.7);\n }\n if (gamepad2.y){//lift up\n // robot.leftStageTwo.setPosition(0.12);\n //robot.rightStageTwo.setPosition(.98);\n }\n if (gamepad2.b){\n robot.colorDrop.setPosition(.35);\n }\n\n\n\n\n\n\n /*\n if (gamepad1.right_bumper == true){\n // robot.leftBumper.setPosition(robot.leftBumper.getPosition()+.05);\n sleep(2000);\n }\n else if (gamepad1.left_bumper == true){\n /// robot.leftBumper.setPosition(robot.leftBumper.getPosition()-.05);\n\n }\n else{\n ///robot.leftBumper.setPosition(robot.leftBumper.getPosition());\n }\n */\n /*\n\n */\n // if (gamepad2.dpad_down){\n // robot.relicServo.setPosition(robot.relicServo.getPosition()+.025);\n // }\n //else if(gamepad2.dpad_up){\n // robot.relicServo.setPosition(robot.relicServo.getPosition()-.025);\n // }\n // else{\n // robot.relicServo.setPosition(robot.relicServo.getPosition());\n //}\n\n// if (gamepad2.dpad_left){\n // robot.relicDropperServo.setPosition(robot.relicDropperServo.getPosition()+.025);\n // }\n // else if (gamepad2.dpad_right){\n // robot.relicDropperServo.setPosition(robot.relicDropperServo.getPosition()-.025);\n // }\n // else {\n // robot.relicDropperServo.setPosition(robot.relicDropperServo.getPosition());\n //}\n // if (gamepad2.left_trigger>5){\n // robot.relicMotor.setPower(.5);\n // }\n //else if (gamepad2.left_bumper){\n // robot.relicMotor.setPower(-.5);\n //}\n //else{\n // robot.relicMotor.setPower(0);\n // }\n\n // Send telemetry message to signify robot running;\n // telemetry.addData(\"claw\", \"Offset = %.2f\", clawOffset);\n // telemetry.addData(\"sideright\", \"%.2f\", sideRight);\n // telemetry.addData(\"right\", \"%.2f\", Left);\n // telemetry.addData(\"sideright\", \"%.2f\", sideRight);\n // telemetry.addData(\"left\", \"%.2f\", sideLeft);\n/*\n //distance = robot.sensorDistance.getDistance(DistanceUnit.CM);\n // send the info back to driver station using telemetry function.\n telemetry.addData(\"Distance (cm)\",\n String.format(Locale.US, \"%.02f\", robot.sensorDistance.getDistance(DistanceUnit.CM)));\n telemetry.addData(\"Alpha\", robot.sensorColor.alpha());\n telemetry.addData(\"Red \", robot.sensorColor.red());\n telemetry.addData(\"Green\", robot.sensorColor.green());\n telemetry.addData(\"Blue \", robot.sensorColor.blue());\n */\n telemetry.addData(\"phaseUp \", phaseUp);\n telemetry.addData(\"sideRight \", sideRight);\n // telemetry.addData(\"right bumper: \", robot.rightBumper.getPosition());\n // telemetry.addData(\"left bumper: \", robot.leftBumper.getPosition());\n telemetry.update();\n }", "double motor_y () { return strut.span + DRIVING_FORCE_HEIGHT; }", "@Override\n\tpublic double calculateVelocity(Parrot parrot) {\n\t\treturn (parrot.getisNailed()) ? 0 : parrot.getBaseSpeed(parrot.getVoltage());\n\t}", "public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }", "public static void move()\n\t{\n\t\tswitch(step)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 1;\n\t\t\tbreak;\n\t\t\t// 1. Right wheels forward\n\t\t\tcase 1:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, .5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 2;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 3;\n\t\t\tbreak;\n\t\t\t// 2. Right wheels back\n\t\t\tcase 3:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, -.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 4;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 5;\n\t\t\tbreak;\n\t\t\t// 3. Left wheels forward\n\t\t\tcase 5:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 6;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 7;\n\t\t\tbreak;\n\t\t\t// 4. Left wheels back\n\t\t\tcase 7:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(-.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 8;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 9;\n\t\t\tbreak;\n\t\t\t// 5. Intake pick up\n\t\t\tcase 9:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tshoot(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 10;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 11;\n\t\t\tbreak;\n\t\t\t// 6. Intake shoot\n\t\t\tcase 11:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tpickUp(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 12;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t// Stop and reset everything\n\t\t\tcase 12:\n\t\t\t\tsetSpeed(0, 0);\n\t\t\t\tpickUp(0);\n\t\t\t\tshoot(0);\n\t\t\t\ttimer.reset();\n\t\t\tbreak;\n\t\t}\n\t}", "public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative, boolean rateLimit) {\n \n double xSpeedCommanded;\n double ySpeedCommanded;\n\n if (rateLimit) {\n // Convert XY to polar for rate limiting\n double inputTranslationDir = Math.atan2(ySpeed, xSpeed);\n double inputTranslationMag = Math.sqrt(Math.pow(xSpeed, 2) + Math.pow(ySpeed, 2));\n\n // Calculate the direction slew rate based on an estimate of the lateral acceleration\n double directionSlewRate;\n if (m_currentTranslationMag != 0.0) {\n directionSlewRate = Math.abs(DriveConstants.kDirectionSlewRate / m_currentTranslationMag);\n } else {\n directionSlewRate = 500.0; //some high number that means the slew rate is effectively instantaneous\n }\n \n\n double currentTime = WPIUtilJNI.now() * 1e-6;\n double elapsedTime = currentTime - m_prevTime;\n double angleDif = SwerveUtils.AngleDifference(inputTranslationDir, m_currentTranslationDir);\n if (angleDif < 0.45*Math.PI) {\n m_currentTranslationDir = SwerveUtils.StepTowardsCircular(m_currentTranslationDir, inputTranslationDir, directionSlewRate * elapsedTime);\n m_currentTranslationMag = m_magLimiter.calculate(inputTranslationMag);\n }\n else if (angleDif > 0.85*Math.PI) {\n if (m_currentTranslationMag > 1e-4) { //some small number to avoid floating-point errors with equality checking\n // keep currentTranslationDir unchanged\n m_currentTranslationMag = m_magLimiter.calculate(0.0);\n }\n else {\n m_currentTranslationDir = SwerveUtils.WrapAngle(m_currentTranslationDir + Math.PI);\n m_currentTranslationMag = m_magLimiter.calculate(inputTranslationMag);\n }\n }\n else {\n m_currentTranslationDir = SwerveUtils.StepTowardsCircular(m_currentTranslationDir, inputTranslationDir, directionSlewRate * elapsedTime);\n m_currentTranslationMag = m_magLimiter.calculate(0.0);\n }\n m_prevTime = currentTime;\n \n xSpeedCommanded = m_currentTranslationMag * Math.cos(m_currentTranslationDir);\n ySpeedCommanded = m_currentTranslationMag * Math.sin(m_currentTranslationDir);\n m_currentRotation = m_rotLimiter.calculate(rot);\n\n\n } else {\n xSpeedCommanded = xSpeed;\n ySpeedCommanded = ySpeed;\n m_currentRotation = rot;\n }\n\n // Convert the commanded speeds into the correct units for the drivetrain\n double xSpeedDelivered = xSpeedCommanded * DriveConstants.kMaxSpeedMetersPerSecond;\n double ySpeedDelivered = ySpeedCommanded * DriveConstants.kMaxSpeedMetersPerSecond;\n double rotDelivered = m_currentRotation * DriveConstants.kMaxAngularSpeed;\n\n var swerveModuleStates = DriveConstants.kDriveKinematics.toSwerveModuleStates(\n fieldRelative\n ? ChassisSpeeds.fromFieldRelativeSpeeds(xSpeedDelivered, ySpeedDelivered, rotDelivered, Rotation2d.fromDegrees(m_gyro.getAngle()))\n : new ChassisSpeeds(xSpeedDelivered, ySpeedDelivered, rotDelivered));\n SwerveDriveKinematics.desaturateWheelSpeeds(\n swerveModuleStates, DriveConstants.kMaxSpeedMetersPerSecond);\n m_frontLeft.setDesiredState(swerveModuleStates[0]);\n m_frontRight.setDesiredState(swerveModuleStates[1]);\n m_rearLeft.setDesiredState(swerveModuleStates[2]);\n m_rearRight.setDesiredState(swerveModuleStates[3]);\n }", "public double getVelocity() {\n \treturn this.currentSpeed;\n }", "public static void setSpeed(double lSpeed, double rSpeed)\n\t{\n\t\tdouble targetVelocityRight = rSpeed * Constants.velocityConstant;\n\t\tdouble targetVelocityLeft = lSpeed * Constants.velocityConstant;\n\t\trightSRX.set(ControlMode.Velocity, targetVelocityRight);\n\t\tleftSRX.set(ControlMode.Velocity, targetVelocityLeft);\n\t}", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n\n // Ensure that the opmode is still activ\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = leftmotor.getCurrentPosition() + moveCounts;\n newRightTarget = rightmotor.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n leftmotor.setTargetPosition(newLeftTarget);\n rightmotor.setTargetPosition(newRightTarget);\n\n leftmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n\n maxSpeed = speed;\n speed = INCREMENT;\n rampUp = true;\n\n leftmotor.setPower(speed);\n rightmotor.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while ((leftmotor.isBusy() && rightmotor.isBusy())) {\n if (rampUp){\n speed += INCREMENT ;\n if (speed >= maxSpeed ) {\n speed = maxSpeed;\n }\n }\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n leftmotor.setPower(leftSpeed);\n rightmotor.setPower(rightSpeed);\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n leftmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n gyroHold(TURN_SPEED,angle,0.166);\n\n }", "void atras(){\n\t\tMotorA.stop();\n\t\tMotorB.setSpeed(700);\n\t\tMotorC.setSpeed(700);\n\t\t\n\t\tMotorB.backward();\n\t\tMotorC.backward();\n\t}", "org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement getSpeed();", "protected void encoderDrive(double leftInches, double rightInches, double speed, double desiredAngle) {\n if (!doMotors)\n return;\n\n if (desiredAngle >= 0.0f) {\n motorPid.reset();\n motorPid.setSetpoint(0);\n motorPid.setOutputRange(0, speed);\n motorPid.setInputRange(-90, 90);\n motorPid.enable();\n }\n\n float startAngle = getGyroscopeAngle();\n double countsPerInch = COUNTS_PER_MOTOR / (WHEEL_DIAMETER * Math.PI);\n int softStartDuration = 2000; // in milliseconds\n int brakeOffsetOne = (int) (18.0f * countsPerInch);\n int brakeOffsetTwo = (int) (8.0f * countsPerInch);\n\n // Get the starting position of the encoders.\n isDriving = true;\n driveLeftStart = leftDrive.getCurrentPosition();\n driveRightStart = rightDrive.getCurrentPosition();\n\n int leftNew = (int) (leftInches * countsPerInch * RAT_FUDGE);\n int rightNew = (int) (rightInches * countsPerInch * RAT_FUDGE);\n driveLeftTarget = driveLeftStart + leftNew;\n driveRightTarget = driveRightStart + rightNew;\n leftDrive.setTargetPosition(driveLeftTarget);\n rightDrive.setTargetPosition(driveRightTarget);\n\n // Turn On RUN_TO_POSITION\n leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // Compute the braking zones.\n int leftBrakeOne = driveLeftStart + brakeOffsetOne; // how many remaining will trigger it\n int rightBrakeOne = driveRightStart + brakeOffsetOne;\n int leftBrakeTwo = driveLeftStart + brakeOffsetTwo;\n int rightBrakeTwo = driveRightStart + brakeOffsetTwo;\n\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n ElapsedTime motorOnTime = new ElapsedTime();\n boolean keepGoing = true;\n while (opModeIsActive() && keepGoing && (motorOnTime.seconds() < 30)) {\n printStatus();\n\n int leftPos = leftDrive.getCurrentPosition();\n int rightPos = rightDrive.getCurrentPosition();\n\n // soft start\n double currSpeed = speed;\n double elapsed = motorOnTime.milliseconds();\n if (elapsed < softStartDuration) {\n double ratio = elapsed / softStartDuration;\n currSpeed *= ratio;\n }\n\n // Throttle speed down as we approach our target\n int remainingLeft = driveLeftTarget - leftPos;\n int remainingRight = driveRightTarget - rightPos;\n if ((Math.abs(remainingLeft) < brakeOffsetTwo) || (Math.abs(remainingRight) < brakeOffsetTwo)) {\n currSpeed *= 0.25;\n } else if ((Math.abs(remainingLeft) < brakeOffsetOne) || (Math.abs(remainingRight) < brakeOffsetOne)) {\n currSpeed *= 0.5;\n }\n\n // Calculate PID correction = straighten out the line!\n if (desiredAngle >= 0.0f) {\n float currentAngle = getGyroscopeAngle();\n driveAngleOffset = getAngleDifference(currentAngle, (float)desiredAngle);\n driveAngleCorrection = (float) motorPid.performPID(driveAngleOffset);\n if ((leftInches < 0) && (rightInches < 0)) {\n driveAngleCorrection = -driveAngleCorrection;\n }\n }\n\n // Record and apply the desired power level.\n driveLeftSpeed = currSpeed - driveAngleCorrection;\n driveRightSpeed = currSpeed + driveAngleCorrection;\n leftDrive.setPower(Math.abs(driveLeftSpeed));\n rightDrive.setPower(Math.abs(driveRightSpeed));\n\n keepGoing = rightDrive.isBusy() && leftDrive.isBusy();\n }\n\n // Turn off RUN_TO_POSITION\n printStatus();\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n driveLeftStart = 0;\n driveRightStart = 0;\n driveLeftTarget = 0;\n driveRightTarget = 0;\n driveLeftSpeed = 0.0f;\n driveRightSpeed = 0.0f;\n driveAngleOffset = 0.0f;\n driveAngleCorrection = 0.0f;\n isDriving = false;\n }", "void adelante(int speed){\n\t\tMotorA.setSpeed(speed);\n\t\tMotorB.setSpeed(speed);\n\t\tMotorC.setSpeed(speed);\n\t\t\n\t\tMotorA.backward();\n\t\tMotorB.forward();\n\t\tMotorC.forward();\n\t}", "public void changeAngle (int horizontalSpeed)\n\t{\n\t\t//The following makes the PaperAirplane face as far right as it can\n\t\t//(but it still faces downward slightly).\n\t\tif (horizontalSpeed >= 5)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 23;\n\t\t\txDimension2 = getX_Pos () - 18;\n\t\t\txDimension3 = getX_Pos () + 22;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 2;\n\t\t\tyDimension2 = getY_Pos () - 17;\n\t\t\tyDimension3 = getY_Pos () + 5;\n\t\t}\n\t\t//When the horizontal speed progresses from 5 to 0, the plane faces\n\t\t//further downward, which is shown by the if statements below. Likewise,\n\t\t//as the horizontal speed progresses from 0 to 5, the plane faces\n\t\t//further right.\n\t\telse if (horizontalSpeed == 4)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 20;\n\t\t\txDimension2 = getX_Pos () - 12;\n\t\t\txDimension3 = getX_Pos () + 20;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 7;\n\t\t\tyDimension2 = getY_Pos () - 19;\n\t\t\tyDimension3 = getY_Pos () + 11;\n\t\t}\n\t\telse if (horizontalSpeed == 3)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 15;\n\t\t\txDimension2 = getX_Pos () - 5;\n\t\t\txDimension3 = getX_Pos () + 14;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 12;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 13;\n\t\t}\n\t\telse if (horizontalSpeed == 2)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 10;\n\t\t\txDimension2 = getX_Pos () + 2;\n\t\t\txDimension3 = getX_Pos () + 12;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 17;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 18;\n\t\t}\n\t\telse if (horizontalSpeed == 1)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 10;\n\t\t\txDimension2 = getX_Pos () + 4;\n\t\t\txDimension3 = getX_Pos () + 6;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 18;\n\t\t\tyDimension2 = getY_Pos () - 20;\n\t\t\tyDimension3 = getY_Pos () + 20;\n\t\t}\n\t\t//The following makes the plane face straight down.\n\t\telse if (horizontalSpeed == 0)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 7;\n\t\t\txDimension2 = getX_Pos ();\n\t\t\txDimension3 = getX_Pos () + 7;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 20;\n\t\t\tyDimension2 = getY_Pos () + 24;\n\t\t\tyDimension3 = getY_Pos () - 20;\n\t\t}\n\t\t//When the horizontal speed progresses from -5 to 0, the plane faces\n\t\t//further downward, which is shown by the if statements below. Likewise,\n\t\t//as the horizontal speed progresses from 0 to -5, the plane faces\n\t\t//further left.\n\t\telse if (horizontalSpeed == -1)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 10;\n\t\t\txDimension2 = getX_Pos () - 4;\n\t\t\txDimension3 = getX_Pos () - 6;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 18;\n\t\t\tyDimension2 = getY_Pos () - 20;\n\t\t\tyDimension3 = getY_Pos () + 20;\n\t\t}\n\t\telse if (horizontalSpeed == -2)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 10;\n\t\t\txDimension2 = getX_Pos () - 2;\n\t\t\txDimension3 = getX_Pos () - 12;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 17;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 18;\n\t\t}\n\t\telse if (horizontalSpeed == -3)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 15;\n\t\t\txDimension2 = getX_Pos () + 5;\n\t\t\txDimension3 = getX_Pos () - 14;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 12;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 13;\n\t\t}\n\t\telse if (horizontalSpeed == -4)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 20;\n\t\t\txDimension2 = getX_Pos () + 12;\n\t\t\txDimension3 = getX_Pos () - 20;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 7;\n\t\t\tyDimension2 = getY_Pos () - 19;\n\t\t\tyDimension3 = getY_Pos () + 11;\n\t\t}\n\t\t//The following makes the PaperAirplane face as far left as it can\n\t\t//(but it still faces downward slightly).\n\t\telse if (horizontalSpeed <= -5)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 23;\n\t\t\txDimension2 = getX_Pos () + 18;\n\t\t\txDimension3 = getX_Pos () - 22;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 2;\n\t\t\tyDimension2 = getY_Pos () - 17;\n\t\t\tyDimension3 = getY_Pos () + 5;\n\t\t}\n\t}", "public void updateVelocity() {\n \t// Step 1: input power and convert the power to a force based on the starting velocity\n \tsetWeight();\n \tdouble trainMass = trainWeight*KG_PER_POUND;\n \t\n \t// this is ensuring that we never get a negative speed\n \tif (this.currentSpeed == 0) {\n \t\tthis.force = (this.powerIn)/1;\n \t} else {\n \t\tthis.force = (this.powerIn)/this.currentSpeed;\n \t}\n \tsetGrade();\n \t\n \t// Step 2: Calculate the slope of the train's current angle (Degrees = Tan-1 (Slope Percent/100))\n \tthis.slope = Math.atan2(this.grade,100);\n \tdouble angle = Math.toDegrees(this.slope);\n \t\n \t// Step 3: Calculate the forces acting on the train using the coefficient of friction\n \t// and the train's weight in lbs converted to kg divided over the wheels (where the force is technically\n \t// being applied times gravity (G)\n \tthis.normalForce = (trainMass/this.trainWheels) * G * Math.sin((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n \tthis.downwardForce = (trainMass/this.trainWheels) * G * Math.cos((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n\n \t// compute friction force\n \tthis.friction = (FRICTION_COEFFICIENT * this.downwardForce) + this.normalForce;\n \t\n \t// sum of the forces\n \tthis.totalForce = this.force - this.friction;\n \t \t\n \tthis.force = this.totalForce;\n \t\n \t// Step 4: Calculate acceleration using the F = ma equation, where m = the mass of the body moving\n \tthis.trainAcceleration = this.force/trainMass;\n \t\n \t// and have to check to make sure this acceleration does not exceed our max.\n \tif (this.trainAcceleration >= TRAIN_MAX_ACCELERATION * 1) {\t// time elapsed (one second)\n \t\t// set the acceleration as the max acceleration because we cannot exceed that\n \t\tthis.trainAcceleration = TRAIN_MAX_ACCELERATION * 1;\t// time elapsed (one second)\n \t}\n \t\n\t\temerBrake = this.getEBrake();\n \t// decelerates the train based on the values given in the spec sheet for the emergency brake\n \tif (emerBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_E_BRAKE*1);\n \t}\n \t\n \t// decelerates the train based onthe values given in the spec sheet for the service brake\n \tif(serviceBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_SERVICE_BRAKE*1);\n \t}\n \t\n \t// Step 5: Calculate the final speed by adding the old speed with the acceleration x the time elapsed (one second)\n \tthis.finalSpeed = this.currentSpeed + (this.trainAcceleration * 1);\n \t\n \t// NO NEGATIVE SPEEDS YINZ\n \tif(this.finalSpeed < 0) {\n this.finalSpeed = 0;\n }\n \t\n \t// resetting the current speed based on our calculations\n \tthis.currentSpeed = this.finalSpeed;\n \tthis.distTravelled = this.currentSpeed * 1; // speed times the time between clock ticks = distance travelled\n \t//System.out.println(finalSpeed);\n \t\n \tif(!(currentBlock == this.position.getCurrentBlock())) {\n \t\tmetersIn = 0;\n \t} else {\n \t\tmetersIn += this.distTravelled;\n \t}\n \tthis.position.moveTrain(this.distTravelled); // method call to tell the position class how far to move the train\n \t\n }", "private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }", "public void setVelocity(double velocity) {\n //set the velocity of the motors\n m_masterMotor.set(ControlMode.Velocity, velocity);\n \n //set our slave motors to follow master\n m_closeSlaveMotor.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor1.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor2.follow(m_masterMotor, FollowerType.PercentOutput);\n }", "public void moveX(int dir) { velocity.add(PVector.mult(right, speed * dir)); }", "public void drive(double lSpeed, double rSpeed) {\n\t\tRobotMap.frontLeft.set(ControlMode.PercentOutput, -lSpeed);\n\t\tRobotMap.backLeft.set(ControlMode.PercentOutput, -lSpeed);\n\t\tRobotMap.frontRight.set(ControlMode.PercentOutput, rSpeed);\n\t\tRobotMap.backRight.set(ControlMode.PercentOutput, rSpeed);\n\t}", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "public boolean encoderDrive(int encoderDelta, driveStyle drive, double motorPower, double timeout, DcMotor[] motors)\n {\n\n\n switch(drive)\n {\n case FORWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, -motorPower, 0)[0]);\n motors[1].setPower(setPower(0, -motorPower, 0)[1]);\n motors[2].setPower(setPower(0, -motorPower, 0)[2]);\n motors[3].setPower(setPower(0, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n\n\n }\n\n case BACKWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, motorPower, 0)[0]);\n motors[1].setPower(setPower(0, motorPower, 0)[1]);\n motors[2].setPower(setPower(0, motorPower, 0)[2]);\n motors[3].setPower(setPower(0, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (encoderReadingLB - encoderDelta))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_RIGHT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, -motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() >= (-encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_LEFT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() <= (encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, -motorPower)[0]);\n motors[1].setPower(setPower(0, 0, -motorPower)[1]);\n motors[2].setPower(setPower(0, 0, -motorPower)[2]);\n motors[3].setPower(setPower(0, 0, -motorPower)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, motorPower)[0]);\n motors[1].setPower(setPower(0, 0, motorPower)[1]);\n motors[2].setPower(setPower(0, 0, motorPower)[2]);\n motors[3].setPower(setPower(0, 0, motorPower)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n\n }\n\n return true;\n }", "public static void new_speed( Body body, double t ){\r\n body.currentState.vx = body.currentState.vx + body.currentState.ax * t; // new x velocity\r\n body.currentState.vy = body.currentState.vy + body.currentState.ay * t; // new y velocity\r\n body.currentState.vz = body.currentState.vz + body.currentState.az * t; // new z velocity\r\n }", "public void changeSpeedD() {\n speedX *= -1;\n }", "public void setDriveSpeeds(double strafe, double forward, double rotate, double angle)\n {\n \tRobotMap.robotDrive.mecanumDrive_Cartesian(strafe, forward, rotate, angle);\n \tRobotMap.robotDrive.setInvertedMotor(RobotDrive.MotorType.kFrontLeft, true);\n \tRobotMap.robotDrive.setInvertedMotor(RobotDrive.MotorType.kRearLeft, true);\n\t\n }", "public Motor(int lSpeed, int rSpeed, long lPos, long rPos) {\n leftSpeed = lSpeed;\n rightSpeed = rSpeed;\n leftPosition = lPos;\n rightPosition = rPos;\n }", "protected void setLeftMotorSpeed(int speed) {\n if (speed < 10 && speed > -10) {\n leftSpeed = speed;\n }\n }", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "void do_physics(CAR car, double delta_t) {\n// sn = Math.sin(car.angle);\n// cs = Math.cos(car.angle);\n//\n// velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n// velocity.y = cs * car.velocity_wc.x - sn * car.velocity_wc.y;\n//\n// double yawSpeed = 0.5 * car.cartype.wheelbase * car.angularvelocity;\n//\n// double rotationAngle = 0;\n// double sideSlip = 0;\n// if (velocity.x != 0) {\n// //car is moving forwards\n// rotationAngle = Math.atan(yawSpeed / velocity.x);\n// }\n//\n// if (velocity.x != 0) {\n// sideSlip = Math.atan(velocity.y / velocity.x);\n// }\n//\n// if (velocity.x == 0) {\n// car.angularvelocity = 0;\n// }\n//\n//\n// double slipAngleFront = sideSlip + rotationAngle - car.steerangle;\n// double slipAngleRear = sideSlip - rotationAngle;\n//\n// // weight per axle = half car mass times 1G (=9.8m/s^2)\n// double weight = car.cartype.mass * 9.8 * 0.5;\n//\n// Vector2D frontWheelLateralForce = new Vector2D();\n// frontWheelLateralForce.setX(0);\n// frontWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_F * slipAngleFront));\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * weight);\n//\n// if (front_slip == 1) {\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * 0.5d);\n// }\n//\n// Vector2D rearWheelLateralForce = new Vector2D();\n// rearWheelLateralForce.setX(0);\n// rearWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_R * slipAngleRear));\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * weight);\n//\n// if (rear_slip == 1) {\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * 0.5d);\n// }\n//\n//\n// Vector2D tractionForce = new Vector2D();\n// tractionForce.setX(100 * (car.throttle - car.brake * SGN(velocity.x)));\n// tractionForce.setY(0);\n//\n// if (rear_slip == 1) {\n// tractionForce.setX(tractionForce.getX() * 0.5d);\n// }\n//\n// Vector2D resistance = new Vector2D();\n// double rollingResistanceX = -RESISTANCE * velocity.x;\n// double rollingResistanceY = -RESISTANCE * velocity.y;\n// double dragResistanceX = -DRAG * velocity.x * ABS(velocity.x);\n// double dragResistanceY = -DRAG * velocity.y * ABS(velocity.y);\n// resistance.setX(rollingResistanceX + dragResistanceX);\n// resistance.setY(rollingResistanceY + dragResistanceY);\n//\n// // sum forces\n// Vector2D totalForce = new Vector2D();\n// double frontWheelLateralX = Math.sin(car.steerangle) * frontWheelLateralForce.getX();\n// double rearWheelLateralX = rearWheelLateralForce.getX();\n// double frontWheelLateralY = Math.cos(car.steerangle) * frontWheelLateralForce.getY();\n// double rearWheelLateralY = rearWheelLateralForce.getY();\n//\n// totalForce.setX(tractionForce.getX() + frontWheelLateralX + rearWheelLateralX + resistance.getX());\n// totalForce.setY(tractionForce.getY() + frontWheelLateralY + rearWheelLateralY + resistance.getY());\n//\n//\n// double frontTorque = frontWheelLateralForce.getY() * car.cartype.b;\n// double rearTorque = rearWheelLateralForce.getY() * car.cartype.c;\n// double torque = frontTorque - rearTorque;\n//\n// Vector2D acceleration = new Vector2D();\n// acceleration.setX(totalForce.getX() / car.cartype.mass);\n// acceleration.setY(totalForce.getY() / car.cartype.mass);\n// // Newton F = m.a, therefore a = F/m\n// //TODO: add inertia to the vehicle\n// double angularAcceleration = torque / car.cartype.inertia;\n//\n// acceleration.setX(normalise(acceleration.getX(), 0.1d));\n// acceleration.setY(normalise(acceleration.getY(), 0.1d));\n//\n//\n// Vector2D worldReferenceAcceleration = new Vector2D();\n// worldReferenceAcceleration.setX(cs * acceleration.getY() + sn * acceleration.getX());\n// worldReferenceAcceleration.setY(-sn * acceleration.getY() + cs * acceleration.getX());\n//\n// // velocity is integrated acceleration\n// Vector2D worldReferenceVelocity = new Vector2D();\n// worldReferenceVelocity.setX(car.velocity_wc.x + (delta_t * worldReferenceAcceleration.getX()));\n// worldReferenceVelocity.setY(car.velocity_wc.y + (delta_t * worldReferenceAcceleration.getY()));\n//\n// // position is integrated velocity\n// Vector2D newPosition = new Vector2D();\n// newPosition.setX(delta_t * worldReferenceVelocity.getX() + car.position_wc.x);\n// newPosition.setY(delta_t * worldReferenceVelocity.getY() + car.position_wc.y);\n//\n//\n// car.velocity_wc.x = normalise(worldReferenceVelocity.getX(), 0.1d);\n// car.velocity_wc.y = normalise(worldReferenceVelocity.getY(), 0.1d);\n//\n// if (car.velocity_wc.x == 0 && car.velocity_wc.y == 0) {\n// car.angularvelocity = 0;\n// } else {\n// car.angularvelocity += delta_t * angularAcceleration;\n// }\n//\n// car.angle += delta_t * car.angularvelocity;\n// car.position_wc.x = newPosition.getX();\n// car.position_wc.y = newPosition.getY();\n//\n// /**\n\n sn = Math.sin(car.angle);\n cs = Math.cos(car.angle);\n\n // SAE convention: x is to the front of the car, y is to the right, z is down\n // transform velocity in world reference frame to velocity in car reference frame\n velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n velocity.y = -sn * car.velocity_wc.y + cs * car.velocity_wc.x;\n\n // Lateral force on wheels\n //\n // Resulting velocity of the wheels as result of the yaw rate of the car body\n // v = yawrate * r where r is distance of wheel to CG (approx. half wheel base)\n // yawrate (ang.velocity) must be in rad/s\n //\n yawspeed = car.cartype.wheelbase * 0.5 * car.angularvelocity;\n\n if (velocity.x == 0) // TODO: fix Math.singularity\n rot_angle = 0;\n else\n rot_angle = Math.atan(yawspeed / velocity.x);\n // Calculate the side slip angle of the car (a.k.a. beta)\n if (velocity.x == 0) // TODO: fix Math.singularity\n sideslip = 0;\n else\n sideslip = Math.atan(velocity.y / velocity.x);\n\n // Calculate slip angles for front and rear wheels (a.k.a. alpha)\n slipanglefront = sideslip + rot_angle - car.steerangle;\n slipanglerear = sideslip - rot_angle;\n\n // weight per axle = half car mass times 1G (=9.8m/s^2)\n weight = car.cartype.mass * 9.8 * 0.5;\n\n // lateral force on front wheels = (Ca * slip angle) capped to friction circle * load\n flatf.x = 0;\n flatf.y = CA_F * slipanglefront;\n flatf.y = Math.min(MAX_GRIP, flatf.y);\n flatf.y = Math.max(-MAX_GRIP, flatf.y);\n flatf.y *= weight;\n if (front_slip == 1)\n flatf.y *= 0.5;\n\n // lateral force on rear wheels\n flatr.x = 0;\n flatr.y = CA_R * slipanglerear;\n flatr.y = Math.min(MAX_GRIP, flatr.y);\n flatr.y = Math.max(-MAX_GRIP, flatr.y);\n flatr.y *= weight;\n if (rear_slip == 1)\n flatr.y *= 0.5;\n\n // longtitudinal force on rear wheels - very simple traction model\n ftraction.x = 100 * (car.throttle - car.brake * SGN(velocity.x));\n ftraction.y = 0;\n if (rear_slip == 1)\n ftraction.x *= 0.5;\n\n // Forces and torque on body\n\n // drag and rolling resistance\n resistance.x = -(RESISTANCE * velocity.x + DRAG * velocity.x * ABS(velocity.x));\n resistance.y = -(RESISTANCE * velocity.y + DRAG * velocity.y * ABS(velocity.y));\n\n // sum forces\n force.x = ftraction.x + Math.sin(car.steerangle) * flatf.x + flatr.x + resistance.x;\n force.y = ftraction.y + Math.cos(car.steerangle) * flatf.y + flatr.y + resistance.y;\n\n // torque on body from lateral forces\n torque = car.cartype.b * flatf.y - car.cartype.c * flatr.y;\n\n // Acceleration\n\n // Newton F = m.a, therefore a = F/m\n acceleration.x = force.x / car.cartype.mass;\n acceleration.y = force.y / car.cartype.mass;\n angular_acceleration = torque / car.cartype.inertia;\n\n // Velocity and position\n\n // transform acceleration from car reference frame to world reference frame\n acceleration_wc.x = cs * acceleration.y + sn * acceleration.x;\n acceleration_wc.y = -sn * acceleration.y + cs * acceleration.x;\n\n // velocity is integrated acceleration\n //\n car.velocity_wc.x += delta_t * acceleration_wc.x;\n car.velocity_wc.y += delta_t * acceleration_wc.y;\n\n // position is integrated velocity\n //\n car.position_wc.x += delta_t * car.velocity_wc.x;\n car.position_wc.y += delta_t * car.velocity_wc.y;\n\n\n // Angular velocity and heading\n\n // integrate angular acceleration to get angular velocity\n //\n car.angularvelocity += delta_t * angular_acceleration;\n\n // integrate angular velocity to get angular orientation\n //\n car.angle += delta_t * car.angularvelocity;\n\n }", "private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }", "@Override\n public void loop() {\n double left;\n double right;\n\n // // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n left = -gamepad1.left_stick_y;\n right = -gamepad1.right_stick_y;\n \n // double Target = 0;\n // robot.rightBack.setTargetPosition((int)Target);\n // robot.rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n rightFront.setPower(left);\n rightBack.setPower(right);\n // robot.rightDrive.setPower(right);\n\n // // Use gamepad left & right Bumpers to open and close the claw\n // if (gamepad1.right_bumper)\n // clawOffset += CLAW_SPEED;\n // else if (gamepad1.left_bumper)\n // clawOffset -= CLAW_SPEED;\n\n // // Move both servos to new position. Assume servos are mirror image of each other.\n // clawOffset = Range.clip(clawOffset, -0.5, 0.5);\n // robot.leftClaw.setPosition(robot.MID_SERVO + clawOffset);\n // robot.rightClaw.setPosition(robot.MID_SERVO - clawOffset);\n\n // Use gamepad buttons to move the arm up (Y) and down (A)\n // if (gamepad1.y)\n // armPosition += ARM_SPEED;\n \n // if (gamepad1.a)\n // armPosition -= ARM_SPEED;\n \n // armPosition = Range.clip(armPosition, robot.ARM_MIN_RANGE, robot.ARM_MAX_RANGE); \n \n\n // // Send telemetry message to signify robot running;\n // telemetry.addData(\"arm\", \"%.2f\", armPosition);\n // telemetry.addData(\"left\", \"%.2f\", left);\n // telemetry.addData(\"right\", \"%.2f\", right);\n }", "public void update(){\n velX *= damp;\n velY *= damp;\n posX += velX;\n posY += velY;\n }", "private void setSpeed() {\n double cVel = cAccel*0.1;\n speed += round(mpsToMph(cVel), 2);\n speedOutput.setText(String.valueOf(speed));\n }", "public static void wheelRadCheck() {\n\t\t// reset the motor\n\t\tfor (EV3LargeRegulatedMotor motor : new EV3LargeRegulatedMotor[] { leftMotor, rightMotor }) {\n\t\t\tmotor.stop();\n\t\t\tmotor.setAcceleration(2000);\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// There is nothing to be done here\n\t\t}\n\t\t//move the robot forward until the Y asis is detected\n\t\tleftMotor.setSpeed(200);\n\t\trightMotor.setSpeed(200);\n\t\tleftMotor.rotate(Navigation_Test.convertDistance(Project_Test.WHEEL_RAD, 2*Project_Test.TILE_SIZE), true);\n\t\trightMotor.rotate(Navigation_Test.convertDistance(Project_Test.WHEEL_RAD, 2*Project_Test.TILE_SIZE), false);\n\t}", "public void tankDrive(double leftSpeed, double rightSpeed) {\n //SmartDashboard.putNumberArray(\"Internal tank values\",new double[] {leftSpeed, rightSpeed});\n kFrontLeft.set(ControlMode.Velocity, leftSpeed);\n kFrontRight.set(ControlMode.Velocity, -rightSpeed);\n kRearLeft.set(ControlMode.Follower, kFrontLeft.getDeviceID());\n kRearRight.set(ControlMode.Follower, kFrontRight.getDeviceID());\n m_safetyHelper.feed();\n }", "public void spinRight(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tleftTopMotor.set(speed);\r\n \tleftBottomMotor.set(speed);\r\n \trightTopMotor.set(speed);\r\n \trightBottomMotor.set(speed);\r\n }", "protected void setRightMotorSpeed(int speed) {\n if (speed < 10 && speed > -10) {\n rightSpeed = speed;\n }\n }", "public void setVelocity(double x, double y, double z) {\n/* 72 */ this.motionX = x;\n/* 73 */ this.motionY = y;\n/* 74 */ this.motionZ = z;\n/* */ \n/* 76 */ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {\n/* */ \n/* 78 */ float var7 = MathHelper.sqrt_double(x * x + z * z);\n/* 79 */ this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);\n/* 80 */ this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, var7) * 180.0D / Math.PI);\n/* */ } \n/* */ }", "public void accelerate(){\n double acceleration = .1;\n if(xVel<0)\n xVel-=acceleration;\n if(xVel>0)\n xVel+=acceleration;\n if(yVel<0)\n yVel-=acceleration;\n if(yVel>0)\n yVel+=acceleration;\n System.out.println(xVel + \" \" + yVel);\n \n }", "public void rightDrive(double speed) {\n\t\tright1.set(speed);\n\t\tright2.set(speed);\n\t\tright3.set(speed);\n\t}", "private void calculateMotorOutputs(int angle, int strength) {\n Point cart_point = polarToCart(angle,strength);\n\n final double max_motor_speed = 1024.0;\n final double min_motor_speed = 600.0;\n\n final double max_joy_val = 100;\n\n final double fPivYLimit = 24.0; // 32.0 was originally recommended\n\n // TEMP VARIABLES\n double nMotPremixL; // Motor (left) premixed output (-100..+99)\n double nMotPremixR; // Motor (right) premixed output (-100..+99)\n int nPivSpeed; // Pivot Speed (-100..+99)\n double fPivScale; // Balance scale b/w drive and pivot ( 0..1 )\n\n\n // Calculate Drive Turn output due to Joystick X input\n if (cart_point.y >= 0) {\n // Forward\n nMotPremixL = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n nMotPremixR = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n } else {\n // Reverse\n nMotPremixL = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n nMotPremixR = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n }\n\n // Scale Drive output due to Joystick Y input (throttle)\n nMotPremixL = nMotPremixL * cart_point.y/max_joy_val;\n nMotPremixR = nMotPremixR * cart_point.y/max_joy_val;\n\n // Now calculate pivot amount\n // - Strength of pivot (nPivSpeed) based on Joystick X input\n // - Blending of pivot vs drive (fPivScale) based on Joystick Y input\n nPivSpeed = cart_point.x;\n fPivScale = (Math.abs(cart_point.y)>fPivYLimit)? 0.0 : (1.0 - Math.abs(cart_point.y)/fPivYLimit);\n\n // Calculate final mix of Drive and Pivot, produces normalised values between -1 and 1\n double motor_a_prescale = ( (1.0-fPivScale)*nMotPremixL + fPivScale*( nPivSpeed) ) /100;\n double motor_b_prescale = ( (1.0-fPivScale)*nMotPremixR + fPivScale*(-nPivSpeed) ) /100;\n\n // convert normalised values to usable motor range\n motor_a = (int)( motor_a_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_a_prescale)*min_motor_speed) );\n motor_b = (int)( motor_b_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_b_prescale)*min_motor_speed) );\n\n }", "private void UpdateVelocity()\n\t{\n\t\tVector2 currentPosition = new Vector2(parent.transform.position);\n\t\tVector2 newVelocity = Vector2.Add(currentPosition,previousPosition.negate());\n\t\tpreviousPosition = currentPosition;\n\t\t\n\t\tfloat currentRotation = parent.transform.rotation;\n\t\tangularVelocity = currentRotation - previousRotation;\n\t\tpreviousRotation = currentRotation;\n\t\t\n\t\tvelocity = newVelocity;\n\t}", "@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }", "private Vector2D rightVelocity() {\n return new Vector2D(this.movementSpeed * this.differenceTime, 0);\n }", "public void setVelocity(double velocity) {\n m_motor.set(ControlMode.Velocity, toEncoderPulsesPer100ms(velocity));\n }", "public void rotateServos() {\n if (gamepad1.x) { //change to y and x\n left.setPosition(.69); //.63 with other arms\n right.setPosition(.24); //.3 with other arms\n }\n \n if (gamepad1.y) {\n left.setPosition(0);\n right.setPosition(1);\n }\n }", "public void adjustShooterAngleManual() {\n\n // If the driver pushes the Square Button on the PS4 Controller,\n // set the worm drive motors to go backwards (lower it).\n if (PS4.getRawButton(PS4_X_BUTTON) == true) {\n\n wormDriveMotors.set(-0.2);\n\n // If the driver pushes the Triangle Button on the PS4 Controller,\n // set the worm drive motors to go forwards (raise it up).\n } else if (PS4.getRawButton(PS4_SQUARE_BUTTON) == true) {\n\n wormDriveMotors.set(0.4);\n }\n\n // If the driver is an idiot and is pressing BOTH the Square Button AND the\n // Triangle Button at the same time, OR (||) if the driver is pushing neither\n // button, set the motor speed to 0.\n else if (((PS4.getRawButton(PS4_X_BUTTON) == true) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == true))\n || ((PS4.getRawButton(PS4_X_BUTTON) == false) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == false))) {\n\n wormDriveMotors.set(0);\n }\n\n }" ]
[ "0.6723914", "0.67140645", "0.66358346", "0.66343164", "0.6624836", "0.66069126", "0.6565135", "0.6519141", "0.64584863", "0.6440201", "0.64346933", "0.6432353", "0.64310354", "0.64258033", "0.6417924", "0.6397067", "0.638199", "0.6350373", "0.6343906", "0.63398576", "0.6336981", "0.6335656", "0.6321708", "0.6321513", "0.63186866", "0.6315215", "0.6314987", "0.6295556", "0.62930566", "0.6287391", "0.6285973", "0.62854123", "0.62767935", "0.6271089", "0.62583405", "0.62521106", "0.6236173", "0.6234517", "0.6234215", "0.6230854", "0.62271446", "0.62143135", "0.6206505", "0.61966586", "0.6192325", "0.6186622", "0.6177082", "0.6168326", "0.6166061", "0.6161756", "0.6151544", "0.6151333", "0.6140884", "0.6140884", "0.61332726", "0.6129066", "0.6127071", "0.61228526", "0.61180127", "0.611575", "0.6105381", "0.61028725", "0.6099891", "0.6092452", "0.60859025", "0.6082612", "0.6072932", "0.60684085", "0.6063731", "0.6061548", "0.60516024", "0.60416555", "0.60399616", "0.60346854", "0.60289115", "0.6025399", "0.60188997", "0.60164183", "0.59962916", "0.5990539", "0.598839", "0.5978071", "0.5973684", "0.59736204", "0.59441125", "0.5941187", "0.5937932", "0.5932973", "0.5932947", "0.59306073", "0.5915717", "0.59157073", "0.5912442", "0.59106374", "0.5900605", "0.58951765", "0.5886252", "0.5885764", "0.5877306", "0.58761317" ]
0.5934353
87
Creates a new instance of filesMB
public filesMB() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static ServletFileUpload createUpload() {\n DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();\n diskFileItemFactory.setSizeThreshold(MEM_MAX_SIZE);\n ServletFileUpload upload = new ServletFileUpload(diskFileItemFactory);\n upload.setSizeMax(FILE_MAX_SIZE);\n return upload;\n }", "WithCreate withDiskSizeGB(Integer diskSizeGB);", "@Test\n public void testFileSize() {\n System.out.println(\"fileSize\");\n RecordFile instance = new RecordFile();\n \n Assert.assertEquals(76, instance.fileSize());\n \n byte[] bytes = new byte[10];\n instance.insert(bytes, 0);\n Assert.assertEquals(86, instance.fileSize());\n \n bytes = new byte[12];\n instance.write(bytes, 0);\n Assert.assertEquals(88, instance.fileSize());\n \n bytes = new byte[100];\n instance.insert(bytes, 0);\n Assert.assertEquals(188, instance.fileSize());\n \n bytes = new byte[100];\n instance.remove(0);\n Assert.assertEquals(88, instance.fileSize());\n \n bytes = new byte[100];\n instance.remove(0);\n Assert.assertEquals(76, instance.fileSize());\n }", "private FileManager() {}", "public DiskBackedProjectFilePartSet() {\r\n // make two files to use\r\n fileA = TempFileUtil.createTemporaryFile();\r\n fileB = TempFileUtil.createTemporaryFile();\r\n }", "private static MockFileChannel newMockFileChannel(\n int size,\n ByteBuffer bb) {\n return newMockFileChannel(\n true,\n true,\n false,\n size,\n bb);\n }", "public Disk(int size){\n this.size = size;\n }", "protected FileItemFactory getFileItemFactory() {\r\n \tUploadMonitor monitor = new UploadMonitor(request.getSession());\r\n \tlistener = new UploadListener(monitor);\r\n \t\r\n \tDiskFileItemFactory factory = new MonitoredDiskFileItemFactory(listener);\r\n \t\r\n \tfactory.setSizeThreshold(10240); // 10k\r\n\r\n if (saveDir != null) {\r\n \tfactory.setRepository(new File(saveDir));\r\n }\r\n \r\n return factory;\r\n }", "public SplitFile() {\n\t}", "private static MockFileChannel newMockFileChannel(\n long size,\n int localBufferCapacity) {\n return newMockFileChannel(\n true,\n true,\n false,\n size,\n localBufferCapacity);\n }", "public FileManager() {\n\t\t\n\t}", "public MemoryJavaFileManager(M fileManager) {\n super(fileManager);\n classBytes = new HashMap<>();\n }", "public FileCount(int numFiles){\n this.numFiles = numFiles;\n }", "long getMaxFileSizeBytes();", "public Builder setMaxUploadSizeInBytes(long value) {\n \n maxUploadSizeInBytes_ = value;\n onChanged();\n return this;\n }", "public Storage() {\n this(null, DEFAULT_MAX, DEFAULT_MAX_SIZE);\n }", "public FileObject() {\n\t}", "public FileBean() {}", "public static ObjectInstance getComplexTypeObjectInstanceForMaxFileSize()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(1);\n \n \n properties.put(\"theLabel\", getComplexTypeMBeanforMaxFileSize().getTheLabel()); \n properties.put(\"complexitem\", getComplexTypeMBeanforMaxFileSize()\n .getComplexClass().toString()); \n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'ComplexType' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n \n return new ObjectInstance(o, new ComplexTypeForMaxFileSize().getClass().getName());\n }", "private void createBin(int size) \n\t{\n\t// create an array of the appropriate type\n\tfBin = (Object[]) Array.newInstance(fClass, size);\t\n\t}", "public FileObjectFactory() {\n }", "Builder withCacheSizeInMiB(int sizeInMiB);", "public void testSetSize_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\t\tString value = \"\";\n\n\t\tfixture.setSize(value);\n\n\t\t\n\t}", "public Files files();", "public void createNew(int size);", "public FileGarbageCollector(){\n\t\tthis.maxAge = 0;\n\t\tthis.dirs = new Vector<File>();\n\t}", "public Phile create( String name) throws PhileAlreadyExistsException, DiskFullException {\n\t\tif (fileList.containsKey(name)) {\n\t\t\tthrow new PhileAlreadyExistsException(\"File already exists\");\n\t\t}\n\t\telse if (totalNumberOfFiles == 32) {\n\t\t\tthrow new DiskFullException(\"Max number of files\");\n\t\t}\n\t\telse {\n\t\t\tPhile phile = new PhileImpl(name, this.tempDisk, currentStartingBlock, currentStartingBlock + 31);\n\t\t\tfileList.put(name, phile);\n\t\t\ttotalNumberOfFiles++;\n\t\t\topenFiles.add(phile);\n\t\t\tnumberOfOpenFiles++;\n\t\t\tcurrentStartingBlock += 32;\n\t\t\treturn phile;\n\t\t}\n }", "public void newFile(int temp) {\n if(!doesExist(temp)){\n System.out.println(\"The Directory does not exist \");\n return;\n }\n\n directory nodeptr = root;\n for(int count = 0; count < temp; count++) {\n nodeptr = nodeptr.forward;\n }\n int space = nodeptr.f.createFile(nodeptr.count);\n nodeptr.count++;\n nodeptr.availableSpace = 512 - space;\n\n }", "public static ComplexTypeMBean getComplexTypeMBeanforMaxFileSize()\n { \n return new ComplexTypeForMaxFileSize();\n }", "public HeapFile(File f, TupleDesc td) {\n this.file = f;\n this.tableId = f.getAbsoluteFile().hashCode();\n this.td = td;\n int pageSize = BufferPool.PAGE_SIZE;\n int pagesNeeded;\n\n RandomAccessFile rf;\n try {\n rf = new RandomAccessFile(f, \"r\");\n pagesNeeded = (int) Math.ceil((double) rf.length() / pageSize);\n } catch (Exception e) {\n System.err.println(\"Caugth exception1:\" + e.getMessage());\n return;\n }\n this.numPages = pagesNeeded;\n System.out.println(\"Created \" + pagesNeeded + \" heap files.\");\n pages = new HeapPage[pagesNeeded];\n\n // TODO Find out the best way to handle exceptions\n for (int pageIndex = 0; pageIndex < pagesNeeded; ++pageIndex) {\n int offset = pageIndex * pageSize;\n byte[] data = new byte[pageSize];\n try {\n rf.readFully(data, offset, pageSize);\n HeapPageId pid = new HeapPageId(tableId, pageIndex);\n System.out.println(\"Created HeapPageId\");\n pages[pageIndex] = new HeapPage(pid, data);\n System.out.println(\"Wrote to pages[\"+pageIndex+\"].\");\n } catch (Exception e) {\n System.err.println(\"Caught exception2:\" + e.getMessage());\n return;\n }\n }\n }", "public Directory() {\n files = new ArrayList<VipeFile>();\n sectors = new int[600];\n }", "public void setMaxFileSize(int sINGLESIZE) {\n\t\t\r\n\t}", "public Builder setFileSize(float value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }", "private BlobFromFile() {\n }", "public MemoryCache() {\n\t\t// use 25% of available heap size\n\t\tsetLimit(Runtime.getRuntime().maxMemory() / 10);\n\t}", "public BlockFileContainer (String prefix, int blockSize, FilesystemOperations fso) {\n\t\tthis.prefix = prefix;\n\t\tthis.blockSize = blockSize;\n\t\tthis.fso = fso;\n\n\t\topenFiles();\n\t\treset();\n\t}", "public File() {\n }", "public ChunkFiler() {}", "@Test\n public void allSize() throws Exception{\n fillFile();\n Assert.assertEquals(maxBlocks, rf.size());\n }", "public Builder setFileSize(long value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }", "public FileServ() {\n\t\tsuper();\n\t}", "public HeapFile(File f, TupleDesc td) {\n this.tupleDesc = td;\n this.file = f;\n this.fid = file.getAbsoluteFile().hashCode();\n this.numOfPages = (int)Math.ceil((double)f.length()/(double)BufferPool.PAGE_SIZE);\n if(f.length()==0) \n//\t\t\ttry {\n//\t\t\t\twritePage(new HeapPage(new HeapPageId(fid, 0), new byte[BufferPool.PAGE_SIZE]));\n//\t\t\t} catch (IOException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t}\n\t\t\tthis.numOfPages = 0;\n// }\n }", "@Before\n public void init(){\n spaceCapacity = 20;\n fileSystem = new FileSystem(spaceCapacity);\n }", "FileInfo create(FileInfo fileInfo);", "public ByteRingBuffer(int maxSize){\n buffer= new byte[maxSize];\n readIndex = 0;\n writeIndex = -1;\n size=0;\n }", "protected void openFiles() {\n\t\tthis.container = fso.openFile(prefix+EXTENSIONS[CTR_FILE],\"rw\");\n\t\tthis.metaData = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\tthis.reservedBitMap = fso.openFile(prefix+EXTENSIONS[RBM_FILE], \"rw\");\n\t\tthis.updatedBitMap = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\tthis.freeList = fso.openFile(prefix+EXTENSIONS[FLT_FILE], \"rw\");\n\t}", "private FileUtil() {}", "public Builder setMaxDiskCacheSize(int val) {\n mMaxDiskCacheSize = val;\n return this;\n }", "public BufferPool(String fileName, int numBuffers)\n throws IOException\n {\n BLOCK_SIZE = 4096;\n // create linked list of buffers, open file, create pointer tempArray\n this.pool = new LinkedList<Buffer>();\n this.buffArr = new Buffer[numBuffers];\n this.file = new RandomAccessFile(fileName, \"rw\");\n this.tempArray = new byte[BLOCK_SIZE];\n\n // initialize all the statistics to zero\n cacheHits = cacheMisses = diskReads = diskWrites = 0;\n\n Buffer newBuf;\n // initialize the appropriate number of buffers\n for (int i = 0; i < numBuffers; i++)\n {\n newBuf = new Buffer(tempArray, -1);\n pool.append(newBuf);\n buffArr[i] = newBuf;\n }\n }", "public FileObject size(Integer size) {\n this.size = size;\n return this;\n }", "private FileUtil() {\n \t\tsuper();\n \t}", "public MainController(){\n allShelves = new List[2];\n allShelves[0] = new List<File>(); //Beachtet die unterschiedliche Instanziierung! Was bedeutet das?\n allShelves[1] = new List<>();\n createFiles();\n }", "@Test\n\tpublic void testNumLargeFiles() {\n\t\tFile test = new File(\"X:\\\\Documents\\\\PS9 Test\");\n\t\tassertEquals(6,Explorer.numLargeFiles(test));\n\t}", "public FileTest() {\n }", "public BlockFileContainer (String prefix) {\n\t\tthis(prefix, JavaFilesystemOperations.DEFAULT_INSTANCE);\n\t}", "@Test\n public void testConstructor_Custom_Store_File_Overflow() {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-list-testConstructor_Custom_Store_File_Overflow\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n File[] subDirs = file.listFiles();\n\n assertNotNull(subDirs);\n }", "public UploadManager() {\n }", "public GCFile(final File file, final int count) {\n\t\tthis.file = file;\n\t\tthis.count = count;\n\t}", "public ByteArrayCache() {\n try {\n imm = ImmortalMemory.instance();\n byteBuffers = (Queue) imm.newInstance(Queue.class);\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.WARN, getClass(), \"<init>\", e);\n System.exit(-1);\n }\n }", "public BitmapMemoryCache() {\r\n //use 25% of available heap size\r\n setLimit(Runtime.getRuntime().maxMemory() / 4);\r\n }", "public void testGetFileSizeSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n assertTrue(\"fileCreationId shouldn't be null or empty\", fileCreationId != null\r\n && fileCreationId.trim().length() != 0);\r\n filePersistence.appendBytes(fileCreationId, new byte[10]);\r\n filePersistence.closeFile(fileCreationId);\r\n assertEquals(\"should be size of 10 bytes\", filePersistence.getFileSize(VALID_FILELOCATION, FILENAME), 10);\r\n filePersistence.deleteFile(VALID_FILELOCATION, FILENAME);\r\n }", "public fileServer() {\n }", "public void setNumberOfAvailableFiles(int value) {\n this.numberOfAvailableFiles = value;\n }", "public void testCtorSuccess() {\r\n new FileSystemPersistence(10);\r\n }", "private DiskLruImageCache(File cacheDir, long maxByteSize)\n {\n this.cacheDirectory = cacheDir;\n this.maxCacheByteSize = maxByteSize;\n }", "public MyFile getMyFile() {\r\n\t\tMyFile msg = new MyFile(path);\r\n\t\tString LocalfilePath = path;\r\n\r\n\t\ttry {\r\n\t\t\tFile newFile = new File(LocalfilePath);\r\n\t\t\tbyte[] mybytearray = new byte[(int) newFile.length()];\r\n\t\t\tFileInputStream fis = new FileInputStream(newFile);\r\n\t\t\tBufferedInputStream bis = new BufferedInputStream(fis);\r\n\r\n\t\t\tmsg.initArray(mybytearray.length);\r\n\t\t\tmsg.setSize(mybytearray.length);\r\n\r\n\t\t\tbis.read(msg.getMybytearray(), 0, mybytearray.length);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error send (Files)msg) to Server\");\r\n\t\t}\r\n\t\treturn msg;\r\n\t}", "public BlockFileContainer (String prefix, int blockSize) {\n\t\tthis(prefix, blockSize, JavaFilesystemOperations.DEFAULT_INSTANCE);\n\t}", "public FileDecoder() {\n pathSB = new StringBuilder(100);\n }", "public BiomartAccess(String fname) \n {\n m_file = new File(fname);\n }", "public MultipartHolder(List<File> files, MediaType fileMediaType, E payload) {\n\t\tthis.filesToSend = files;\n\t\tthis.payload = payload;\n\t\tthis.fileMediaType = fileMediaType;\n\t}", "protected SMBFile(Session sess, FileInfo finfo, int fid) {\n\t\tm_sess = sess;\n\t\tm_info = finfo;\n\t\tm_FID = fid;\n\n\t\t// Initialize the file write position using the current file size\n\n\t\tm_txpos = getFileSize();\n\t}", "BIG createBIG();", "public static String m576f() {\r\n long j = 0;\r\n try {\r\n StatFs statFs = new StatFs(Environment.getDataDirectory().getPath());\r\n j = ((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize());\r\n } catch (Exception e) {\r\n }\r\n return String.valueOf(j);\r\n }", "public MyBMPFile() { \n\n }", "public FileLRUCache(int maxSize, int maxFileSize, long timeout) {\n\t\tsuper(maxSize, maxFileSize, timeout);\n\t}", "public FileIOManager() {\n\t\tthis.reader = new Reader(this);\n\t\tthis.writer = new Writer(this);\n\t}", "Builder withAutoCommitBufferSizeInKiB(int sizeInKiB);", "public ProgramManager() {\n display = new DisplayManager();\n fileName = \"resources/aLargeFile\";\n try {\n fileReader = new BufferedReader(new FileReader(fileName));\n } catch (FileNotFoundException e) {\n logger.error(e.getMessage());\n }\n wordStorage = new WordStorage();\n }", "public abstract long NewFileNumber();", "public Memory(String file) {\n\t\tfor(int i=0; i < Constants.MEM_SIZE; ++i){\n\t\t\tmemory[i] = 0;\n\t\t}\n\t\tinstructions = new FileProcessor(file).fetchInstructions();\n\t}", "private void setMemorySize() { }", "public MainframeFile (String name, byte[] buffer)\n // ---------------------------------------------------------------------------------//\n {\n this.name = name;\n this.buffer = buffer;\n }", "static public void setMaxLogStoreSize(final int bytes) {\n // TODO: also check if bytes is bigger than remaining disk space?\n if (bytes >= 10000) {\n logFileMaxSize = bytes;\n }\n if (null != context) {\n SharedPreferences prefs = context.getSharedPreferences (SHARED_PREF_KEY, Context.MODE_PRIVATE);\n prefs.edit ().putInt (SHARED_PREF_KEY_logFileMaxSize, logFileMaxSize).commit();\n }\n }", "public FileCreator() {\r\n initComponents();\r\n }", "public StorageServer(File root)\n {\n this(root, 0, 0);\n }", "public void setMaxFiles(int maxFiles)\n\t{\n\t\tthis.maxFiles = maxFiles;\n\t}", "public entities.Torrent.FileInfo.Builder getFilesBuilder(\n int index) {\n return getFilesFieldBuilder().getBuilder(index);\n }", "public static Bytes megabytes(final long megabytes)\n\t{\n\t\treturn kilobytes(megabytes * 1024);\n\t}", "public Long createFileUpload(FileUpload fileUpload, InputStream fileInputStream) throws AppException;", "void create_MB(String nombre){\n if (Globales.UltimoIndiceMailbox == 6){\r\n PantallaError pe = new PantallaError(\"Ya hay 6 buzones (mailbox) en ejecución, no puede crear más.\");\r\n }\r\n else{\r\n Mailbox mb = new Mailbox(\"MB\"+nombre);\r\n Globales.mails[Globales.UltimoIndiceMailbox]=mb;\r\n //System.out.println(\"Globales.mails[\"+Globales.UltimoIndiceMailbox+\"] = \"+Globales.mails[Globales.UltimoIndiceMailbox].nombre);\r\n Globales.UltimoIndiceMailbox++;\r\n //System.out.println(\"creó el mb: \"+mb.nombre+\" y lo insertó el el arreglo global de mb\");\r\n }\r\n }", "public MemoryByteArrayOutputStream() {\n\t\tthis(4096, 65536);\n\t}", "public FileUtility()\n {\n }", "public FSLockWithShared(File baseFile) {\n file = baseFile;\n }", "public StripesRequestWrapper(HttpServletRequest request,\n String pathToTempDir,\n int maxTotalPostSize) throws StripesServletException {\n super(request);\n \n try {\n String contentType = request.getContentType();\n \n if (contentType != null && contentType.startsWith(\"multipart/form-data\")) {\n this.multipart = new MultipartRequest(request, pathToTempDir, maxTotalPostSize);\n }\n }\n catch (IOException e) {\n Matcher matcher = exceptionPattern.matcher(e.getMessage());\n \n if (matcher.matches()) {\n throw new FileUploadLimitExceededException(Integer.parseInt(matcher.group(2)),\n Integer.parseInt(matcher.group(1)));\n }\n else {\n throw new StripesServletException(\"Could not construct request wrapper.\", e);\n }\n }\n }", "BucsUserFile(File f,String unm,UserFileType ft)\n{\n this();\n set(f,unm,ft);\n}", "private void getExtractWithFiles(){\n\t\ttry{\n\t\t\t\n\t\t\tFileInputStream fStream = new FileInputStream(tfile);\n\t\t\tfileBytes = new byte[(int)tfile.length()];\n\t\t\t\n\t\t\tfStream.read(fileBytes, 0, fileBytes.length);\n\t\t\tfileSize = fileBytes.length;\n\t\t}catch(Exception ex){\n\t\t\tSystem.err.println(\"File Packet \"+ex.getMessage());\n\t\t}\n\t}", "public FileInfo()\r\n {\r\n hash = new HashInfo();\r\n }", "protected FileMessage(MessageWireType wireId) {\n super(wireId);\n }", "public FileSet() {\n super();\n }", "public long getFileSize();" ]
[ "0.6362719", "0.605577", "0.5783193", "0.57078177", "0.5703864", "0.5677473", "0.56642556", "0.5636333", "0.5608969", "0.5597305", "0.5570812", "0.5485535", "0.54820144", "0.54746044", "0.5472618", "0.54589117", "0.5458248", "0.5451428", "0.5423884", "0.54184383", "0.5414102", "0.54062814", "0.5396619", "0.5396275", "0.5388562", "0.53825855", "0.53712255", "0.5352365", "0.53177184", "0.5310628", "0.52978253", "0.52795726", "0.52718776", "0.5258191", "0.52374667", "0.52166915", "0.51864886", "0.51817274", "0.5176887", "0.5173875", "0.51720536", "0.51605886", "0.51572675", "0.51570666", "0.5150725", "0.5144025", "0.51419824", "0.5141516", "0.51296633", "0.51208156", "0.51180494", "0.51141113", "0.51131785", "0.51065725", "0.51061857", "0.5092428", "0.50854486", "0.50845486", "0.5081702", "0.50795627", "0.5073927", "0.5070291", "0.5061504", "0.5055439", "0.50524193", "0.50436497", "0.5038056", "0.50369895", "0.5031142", "0.50276303", "0.50243753", "0.50235265", "0.501878", "0.5011818", "0.50085545", "0.50042665", "0.5001003", "0.50008965", "0.49956158", "0.49920484", "0.49821973", "0.49755248", "0.497113", "0.49690157", "0.49660236", "0.49542475", "0.4950507", "0.4944146", "0.49396145", "0.4937749", "0.49337512", "0.49330723", "0.4932263", "0.4930501", "0.49287835", "0.49277738", "0.49252778", "0.49227476", "0.4898384", "0.4897178" ]
0.79631114
0
TODO Autogenerated method stub
@Override public List<Role> getAllRoles() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "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.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public int addRole(Role role) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "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.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public int updRole(Role role) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "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.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public int delRole(int id) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "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.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Check if a user has joined room
boolean isInRoom(String username) { for (ClientHandle participant : participants) { if (participant.getUsername().equals(username)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasChatRoom();", "public boolean isPlayerInRoom() {\n return !(roomPlayer == null);\n }", "boolean hasJoinGameRequest();", "public boolean canJoin(User user, Chatroom chatroom) {\n\t\t// invites are needed to join the chatroom and the useer has not received an\n\t\t// invite\n\t\tif (chatroom.getInvited_only() && !memberInvitationSent(user, chatroom)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isJoined() {\n\t\treturn state == State.JOINED;\n\t}", "public boolean checkUser(String room, String username) {\n return ((GroupChatPanel)grouptabs.get(room)).checkUser(username);\n }", "public static boolean roomContainsUser(String username, String room)\r\n\t{\r\n\t\treturn rooms.get(room).contains(username);\r\n\t}", "@Override\n\tpublic void onUserJoinedRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "boolean hasLobbyId();", "boolean hasSelectedUser();", "boolean shouldStartGame(Room room) {\n int connectedPlayers = 0;\n for (Participant p : room.getParticipants()) {\n if (p.isConnectedToRoom()) ++connectedPlayers;\n }\n return connectedPlayers >= MIN_PLAYERS;\n }", "boolean hasJoinGameResponse();", "public static boolean CheckRoomIsAvailable(Room room, long Start, long end) {\n\t\tboolean[] DIO = room.getDateIsOccupied();\n\t\tfor (int i = (int) Start; i < end; i++)\n\t\t\tif (DIO[i] == true) \n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasFindGameRoomsRequest();", "public boolean joinLobby(Lobby lobby)\n {\n if (lobby.assignSlot(this))\n {\n this.currentLobby = lobby;\n return true;\n }\n return false;\n }", "void join(User user);", "@Override\n\tpublic boolean canJoin() {\n\t\treturn isOpen() || isRunning();\n\t}", "boolean hasUserId();", "boolean hasUserId();", "boolean hasUserId();", "public boolean isJoining(){\n\t\treturn join!=null;\n\t}", "public void join() throws OperationFailedException\n {\n if (chatRoomSession == null && chatInvitation == null)\n { // the session is not set and we don't have a chatInvitatoin\n // so we try to join the chatRoom again\n ChatRoomManager chatRoomManager =\n provider.getAimConnection().getChatRoomManager();\n chatRoomSession = chatRoomManager.joinRoom(this.getName());\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n else if (chatInvitation != null)\n {\n chatRoomSession = chatInvitation.accept();\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n\n // We don't specify a reason.\n opSetMuc.fireLocalUserPresenceEvent(this,\n LocalUserAdHocChatRoomPresenceChangeEvent.LOCAL_USER_JOINED, null);\n }", "public boolean isMember(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getMemberOfChatrooms();\n\t\tList<User> users = chatroom.getMembers();\n\n\t\treturn chatrooms.contains(chatroom) && users.contains(user);\n\t}", "boolean hasFindGameRoomsResponse();", "private void checkUserExist() {\n\n final DatabaseReference mUseRef;\n\n\n if (mAuth.getCurrentUser() != null) {\n final String valid_user_id = mAuth.getCurrentUser().getUid();\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.hasChild(valid_user_id)) {\n Intent singinIntent = new Intent(JoinActivity.this, MainActivity.class);\n singinIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(singinIntent);\n finish();\n } else {\n Toast.makeText(JoinActivity.this, \"You have to first setup your account!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "public boolean hasRoom() {\n return fieldSetFlags()[3];\n }", "public void checkIn(Recepcionist user, List<Reservation> reservations, List<Room> rooms){\n int reservationId;\n Room room;\n reservationId = this.enterNumber(\"el numero de Reserva\");\n room = user.checkIn(reservationId,reservations,rooms);\n if(room != null){\n System.out.println(\"\\nEl check-in fue exitoso. Pueden ocupar la habitacion Nro. \"+room.getRoomNumber());\n } else {\n System.out.println(\"\\nEl numero de reserva no se encuentra en el sistema.\");\n }\n }", "public boolean verifyRoom() throws NotEnoughDoorsException {\n if (getDoors().get(\"N\") == null && getDoors().get(\"W\") == null\n && getDoors().get(\"S\") == null && getDoors().get(\"E\") == null) {\n throw new NotEnoughDoorsException();\n }\n\n for (String key: getDoors().keySet()) {\n Door doorHolder = getDoors().get(key);\n if (doorHolder != null) {\n if (doorHolder.getConnectedRooms().size() < 2 || doorHolder.getOtherRoom(this) == null) {\n return false;\n }\n }\n }\n\n for (Item singleItem: roomItems) {\n int itemX = (int) singleItem.getXyLocation().getX();\n int itemY = (int) singleItem.getXyLocation().getY();\n if (itemX >= getWidth() - 1 || itemX <= 0) {\n return false;\n }\n if (itemY >= getHeight() - 1 || itemY <= 0) {\n return false;\n }\n }\n\n if (isPlayerInRoom()) {\n int playerX = (int) getPlayer().getXyLocation().getX();\n int playerY = (int) getPlayer().getXyLocation().getY();\n if (playerX >= getWidth() - 1 || playerX <= 0) {\n return false;\n }\n if (playerY >= getHeight() - 1 || playerY <= 0) {\n return false;\n }\n }\n\n return true;\n }", "void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;", "private void onJoinRoom(String roomName) {\n if (roomEntries.containsKey(roomName)) {\n backBTN.setEnabled(chatController.getJoinedRooms().size() > 0);\n JPanel panel = roomEntries.get(roomName);\n panel.removeAll();\n renderRoom(roomName, panel);\n panel.revalidate();\n panel.repaint();\n }\n }", "public static boolean CanSendJoinRequest() \n\t{\t\n\t\t//login and Goto community\n\t\tGoto();\n\t\t\n\t\t//Send Join request\n\t\tWebElement JoinCommunity= Driver.Instance.findElement(PageObjRef.JoinCommunity);\n\t\tJoinCommunity.click();\n\t\t\n\t\t//Validate\n\t\tString Check= Driver.Instance.findElement(PageObjRef.CheckJoinRequestSent).getText();\t\t\n\t\tif(Check.endsWith(\"In a short while someone will review your request.\"))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean joinGame(){\n\t\tJoinGameBean resultBean = new JoinGameBean();\n\t\tresultBean.setTo(jid);\n\t resultBean.setFrom(fromJID);\n\t resultBean.setType(XMPPBean.TYPE_RESULT);\n\t connection.sendPacket(new BeanIQAdapter(resultBean));\n//\t System.out.println(\"JoinGameBean vom typ RESULT an \" + jid + \" gesendet\");\n\t return true;\n\t}", "void opponentInRoom();", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "public boolean canBeDoneIn(Room r) {\n\t\treturn true;\n\t}", "public boolean volunteerJoinedActivity(final String volunteerId, final String activityId){\n final Object[] args = new Object[]{volunteerId, activityId};\n final Integer count = jdbcTemplate.query(\"SELECT COUNT(*) AS joined_count FROM volunteeractivities \" +\n \"WHERE volunteer_id = ? AND activity_id = ?\", args, resultSet -> resultSet.next() ?\n resultSet.getInt(\"joined_count\") : 0);\n if(count == null){\n return false;\n }else{\n return count > 0;\n }\n }", "public boolean isRoom(){\n\t\treturn (cellType == CellType.ROOM);\n\t}", "@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "@Override\n\tpublic boolean hasAccountGameRoomManagementRights(AccountUId accountuid,\n\t\t\tGameUId gameuid) throws InvalidAccountUIdException,\n\t\t\tRightsManagementException {\n\t\treturn false;\n\t}", "boolean getCurrentRoom() {\n return currentRoom;\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean isUserInGroup(long idUser, long idGroup);", "public boolean memberInvitationSent(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatroomInvites = user.getChatroomInvites();\n\t\tList<User> invitees = chatroom.getMemberInvitees();\n\n\t\treturn invitees.contains(user) && chatroomInvites.contains(chatroom);\n\t}", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "boolean hasUserID();", "@Override\n\tpublic void onUserJoinedLobby(LobbyData arg0, String arg1) {\n\t\t\n\t}", "public boolean isActive(){\n return (registeredParticipants.size() == connections().size());\n }", "@Override\n public boolean isAvailable() {\n return room.isAvailable();\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean isOwner(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getOwnedChatrooms();\n\n\t\treturn chatrooms.contains(chatroom) && chatroom.getOwner() == user;\n\t}", "public boolean hasUser() {\n return instance.hasUser();\n }", "boolean hasAttackerRoleId();", "public boolean hasUsers() {\n\t\treturn !this.userNames.isEmpty();\n\t}", "public\tvoid\tuserJoined(UIRosterEntry user)\n\t{\n\t\t\n\t\tNewChatPanel panel = this.getDiscussionPanel();\n\t\n\t\tString joinedUserName = user.getDisplayName();\n\t\tString joinedUserId = user.getUserId();\n\t\t\n\t\tString senderId = this.rosterModel.getCurrentActivePresenter().getUserId();\n\t\tString senderName = this.rosterModel.getCurrentActivePresenter().getDisplayName();\n\t\t\n\t\t//Window.alert(\"senderId = \"+senderId+\":senderName:\"+senderName);\n\t\t//Window.alert(\"User Joined:joinedUserName :\"+joinedUserName+\":joinedUser Status:\"+user.getJoinedStatus());\n\t\t//Window.alert(\"lastUserJoined = \"+lastUserJoined);\n\t\tif((joinedUserId != senderId ) && (joinedUserId != lastUserJoined ) && (senderName != \"Not Available\") && (joinedUserId != me.getUserId()) && (!user.getJoinedStatus()))\n\t\t{\n\t\t//\tpanel.receiveChatMessage(\"\", sender,joinedUser + \" has joined the conference\");\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_joined_message\",\"has joined the dimdim web meeting.\");\n\t \t //Window.alert(\"adding \"+s);\n\t\t\tpanel.receiveWelcomeMessage(joinedUserName + \" \"+s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t\telse if((joinedUserId == senderId) && lastUserJoined == null && (joinedUserId != lastUserJoined))\n\t\t{\n\t \t String s = ConferenceGlobals.getDisplayString(\"user_welcome_message\",\"Welcome to the Dimdim Web Meeting.\");\n\t \t //Window.alert(\"adding welcom message...\");\n\t\t\tpanel.receiveWelcomeMessage(s);\n\t\t\tlastUserJoined = joinedUserId;\n\t\t}\n\t}", "public boolean isLoggedIn() {\n SQLiteDatabase db = this.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n SportPartnerDBContract.LoginDB.COLUMN_EMAIL_NAME\n };\n\n Cursor cursor = db.query(\n SportPartnerDBContract.LoginDB.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null\n );\n\n boolean logedin = cursor.getCount() == 1;\n cursor.close();\n return logedin;\n }", "public boolean isUserLoggedIn(Context context){\n\t\tDatabaseHandler db = new DatabaseHandler(context);\n\t\tint count = db.getRowCount();\n\t\tif(count > 0){\n\t\t\t// user logged in\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "public boolean isUserLoggedIn();", "private boolean joinGame() throws RemoteException{\n\t\tgui.showLoginWindow(playerDetails);\n\n\t\twhile(!gui.isUserDataAvailable()){\n\t\t\t// wait for user to enter details\n\t\t\tDebug.log(\"MainMenu\", \"waiting for player details\");\n\t\t\ttry{\n\t\t\t\tThread.sleep(1000);\n\t\t\t}catch(InterruptedException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t}\n\t\t}\n\t\tplayerDetails = gui.getPlayerDetails();\n\t\tDebug.log(\"MainMenu\", \"player details received!\");\n\n\t\tif(playerDetails == null) quitGame(false); // quit if player declined/cancelled to enter details\n\n\t\t/* Get preferred position */\n\t\tpreferredPosition = gui.getPreferredPosition();\n\n\t\t/* Register this client as Callback */\n\t\treturn server.connect(this, myHost, myPort, preferredPosition, false, playerDetails.getFirstName(), playerDetails.getSurname(),\n\t\t\t\tplayerDetails.getAddress(), playerDetails.getPhone(), playerDetails.getUsername(), playerDetails.getPassword());\n\t}", "public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }", "public boolean hasRegisteredUser() {\n return registeredUserBuilder_ != null || registeredUser_ != null;\n }", "@Override\n\tpublic void onUserLeftRoom(RoomData arg0, String arg1) {\n\t\t\n\t}", "public boolean hasUsers() {\n\n return !realm.where(User.class).findAll().isEmpty();\n }", "public boolean isAvailableRoom(String sNmRoom, Date dtFrom, Date dtTo)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=isAvailableRoom&token=\"+sSecurityToken+\"&room=\"+URLEncode(sNmRoom)+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.value.equalsIgnoreCase(\"true\");\r\n } else {\r\n return false;\r\n }\r\n }", "private void isUserExist() {\n\n if (firebaseAuth.getCurrentUser() != null) {\n\n final String user_id = firebaseAuth.getCurrentUser().getUid();\n users_database_reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.hasChild(user_id)) {\n // sign in the user and go to main activity\n // Intent intent = new Intent(StartActivity.this, MainActivity.class);\n // intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(intent);\n } else {\n // go to profile page\n Intent intent = new Intent(MainActivity.this, Profile.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "private void userDidLeave() {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n deviceSingleton.setImInARoom(false);\n deviceSingleton.setJoinedChat(false);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"savedJoinedChat\", false);\n editor.commit();\n Intent intent2 = new Intent(ShowMapActivity.this, LoginActivity.class);\n startActivity(intent2);\n// break;\n\n }", "private static boolean hasRoomAdjacentUp(int roomId) {\n\t\treturn _maze.hasRoom(roomId - _totalSideRooms);\n\t}", "public boolean isJoining(Train train){\n\t\treturn join==train;\n\t}", "public static boolean isLoggedIn() {\n\t\treturn arcade.hasPlayer();\n\t}", "boolean hasRole();", "boolean hasUserMessage();", "public boolean isRoomEvent() {\n return roomEvent;\n }", "boolean hasLoggedIn();" ]
[ "0.69251496", "0.6563929", "0.6516967", "0.649686", "0.64489144", "0.6416874", "0.62380666", "0.6226512", "0.6155337", "0.61209345", "0.6119791", "0.60441005", "0.6033088", "0.601221", "0.601221", "0.601221", "0.601221", "0.601221", "0.601221", "0.601221", "0.59923935", "0.5848924", "0.579545", "0.57924783", "0.57859766", "0.57859766", "0.57859766", "0.5776037", "0.5770196", "0.57440996", "0.57368577", "0.5702097", "0.56651425", "0.5640181", "0.5631006", "0.5626601", "0.5626287", "0.56200737", "0.5614883", "0.5610175", "0.56015456", "0.5591184", "0.55897504", "0.55723137", "0.555545", "0.555519", "0.55549204", "0.55542195", "0.55494726", "0.55494726", "0.5533598", "0.5533598", "0.5526558", "0.5525864", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.5522827", "0.55076164", "0.55035096", "0.5490472", "0.54865944", "0.5477257", "0.54706496", "0.5465512", "0.54625905", "0.5452194", "0.54440254", "0.54405946", "0.54334533", "0.54230064", "0.5420887", "0.54187626", "0.5417839", "0.53976136", "0.5389741", "0.5385735", "0.5384247", "0.53826445", "0.53805566", "0.53750616", "0.5374079", "0.5369456", "0.5367179", "0.535543", "0.5354832" ]
0.6850628
1
ep is a resource of type Combiner. It has multiple elements, each of which themselves represent subsources.
public CombinedSource(FileManager fm, AuthMap am, Resource ep) { constructs = ep.listProperties(EXTRAS.construct).mapWith(toString).toList(); matches = ep.listProperties(EXTRAS.match).mapWith(toString).toList(); sources = ep.listProperties(EXTRAS.element).mapWith(toSource(fm, am)).toList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<? extends Computer> getProduces();", "public static ArrayList<String> getMultipleSources(PathConnectionType element, String elementName)\n\t{\n\t\tStringBuilder error = new StringBuilder(); \n\t\tboolean hasError = false;\n\t\tArrayList<String> sources = new ArrayList<>(); \n\t\t\n\t\tif (element.getSource() == null){\n\t\t\terror.append(elementName + \" (\"+ element.getId() + \") must have a Source attribute\").append(\"\\n\"); \n\t\t\thasError = true; \n\t\t}\n\t\telse if (element.getSource().size() <= 1)\n\t\t{\n\t\t\terror.append(elementName + \" (\"+ element.getId() + \") cannot have \"+ element.getSource().size() +\" Source(s)\").append(\"\\n\"); \n\t\t\thasError = true; \n\t\t\t \n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tEList<StepType> sourceList = element.getSource(); \n\t\t\tfor (ScenarioElementType sourceType: sourceList)\n\t\t\t{\n\t\t\t\tsources.add(sourceType.getId());\n\t\t\t\tif (checkForMultipleIDs(sourceType.getId()) == false)\n\t\t\t\t{\n\t\t\t\t\terror.append(elementName + \" (\"+ element.getId() + \") has multiple same line Sources \" + sources).append(\"\\n\"); \n\t\t\t\t\thasError = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (hasError){\n\t\t\tSystem.out.println(error.toString()); \n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn sources; \n\t\t}\n\t}", "private void addEtherEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) {\n enriching(consumer, BYGBlocks.ETHER_STONE, BYGBlocks.CARVED_ETHER_STONE, basePath + \"to_carved\");\n enriching(consumer, BYGBlocks.ETHER_STONE_SLAB, BYGBlocks.CARVED_ETHER_STONE_SLAB, basePath + \"slabs_to_carved_slabs\");\n enriching(consumer, BYGBlocks.ETHER_STONE_STAIRS, BYGBlocks.CARVED_ETHER_STONE_STAIRS, basePath + \"stairs_to_carved_stairs\");\n enriching(consumer, BYGBlocks.ETHER_STONE_WALL, BYGBlocks.CARVED_ETHER_STONE_WALL, basePath + \"walls_to_carved_walls\");\n }", "Set<CyEdge> getExternalEdgeList();", "public void subsetOneBundlePerEdge() {\n Set<Bundle> set = new HashSet<Bundle>();\n for (int ent_i=0;ent_i<digraph.getNumberOfEntities();ent_i++) {\n for (int i=0;i<digraph.getNumberOfNeighbors(ent_i);i++) {\n int nbor_i = digraph.getNeighbor(ent_i,i);\n\tIterator<Bundle> it = digraph.linkRefIterator(digraph.linkRef(ent_i,nbor_i));\n\tset.add(it.next());\n }\n }\n getRTParent().push(getRTParent().getRootBundles().subset(set));\n }", "protected static void bindExternalResources(AnalysisEngineDescription aed, ResourceCreationSpecifier spec) {\n ResourceManagerConfiguration armc = aed.getResourceManagerConfiguration();\n if (spec.getResourceManagerConfiguration() == null) return;\n ExternalResourceBinding[] erbs = spec.getResourceManagerConfiguration().getExternalResourceBindings();\n ExternalResourceDescription[] erds = spec.getResourceManagerConfiguration().getExternalResources();\n for (int i = 0; i < erbs.length; i++) {\n //Make sure the RMC for the aggregate is not null\n if (armc == null) {\n armc = new ResourceManagerConfiguration_impl();\n aed.setResourceManagerConfiguration(armc);\n }//if\n armc.addExternalResource(erds[i]);\n armc.addExternalResourceBinding(erbs[i]);\n }//for\n }", "private Sources(Builder b)\n {\n super(NAMESPACE, ELEMENT);\n\n for (MediaSource ms: b.mediaSources)\n {\n addChildExtension(ms);\n }\n }", "@Override\n public List<Producer> apply() {\n Comparator<Producer> comparator = Comparator\n .comparing((Producer::getEnergyPerDistributor), Comparator.reverseOrder())\n .thenComparing(Producer::getId);\n\n producers = producers.stream()\n .sorted(comparator)\n .collect(Collectors.toList());\n\n // se selecteaza din lista sortata cati producatori este nevoie pentru\n // asigurarea cantitatii de energie necesare\n return Strategy.selectProducers(producers, energyNeededKW);\n }", "public void connect(Element elem){\n\n\t\tif (elem instanceof Source) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\toutput = elem;\n\t}", "public boolean offer(E e)\r\n/* 72: */ {\r\n/* 73:259 */ if (null == e) {\r\n/* 74:261 */ throw new NullPointerException();\r\n/* 75: */ }\r\n/* 76: */ long pIndex;\r\n/* 77: */ long mask;\r\n/* 78: */ E[] buffer;\r\n/* 79: */ for (;;)\r\n/* 80: */ {\r\n/* 81:270 */ long producerLimit = lvProducerLimit();\r\n/* 82:271 */ pIndex = lvProducerIndex();\r\n/* 83:273 */ if ((pIndex & 1L) != 1L)\r\n/* 84: */ {\r\n/* 85:280 */ mask = this.producerMask;\r\n/* 86:281 */ buffer = this.producerBuffer;\r\n/* 87:285 */ if (producerLimit <= pIndex)\r\n/* 88: */ {\r\n/* 89:287 */ int result = offerSlowPath(mask, pIndex, producerLimit);\r\n/* 90:288 */ switch (result)\r\n/* 91: */ {\r\n/* 92: */ case 0: \r\n/* 93: */ break;\r\n/* 94: */ case 1: \r\n/* 95: */ break;\r\n/* 96: */ case 2: \r\n/* 97:295 */ return false;\r\n/* 98: */ case 3: \r\n/* 99:297 */ resize(mask, buffer, pIndex, e);\r\n/* 100:298 */ return true;\r\n/* 101: */ }\r\n/* 102: */ }\r\n/* 103: */ else\r\n/* 104: */ {\r\n/* 105:302 */ if (casProducerIndex(pIndex, pIndex + 2L)) {\r\n/* 106: */ break;\r\n/* 107: */ }\r\n/* 108: */ }\r\n/* 109: */ }\r\n/* 110: */ }\r\n/* 111:308 */ long offset = LinkedArrayQueueUtil.modifiedCalcElementOffset(pIndex, mask);\r\n/* 112:309 */ UnsafeRefArrayAccess.soElement(buffer, offset, e);\r\n/* 113:310 */ return true;\r\n/* 114: */ }", "public ECP getGen(){return gen;}", "public OOPGenericProgram(E[] element) {\n this.element = element;\n }", "List<EpicsData> getEpicsData(EpicsType epicsType, int run);", "public void configure(Element parent) {\n }", "private void extendInitialCompositeNEs() {\n \n MyCombinator = new Combinator();\n \n String initialCompositeNE = null;\n String compositeNeConstructor = null;\n for (int i = 0; i < NumberOfInitialCompositeNEs ; i ++) {\n initialCompositeNE = InitialCompositeNEs[0][i].toString();\n compositeNeConstructor = InitialCompositeNEs[1][i].toString();\n MyCombinator.setPatternArray(BasicNEs, NumberOfBasicNEs,\n initialCompositeNE, compositeNeConstructor);\n MyCombinator.reset();\n }\n MyCombinator.copyArray();\n \n }", "public Resource getER() {\r\n return er;\r\n }", "public static ArrayList<BaseOffer> findOffer(PurchaseRow pr) {\n\t\tArrayList<BaseOffer> payload = new ArrayList<BaseOffer>();\r\n\t\tfor(BaseOffer o : OfferManager.offers) {\r\n\t\t\tif(o.evaluate(pr)) payload.add(o);\r\n\t\t}\r\n\t\treturn payload;\r\n\t}", "public void out_ep(Edge e) {\r\n\r\n\t\tif (triangulate == 0 & plot == 1) {\r\n\t\t\tclip_line(e);\r\n\t\t}\r\n\r\n\t\tif (triangulate == 0 & plot == 0) {\r\n\t\t\tSystem.err.printf(\"e %d\", e.edgenbr);\r\n\t\t\tSystem.err.printf(\" %d \", e.ep[le] != null ? e.ep[le].sitenbr : -1);\r\n\t\t\tSystem.err.printf(\"%d\\n\", e.ep[re] != null ? e.ep[re].sitenbr : -1);\r\n\t\t}\r\n\r\n\t}", "Package getSubp();", "@Override\n public T getCombinedElement()\n {\n return element;\n }", "@Override\n\tpublic WebElement[] getOfferDetail() {\n\t\treturn null;\n\t}", "protected Element myPlnk(){\n\t\treturn el(\"bpws:partnerLink\", new Node[]{\n\t\t\t\tattr(\"partnerLinkType\", \"nswomo:evtrcvType\"),\n\t\t\t\tattr(\"name\", PLNKNAME),\n\t\t\t\tattr(\"partnerRole\", \"service\")\n\t\t});\n\t}", "public void addSecondaryApnSourceEpc() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"secondary-apn-source-epc\",\n null,\n childrenNames());\n }", "Exp join() {\n List<Node> connectedNode = null;\n Exp connectedExp = Exp.create(AND);\n List<Exp> disconnectedExp = new ArrayList<Exp>();\n boolean disconnectedFilter = false;\n\n for (int i = 0; i < size(); i++) {\n Exp e = get(i);\n\n switch (e.type()) {\n\n case FILTER:\n Filter f = e.getFilter();\n List<String> lvar = f.getVariables();\n\n if (connectedNode == null || isBound(lvar, connectedNode)) {\n // filter is first \n // or filter is bound by current exp : add it to exp\n connectedExp.add(e);\n } else {\n // filter not bound by current exp\n if (!disconnectedFilter) {\n add(disconnectedExp, connectedExp);\n disconnectedFilter = true;\n }\n add(disconnectedExp, e);\n }\n continue;\n\n case OPTION:\n if (connectedNode == null) {\n connectedNode = e.getAllNodes();\n } else {\n connectedNode.addAll(e.getAllNodes());\n }\n\n break;\n\n default:\n // TODO: UNION \n List<Node> nodes = null;\n if (type() == MINUS || type() == OPTIONAL) {\n nodes = e.first().getAllNodes();\n } else {\n nodes = e.getAllNodes();\n }\n\n if (disconnectedFilter) {\n if (!groupEdge) {\n connectedExp = Exp.create(AND);\n connectedNode = null;\n }\n disconnectedFilter = false;\n }\n\n if (connectedNode == null) {\n connectedNode = nodes;\n } else if (intersect(nodes, connectedNode)) {\n connectedNode.addAll(nodes);\n } else {\n add(disconnectedExp, connectedExp);\n connectedExp = Exp.create(AND);\n connectedNode = nodes;\n }\n }\n\n connectedExp.add(e);\n }\n\n if (connectedExp.size() > 0) {\n add(disconnectedExp, connectedExp);\n }\n\n if (disconnectedExp.size() <= 1) {\n return this;\n } else {\n Exp res = join(disconnectedExp);\n //System.out.println(\"E: \" + res);\n return res;\n }\n }", "public Edge partner(){\n\t\treturn partner;\n\t}", "public abstract Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection);", "ElementCircuit getSource();", "public MCMCSampleProducer(BayesianNetwork bn, Variable[] X, Variable[] Y, Variable[] E, int[] e) {\n super(bn, X, Y, E, e);\n this.generateResamplingActions();\n }", "private void expand(XGraph.XVertex source, Graph.Edge edge) {\n source.seen = true;\n XGraph.XEdge xEdge = (XGraph.XEdge) edge;\n if (source.isComponent()) {\n //Expand the component, with original edge's end vertex as root\n expand(graph.getVertex(xEdge.getOriginal().toVertex()), xEdge.getOriginal());\n } else if (edge != null) {\n source.stEdge = xEdge.getOriginal();\n }\n //explore other components\n for (Graph.Edge e : source) {\n if (!graph.getVertex(e.toVertex()).seen) {\n expand(graph.getVertex(e.toVertex()), e);\n }\n }\n }", "public Object element() { return e; }", "Offer getOffer();", "public void pushAll(Collection<? extends E> src) {\n //Implementation\n }", "Subp getSubp();", "private Collection<Edge> getEdges()\r\n\t{\r\n\t return eSet;\r\n\t}", "private void setUpGroupBy(){\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t}", "Exp getSubpSpec();", "public ItemPart(ExtendedConfig<ItemConfig> eConfig, IPartType<P, S> part) {\n super(eConfig);\n this.part = part;\n }", "public Description(Element e) {\n\t\tsuper(e);\n\t\ttype = QuestionType.DESCRIPTION;\n\t\t// Handling of the answer balise\n\t\tList eAnswer = e.getChildren(\"answer\");\n\t\tArrayList<Answer> lAnswer = new ArrayList<Answer>();\n\t\tIterator i = eAnswer.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\t// Parse of the current element to add it on the list of answer\n\t\t\tlAnswer.add(new RegularAnswer((Element) i.next()));\n\t\t}\n\t\tanswers = lAnswer;\n\t}", "public abstract Collection<IRelation> getStartingRelations(String elementUri);", "private void generateDummyEA(HashMap<Integer, OWLIndividual> compHash, ClassDiagram dg) {\n\t\tint num = 2;\r\n\t\t// dummy role with PubSub style\r\n\t\tOWLClass publisherClass = factory.getOWLClass(IRI.create(IRI_NAME + \"#Publisher\"));\r\n\t\tOWLClass subscriberClass = factory.getOWLClass(IRI.create(IRI_NAME + \"#Subscriber\"));\r\n\t\t\r\n\t\tfor (nz.aucklanduni.archchecker.object.Package pkg : dg.getPackageList()) {\r\n\t\t\tOWLIndividual publishCompIndv = compHash.get(pkg.getId());\r\n\t\t\tSystem.out.println(\"inserting dummy connectors..\"+num);\r\n\t\t\t\r\n\t\t\tList<Dependency> callers = dg.getDependencyByTarget(pkg.getId());\r\n\t\t\tif(callers.size()!=0) {\r\n\t\t\t\tOWLIndividual subscribeCompIndv = compHash.get(callers.get(0).getSource().getRefId());\r\n\t\t\t\t// create connector for the caller\r\n\t\t\t\tString connName = \"conn\"+ pkg.getId()+\"_dummy_\" + RandomString.randomString(2);\r\n\t\t\t\tOWLIndividual connectorIndv = factory\r\n\t\t\t\t\t\t.getOWLNamedIndividual(IRI.create(IRI_NAME + \"#\"+connName));\r\n\t\r\n\t\t\t\t// create provider role\r\n\t\t\t\tOWLIndividual publisherRole = factory\r\n\t\t\t\t\t\t.getOWLNamedIndividual(IRI.create(IRI_NAME + \"#publisher\"+connName));\r\n\t\t\t\tOWLClassAssertionAxiom provClassAssertion = factory.getOWLClassAssertionAxiom(publisherClass, publisherRole);\r\n\t\t\t\tmanager.addAxiom(ontology, provClassAssertion);\r\n\t\r\n\t\t\t\t// create consumer role\r\n\t\t\t\tOWLIndividual subscriberRole = factory\r\n\t\t\t\t\t\t.getOWLNamedIndividual(IRI.create(IRI_NAME + \"#subscriber\"+connName));\r\n\t\t\t\tOWLClassAssertionAxiom consuClassAssertion = factory.getOWLClassAssertionAxiom(subscriberClass, subscriberRole);\r\n\t\t\t\tmanager.addAxiom(ontology, consuClassAssertion);\r\n\t\t\t\t\r\n\t\t\t\t// bind connector and roles\r\n\t\t\t\tOWLObjectPropertyExpression hasRoleExpr = factory.getOWLObjectProperty(IRI.create(IRI_NAME + \"#hasRole\"));\r\n\t\t\t\tOWLObjectPropertyAssertionAxiom providerHasRoleAxiom = factory\r\n\t\t\t\t\t\t.getOWLObjectPropertyAssertionAxiom(hasRoleExpr, connectorIndv, publisherRole);\r\n\t\t\t\tmanager.addAxiom(ontology, providerHasRoleAxiom);\r\n\t\t\t\tOWLObjectPropertyAssertionAxiom consumerHasRoleAxiom = factory\r\n\t\t\t\t\t\t.getOWLObjectPropertyAssertionAxiom(hasRoleExpr, connectorIndv, subscriberRole);\r\n\t\t\t\tmanager.addAxiom(ontology, consumerHasRoleAxiom);\r\n\t\t\t\t\r\n\t\t\t\t//OWLIndividual publishPort = portDict.get(pkg.getId());\r\n\t\t\t\t//OWLIndividual subscribPort = portDict.get(callers.get(0).getSource().getRefId());\r\n\t\t\t\t// create new port\r\n\t\t\t\tOWLIndividual publishPort = factory\r\n\t\t\t\t\t\t.getOWLNamedIndividual(IRI.create(IRI_NAME + \"#publish\"+pkg.getId()+\"_\" + RandomString.randomString(4)));\r\n\t\t\t\tOWLObjectPropertyExpression hasPortExpr = factory.getOWLObjectProperty(IRI.create(IRI_NAME + \"#hasPort\"));\r\n\t\t\t\tOWLObjectPropertyAssertionAxiom providerHasPortAxiom = factory\r\n\t\t\t\t\t\t.getOWLObjectPropertyAssertionAxiom(hasPortExpr, publishCompIndv, publishPort);\r\n\t\t\t\tmanager.addAxiom(ontology, providerHasPortAxiom);\r\n\t\r\n\t\t\t\t// attach publisher role to publish port\r\n\t\t\t\tOWLObjectPropertyExpression hasAttachmentExpr = factory\r\n\t\t\t\t\t\t.getOWLObjectProperty(IRI.create(IRI_NAME + \"#hasAttachment\"));\r\n\t\t\t\tOWLObjectPropertyAssertionAxiom publisherhasAttachAxiom = factory\r\n\t\t\t\t\t\t.getOWLObjectPropertyAssertionAxiom(hasAttachmentExpr, publishPort, publisherRole);\r\n\t\t\t\tmanager.addAxiom(ontology, publisherhasAttachAxiom);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tOWLIndividual subscribePort = factory\r\n\t\t\t\t\t\t.getOWLNamedIndividual(IRI.create(IRI_NAME + \"#publish\"+pkg.getId()+\"_\" + RandomString.randomString(4)));\r\n\t\t\t\tOWLObjectPropertyAssertionAxiom subscriberHasPortAxiom = factory\r\n\t\t\t\t\t\t.getOWLObjectPropertyAssertionAxiom(hasPortExpr, subscribeCompIndv, subscribePort);\r\n\t\t\t\tmanager.addAxiom(ontology, subscriberHasPortAxiom);\r\n\t\t\t\t\r\n\t\t\t\t// attach subscriber role to subscribe port\r\n\t\t\t\tOWLObjectPropertyAssertionAxiom subscriberhasAttachAxiom = factory\r\n\t\t\t\t\t\t.getOWLObjectPropertyAssertionAxiom(hasAttachmentExpr, subscribePort, subscriberRole);\r\n\t\t\t\tmanager.addAxiom(ontology, subscriberhasAttachAxiom);\r\n\t\t\t\tnum--;\r\n\t\t\t} else {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tif(num ==0)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t}", "public abstract NestedSet<Artifact> auxiliary();", "TypeAssociation getEstRapporteeParRapport();", "@Override\n public IOffer getOffer() {\n return offer;\n }", "public Population evolve()\r\n {\r\n\tArrayList<Chromosome> tempPop = \r\n\t new ArrayList<Chromosome>(chromos.size());\r\n\tChromosome u;\r\n\tChromosome v;\r\n\r\n\tfor(int i = 0; i < chromos.size()/2; i++)\r\n\t {\r\n\t\tu = selectParent();\r\n\t\tv = selectParent();\r\n\t\t\r\n\t\t//System.out.println(\"*****Parent 1 : \\n\" + v);\r\n\t\t\r\n Chromosome c1 = u.child(v);\r\n Chromosome c2 = v.child(u);\r\n\t\ttempPop.add(c1);\r\n\t\ttempPop.add(c2);\r\n\t\t\r\n //System.out.println(\"****Generated new child: \\n\" + c1);\r\n\t }\t \r\n\t\r\n\t// if needed, add in the code for keeping the best chromosome\r\n\tPopulation pop = new Population(tempPop, selMethod, selPara, \r\n\t\t\t\t\tcrossMethod, crossPara, mutMethod, mutPara, \r\n\t\t\t\t\treplaceMethod, replacePara, powerStep, tourStep, ff);\r\n\r\n\tif(replaceMethod == ELITISM)\r\n\t {\r\n\t\tpop.remove(worstChromoIndex);\r\n\t\tpop.add(bestChromo.clone());\r\n\t\tpop.initialize();\r\n\t }\r\n\r\n\tgeneration++;\r\n\treturn pop;\r\n }", "@Override\n\tpublic EList<SourceRef> getSource() {\n\t\treturn adaptee.getSource();\n\t}", "private ResolverService(Peer peer, EndpointService epService)\n {\n super(peer, RESSERVICE_NAME);\n\n // init fields\n initFields();\n \n \n this.epService = epService;\n epService.addListener(serviceName, this); //adding listener to end\n // point service\n\n cache = Cache.createInstance(); //creating cache\n cache.addResource(peer);\n \n\n // get SeedPeerList\n EndpointAddress[] seedPeerList = getSeedURIs();\n \n if (seedPeerList != null && seedPeerList.length > 0)\n {\n int seedListSize = (neighbors > seedPeerList.length ? seedPeerList.length : neighbors);\n seedURI = new EndpointAddress[seedListSize][1];\n for (int i = 0; i < seedListSize; i++)\n {\n seedURI[i][0] = seedPeerList[i];\n }\n }\n// try\n// {\n// mcastURI = new EndpointAddress(null, null, 0);\n// } catch (Exception e)\n// {\n// e.printStackTrace();\n// }\n\n// myPeer = peer;\n peerId = peer.getID().toString(); //TBD kuldeep - Is this needed?\n// peername = myPeer.getName();\n }", "private Endpoint(Element endpoint)\n\t\t{\n\t\t\tthis.endpointElement = endpoint;\n\t\t\tNodeList mediaNodeList = endpoint.getElementsByTagName(MEDIA_ELEMENT_NAME);\n\t\t\tfor (int i = 0; i < mediaNodeList.getLength(); i++) {\n\t\t\t\tMedia media = new Media((Element) mediaNodeList.item(i));\n\t\t\t\tmediasList.add(media);\n\t\t\t}\n\t\t}", "@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }", "private static EventSetDescriptor[] getEdescriptor() {\n EventSetDescriptor[] eventSets = new EventSetDescriptor[0];//GEN-HEADEREND:Events\n\n // Here you can add code for customizing the event sets array.\n\n return eventSets;\n }", "PreconfiguredEndpointInner innerModel();", "@Test\n public void testInterpolationOverMultipleSources()\n throws ConfigurationException\n {\n File testFile =\n ConfigurationAssert.getTestFile(\"testInterpolationBuilder.xml\");\n factory.setFile(testFile);\n CombinedConfiguration combConfig = factory.getConfiguration(true);\n assertEquals(\"Wrong value\", \"abc-product\",\n combConfig.getString(\"products.product.desc\"));\n XMLConfiguration xmlConfig =\n (XMLConfiguration) combConfig.getConfiguration(\"test\");\n assertEquals(\"Wrong value from XML config\", \"abc-product\",\n xmlConfig.getString(\"products/product/desc\"));\n SubnodeConfiguration subConfig =\n xmlConfig\n .configurationAt(\"products/product[@name='abc']\", true);\n assertEquals(\"Wrong value from sub config\", \"abc-product\",\n subConfig.getString(\"desc\"));\n }", "public abstract Element getSourceElement(Element forElement) throws IOException;", "public CDLElement newSubCDLElementObject(Element elem) {\n\t\tCDLElement cdlElement = null;\n\t\tString elemName = elem.getName();\n \t\tif (elemName.equals(\"workunit\")) {\t\t\t\n\t\t\tcdlElement = CDLFactory.eINSTANCE.createExceptionWorkUnit();\n\t\t\tgetExceptionWorkUnits().add((ExceptionWorkUnit)cdlElement);\n\t\t} \n\t\treturn cdlElement;\n\t}", "@Override\n\tpublic WebElement[] getOfferName() {\n\t\treturn null;\n\t}", "public static AnalysisEngineDescription createAggregateDescription(String name, List<ResourceSpecifier> specs) {\n //Create the aggregate descriptor object and set the name\n AnalysisEngineDescription aed = new AnalysisEngineDescription_impl();\n aed.getAnalysisEngineMetaData().setName(name);\n aed.setFrameworkImplementation(Constants.JAVA_FRAMEWORK_NAME);\n aed.setPrimitive(false);\n\n //Additional variables for operational information\n ArrayList<String> compNames = new ArrayList<String>();\n FlowControllerDescription fcd = null;\n boolean multipleDeploy = true;\n Import_impl imprt = null;\n\n for (ResourceSpecifier spec : specs) {\n if (spec instanceof AnalysisEngineDescription || spec instanceof CasConsumerDescription) {\n //Add as an import\n String component = ((ResourceCreationSpecifier)spec).getMetaData().getName();\n aed.getDelegateAnalysisEngineSpecifiersWithImports().put(component, spec);\n\n //Add component name to the list\n compNames.add(component);\n\n //Bind external resources\n bindExternalResources(aed, (ResourceCreationSpecifier)spec);\n\n //Set the multiple deployment flag\n if (spec instanceof AnalysisEngineDescription) {\n multipleDeploy &= ((AnalysisEngineDescription) spec).getAnalysisEngineMetaData()\n .getOperationalProperties().isMultipleDeploymentAllowed();\n } else { //Can't deploy more than one CasConsumer\n multipleDeploy = false;\n }//else\n } else if (spec instanceof FlowControllerDescription) {\n fcd = (FlowControllerDescription) spec;\n } else if (spec instanceof CustomResourceSpecifier) {\n //Add the delegate as an import\n String component = getComponentName(((CustomResourceSpecifier) spec).getParameters(), \"leoRemoteServiceDelegate\");\n aed.getDelegateAnalysisEngineSpecifiersWithImports().put(component, spec);\n\n //Add component name to the list\n compNames.add(component);\n } else if (spec instanceof PearSpecifier) {\n String component = getComponentName(((PearSpecifier) spec).getParameters(), \"leoPearServiceDelegate\");\n aed.getDelegateAnalysisEngineSpecifiersWithImports().put(component, spec);\n compNames.add(component);\n }\n }//for\n\n //Set the multiple deployment property\n aed.getAnalysisEngineMetaData().getOperationalProperties().setMultipleDeploymentAllowed(multipleDeploy);\n\n //Setup the flow controller\n if (fcd != null) {\n FlowControllerDeclaration flowControllerDecl = new FlowControllerDeclaration_impl();\n flowControllerDecl.setSpecifier(fcd);\n aed.setFlowControllerDeclaration(flowControllerDecl);\n }//if\n //Setup fixed flow FlowController - will only be used if custom flow controller not provided.\n FixedFlow fixedFlow = new FixedFlow_impl();\n fixedFlow.setFixedFlow(compNames.toArray(new String[compNames.size()]));\n aed.getAnalysisEngineMetaData().setFlowConstraints(fixedFlow);\n\n //Perform full validation on the descriptor before returning\n //Removed validation to support late serialization - TomG 01/31/2012\n //aed.doFullValidation(UIMAFramework.newDefaultResourceManager());\n return aed;\n }", "public ProjectOfferPOExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public EdgeItemProvider(AdapterFactory adapterFactory) {\n\t\tsuper(adapterFactory);\n\t}", "public abstract DTDSubset combineWithExternalSubset(DTDSubset extSubset,\n XMLReporter rep)\n throws WstxException;", "public CollectionPermutationIter(List<E> objectsArray, ArrayPermutationsIter permuter)\r\n/* */ {\r\n/* 103 */ this.permOrder = permuter;\r\n/* 104 */ this.sourceArray = objectsArray;\r\n/* */ }", "private void iterateLandProducers(){\n landPrimaryProducerManager.produceAll();\n\n for(Map.Entry<Sector, SecondaryProducer> v : landSecondaryProducerManager.getManagerMap().entrySet()){\n resourceManager.addProducerResourceVisitor(v.getValue(), v.getKey());\n }\n landSecondaryProducerManager.produceAll();\n }", "public void endElement(String uri, String localName, String qName) throws SAXException {\n if(localName.equals(\"domain\")){\r\n // make the peptide\r\n StringWriter sw = new StringWriter();\r\n for (int i=0;i<currentPep.length();i++) {\r\n sw.write(currentPep.charAt(i));\r\n if (modifications[i] != null) {\r\n sw.write(\"(\"+modifications[i]+\")\");\r\n }\r\n }\r\n String peptideString = sw.toString();\r\n// // check if it exists\r\n// if (peptideString.contains(\"X\")) {\r\n// return;\r\n// }\r\n try {\r\n // convert to a peptide\r\n Peptide p = new Peptide(peptideString);\r\n // add the scored peptide\r\n GenericScoredPeptide gsp = new GenericScoredPeptide();\r\n gsp.setPeptide(p);\r\n gsp.setScore(score);\r\n gsp.setPeakListIdentifier(Integer.toString(currentGroup));\r\n if (isReversed) {\r\n decoyPeptides.add(gsp);\r\n } else {\r\n peptides.add(gsp);\r\n }\r\n \r\n } catch (Exception ex) {\r\n System.out.println(\"Can't create a peptide using \"+peptideString);\r\n// throw new RuntimeException(\"Can't create a peptide using \"+peptideString, ex);\r\n }\r\n }\r\n }", "private ElementSelection getSelectedElements()\n {\n final int[] rowViewIndexes = this.getSelectedRows();\n final NetPlan np = callback.getDesign();\n\n final List<NetworkElement> elementList = new ArrayList<>();\n final List<Pair<Demand, Link>> frList = new ArrayList<>();\n\n if (rowViewIndexes.length != 0)\n {\n final int maxValidRowIndex = model.getRowCount() - 1 - (hasAggregationRow() ? 1 : 0);\n final List<Integer> validRows = new ArrayList<Integer>();\n for (int a : rowViewIndexes) if ((a >= 0) && (a <= maxValidRowIndex)) validRows.add(a);\n\n if (networkElementType == NetworkElementType.FORWARDING_RULE)\n {\n for (int rowViewIndex : validRows)\n {\n final int viewRowIndex = this.convertRowIndexToModel(rowViewIndex);\n final String demandInfo = (String) getModel().getValueAt(viewRowIndex, AdvancedJTable_forwardingRule.COLUMN_DEMAND);\n final String linkInfo = (String) getModel().getValueAt(viewRowIndex, AdvancedJTable_forwardingRule.COLUMN_OUTGOINGLINK);\n final int demandIndex = Integer.parseInt(demandInfo.substring(0, demandInfo.indexOf(\"(\")).trim());\n final int linkIndex = Integer.parseInt(linkInfo.substring(0, linkInfo.indexOf(\"(\")).trim());\n frList.add(Pair.of(np.getDemand(demandIndex), np.getLink(linkIndex)));\n }\n } else\n {\n for (int rowViewIndex : validRows)\n {\n final int viewRowIndex = this.convertRowIndexToModel(rowViewIndex);\n final long id = (long) getModel().getValueAt(viewRowIndex, 0);\n elementList.add(np.getNetworkElement(id));\n }\n }\n }\n\n // Parse into ElementSelection\n final Pair<List<NetworkElement>, List<Pair<Demand, Link>>> selection = Pair.of(elementList, frList);\n final boolean nothingSelected = selection.getFirst().isEmpty() && selection.getSecond().isEmpty();\n\n // Checking for selection type\n final ElementSelection elementHolder;\n\n if (!nothingSelected)\n {\n if (!selection.getFirst().isEmpty())\n elementHolder = new ElementSelection(NetworkElementType.getType(selection.getFirst()), selection.getFirst());\n else if (!selection.getSecond().isEmpty())\n elementHolder = new ElementSelection(selection.getSecond());\n else elementHolder = new ElementSelection();\n } else\n {\n elementHolder = new ElementSelection();\n }\n\n return elementHolder;\n }", "public abstract EndpointReference readEndpointReference(javax.xml.transform.Source eprInfoset);", "public ProtocolProviderServiceRssImpl getParentProvider()\n {\n return this.parentProvider;\n }", "protected abstract Set<Part> generateParts(List<Card> cards, List<Card> jokers);", "public interface FlowDesignerPackage extends EPackage {\n /**\n * The package name.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNAME = \"FlowDesigner\";\n\n /**\n * The package namespace URI.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNS_URI = \"http://piece-framework.com/piece-ide/flowdesigner/1.0\";\n\n /**\n * The package namespace name.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNS_PREFIX = \"FlowDesigner\";\n\n /**\n * The singleton instance of the package.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n FlowDesignerPackage eINSTANCE = FlowDesigner.impl.FlowDesignerPackageImpl.init();\n\n /**\n * The meta object id for the '{@link FlowDesigner.Source <em>Source</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.Source\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getSource()\n * @generated\n */\n int SOURCE = 5;\n\n /**\n * The feature id for the '<em><b>Events</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SOURCE__EVENTS = 0;\n\n /**\n * The number of structural features of the '<em>Source</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int SOURCE_FEATURE_COUNT = 1;\n\n /**\n * The meta object id for the '{@link FlowDesigner.impl.InitialStateImpl <em>Initial State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.InitialStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getInitialState()\n * @generated\n */\n int INITIAL_STATE = 0;\n\n /**\n * The feature id for the '<em><b>Events</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int INITIAL_STATE__EVENTS = SOURCE__EVENTS;\n\n /**\n * The feature id for the '<em><b>Initialize</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int INITIAL_STATE__INITIALIZE = SOURCE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Initial State</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int INITIAL_STATE_FEATURE_COUNT = SOURCE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link FlowDesigner.Target <em>Target</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.Target\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getTarget()\n * @generated\n */\n int TARGET = 6;\n\n /**\n * The number of structural features of the '<em>Target</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int TARGET_FEATURE_COUNT = 0;\n\n /**\n * The meta object id for the '{@link FlowDesigner.impl.FinalStateImpl <em>Final State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.FinalStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getFinalState()\n * @generated\n */\n int FINAL_STATE = 1;\n\n /**\n * The feature id for the '<em><b>Finalize</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FINAL_STATE__FINALIZE = TARGET_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Final State</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FINAL_STATE_FEATURE_COUNT = TARGET_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link FlowDesigner.impl.NamedStateImpl <em>Named State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.NamedStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getNamedState()\n * @generated\n */\n int NAMED_STATE = 7;\n\n /**\n * The feature id for the '<em><b>Events</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int NAMED_STATE__EVENTS = SOURCE__EVENTS;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int NAMED_STATE__NAME = SOURCE_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Activity</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int NAMED_STATE__ACTIVITY = SOURCE_FEATURE_COUNT + 1;\n\n /**\n * The feature id for the '<em><b>Exit</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int NAMED_STATE__EXIT = SOURCE_FEATURE_COUNT + 2;\n\n /**\n * The feature id for the '<em><b>Entry</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int NAMED_STATE__ENTRY = SOURCE_FEATURE_COUNT + 3;\n\n /**\n * The number of structural features of the '<em>Named State</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int NAMED_STATE_FEATURE_COUNT = SOURCE_FEATURE_COUNT + 4;\n\n /**\n * The meta object id for the '{@link FlowDesigner.impl.ActionStateImpl <em>Action State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.ActionStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getActionState()\n * @generated\n */\n int ACTION_STATE = 2;\n\n /**\n * The feature id for the '<em><b>Events</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ACTION_STATE__EVENTS = NAMED_STATE__EVENTS;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ACTION_STATE__NAME = NAMED_STATE__NAME;\n\n /**\n * The feature id for the '<em><b>Activity</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ACTION_STATE__ACTIVITY = NAMED_STATE__ACTIVITY;\n\n /**\n * The feature id for the '<em><b>Exit</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ACTION_STATE__EXIT = NAMED_STATE__EXIT;\n\n /**\n * The feature id for the '<em><b>Entry</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ACTION_STATE__ENTRY = NAMED_STATE__ENTRY;\n\n /**\n * The number of structural features of the '<em>Action State</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ACTION_STATE_FEATURE_COUNT = NAMED_STATE_FEATURE_COUNT + 0;\n\n /**\n * The meta object id for the '{@link FlowDesigner.impl.ViewStateImpl <em>View State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.ViewStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getViewState()\n * @generated\n */\n int VIEW_STATE = 3;\n\n /**\n * The feature id for the '<em><b>Events</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int VIEW_STATE__EVENTS = NAMED_STATE__EVENTS;\n\n /**\n * The feature id for the '<em><b>Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int VIEW_STATE__NAME = NAMED_STATE__NAME;\n\n /**\n * The feature id for the '<em><b>Activity</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int VIEW_STATE__ACTIVITY = NAMED_STATE__ACTIVITY;\n\n /**\n * The feature id for the '<em><b>Exit</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int VIEW_STATE__EXIT = NAMED_STATE__EXIT;\n\n /**\n * The feature id for the '<em><b>Entry</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int VIEW_STATE__ENTRY = NAMED_STATE__ENTRY;\n\n /**\n * The feature id for the '<em><b>View</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int VIEW_STATE__VIEW = NAMED_STATE_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>View State</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int VIEW_STATE_FEATURE_COUNT = NAMED_STATE_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link FlowDesigner.impl.EventImpl <em>Event</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.EventImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getEvent()\n * @generated\n */\n int EVENT = 4;\n\n /**\n * The feature id for the '<em><b>Event</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EVENT__EVENT = 0;\n\n /**\n * The feature id for the '<em><b>Next State</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EVENT__NEXT_STATE = 1;\n\n /**\n * The feature id for the '<em><b>Action</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EVENT__ACTION = 2;\n\n /**\n * The feature id for the '<em><b>Guard</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EVENT__GUARD = 3;\n\n /**\n * The number of structural features of the '<em>Event</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int EVENT_FEATURE_COUNT = 4;\n\n /**\n * The meta object id for the '{@link FlowDesigner.impl.FlowImpl <em>Flow</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.FlowImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getFlow()\n * @generated\n */\n int FLOW = 8;\n\n /**\n * The feature id for the '<em><b>Initial State</b></em>' containment reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FLOW__INITIAL_STATE = 0;\n\n /**\n * The feature id for the '<em><b>States</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FLOW__STATES = 1;\n\n /**\n * The feature id for the '<em><b>Final State</b></em>' containment reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FLOW__FINAL_STATE = 2;\n\n /**\n * The number of structural features of the '<em>Flow</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int FLOW_FEATURE_COUNT = 3;\n\n /**\n * The meta object id for the '<em>Action</em>' data type.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see java.lang.String\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getAction()\n * @generated\n */\n int ACTION = 9;\n\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.InitialState <em>Initial State</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Initial State</em>'.\n * @see FlowDesigner.InitialState\n * @generated\n */\n EClass getInitialState();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.InitialState#getInitialize <em>Initialize</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Initialize</em>'.\n * @see FlowDesigner.InitialState#getInitialize()\n * @see #getInitialState()\n * @generated\n */\n EAttribute getInitialState_Initialize();\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.FinalState <em>Final State</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Final State</em>'.\n * @see FlowDesigner.FinalState\n * @generated\n */\n EClass getFinalState();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.FinalState#getFinalize <em>Finalize</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Finalize</em>'.\n * @see FlowDesigner.FinalState#getFinalize()\n * @see #getFinalState()\n * @generated\n */\n EAttribute getFinalState_Finalize();\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.ActionState <em>Action State</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Action State</em>'.\n * @see FlowDesigner.ActionState\n * @generated\n */\n EClass getActionState();\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.ViewState <em>View State</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>View State</em>'.\n * @see FlowDesigner.ViewState\n * @generated\n */\n EClass getViewState();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.ViewState#getView <em>View</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>View</em>'.\n * @see FlowDesigner.ViewState#getView()\n * @see #getViewState()\n * @generated\n */\n EAttribute getViewState_View();\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.Event <em>Event</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Event</em>'.\n * @see FlowDesigner.Event\n * @generated\n */\n EClass getEvent();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.Event#getEvent <em>Event</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Event</em>'.\n * @see FlowDesigner.Event#getEvent()\n * @see #getEvent()\n * @generated\n */\n EAttribute getEvent_Event();\n\n /**\n * Returns the meta object for the reference '{@link FlowDesigner.Event#getNextState <em>Next State</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference '<em>Next State</em>'.\n * @see FlowDesigner.Event#getNextState()\n * @see #getEvent()\n * @generated\n */\n EReference getEvent_NextState();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.Event#getAction <em>Action</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Action</em>'.\n * @see FlowDesigner.Event#getAction()\n * @see #getEvent()\n * @generated\n */\n EAttribute getEvent_Action();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.Event#getGuard <em>Guard</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Guard</em>'.\n * @see FlowDesigner.Event#getGuard()\n * @see #getEvent()\n * @generated\n */\n EAttribute getEvent_Guard();\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.Source <em>Source</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Source</em>'.\n * @see FlowDesigner.Source\n * @generated\n */\n EClass getSource();\n\n /**\n * Returns the meta object for the containment reference list '{@link FlowDesigner.Source#getEvents <em>Events</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the containment reference list '<em>Events</em>'.\n * @see FlowDesigner.Source#getEvents()\n * @see #getSource()\n * @generated\n */\n EReference getSource_Events();\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.Target <em>Target</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Target</em>'.\n * @see FlowDesigner.Target\n * @generated\n */\n EClass getTarget();\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.NamedState <em>Named State</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Named State</em>'.\n * @see FlowDesigner.NamedState\n * @generated\n */\n EClass getNamedState();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.NamedState#getName <em>Name</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Name</em>'.\n * @see FlowDesigner.NamedState#getName()\n * @see #getNamedState()\n * @generated\n */\n EAttribute getNamedState_Name();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.NamedState#getActivity <em>Activity</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Activity</em>'.\n * @see FlowDesigner.NamedState#getActivity()\n * @see #getNamedState()\n * @generated\n */\n EAttribute getNamedState_Activity();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.NamedState#getExit <em>Exit</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Exit</em>'.\n * @see FlowDesigner.NamedState#getExit()\n * @see #getNamedState()\n * @generated\n */\n EAttribute getNamedState_Exit();\n\n /**\n * Returns the meta object for the attribute '{@link FlowDesigner.NamedState#getEntry <em>Entry</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Entry</em>'.\n * @see FlowDesigner.NamedState#getEntry()\n * @see #getNamedState()\n * @generated\n */\n EAttribute getNamedState_Entry();\n\n /**\n * Returns the meta object for class '{@link FlowDesigner.Flow <em>Flow</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Flow</em>'.\n * @see FlowDesigner.Flow\n * @generated\n */\n EClass getFlow();\n\n /**\n * Returns the meta object for the containment reference '{@link FlowDesigner.Flow#getInitialState <em>Initial State</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the containment reference '<em>Initial State</em>'.\n * @see FlowDesigner.Flow#getInitialState()\n * @see #getFlow()\n * @generated\n */\n EReference getFlow_InitialState();\n\n /**\n * Returns the meta object for the containment reference list '{@link FlowDesigner.Flow#getStates <em>States</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the containment reference list '<em>States</em>'.\n * @see FlowDesigner.Flow#getStates()\n * @see #getFlow()\n * @generated\n */\n EReference getFlow_States();\n\n /**\n * Returns the meta object for the containment reference '{@link FlowDesigner.Flow#getFinalState <em>Final State</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the containment reference '<em>Final State</em>'.\n * @see FlowDesigner.Flow#getFinalState()\n * @see #getFlow()\n * @generated\n */\n EReference getFlow_FinalState();\n\n /**\n * Returns the meta object for data type '{@link java.lang.String <em>Action</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for data type '<em>Action</em>'.\n * @see java.lang.String\n * @model instanceClass=\"java.lang.String\"\n * @generated\n */\n EDataType getAction();\n\n /**\n * Returns the factory that creates the instances of the model.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the factory that creates the instances of the model.\n * @generated\n */\n FlowDesignerFactory getFlowDesignerFactory();\n\n /**\n * <!-- begin-user-doc -->\n * Defines literals for the meta objects that represent\n * <ul>\n * <li>each class,</li>\n * <li>each feature of each class,</li>\n * <li>each enum,</li>\n * <li>and each data type</li>\n * </ul>\n * <!-- end-user-doc -->\n * @generated\n */\n interface Literals {\n /**\n * The meta object literal for the '{@link FlowDesigner.impl.InitialStateImpl <em>Initial State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.InitialStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getInitialState()\n * @generated\n */\n EClass INITIAL_STATE = eINSTANCE.getInitialState();\n\n /**\n * The meta object literal for the '<em><b>Initialize</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute INITIAL_STATE__INITIALIZE = eINSTANCE.getInitialState_Initialize();\n\n /**\n * The meta object literal for the '{@link FlowDesigner.impl.FinalStateImpl <em>Final State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.FinalStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getFinalState()\n * @generated\n */\n EClass FINAL_STATE = eINSTANCE.getFinalState();\n\n /**\n * The meta object literal for the '<em><b>Finalize</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute FINAL_STATE__FINALIZE = eINSTANCE.getFinalState_Finalize();\n\n /**\n * The meta object literal for the '{@link FlowDesigner.impl.ActionStateImpl <em>Action State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.ActionStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getActionState()\n * @generated\n */\n EClass ACTION_STATE = eINSTANCE.getActionState();\n\n /**\n * The meta object literal for the '{@link FlowDesigner.impl.ViewStateImpl <em>View State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.ViewStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getViewState()\n * @generated\n */\n EClass VIEW_STATE = eINSTANCE.getViewState();\n\n /**\n * The meta object literal for the '<em><b>View</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute VIEW_STATE__VIEW = eINSTANCE.getViewState_View();\n\n /**\n * The meta object literal for the '{@link FlowDesigner.impl.EventImpl <em>Event</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.EventImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getEvent()\n * @generated\n */\n EClass EVENT = eINSTANCE.getEvent();\n\n /**\n * The meta object literal for the '<em><b>Event</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute EVENT__EVENT = eINSTANCE.getEvent_Event();\n\n /**\n * The meta object literal for the '<em><b>Next State</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference EVENT__NEXT_STATE = eINSTANCE.getEvent_NextState();\n\n /**\n * The meta object literal for the '<em><b>Action</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute EVENT__ACTION = eINSTANCE.getEvent_Action();\n\n /**\n * The meta object literal for the '<em><b>Guard</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute EVENT__GUARD = eINSTANCE.getEvent_Guard();\n\n /**\n * The meta object literal for the '{@link FlowDesigner.Source <em>Source</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.Source\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getSource()\n * @generated\n */\n EClass SOURCE = eINSTANCE.getSource();\n\n /**\n * The meta object literal for the '<em><b>Events</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SOURCE__EVENTS = eINSTANCE.getSource_Events();\n\n /**\n * The meta object literal for the '{@link FlowDesigner.Target <em>Target</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.Target\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getTarget()\n * @generated\n */\n EClass TARGET = eINSTANCE.getTarget();\n\n /**\n * The meta object literal for the '{@link FlowDesigner.impl.NamedStateImpl <em>Named State</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.NamedStateImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getNamedState()\n * @generated\n */\n EClass NAMED_STATE = eINSTANCE.getNamedState();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NAMED_STATE__NAME = eINSTANCE.getNamedState_Name();\n\n /**\n * The meta object literal for the '<em><b>Activity</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NAMED_STATE__ACTIVITY = eINSTANCE.getNamedState_Activity();\n\n /**\n * The meta object literal for the '<em><b>Exit</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NAMED_STATE__EXIT = eINSTANCE.getNamedState_Exit();\n\n /**\n * The meta object literal for the '<em><b>Entry</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NAMED_STATE__ENTRY = eINSTANCE.getNamedState_Entry();\n\n /**\n * The meta object literal for the '{@link FlowDesigner.impl.FlowImpl <em>Flow</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see FlowDesigner.impl.FlowImpl\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getFlow()\n * @generated\n */\n EClass FLOW = eINSTANCE.getFlow();\n\n /**\n * The meta object literal for the '<em><b>Initial State</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FLOW__INITIAL_STATE = eINSTANCE.getFlow_InitialState();\n\n /**\n * The meta object literal for the '<em><b>States</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FLOW__STATES = eINSTANCE.getFlow_States();\n\n /**\n * The meta object literal for the '<em><b>Final State</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference FLOW__FINAL_STATE = eINSTANCE.getFlow_FinalState();\n\n /**\n * The meta object literal for the '<em>Action</em>' data type.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see java.lang.String\n * @see FlowDesigner.impl.FlowDesignerPackageImpl#getAction()\n * @generated\n */\n EDataType ACTION = eINSTANCE.getAction();\n\n }\n\n}", "@Override\n \tpublic Representation getResource() throws Exception {\n \t\tJsonRepresentation result = null;\n \t\t// Rcupre l'identifiant unique de la ressource demande.\n \t\tString interId = (String) this.getRequestAttributes().get(\"interId\");\n \t\tString srcId = (String) this.getRequestAttributes().get(\"sourceId\");\n \t\tSystem.out.println(srcId);\n \t\t// Rcupration des sources de l'intervention\n \t\tList<Source> sources = Interventions.getInstance().getIntervention(interId).getSources();\n \n \t\tSource source = null;\n \t\t\n \t\t// Si on demande un source prcis\n \t\tif (srcId != null) {\n \t\t\t// Recherche du source demand\n \t\t\tfor (int i = 0; i < sources.size(); i++) {\n \t\t\t\tif (sources.get(i).getUniqueID().equals(srcId)) {\n \t\t\t\t\tsource = sources.get(i);\n \t\t\t\t}\n \t\t\t}\n \t\t\t// Si le source n'est pas trouv\n \t\t\tif (source == null) {\n \t\t\t\tresult = null;\n \t\t\t\tgetResponse().setStatus(Status.CLIENT_ERROR_NOT_ACCEPTABLE);\n \t\t\t} else {\n \t\t\t\tresult = new JsonRepresentation(source.toJSON());\n \t\t\t}\n \t\t// Si on veut tous les sources\n \t\t} else if (srcId == null) {\n \t\t\t\n \t\t\tJSONArray jsonAr = new JSONArray(); //Cration d'une liste Json\n \t\t\tfor(int i=0; i< sources.size();i++){\n\t\t\t\tjsonAr.put(sources.get(i).toJSON()); // On ajoute un jsonObject contenant le source dans le jsonArray\n \t\t\t}\n \t\t\t\n \t\t\tresult = new JsonRepresentation(jsonAr); // On cre la reprsentation de la liste\n \t\t}\n \n \t\t// Retourne la reprsentation, le code status indique au client si elle est valide\n \t\treturn result;\n \t}", "private static EventSetDescriptor[] getEdescriptor(){\n EventSetDescriptor[] eventSets = new EventSetDescriptor[0];//GEN-HEADEREND:Events\n // Here you can add code for customizing the event sets array.\n\n return eventSets; }", "private Element generateCriteriaElementForSetOpExcerpt(XmlProcessor hqmfXmlProcessor,\n\t\t\tNode clonedNodeToAppendExcerpt) {\n\t\tElement criteriaElement = null;\n\t\tfor (int i = 0; i < clonedNodeToAppendExcerpt.getChildNodes().getLength(); i++) {\n\t\t\tNode childNode = clonedNodeToAppendExcerpt.getChildNodes().item(i);\n\t\t\tif (ID.equalsIgnoreCase(childNode.getNodeName())) {\n\t\t\t\tNode criteriaNode = generateEmptyGrouper(hqmfXmlProcessor,\n\t\t\t\t\t\tchildNode.getAttributes().getNamedItem(ROOT).getNodeValue(),\n\t\t\t\t\t\tchildNode.getAttributes().getNamedItem(EXTENSION).getNodeValue());\n\t\t\t\tcriteriaElement = (Element) criteriaNode;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn criteriaElement;\n\t}", "private void offer() {\n\t\t\t\n\t\t}", "public abstract Parts getProcessor();", "@CLIMethod(\"--create-part-of\")\n public void createPartOfLinks(Opts opts) throws Exception {\n if (g == null) {\n LOG.error(\"No source ontology available.\");\n exit(-1);\n return;\n }\n if (reasoner == null) {\n LOG.error(\"No resoner available.\");\n exit(-1);\n return;\n }\n String goRef = \"GO_REF:0000090\";\n String annotationIRIString = \"http://purl.org/dc/terms/source\";\n String targetFileName = null;\n\n while (opts.hasOpts()) {\n if (opts.nextEq(\"--go-ref\")) {\n goRef = opts.nextOpt();\n }\n else if (opts.nextEq(\"--annotation-iri\")) {\n annotationIRIString = opts.nextOpt();\n }\n else if (opts.nextEq(\"--target-file\")) {\n targetFileName = opts.nextOpt();\n }\n else {\n break;\n }\n }\n\n if (targetFileName == null) {\n LOG.error(\"No target-file as output was specified.\");\n exit(-1);\n return;\n }\n final File targetFile = new File(targetFileName);\n final IRI targetFileIRI = IRI.create(targetFile);\n\n final IRI annotationIRI = IRI.create(annotationIRIString);\n\n // first hard coded test for MF -> BP mappings:\n // transporter activity -part_of-> transporter\n // transmembrane transporter activity -part_of-> transmembrane transport\n\n final OWLClass ta = g.getOWLClassByIdentifier(\"GO:0005215\"); // transporter activity\n final OWLClass t = g.getOWLClassByIdentifier(\"GO:0006810\"); // transport\n final OWLClass tmta = g.getOWLClassByIdentifier(\"GO:0022857\"); // transmembrane transport activity\n final OWLClass tmt = g.getOWLClassByIdentifier(\"GO:0055085\"); // transmembrane transport\n final OWLObjectProperty partOf = g.getOWLObjectPropertyByIdentifier(\"part_of\");\n final OWLObjectProperty transports = g.getOWLObjectPropertyByIdentifier(\"transports_or_maintains_localization_of\");\n\n List<LinkPattern> patterns = new ArrayList<LinkPattern>(2);\n patterns.add(new LinkPattern(ta, t, transports, partOf));\n patterns.add(new LinkPattern(tmta, tmt, transports, partOf));\n\n OWLDataFactory factory = g.getDataFactory();\n OWLAnnotationProperty property = factory.getOWLAnnotationProperty(annotationIRI);\n OWLAnnotation sourceAnnotation = factory.getOWLAnnotation(property, factory.getOWLLiteral(goRef));\n\n LinkMaker maker = new LinkMaker(g, reasoner);\n LinkMakerResult result = maker.makeLinks(patterns, sourceAnnotation, false);\n\n LOG.info(\"Predictions size: \"+result.getPredictions().size());\n OWLPrettyPrinter pp = getPrettyPrinter();\n for (OWLAxiom ax : result.getPredictions()) {\n LOG.info(pp.render(ax));\n }\n LOG.info(\"Existing size: \"+result.getExisiting().size());\n LOG.info(\"Modified size: \"+result.getModified().size());\n\n OWLOntologyManager manager = g.getManager();\n manager.removeAxioms(g.getSourceOntology(), result.getExisiting());\n manager.addAxioms(g.getSourceOntology(), result.getModified());\n manager.addAxioms(g.getSourceOntology(), result.getPredictions());\n\n manager.saveOntology(g.getSourceOntology(), targetFileIRI);\n }", "private XMLElement findExtension(XMLElement pluginDescriptor, String epName) {\n for (XMLElement child : pluginDescriptor.getChildren()) {\n if (child.getName().equals(\"extension\") &&\n epName.equals(child.getStringAttribute(\"point\"))) {\n return child;\n }\n }\n return null;\n }", "public Collection< EDataT > edgeData();", "public AddEditionPatternParameter(ViewPointBuilder builder) {\n \t\t\tsuper(builder);\n \t\t}", "@Override\r\n\tpublic PointInterface[] edgeEndPoints() {\n\t\treturn p;\r\n\t}", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }", "@Command\n\tpublic void voirEae(@BindingParam(\"ref\") EaeListItemDto eae) {\n\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\targs.put(\"eae\", eae);\n\t\targs.put(\"mode\", \"VIEW\");\n\t\tgetDivDepart().getChildren().clear();\n\t\tExecutions.createComponents(\"/eae/onglet/eae.zul\", getDivDepart(), args);\n\t}", "public DnRawType buildEndpointType(@SuppressWarnings(\"unused\") DnCxt cxt, DnRawType epInputType)\n throws DnException {\n var inModel = epInputType.model;\n var namespace = epInputType.namespace;\n String inputTypeRef = DnTypeUtils.applyNamespace(namespace, getReqStr(inModel, EP_INPUT_TYPE_REF));\n String outputTypeRef = DnTypeUtils.applyNamespace(namespace, getReqStr(inModel, EP_OUTPUT_TYPE_REF));\n\n DnRawField inputField = DnRawField.mkField(EPF_INPUT_TYPE,\n \"Endpoint Input Type\", \"The definition of the validation and transformation to \" +\n \"be applied to input data for the endpoint.\");\n DnRawField outputField = DnRawField.mkField(EPF_OUTPUT_TYPE, \"Endpoint Output Type\",\n \"The specification of the allowable output for this endpoint.\");\n DnRawField requestUri = DnRawField.mkReqField(EPR_REQUEST_URI, \"Request URI\",\n \"The request URI that make this request.\");\n DnRawField duration = DnRawField.mkReqField(EPR_DURATION, \"Duration in Milliseconds\",\n \"The time taken to perform the request in milliseconds.\").setTypeRef(DNT_FLOAT);\n\n if (getBoolWithDefault(inModel, EP_IS_LIST_RESPONSE, false)) {\n int defaultLimit = 100;\n // More complex result.\n var inputType = DnRawType.mkSubType(inputTypeRef);\n var limitType = DnRawType.mkSubType(DNT_COUNT).setAttribute(DN_MAX, 20000);\n if (!getBoolWithDefault(inModel, EP_NO_LIMIT_PARAMETER, false)) {\n DnRawField limit = DnRawField.mkField(EPF_LIMIT, \"Limit On Results\",\n \"The maximum number of items that can be returned.\")\n .setTypeDef(limitType)\n .setAttribute(DN_DEFAULT_VALUE, defaultLimit);\n inputType.addField(limit);\n }\n\n inputField.setTypeDef(inputType);\n\n DnRawField numItems = DnRawField.mkReqField(EPR_NUM_ITEMS, \"Number of Items\",\n \"Number of items returned.\").setTypeRef(DNT_COUNT);\n DnRawField items = DnRawField.mkReqField(EPR_ITEMS, \"Items\",\n \"Items returned by endpoint.\")\n .setTypeRef(outputTypeRef).setAttribute(DN_IS_LIST, true);\n List<DnRawField> fieldList = mList(numItems, requestUri, duration);\n if (getBoolWithDefault(inModel, EP_HAS_MORE_PAGING, false)) {\n DnRawField hasMore = DnRawField.mkReqBoolField(EPR_HAS_MORE, \"Has More\",\n \"Whether there are more items that could be returned.\");\n fieldList.add(hasMore);\n }\n if (getBoolWithDefault(inModel, EP_HAS_NUM_AVAILABLE, false)) {\n DnRawField totalSize = DnRawField.mkReqField(EPR_NUM_AVAILABLE, \"Total Size\",\n \"The total number of items available to be returned.\").setTypeRef(DNT_COUNT);\n fieldList.add(totalSize);\n }\n fieldList.add(items);\n var outputType = DnRawType.mkType(fieldList);\n outputField.setTypeDef(outputType);\n } else {\n // Endpoints always use inline (unregistered) types at their core.\n inputField.setTypeDef(DnRawType.mkSubType(inputTypeRef));\n var outputType = DnRawType.mkSubType(outputTypeRef);\n outputType.addFields(mList(requestUri, duration));\n outputField.setTypeDef(outputType);\n }\n\n DnRawType endpointType = DnRawType.mkType(epInputType.name, null);\n endpointType.model.putAll(epInputType.model);\n endpointType.addFields(mList(inputField, outputField));\n endpointType.setAttribute(DN_IS_ENDPOINT, true);\n return endpointType;\n }", "public void fetcherLesEo() {\r\n\t\r\n\t// Commence par fetcher les params ... et si Ok, fetche les EO !\r\n\tif (recupererValParams() && valParams != null) {\r\n\r\n\t NSArray bindings = new NSArray(valParams);\r\n\t EOQualifier qualifier = EOQualifier.qualifierWithQualifierFormat(chaineQualif, bindings);\r\n\t EOFetchSpecification fetchSpec = new EOFetchSpecification(nomEntite,qualifier, eoSortOrderings);\r\n\r\n\t fetchSpec.setRefreshesRefetchedObjects(true);\r\n\r\n\t NSArray res = null;\r\n\t res = monEc.objectsWithFetchSpecification(fetchSpec);\r\n\t listeEOFetches = res;\r\n\t \r\n\t // si on demande � ce qu'� l'init il n'y ait pas de ligne s�lectionn�e par d�faut, alors pas d'Item choisi (en cascade)\r\n\t if (noSelectionPossible) setItemChoisi(null);\r\n\t else {\r\n\t\tif (listeEOFetches != null && listeEOFetches.count() > 0)\r\n\t\t setItemChoisi((EOGenericRecord)listeEOFetches.objectAtIndex(0));\r\n\t\telse setItemChoisi(null);\r\n\t }\r\n\t}\r\n\t// les parametres n'ont pu être récupérés : vider le popUp...\r\n\telse {\r\n listeEOFetches = null;\r\n // pas d'Item choisi (en cascade)\r\n setItemChoisi(null);\r\n\t}\r\n }", "ImmutableList<SchemaOrgType> getProducerList();", "public String readPolicyCombiningAlgorithm() throws EntitlementException {\n try {\n Collection policyCollection = null;\n if(registry.resourceExists(policyStorePath)){\n policyCollection = (Collection) registry.get(policyStorePath);\n }\n if(policyCollection != null){\n return policyCollection.getProperty(\"globalPolicyCombiningAlgorithm\");\n }\n return null;\n } catch (RegistryException e) {\n log.error(\"Error while reading policy combining algorithm\", e);\n throw new EntitlementException(\"Error while reading policy combining algorithm\", e);\n }\n }", "protected void addConnectionAePropertyDescriptor ( Object object )\n {\n itemPropertyDescriptors.add ( createItemPropertyDescriptor ( ( (ComposeableAdapterFactory)adapterFactory ).getRootAdapterFactory (), getResourceLocator (), getString ( \"_UI_Site_connectionAe_feature\" ), getString ( \"_UI_PropertyDescriptor_description\", \"_UI_Site_connectionAe_feature\", \"_UI_Site_type\" ), GlobalPackage.Literals.SITE__CONNECTION_AE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null ) );\n }", "public Set<K> e() {\n return new c(this);\n }", "public void addSource(ReplicaCatalogEntry rce) {\n List<ReplicaCatalogEntry> l = null;\n if (mSourceMap.containsKey(rce.getResourceHandle())) {\n // add the url to the existing list\n l = (List) mSourceMap.get(rce.getResourceHandle());\n // add the entry to the list\n l.add(rce);\n } else {\n // add a new list\n l = new ArrayList(3);\n l.add(rce);\n mSourceMap.put(rce.getResourceHandle(), l);\n }\n }", "protected RemoteFactory.Parts<Msg, Ref> eco_parts() {\n assert this.ecosystemComponent != null: \"This is a bug.\";\n return this.ecosystemComponent;\n }", "Product getPProducts();", "public MutableGraph<PatternInstance> buildPatternEvolution(PatternInstance pi){\n MutableGraph<PatternInstance> patternEvolution = GraphBuilder.directed().allowsSelfLoops(false).build();\n\n for (SoftwareVersion v : patternSummaryTable.rowKeySet()) {\n for (PatternType pt : patternSummaryTable.columnKeySet()) {\n if (pi.getPatternType().equals(pt)){\n //same pattern type; not necessary but filters some pattern instances\n for (PatternInstance allPI : patternSummaryTable.get(v, pt)) {\n if (pi.isInstanceEqual(allPI)) {\n //same pattern, (hopefully)\n patternEvolution.addNode(allPI);\n }\n }\n }\n }\n }\n\n List<PatternInstance> orderedPIs = new ArrayList<>();\n //fill nodes\n for (PatternInstance node : patternEvolution.nodes()){\n orderedPIs.add(node);\n }\n orderedPIs.sort(Comparator.comparing(PatternInstance::getSoftwareVersion));\n //sort list\n //https://stackoverflow.com/questions/16252269/how-to-sort-an-arraylist\n// Collections.sort(orderedPIs, new Comparator<PatternInstance>() {\n// @Override\n// public int compare(PatternInstance patternInstance, PatternInstance t1) {\n// return patternInstance.getSoftwareVersion().getVersionNum() - t1.getSoftwareVersion().getVersionNum();\n// }\n// });\n\n //add edges\n for (int i = 0; i < orderedPIs.size()-1; i++){\n patternEvolution.putEdge(orderedPIs.get(i), orderedPIs.get(i+1));\n }\n\n return patternEvolution;\n }", "public void offerFront(E elem);", "public Set<IPortletDefinition> getChildPortlets(PortletCategory parent);", "protected List<QueryIterator> nextStage(List<Binding> bindingsCouldBeParent) {\n\n\t\tList<QueryIterator> allIterators = new ArrayList<QueryIterator>();\n\t\tString filterType = (String) getExecContext().getContext().get(\n\t\t\t\tConstants.FILTER_TYPE);\n\t\t// creating filter Ops.\n\t\tList<Op> filterOps = QCFilter.substitute(opService,\n\t\t\t\tbindingsCouldBeParent, filterType);\n\t\tfor (int i = 0; i < filterOps.size(); i++) {\n\t\t\t// creating numeric binding list using numeric op\n\t\t\tList<Binding> bindingList = ServiceBound\n\t\t\t\t\t.exec((OpService) filterOps.get(i), getExecContext()\n\t\t\t\t\t\t\t.getContext());\n\n\t\t\t// logger.debug(\"Binding pairs is beginning to be generated...\");\n\t\t\t// long before = System.currentTimeMillis();\n\t\t\t// find binding pairs\n\t\t\tList<BindingPair> bindingPairs = generateBindingPairs(bindingList,\n\t\t\t\t\tbindingsCouldBeParent, opService.getService(),\n\t\t\t\t\t((OpService) filterOps.get(i)).getService());\n\t\t\t// long after = System.currentTimeMillis();\n\t\t\t// logger.debug(MessageFormat.format(\n\t\t\t// \"Binding pairs has been generated in \\\"{0}\\\" miliseconds\",\n\t\t\t// after - before));\n\n\t\t\t// logger.debug(\"Binding pairs is beginning to be intersected...\");\n\t\t\t// before = System.currentTimeMillis();\n\t\t\t// intersect bindings and their parents contained in binding pairs\n\t\t\tbindingPairs = intersectBindingPairs(bindingPairs);\n\t\t\t// after = System.currentTimeMillis();\n\t\t\t// logger.debug(MessageFormat\n\t\t\t// .format(\"Binding pairs has been intersected in \\\"{0}\\\" miliseconds\",\n\t\t\t// after - before));\n\n\t\t\t// logger.debug(\"Query iterators is beginning to be generated...\");\n\t\t\t// before = System.currentTimeMillis();\n\t\t\t// make query iterators using binding pairs\n\t\t\tList<QueryIterator> queryIterators = generateQueryIterators(bindingPairs);\n\t\t\t// after = System.currentTimeMillis();\n\t\t\t// logger.debug(MessageFormat\n\t\t\t// .format(\"Query iterators has been generated in \\\"{0}\\\" miliseconds\",\n\t\t\t// after - before));\n\n\t\t\t// reverse iterators\n\t\t\tCollections.reverse(queryIterators);\n\t\t\tallIterators.addAll(queryIterators);\n\t\t}\n\t\treturn allIterators;\n\t}", "public ArrayList<Integer> getE() {\r\n return this.e;\r\n }", "private static Product getProduct(Element e) {\n\t\tNodeList children = e.getChildNodes();\n\n\t\tElement descriptionElement = (Element) children.item(1);\n\t\tText descriptionText = (Text) descriptionElement.getFirstChild();\n\t\tString description = descriptionText.getData();\n\n\t\tElement priceElement = (Element) children.item(1);\n\t\tText priceText = (Text) priceElement.getFirstChild();\n\t\tdouble price = Double.parseDouble(priceText.getData());\n\n\t\treturn new Product(description, price);\n\t}", "private void processComponentGroupings(String rel, Element comp){\n\t\tSubmodel parentsubmodel = semsimmodel.getSubmodel(comp.getAttributeValue(\"component\"));\n\t\tIterator<?> subcompit = comp.getChildren(\"component_ref\", mainNS).iterator();\n\t\twhile(subcompit.hasNext()){\n\t\t\tElement subcomp = (Element) subcompit.next();\n\t\t\tSubmodel childsubmodel = semsimmodel.getSubmodel(subcomp.getAttributeValue(\"component\"));\n\t\t\t\n\t\t\t// If both components have corresponding FunctionalSubmodels in the SemSimModel\n\t\t\tif(parentsubmodel instanceof FunctionalSubmodel && childsubmodel instanceof FunctionalSubmodel){\n\t\t\t\tSet<FunctionalSubmodel> valueset = ((FunctionalSubmodel)parentsubmodel).getRelationshipSubmodelMap().get(rel);\n\t\t\t\t\n\t\t\t\t// If we haven't associated a FunctionalSubmodel with this relationship type yet, create new value set, add value\n\t\t\t\tif(valueset==null) valueset = new HashSet<FunctionalSubmodel>();\n\t\t\t\tvalueset.add((FunctionalSubmodel)childsubmodel);\n\t\t\t\t\n\t\t\t\t// Connect the parent and child submodels\n\t\t\t\t((FunctionalSubmodel)parentsubmodel).getRelationshipSubmodelMap().put(rel, valueset);\n\t\t\t\t\n\t\t\t\tparentsubmodel.addSubmodel(childsubmodel);\n\t\t\t\t\n\t\t\t\t// Iterate recursively\n\t\t\t\tprocessComponentGroupings(rel, subcomp);\n\t\t\t}\n\t\t}\n\t}", "private Element generateExcerptEntryForFunctionalNode(Node functionalOpNode, Node lhsNode,\n\t\t\tXmlProcessor hqmfXmlProcessor, Node clonedNodeToAppendExcerpt) throws XPathExpressionException {\n\t\tElement excerptElement = hqmfXmlProcessor.getOriginalDoc().createElement(EXCERPT);\n\t\tString functionalOpName = functionalOpNode.getAttributes().getNamedItem(TYPE).getNodeValue();\n\t\tElement criteriaElement = null;\n\t\tif (FUNCTIONAL_OPS_NON_SUBSET.containsKey(functionalOpName)) {\n\t\t\tElement sequenceElement = hqmfXmlProcessor.getOriginalDoc().createElement(SEQUENCE_NUMBER);\n\t\t\tsequenceElement.setAttribute(VALUE, FUNCTIONAL_OPS_NON_SUBSET.get(functionalOpName.toUpperCase()));\n\t\t\texcerptElement.appendChild(sequenceElement);\n\t\t\tif (clonedNodeToAppendExcerpt != null) {\n\t\t\t\tif (clonedNodeToAppendExcerpt.getNodeName().contains(GROUPER)) {\n\t\t\t\t\tcriteriaElement = generateCriteriaElementForSetOpExcerpt(hqmfXmlProcessor,\n\t\t\t\t\t\t\tclonedNodeToAppendExcerpt);\n\t\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t\t} else {\n\t\t\t\t\tNodeList entryChildNodes = clonedNodeToAppendExcerpt.getChildNodes();\n\t\t\t\t\tcriteriaElement = generateCriteriaElementForExcerpt(hqmfXmlProcessor, entryChildNodes);\n\t\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (FUNCTIONAL_OPS_SUBSET.containsKey(functionalOpName)) {\n\t\t\tNamedNodeMap attributeMap = functionalOpNode.getAttributes();\n\t\t\tif (clonedNodeToAppendExcerpt.getNodeName().contains(GROUPER)) {\n\t\t\t\tcriteriaElement = generateCriteriaElementForSetOpExcerpt(hqmfXmlProcessor, clonedNodeToAppendExcerpt);\n\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t} else {\n\t\t\t\tNodeList entryChildNodes = clonedNodeToAppendExcerpt.getChildNodes();\n\t\t\t\tcriteriaElement = generateCriteriaElementForExcerpt(hqmfXmlProcessor, entryChildNodes);\n\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t}\n\t\t\tif (clonedNodeToAppendExcerpt != null) {\n\n\t\t\t\tif (\"count\".equalsIgnoreCase(functionalOpName)) {\n\n\t\t\t\t\tcreateRepeatNumberTagForCountFuncttion(hqmfXmlProcessor, attributeMap, criteriaElement);\n\t\t\t\t\tElement qdmSubSetElement = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:subsetCode\");\n\t\t\t\t\tqdmSubSetElement.setAttribute(CODE, FUNCTIONAL_OPS_SUBSET.get(functionalOpName.toUpperCase()));\n\t\t\t\t\tElement subSetCodeElement = hqmfXmlProcessor.getOriginalDoc().createElement(\"subsetCode\");\n\t\t\t\t\tsubSetCodeElement.setAttribute(CODE, \"SUM\");\n\n\t\t\t\t\texcerptElement.appendChild(subSetCodeElement);\n\t\t\t\t\texcerptElement.appendChild(qdmSubSetElement);\n\t\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t\t} else {\n\t\t\t\t\tif (attributeMap.getNamedItem(OPERATOR_TYPE) != null && lhsNode != null) {\n\t\t\t\t\t\tString lhsNodeType = lhsNode.getNodeName();\n\t\t\t\t\t\tif (ELEMENT_REF.equalsIgnoreCase(lhsNodeType)) {\n\t\t\t\t\t\t\tString qdmUUID = lhsNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\t\t\t\t\t\tString xPath = \"/measure/elementLookUp/qdm[@uuid ='\" + qdmUUID + \"']\";\n\t\t\t\t\t\t\tNode node = measureExport.getSimpleXMLProcessor()\n\t\t\t\t\t\t\t\t\t.findNode(measureExport.getSimpleXMLProcessor().getOriginalDoc(), xPath);\n\t\t\t\t\t\t\tif (node != null && lhsNode.hasChildNodes()) {\n\t\t\t\t\t\t\t\tNode qdmNode = node.cloneNode(true);\n\t\t\t\t\t\t\t\tNode attributeNode = lhsNode.getFirstChild().cloneNode(true);\n\t\t\t\t\t\t\t\tattributeNode.setUserData(ATTRIBUTE_NAME,\n\t\t\t\t\t\t\t\t\t\tattributeNode.getAttributes().getNamedItem(NAME).getNodeValue(), null);\n\t\t\t\t\t\t\t\tattributeNode.setUserData(ATTRIBUTE_MODE,\n\t\t\t\t\t\t\t\t\t\tattributeMap.getNamedItem(OPERATOR_TYPE).getNodeValue(), null);\n\t\t\t\t\t\t\t\tattributeNode.setUserData(ATTRIBUTE_UUID,\n\t\t\t\t\t\t\t\t\t\tattributeNode.getAttributes().getNamedItem(ATTR_UUID).getNodeValue(), null);\n\t\t\t\t\t\t\t\tElement attributeElement = (Element) attributeNode;\n\n\t\t\t\t\t\t\t\tattributeElement.setAttribute(MODE,\n\t\t\t\t\t\t\t\t\t\tattributeMap.getNamedItem(OPERATOR_TYPE).getNodeValue());\n\t\t\t\t\t\t\t\tif (attributeElement.getAttributes().getNamedItem(ATTR_DATE) != null) {\n\t\t\t\t\t\t\t\t\tattributeNode.setUserData(ATTRIBUTE_DATE,\n\t\t\t\t\t\t\t\t\t\t\tattributeMap.getNamedItem(QUANTITY).getNodeValue(), null);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tattributeElement.setAttribute(COMPARISON_VALUE,\n\t\t\t\t\t\t\t\t\t\t\tattributeMap.getNamedItem(QUANTITY).getNodeValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (attributeMap.getNamedItem(UNIT) != null) {\n\t\t\t\t\t\t\t\t\tattributeElement.setAttribute(UNIT, attributeMap.getNamedItem(UNIT).getNodeValue());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (attributeElement.getAttributes().getNamedItem(UNIT) != null) {\n\t\t\t\t\t\t\t\t\t\tattributeElement.removeAttribute(UNIT);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tattributeNode = attributeElement;\n\n\t\t\t\t\t\t\t\t// HQMFDataCriteriaElementGenerator hqmfDataCriteriaElementGenerator = new\n\t\t\t\t\t\t\t\t// HQMFDataCriteriaElementGenerator();\n\t\t\t\t\t\t\t\t// hqmfDataCriteriaElementGenerator.generateAttributeTagForFunctionalOp(measureExport,qdmNode,\n\t\t\t\t\t\t\t\t// criteriaElement, attributeNode);\n\t\t\t\t\t\t\t\tHQMFAttributeGenerator attributeGenerator = new HQMFAttributeGenerator();\n\t\t\t\t\t\t\t\tattributeGenerator.generateAttributeTagForFunctionalOp(measureExport, qdmNode,\n\t\t\t\t\t\t\t\t\t\tcriteriaElement, attributeNode);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tElement qdmSubSetElement = hqmfXmlProcessor.getOriginalDoc().createElement(\"qdm:subsetCode\");\n\t\t\t\t\tqdmSubSetElement.setAttribute(CODE, FUNCTIONAL_OPS_SUBSET.get(functionalOpName.toUpperCase()));\n\n\t\t\t\t\tif (\"sum\".equalsIgnoreCase(functionalOpName)) {\n\t\t\t\t\t\tElement subSetCodeElement = hqmfXmlProcessor.getOriginalDoc().createElement(\"subsetCode\");\n\t\t\t\t\t\tsubSetCodeElement.setAttribute(CODE, \"SUM\");\n\t\t\t\t\t\texcerptElement.appendChild(subSetCodeElement);\n\t\t\t\t\t}\n\t\t\t\t\texcerptElement.appendChild(qdmSubSetElement);\n\t\t\t\t\texcerptElement.appendChild(criteriaElement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn excerptElement;\n\t}", "public Layer_ElementsCollection()\n\t{\n\t\tthis.elements = new ArrayList<GIS_element>();\n\t}", "public org.iplant.pipeline.client.json.autobeans.Pipeline getPipeline() {\n org.iplant.pipeline.client.json.autobeans.Pipeline ret = factory.pipeline().as();\n ret.setName(workspace.getPipeline().getName());\n ret.setDescription(workspace.getPipeline().getDescription());\n \n List<PipelineApp> apps = new ArrayList<PipelineApp>();\n Vector<PipeComponent> steps = workspace.getPipeline().getSteps();\n for (PipeComponent step : steps) {\n App app = ((PipeApp)step).getApp();\n \n PipelineApp jsonApp = factory.app().as();\n jsonApp.setId(app.getID());\n jsonApp.setName(app.getName());\n jsonApp.setDescription(app.getDescription());\n jsonApp.setStep(step.getPosition());\n \n HashMap<PipeComponent, ArrayList<Input>> mappings = new HashMap<PipeComponent, ArrayList<Input>>();\n for (Input input : step.getInputs()) {\n if (input.getMapped() != null) {\n PipeComponent parent = input.getMapped().getParent();\n ArrayList<Input> maps = mappings.get(parent);\n if (maps == null)\n maps = new ArrayList<Input>();\n maps.add(input);\n mappings.put(parent, maps);\n }\n }\n \n List<PipelineAppMapping> jsonMappings = new ArrayList<PipelineAppMapping>();\n jsonApp.setMappings(jsonMappings);\n \n for (PipeComponent mappedTo : mappings.keySet()) {\n App mappedApp = ((PipeApp)mappedTo).getApp();\n PipelineAppMapping jsonMap = factory.appMapping().as();\n jsonMap.setStep(mappedTo.getPosition());\n jsonMap.setId(mappedApp.getID());\n ArrayList<Input> inputs = mappings.get(mappedTo);\n Map<String, String> map = new HashMap<String, String>();\n for (Input input : inputs) {\n map.put(input.getID(), input.getMapped().getID());\n }\n jsonMap.setMap(map);\n jsonMappings.add(jsonMap);\n }\n \n jsonApp.setInputs(app.getAppDataInputs());\n jsonApp.setOutputs(app.getAppDataOutputs());\n \n apps.add(jsonApp);\n }\n \n ret.setApps(apps);\n \n return ret;\n }", "public static void runPipeline(final CollectionReaderDescription readerDesc,\n\t\t\tfinal AnalysisEngineDescription... descs) throws UIMAException, SAXException,\n\t\t\tCpeDescriptorException, IOException {\n\t\t// Create AAE\n\t\tfinal AnalysisEngineDescription aaeDesc = createAggregateDescription(descs);\n\n\t\tCpeBuilder builder = new CpeBuilder();\n\t\tbuilder.setReader(readerDesc);\n\t\tbuilder.setAnalysisEngine(aaeDesc);\n\t\t\n\t\tStatusCallbackListenerImpl status = new StatusCallbackListenerImpl();\n\t\tCollectionProcessingEngine engine = builder.createCpe(status);\n\t\t\n\t\tengine.process();\n\t\ttry {\n\t\t\tsynchronized (status) {\n\t\t\t\twhile (status.isProcessing) {\n\t\t\t\t\tstatus.wait();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (InterruptedException e) {\n\t\t\t// Do nothing\n\t\t}\n\n\t\tif (status.exceptions.size() > 0) {\n\t\t\tthrow new AnalysisEngineProcessException(status.exceptions.get(0));\n\t\t}\n\t}", "private void addScoriaEnrichingRecipes(Consumer<IFinishedRecipe> consumer, String basePath) {\n enriching(consumer, BYGBlocks.CRACKED_SCORIA_STONE_BRICKS, BYGBlocks.SCORIA_STONEBRICKS, basePath + \"cracked_bricks_to_bricks\");\n //Scoria -> Cracked Scoria Stone Bricks\n enriching(consumer, BYGBlocks.SCORIA_STONE, BYGBlocks.CRACKED_SCORIA_STONE_BRICKS, basePath + \"to_cracked_bricks\");\n //Scoria -> Scoria Stone Bricks\n enriching(consumer, BYGBlocks.SCORIA_SLAB, BYGBlocks.SCORIA_STONEBRICK_SLAB, basePath + \"slabs_to_brick_slabs\");\n enriching(consumer, BYGBlocks.SCORIA_STAIRS, BYGBlocks.SCORIA_STONEBRICK_STAIRS, basePath + \"stairs_to_brick_stairs\");\n enriching(consumer, BYGBlocks.SCORIA_WALL, BYGBlocks.SCORIA_STONEBRICK_WALL, basePath + \"walls_to_brick_walls\");\n }", "Builder addProducer(Organization.Builder value);" ]
[ "0.49698487", "0.48011768", "0.4739701", "0.46763012", "0.4639193", "0.4630996", "0.46211916", "0.4605508", "0.45980725", "0.45971453", "0.4593127", "0.4566007", "0.45552364", "0.45017743", "0.44956383", "0.44854626", "0.4482582", "0.44608995", "0.4456361", "0.44547442", "0.44459146", "0.44440988", "0.44397706", "0.4433888", "0.44122466", "0.43871716", "0.43828008", "0.4365926", "0.4358467", "0.43582416", "0.4357351", "0.43508762", "0.4342592", "0.43338153", "0.43227705", "0.4311026", "0.4303848", "0.43024823", "0.4294696", "0.42870933", "0.42728916", "0.42716485", "0.42632878", "0.4260344", "0.4259223", "0.42567074", "0.4246717", "0.42443955", "0.42376766", "0.42368627", "0.4230982", "0.4229797", "0.4227454", "0.42258322", "0.422488", "0.42238915", "0.42234448", "0.42175293", "0.42166764", "0.42119142", "0.42102623", "0.4202605", "0.42012107", "0.41993752", "0.41990176", "0.41983616", "0.4195378", "0.41939983", "0.41932958", "0.41868037", "0.41864535", "0.4184784", "0.4180296", "0.41768688", "0.41740787", "0.41735783", "0.4172754", "0.41723895", "0.41712475", "0.41708016", "0.41654995", "0.41653258", "0.41621614", "0.41620484", "0.41592708", "0.41588607", "0.41582894", "0.41537777", "0.4148952", "0.41487876", "0.41458353", "0.41414073", "0.41410425", "0.41385368", "0.41352525", "0.41335627", "0.41330457", "0.41314694", "0.41285717", "0.41268075" ]
0.5876285
0
Add metdata describing this source to a metdata model
@Override public void addMetadata(Resource meta) { meta.addProperty(API.sparqlEndpoint, "a combined source"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addMetaData(MetaDataDescriptor mdd);", "public void add(PartData data, PartSource source) throws IOException {\n String url = source.getUrl();\n String name = source.getName();\n String id = StringUtils.isEmpty(source.getId()) ? data.getPartId() : source.getId();\n\n Document doc = new Document();\n\n // add part fields\n addToDocument(doc, IndexField.RECORD_ID, data.getRecordId());\n addToDocument(doc, IndexField.ID, Long.toString(data.getId()));\n addToDocument(doc, IndexField.TYPE, data.getType().getName());\n addToDocument(doc, IndexField.PART_ID, data.getPartId());\n addToDocument(doc, IndexField.NAME, data.getName());\n addToDocument(doc, IndexField.SUMMARY, data.getShortDescription());\n addToDocument(doc, IndexField.KEYWORDS, data.getKeywords());\n addToDocument(doc, IndexField.CREATED, Long.toString(data.getCreationTime()));\n\n doc.add(new LongPoint(IndexField.CREATED.toString() + \"_long\", data.getCreationTime()));\n doc.add(new StringField(IndexField.SOURCE_URL.toString(), url, Field.Store.YES));\n doc.add(new StringField(IndexField.SOURCE_NAME.toString(), name, Field.Store.YES));\n if (!StringUtils.isEmpty(id))\n doc.add(new StringField(IndexField.SOURCE_ID.toString(), id, Field.Store.YES));\n\n doc.add(new StringField(IndexField.HAS_SAMPLE.toString(), (data.isHasSample() ? \"true\" : \"false\"), Field.Store.YES));\n doc.add(new StringField(IndexField.HAS_SEQUENCE.toString(), (data.isHasSequence() ? \"true\" : \"false\"), Field.Store.YES));\n\n if (!StringUtils.isEmpty(data.getShortDescription()))\n doc.add(new TextField(IndexField.SUMMARY.toString() + \"_token\", data.getShortDescription().toLowerCase(), Field.Store.NO));\n\n if (!StringUtils.isEmpty(data.getName()))\n doc.add(new TextField(IndexField.NAME.toString() + \"_token\", data.getName().toLowerCase(), Field.Store.NO));\n\n writer.addDocument(doc);\n }", "public org.landxml.schema.landXML11.SourceDataDocument.SourceData addNewSourceData()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData target = null;\r\n target = (org.landxml.schema.landXML11.SourceDataDocument.SourceData)get_store().add_element_user(SOURCEDATA$0);\r\n return target;\r\n }\r\n }", "public Dataset withSource(Source source) {\n this.source = source.toString();\n return this;\n }", "@Override\n public Collection<MetadatumDTO> contributeMetadata(PlainMetadataSourceDto t) {\n List<MetadatumDTO> values = new LinkedList<>();\n for (PlainMetadataKeyValueItem metadatum : t.getMetadata()) {\n if (key.equals(metadatum.getKey())) {\n MetadatumDTO dcValue = new MetadatumDTO();\n dcValue.setValue(metadatum.getValue());\n dcValue.setElement(field.getElement());\n dcValue.setQualifier(field.getQualifier());\n dcValue.setSchema(field.getSchema());\n values.add(dcValue);\n }\n }\n return values;\n }", "public Dataset withSource(String source) {\n setSource(source);\n return this;\n }", "public void addTrainingData(String value,String label);", "private void addSampleData() {\r\n }", "private void constructSourceMetadata() throws Exception {\n final String masterTag = \"ifg\";\n final String slaveTag = \"dummy\";\n\n // get sourceMaster & sourceSlave MetadataElement\n final MetadataElement masterMeta = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n final String slaveMetadataRoot = AbstractMetadata.SLAVE_METADATA_ROOT;\n\n /* organize metadata */\n\n // put sourceMaster metadata into the masterMap\n metaMapPut(masterTag, masterMeta, sourceProduct, masterMap);\n\n // pug sourceSlave metadata into slaveMap\n MetadataElement[] slaveRoot = sourceProduct.getMetadataRoot().getElement(slaveMetadataRoot).getElements();\n for (MetadataElement meta : slaveRoot) {\n metaMapPut(slaveTag, meta, sourceProduct, slaveMap);\n }\n\n }", "private void addData() {\n Details d1 = new Details(\"Arpitha\", \"+91-9448907664\", \"25/05/1997\");\n Details d2 = new Details(\"Abhijith\", \"+91-993602342\", \"05/10/1992\");\n details.add(d1);\n details.add(d2);\n }", "private void setupSource() {\n source = new GeoJsonSource( geojsonSourceId, featureCollection );\n map.addSource( source );\n }", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "public void addMeteoData(MeteoDataInfo aDataInfo) {\n dataInfoList.add(aDataInfo);\n currentDataInfo = aDataInfo; \n }", "public void addSeries(DataSeries aSeries) { _dataSet.addSeries(aSeries); }", "public void addDataModel(DataModel dm) throws Exception {\r\n\t\tif (dm == null) {\r\n\t\t\tthrow new NullPointerException(\"The data model passed to \" +\r\n\t\t\t\t\t\"the DefaultDataSource's addDataModel method cannot \" +\r\n\t\t\t\t\t\"be null\");\r\n\t\t}\r\n\t\tif (!dataModels.contains(dm)) {\r\n\t\t\tdataModels.add(dm);\r\n\t\t}\r\n\t}", "private void getMetadata() {\n masterRoot = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n masterMetadata = new MetadataDoris(masterRoot);\n masterOrbit = new OrbitsDoris();\n masterOrbit.setOrbit(masterRoot);\n \n // SLAVE METADATA\n // hash table or just map for slaves - now it supports only a single sourceSlave image\n slaveRoot = sourceProduct.getMetadataRoot().getElement(AbstractMetadata.SLAVE_METADATA_ROOT).getElementAt(0);\n slaveMetadata = new MetadataDoris(slaveRoot);\n slaveOrbit = new OrbitsDoris();\n slaveOrbit.setOrbit(slaveRoot);\n }", "public void setSource (AbstractRelationalDataView v) { \n\t\t\n\t\tdv = v; \n\t\t\n\t\t// obtain number of records in training set\n\t\tmembers = dv.GetCount();\n\t}", "public void addSource(NameValue<String, String> nv) {\n this.addSource(nv.getKey(), nv.getValue());\n }", "org.hl7.fhir.SampledData addNewValueSampledData();", "public void addData(DataPoint point)\n {\n data.add(point);\n }", "@Test\n public void addModelData() {\n new FactoryInitializer()\n .initialize(\n ((tr, ev, is, np, md) -> new ResNetConv2DFactory(tr,ev,is,np,md).addModelData(new ArrayList<>()))\n );\n }", "public void addInput(@Nonnull Source source) {\r\n source.init(this);\r\n inputs.add(source);\r\n }", "public void merge(TaskViewModel source) {\n setName(source.getName());\n setEstimate(source.getEstimate());\n setDescription(source.getDescription());\n }", "public void addDataSource(DataSource source) {\n if (!containsDataSource(source)) datasources.add(source);\n }", "public DataOuts(final String name, final String type, final String source) {\n this.name = name;\n this.type = type;\n this.source = source;\n }", "private void setTableModelData() {\r\n\t\t//Spin through the list and add the individual country fields.\r\n\t\tVector<String> fields;\r\n\t\tfor (Country c : countryList) {\r\n\t\t\tfields = new Vector<String>();\r\n\t\t\tfields.add(c.getName());\r\n\t\t\tfields.add(c.getCapital());\r\n\t\t\tfields.add(c.getFoundation().toString());\r\n\t\t\tfields.add(c.getContinent());\r\n\t\t\tfields.add(String.valueOf(c.getPopulation()));\r\n\t\t\tcountryData.add(fields);\r\n\t\t}\r\n\t}", "private Object createDataset(final ChartConfiguration config) {\n final CategoryChart chart = (CategoryChart) config.chart;\n for (final Fields key: config.fields) {\n chart.addSeries(key.getLocalizedName(), new double[1], new double[1]);\n }\n populateDataset(config);\n return null;\n }", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "public AbstractJob addMetaData(String key, String value) {\n this.mMetaDataAttributes.add(new MetaData(key, value));\n return this;\n }", "public FileSourceGraphML() {\n\t\tevents = new Stack<XMLEvent>();\n\t\tkeys = new HashMap<String, Key>();\n\t\tdatas = new LinkedList<Data>();\n\t\tgraphId = new Stack<String>();\n\t\tgraphCounter = 0;\n\t\tsourceId = String.format(\"<GraphML stream %x>\", System.nanoTime());\n\t}", "void addTabularData(TabularData data);", "protected void addFinishedData() throws ModelException {\n int i;\n \n //Harvest data\n ArrayList<Behavior> p_oBehs = m_oDisturbanceBehaviors.getBehaviorByParameterFileTag(\"Harvest\");\n if (mp_oHarvestData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n Harvest oHarvest;\n if (p_oBehs.size() > 0) {\n oHarvest = (Harvest) p_oBehs.get(0);\n oHarvest.clearHarvestEvents();\n } else {\n oHarvest = (Harvest) m_oDisturbanceBehaviors.createBehaviorFromParameterFileTag(\"Harvest\");\n }\n for (i = 0; i < mp_oHarvestData.size(); i++) {\n oHarvest.addHarvestEvent(mp_oHarvestData.get(i));\n }\n }\n \n //Mortality episode data\n p_oBehs = m_oDisturbanceBehaviors.getBehaviorByParameterFileTag(\"EpisodicMortality\");\n if (mp_oMortEpisodeData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n EpisodicMortality oEp;\n if (p_oBehs.size() > 0) {\n oEp = (EpisodicMortality) p_oBehs.get(0);\n oEp.clearMortalityEpisodes();\n } else {\n oEp = (EpisodicMortality) m_oDisturbanceBehaviors.createBehaviorFromParameterFileTag(\"EpisodicMortality\");\n }\n for (i = 0; i < mp_oMortEpisodeData.size(); i++) {\n oEp.addMortalityEpisode(mp_oMortEpisodeData.get(i));\n }\n }\n\n //Planting data\n p_oBehs = m_oPlantBehaviors.getBehaviorByParameterFileTag(\"Plant\");\n if (mp_oPlantingData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n Planting oPlant;\n if (p_oBehs.size() > 0) {\n oPlant = (Planting) p_oBehs.get(0);\n oPlant.clearPlantingEvents();\n } else {\n oPlant = (Planting) m_oPlantBehaviors.createBehaviorFromParameterFileTag(\"Plant\");\n }\n for (i = 0; i < mp_oPlantingData.size(); i++) {\n oPlant.addPlantingEvent(mp_oPlantingData.get(i));\n }\n }\n }", "protected void createMetaData(final TidaModel model) {\n\n\t\t// add some descriptors\n\t\tmodel.getMetaDataModel().createDescriptor(\"STRING\", \"Dog\");\n\t\tmodel.getMetaDataModel().createDescriptor(\"STRING\", \"Cat\");\n\t\tmodel.getMetaDataModel().createDescriptor(\"STRING\", \"Mouse\");\n\t\tmodel.getMetaDataModel().createDescriptor(\"STRING\", \"ÜÄÖß\");\n\t\tfor (int i = 0; i < 1000; i++) {\n\t\t\tmodel.getMetaDataModel().createDescriptor(\"INT\", i);\n\t\t}\n\t\tfor (long i = Long.MAX_VALUE; i > Long.MAX_VALUE - 1000; i--) {\n\t\t\tmodel.getMetaDataModel().createDescriptor(\"LONG\", i);\n\t\t}\n\t}", "private XYMultipleSeriesDataset getdemodataset() {\n\t\t\tdataset1 = new XYMultipleSeriesDataset();// xy轴数据源\n\t\t\tseries = new XYSeries(\"温度 \");// 这个事是显示多条用的,显不显示在上面render设置\n\t\t\t// 这里相当于初始化,初始化中无需添加数据,因为如果这里添加第一个数据的话,\n\t\t\t// 很容易使第一个数据和定时器中更新的第二个数据的时间间隔不为两秒,所以下面语句屏蔽\n\t\t\t// 这里可以一次更新五个数据,这样的话相当于开始的时候就把五个数据全部加进去了,但是数据的时间是不准确或者间隔不为二的\n\t\t\t// for(int i=0;i<5;i++)\n\t\t\t// series.add(1, Math.random()*10);//横坐标date数据类型,纵坐标随即数等待更新\n\n\t\t\tdataset1.addSeries(series);\n\t\t\treturn dataset1;\n\t\t}", "protected void createTelemetryMetadata(SpaceSystemType spaceSystem)\n {\n spaceSystem.setTelemetryMetaData(factory.createTelemetryMetaDataType());\n }", "private void onAdd()\n {\n // get the source list selection\n Object selection[] = _lstSource.getSelectedValues();\n\n // iterate the selection\n EntityDobj table;\n TransferEntity te;\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the table\n table = (EntityDobj)selection[i];\n if(table != null)\n {\n // create new te\n te = new TransferEntity();\n te.setSourceEntityName(table.getName());\n\n // add to the target list and the datasource\n _lstTarget.addItem(te);\n _dt.addTransferEntity(te);\n }\n }\n\n // remove the selection from the source list\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the table\n table = (EntityDobj)selection[i];\n if(table != null)\n _lstSource.removeItem(table);\n }\n }", "@PostMapping(path = \"/source\")\r\n\tpublic ResponseEntity<SourceBO> addSource(@RequestBody SourceBO source) {\r\n\t\tSourceBO src = this.bl.save(source);\r\n\t\treturn ResponseEntity.status(HttpStatus.OK).body(src);\r\n\t}", "public void addPreferredDataSource(DataSource source) { \n if (!containsDataSource(source)) datasources.add(0,source);\n }", "public SourceData(SourceData other) {\n __isset_bitfield = other.__isset_bitfield;\n this.version = other.version;\n if (other.isSetApp_id()) {\n this.app_id = other.app_id;\n }\n this.brand = other.brand;\n this.point = other.point;\n this.campaign_type = other.campaign_type;\n this.point_multiply = other.point_multiply;\n this.snapearn_id = other.snapearn_id;\n if (other.isSetReceipt_number()) {\n this.receipt_number = other.receipt_number;\n }\n this.outlet_id = other.outlet_id;\n this.operator_id = other.operator_id;\n this.rejected_reason = other.rejected_reason;\n }", "@Override\n public boolean addDataSourceInfo(DataSource ds) {\n return false;\n }", "void addData();", "public void addModelMeta(ModelMeta modelMeta){\n String schema = modelMeta.getSchemaName();\n String model = modelMeta.getModelName();\n metaSet.add(Pair.of(getMetaKey(schema,model),modelMeta));\n }", "private void setData() {\n LineDataSet set1 = new LineDataSet(valuesTemperature, \"Temperature\");\n\n set1.setColor(Color.RED);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n LineData data = new LineData(set1);\n\n // set data\n chartTemperature.setData(data);\n\n // get the legend (only possible after setting data)\n Legend l = chartTemperature.getLegend();\n l.setEnabled(true);\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesPressure, \"Pressure\");\n\n set1.setColor(Color.GREEN);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartPressure.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartPressure.getLegend();\n l.setEnabled(true);\n\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesAltitude, \"Altitude\");\n\n set1.setColor(Color.BLUE);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartAltitude.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartAltitude.getLegend();\n l.setEnabled(true);\n }", "public void setMetaData(MetaData newMetaData);", "public DatasetHelper(DatasetHelper another){\n id= another.id;\n hash = another.hash;\n catalogueId = another.catalogueId;\n sourceType = another.sourceType;\n sourceLang = another.sourceLang;\n model = ModelFactory.createDefaultModel().add(another.model);\n uriSchema = another.uriSchema;\n }", "public gov.niem.niem.structures._2_0.MetadataType addNewMetadata()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.niem.niem.structures._2_0.MetadataType target = null;\n target = (gov.niem.niem.structures._2_0.MetadataType)get_store().add_element_user(METADATA$0);\n return target;\n }\n }", "public void addLogModel(LogModel param) {\n if (localLogModel == null) {\n localLogModel = new LogModel[] { };\n }\n\n //update the setting tracker\n localLogModelTracker = true;\n\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localLogModel);\n list.add(param);\n this.localLogModel = (LogModel[]) list.toArray(new LogModel[list.size()]);\n }", "private void initDataset(){\n dataSet.add(\"Karin\");\n dataSet.add(\"Ingrid\");\n dataSet.add(\"Helga\");\n dataSet.add(\"Renate\");\n dataSet.add(\"Elke\");\n dataSet.add(\"Ursula\");\n dataSet.add(\"Erika\");\n dataSet.add(\"Christa\");\n dataSet.add(\"Gisela\");\n dataSet.add(\"Monika\");\n\n addDataSet.add(\"Anna\");\n addDataSet.add(\"Sofia\");\n addDataSet.add(\"Emilia\");\n addDataSet.add(\"Emma\");\n addDataSet.add(\"Neele\");\n addDataSet.add(\"Franziska\");\n addDataSet.add(\"Heike\");\n addDataSet.add(\"Katrin\");\n addDataSet.add(\"Katharina\");\n addDataSet.add(\"Liselotte\");\n }", "protected void addMetadataFieldsFromParameters() {\n for (Map.Entry<String, String> e: parameters.entrySet()) {\n if (e.getKey().startsWith(\"meta-\")) {\n String fieldName = e.getKey().substring(5);\n String fieldValue = e.getValue();\n currentDoc.addTextualMetadataField(fieldName, fieldValue, getDocWriter().metadataFieldType(false));\n }\n }\n }", "public AudioMetadata(AudioMetadata source) {\n if (source.FileSize != null) {\n this.FileSize = new Long(source.FileSize);\n }\n if (source.MD5 != null) {\n this.MD5 = new String(source.MD5);\n }\n if (source.Duration != null) {\n this.Duration = new Float(source.Duration);\n }\n if (source.SampleRate != null) {\n this.SampleRate = new Float(source.SampleRate);\n }\n if (source.BitRate != null) {\n this.BitRate = new Long(source.BitRate);\n }\n if (source.Format != null) {\n this.Format = new String(source.Format);\n }\n }", "public Source(String name, String description, String story, double mass, \n String itemtype, String itemname, String itemdescription, String itemstory, \n double itemmass, double itemnutrition) \n {\n super(name, description, story, mass);\n this.itemtype = itemtype;\n \n this.itemname = itemname;\n this.itemdescription = itemdescription;\n this.itemstory = itemstory; \n this.itemmass = itemmass;\n this.itemnutrition = itemnutrition;\n \n //creates item of the type itemtype, which is specified upon creation of the source\n if(itemtype.equals(\"Drink\")) {new Drink(itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Food\")) {new Food (itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Item\")) {item = new Item (itemname, itemdescription, itemstory, itemmass);} \n }", "public void setSource(String value) {\n/* 304 */ setValue(\"source\", value);\n/* */ }", "@ApiModelProperty(value = \"The source of the data.\")\n public String getSource() {\n return source;\n }", "@Override\r\n public void dataAdded(DataSet data) {\n rebuildColumns();\r\n }", "DatasetFileService getSource();", "@Override\n void add()\n {\n long sensorId = Long.parseLong(textSensorId.getText());\n MissionNumber missionNumber = textMissionNumber.getValue();\n String jobOrderNumber = textJobOrderNumber.getText();\n \n FPS16SensorDataGenerator generator = new FPS16SensorDataGenerator(tspiConfigurator.getTspiGenerator(), sensorId, missionNumber, jobOrderNumber);\n controller.addSensorDataGenerator(getRate(), getChannel(), generator);\n }", "public void addDataset(Resource dataset, String label, String comment, String publisher, String date, Resource structure){\n\t\tdataCubeModel.add(dataset, RDF.type, QB.Dataset);\n\t\tdataCubeModel.add(dataset, DCTerms.publisher, publisher);\n\t\tdataCubeModel.add(dataset, RDFS.label, label);\n\t\tdataCubeModel.add(dataset, RDFS.comment, comment);\n\t\tdataCubeModel.add(dataset, QB.structure, structure);\n\t\tdataCubeModel.add(dataset, DCTerms.date, date);\n\t}", "public void addMetadata(AbstractMetadata metadata) {\n\t\tif(metadata == null) {\n\t\t\tthrow new IllegalArgumentException(\"Metadata must not be null\");\n\t\t}\n\n\t\tthis.metadata.add(metadata);\n\t}", "@Override\n\tpublic void sourceInfo(MultimediaInfo arg0) {\n\n\t}", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "public gov.ucore.ucore._2_0.ContentMetadataType addNewMetadata()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.ContentMetadataType target = null;\n target = (gov.ucore.ucore._2_0.ContentMetadataType)get_store().add_element_user(METADATA$0);\n return target;\n }\n }", "public DataRequest(DataRequest source) {\n\t\tthis();\n\t\tcopy(source);\n\t}", "@JsonProperty(\"source\")\n public void setSource(Source source) {\n this.source = source;\n }", "public DataModel(){\n this.listeners = new ArrayList<>();\n this.data = new ArrayList<>();\n }", "public XYDataset getLineDataset() {\n\n // Initialize some variables\n XYSeriesCollection dataset = new XYSeriesCollection();\n XYSeries series[][] = new XYSeries[rois.length][images.length];\n String seriesname[][] = new String[rois.length][images.length];\n int currentSlice = ui.getOpenMassImages()[0].getCurrentSlice();\n ArrayList<String> seriesNames = new ArrayList<String>();\n String tempName = \"\";\n map = new HashMap<String, Pair<MimsPlus, Roi>>();\n double stat;\n\n // Image loop\n for (int j = 0; j < images.length; j++) {\n MimsPlus image;\n if (images[j].getMimsType() == MimsPlus.HSI_IMAGE || images[j].getMimsType() == MimsPlus.RATIO_IMAGE) {\n image = images[j].internalRatio;\n } else {\n image = images[j];\n }\n // Roi loop\n for (int i = 0; i < rois.length; i++) {\n\n // Set the Roi to the image.\n Integer[] xy = ui.getRoiManager().getRoiLocation(rois[i].getName(), image.getCurrentSlice());\n rois[i].setLocation(xy[0], xy[1]);\n image.setRoi(rois[i]);\n\n // Stat loop\n for (int k = 0; k < stats.length; k++) {\n\n // Generate a name for the dataset.\n String prefix = \"\";\n if (image.getType() == MimsPlus.MASS_IMAGE || image.getType() == MimsPlus.RATIO_IMAGE) {\n prefix = \"_m\";\n }\n if (seriesname[i][j] == null) {\n tempName = \"mean\" + prefix + image.getRoundedTitle(true) + \"_r\" + rois[i].getName();\n int dup = 1;\n while (seriesNames.contains(tempName)) {\n tempName = \"mean\" + prefix + image.getRoundedTitle(true) + \"_r\" + rois[i].getName() + \" (\" + dup + \")\";\n dup++;\n }\n seriesNames.add(tempName);\n seriesname[i][j] = tempName;\n }\n series[i][j] = new XYSeries(seriesname[i][j]);\n ij.gui.ProfilePlot profileP = new ij.gui.ProfilePlot(image);\n double[] newdata = profileP.getProfile();\n for (int p = 0; p < newdata.length; p++) {\n series[i][j].add(p, newdata[p]);\n }\n Pair tuple = new Pair(images[j], rois[i]);\n map.put(seriesname[i][j], tuple);\n\n } // End of Stat\n } // End of Roi\n } // End of Image\n\n // Populate the final data structure.\n for (int i = 0; i < rois.length; i++) {\n for (int j = 0; j < images.length; j++) {\n dataset.addSeries(series[i][j]);\n }\n }\n\n ui.getOpenMassImages()[0].setSlice(currentSlice);\n\n return dataset;\n }", "public void add(DataFile data) {\n dataFiles.add(data);\n super.fireTableDataChanged();\n }", "private void merge(DefaultSingleGraphDataUnit source) throws LpException {\n try {\n execute((connection) -> {\n final Update update = connection.prepareUpdate(\n QueryLanguage.SPARQL, QUERY_COPY);\n final SimpleDataset dataset = new SimpleDataset();\n dataset.addDefaultGraph(source.getReadGraph());\n dataset.setDefaultInsertGraph(graph);\n update.setDataset(dataset);\n update.execute();\n });\n } catch (LpException ex) {\n throw new LpException(\"Can't merge with: {}\",\n source.getIri(), ex);\n }\n }", "interface Feature <T> {\n /**\n * @return original source of data.\n */\n Source source();\n\n /**\n * @return feature's data.\n */\n T data();\n }", "private Dataset prepareDataset() {\n // create TAPIR dataset with single endpoint\n Dataset dataset = new Dataset();\n dataset.setKey(UUID.randomUUID());\n dataset.setTitle(\"Beavers\");\n dataset.addEndpoint(endpoint);\n\n // add single Contact\n Contact contact = new Contact();\n contact.setKey(1);\n contact.addEmail(\"test@gbif.org\");\n dataset.setContacts(Lists.newArrayList(contact));\n\n // add single Identifier\n Identifier identifier = new Identifier();\n identifier.setKey(1);\n identifier.setType(IdentifierType.GBIF_PORTAL);\n identifier.setIdentifier(\"450\");\n dataset.setIdentifiers(Lists.newArrayList(identifier));\n\n // add 2 MachineTags 1 with metasync.gbif.org namespace, and another not having it\n List<MachineTag> machineTags = Lists.newArrayList();\n\n MachineTag machineTag = new MachineTag();\n machineTag.setKey(1);\n machineTag.setNamespace(Constants.METADATA_NAMESPACE);\n machineTag.setName(Constants.DECLARED_COUNT);\n machineTag.setValue(\"1000\");\n machineTags.add(machineTag);\n\n MachineTag machineTag2 = new MachineTag();\n machineTag2.setKey(2);\n machineTag2.setNamespace(\"public\");\n machineTag2.setName(\"IsoCountryCode\");\n machineTag2.setValue(\"DK\");\n machineTags.add(machineTag2);\n\n dataset.setMachineTags(machineTags);\n\n // add 1 Tag\n Tag tag = new Tag();\n tag.setKey(1);\n tag.setValue(\"Invasive\");\n dataset.setTags(Lists.newArrayList(tag));\n\n return dataset;\n }", "private void init(AnalyticSource source) throws AnalysisException {\n columnValuesMap = new HashMap<String,ColumnValueAnalysisResult>();\n\n HadoopAnalyticSource hadoopSource = (HadoopAnalyticSource) source;\n //hadoopSource.getHadoopFileStructureModel().\n String errString;\n //Setting purefilename\n String pureFileName =hadoopSource.getFileName();\n if(null==pureFileName||\"\".equals(pureFileName.trim())){\n errString=\"File name[\"+pureFileName+\"] is either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setPureFileName(pureFileName);\n //Setting pig server\n setPigServer(acquirePigServerInfo(hadoopSource));\n //Setting the column names\n ValueAnalysisConfig config = (ValueAnalysisConfig) source\n .getAnalyticConfig();\n String cNames = config.getColumnNames();\n if(null==cNames||\"\".equals(cNames.trim())){\n errString=\"Column names[\"+cNames+\"] are either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setColumnNames(new TreeSet<String>(Arrays.asList(cNames.split(\",\"))));\n fetchColumnValuePairs(hadoopSource.getHadoopFileStructureModel());\n //Setting locale\n Locale loc=hadoopSource.getAnalyticConfig().getLocale();\n if(null==loc){\n itsLogger.error(\"Could not acquire Locale yet will try to continue\");\n }\n setLocale(hadoopSource.getAnalyticConfig().getLocale());\n //Setting pigData source variable name\n String pigDataSourceName = hadoopSource.getInputTempName();\n if(null==pigDataSourceName||\"\".equals(pigDataSourceName.trim())){\n errString=\"PigDataSource name[\"+pigDataSourceName+\"] is either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setLoadedVariableName(pigDataSourceName);\n initNumberAndTextColumns();\n }", "public void summarizeData() {\n\t\t//take json object and populate a POJO\n\t\t\n//\t\tfor(javaObject : x) {\n\t\t\n\t\t\t//new JobSummaryObject\n\t\t\t//\n\t}", "@Inject\r\n\tpublic void setAdditionalDatasetColumns(@Named(ServerConstants.KEY_ADDITIONAL_DATASET_COLS) String additional){\n\t\tList<String> keyList = splitCommaSeparatedString(additional);\r\n\t\tadditoinalColumns.put(ObjectType.dataset.name(), keyList);\r\n\t}", "private void addSources() {\n FeatureCollection emptyFeature = FeatureCollection.fromFeatures(new Feature[] {});\n\n if (mapboxMap.getSourceAs(LocationLayerConstants.LOCATION_SOURCE) == null) {\n mapboxMap.addSource(new GeoJsonSource(\n LocationLayerConstants.LOCATION_SOURCE,\n emptyFeature,\n new GeoJsonOptions().withMaxZoom(16))\n );\n }\n\n if (mapboxMap.getSourceAs(LocationLayerConstants.LOCATION_ACCURACY_SOURCE) == null) {\n mapboxMap.addSource(new GeoJsonSource(\n LocationLayerConstants.LOCATION_ACCURACY_SOURCE,\n emptyFeature,\n new GeoJsonOptions().withMaxZoom(16))\n );\n }\n }", "@Override\n\t\t\tpublic void dragSetData (DragSourceEvent event) {\n\t\t\t\tif (TextTransfer.getInstance().isSupportedType (event.dataType)) {\n\t\t\t\t\tevent.data = dragLabel.getText ();\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\tpublic XContentBuilder addMeta(XContentBuilder xcb, T river) throws IOException {\r\n\t\t// We add specific metadata here\r\n\t\txcb = addFSMeta(xcb, river);\r\n\t\t\r\n\t\txcb\t\r\n\t\t\t.field(\"url\", river.getUrl())\r\n\t\t\t.field(\"update_rate\", river.getUpdateRate() * 1000)\r\n\t\t\t.field(\"includes\", river.getIncludes())\r\n\t\t\t.field(\"excludes\", river.getExcludes())\r\n\t\t\t.field(\"analyzer\", river.getAnalyzer());\r\n\r\n\t\treturn xcb;\r\n\t}", "private void createData() {\n//\n// tour = new Tour();\n// tour.setTitle(\"Death Valley\");\n// tour.setDescription(\"A tour to Death Valley\");\n// tour.setPrice(900);\n// tour.setImage(\"death_valley\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n//\n// tour = new Tour();\n// tour.setTitle(\"San Francisco\");\n// tour.setDescription(\"A tour to San Francisco\");\n// tour.setPrice(1200);\n// tour.setImage(\"san_francisco\");\n// tour = dataSource.create(tour);\n// Log.i(LOGTAG, \"Tour created with id \" + tour.getId());\n\n ToursPullParser parser = new ToursPullParser();\n tours = parser.parseXML(this);\n\n for (Tour tour : tours) {\n dataSource.create(tour);\n }\n\n }", "@Override\n\tpublic Meta_data get_Meta_data() {\n\t\tMeta_data meta_data = new Meta_data_layer(elements);\n\t\treturn meta_data;\n\t}", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "private void initRowSource() {\n\t\tRowStructure rs = new RowStructure(6);\n\t\trs.add(\"EMP_ID\", StringType.get());\n\t\trs.add(\"EMP_FULLNAME\", StringType.get());\n\t\trs.add(\"Work Date\", StringType.get());\n\t\trs.add(\"Start Time\t\t\", StringType.get());\n\t\trs.add(\"End Time\t\t\", StringType.get());\n\t\trs.add(\"Time Worked (mins)\", StringType.get());\n\t\trowDefinition = new RowDefinition(-1, rs);\n\t}", "void addData(Map<String, List<Object>> values, Properties connectorMetadata)\n throws IOException;", "public String setData() {\r\n\r\n\t\tVendorMasterModel model = new VendorMasterModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tmodel.setData(vendorMaster);\r\n\t\tmodel.terminate();\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn \"Data\";\r\n\t}", "@java.lang.Override\n public boolean hasDataset() {\n return inputSourceCase_ == 11;\n }", "void addLogToBatch(TelemetryData log) throws IOException;", "public void addRecipe(Recipe recipe)\n {\n recipe.setDataSource(this);\n _recipes.add(recipe);\n }", "public void set_source(String name) throws ConnectorConfigException{\n\t\tsource = name.trim();\n\t\tif (source.equals(\"\"))\n\t\t\tthrow new ConnectorConfigException(\"Source of data can't be empty\");\n\t}", "public void addData(@NonNull Collection<? extends T> newData) {\n mData.addAll(newData);\n notifyItemRangeInserted(mData.size() - newData.size() + getHeaderLayoutCount(), newData.size());\n compatibilityDataSizeChanged(newData.size());\n }", "void copyPropertiesToMetas( Object sourceAndTarget );", "private void populateData() {\r\n\t\tfor(int i = 0; i < this.incomeRanges.length; i++) {\r\n\t\t\tthis.addData(new Data(incomeRanges[i], 0), true);\r\n\t\t}\t// end for\r\n\t}", "private XYDataset createDataset() {\n\t\tfinal XYSeriesCollection dataset = new XYSeriesCollection( ); \n\t\tdataset.addSeries(trainErrors); \n\t\tdataset.addSeries(testErrors);\n\t\treturn dataset;\n\t}", "@Override\n protected void addFields(PdfFile source, Document doc) throws IOException {\n doc.add(createField(SOURCE, downloadService + source.getId()));\n\n String extractedText = extractText(source);\n doc.add(createField(CONTENT, extractedText));\n }", "public void setSource (String source);", "public void addDataSource(DataSource dataSource) throws Exception {\n\t\tdataSourceMapper.addDataSource(dataSource);\n\t}", "private void buildSourceTable()\n {\n // validate\n Util.argCheckNull(_dt);\n\n // get entities\n try\n {\n DataSourceDobj ds = _dt.getSourceDataSource();\n Util.argCheckNull(ds);\n Vector entities = ds.getEntities();\n\n // iterate entities\n EntityDobj ent;\n for(int i = 0; entities != null && i < entities.size(); i++)\n {\n // get the entity\n ent = (EntityDobj)entities.elementAt(i);\n\n // add to source table if not in target table\n if(ent != null)\n {\n // search target list\n boolean inTarget = false;\n TransferEntity te;\n for(int j = 0; !inTarget && j < _lstTarget.getDefaultModel().getSize(); j++)\n {\n te = (TransferEntity)_lstTarget.getDefaultModel().getElementAt(j);\n if(te != null && te.getSourceEntityName().equalsIgnoreCase(ent.getName()))\n inTarget = true;\n }\n\n // if !inTarget add to source\n if(!inTarget)\n _lstSource.addItem(ent);\n }\n }\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"TransferEntitiesPanel.buildSourceTable: \" + e.toString());\n }\n }", "public Builder addMetaInformation(io.dstore.engine.MetaInformation value) {\n if (metaInformationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureMetaInformationIsMutable();\n metaInformation_.add(value);\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addMetaInformation(io.dstore.engine.MetaInformation value) {\n if (metaInformationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureMetaInformationIsMutable();\n metaInformation_.add(value);\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addMetaInformation(io.dstore.engine.MetaInformation value) {\n if (metaInformationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureMetaInformationIsMutable();\n metaInformation_.add(value);\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addMetaInformation(io.dstore.engine.MetaInformation value) {\n if (metaInformationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureMetaInformationIsMutable();\n metaInformation_.add(value);\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(value);\n }\n return this;\n }", "public Builder addMetaInformation(io.dstore.engine.MetaInformation value) {\n if (metaInformationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureMetaInformationIsMutable();\n metaInformation_.add(value);\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(value);\n }\n return this;\n }", "@java.lang.Override\n public boolean hasDataset() {\n return inputSourceCase_ == 11;\n }", "private void addToModelByMonth(String modelName, DefaultChartModel[] array, Month month, long time, Double value) {\n if (value == null) {\n return;\n }\n DefaultChartModel m = array[month.ordinal()];\n if (m == null) {\n String name = modelName == null ? month.toString() : modelName+\" (\"+month+\")\";\n m = new DefaultChartModel(name);\n array[month.ordinal()] = m;\n }\n m.addPoint(time, value);\n }" ]
[ "0.5877939", "0.57145095", "0.56547725", "0.5637081", "0.5585789", "0.5572003", "0.5548172", "0.55252033", "0.5438266", "0.5434432", "0.5394647", "0.5380429", "0.533169", "0.53000796", "0.527365", "0.52652776", "0.5263916", "0.5247664", "0.5215098", "0.5195232", "0.514356", "0.512716", "0.5113167", "0.5077312", "0.5053144", "0.5015779", "0.49887207", "0.49609467", "0.49544397", "0.4947823", "0.4912387", "0.4909954", "0.49086583", "0.48985445", "0.48955414", "0.4880401", "0.48421836", "0.48366743", "0.48313862", "0.48225027", "0.481861", "0.48148614", "0.48085138", "0.48037815", "0.47961938", "0.4792145", "0.4778942", "0.47673216", "0.47635442", "0.47610512", "0.47528678", "0.4748025", "0.47479892", "0.47470278", "0.4745395", "0.47449404", "0.47306907", "0.47241518", "0.4715195", "0.47069237", "0.47021064", "0.46893933", "0.46844372", "0.46832258", "0.46762446", "0.46752313", "0.46716398", "0.4669833", "0.46695533", "0.46690765", "0.46626252", "0.46579054", "0.465665", "0.46506742", "0.4650071", "0.4645623", "0.46440458", "0.46440446", "0.46438614", "0.46368015", "0.46300602", "0.4627272", "0.46269286", "0.46268532", "0.46234298", "0.46229222", "0.46214807", "0.46199596", "0.4619445", "0.46004876", "0.45996302", "0.45992723", "0.45958978", "0.45949703", "0.45949703", "0.45949703", "0.45949703", "0.45949703", "0.45944482", "0.45892996" ]
0.55117273
8
Creates a new Client with the given first name, last name, email, address, credit card number and expiry date.
public Client(String lastName, String firstNames, String email, String address, Long creditNum, Date expiryDate) { super(lastName, firstNames, email); this.address = address; this.creditNum = creditNum; this.expiryDate = expiryDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Client createClient() {\n\t\tClient client = null;\n\t\tvar clientsList = clientDAO.getClients();\n\t\tvar name = txtName.getText();\n\t\tvar surnames = txtSurnames.getText();\n\t\tvar dni = txtDni.getText();\n\t\tvar telephone = txtTelephone.getText();\n\n\t\tif (txtDni.getText().isBlank() || txtName.getText().isBlank() || txtSurnames.getText().isBlank()\n\t\t\t\t|| txtTelephone.getText().isBlank()) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"Error, los campos no pueden estar vacios, ni contener solo espacios\",\n\t\t\t\t\t\"Warning!\", JOptionPane.ERROR_MESSAGE);\n\t\t} else {\n\t\t\t// Comprobar si el cliente ya existe\n\t\t\tvar exist = false;\n\t\t\tfor (int i = 0; i < clientsList.size(); ++i) {\n\t\t\t\tif (dni.equalsIgnoreCase(clientsList.get(i).getDni())) {\n\t\t\t\t\texist = true;\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Error, ya existe el DNI introducido\", \"Warning!\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!exist) {\n\t\t\t\tclient = new Client(dni, name, surnames, telephone);\n\t\t\t}\n\t\t}\n\n\t\treturn client;\n\t}", "@org.testng.annotations.Test\n public void test_create_client_with_fullName() {\n Client client = new Client(\"Denis\", \"Denise\");\n Assert.assertEquals(\"Denis\", client.getNom());\n Assert.assertEquals(\"Denise\", client.getPrenom());\n Assert.assertEquals( Datutil.dateDuJour(), client.getDateInscription());\n Assert.assertEquals(Datutil.addDate(Datutil.dateDuJour(), 365), client.getDateCotisation());\n Assert.assertNotNull(client.getLesEmprunts());\n }", "Client createNewClient(Client client);", "public Client(int id, String fname, String lname, String fianceeFname, String fianceeLname, String phone,\n\t\t\tString email, Address address) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.fname = fname;\n\t\tthis.lname = lname;\n\t\tthis.fianceeFname = fianceeFname;\n\t\tthis.fianceeLname = fianceeLname;\n\t\tthis.phone = phone;\n\t\tthis.email = email;\n\t\tthis.address = address;\n\t}", "public void addClient() {\n String name = getToken(\"Enter client company: \");\n String address = getToken(\"Enter address: \");\n String phone = getToken(\"Enter phone: \");\n Client result;\n result = warehouse.addClient(name, address, phone);\n if (result == null) {\n System.out.println(\"Client could not be added.\");\n }\n System.out.println(result);\n }", "public void createNewClient(String nom, String prenom, String tel, String mail, String adresse) throws SQLException {\n\t\tint tmp = getLastClientId();\n\t\tSystem.out.println(tmp);\n\t\tif(tmp != 0) {\n\t\t\t//voir generated keys pour l'id\n\t\t\tClient tmpClient = new Client(tmp, nom, prenom, tel, mail, adresse);\n\t\t\tClient tmp2 = create(tmpClient);\n\t\t\tSystem.out.println(tmp2.getLogin());\n\t\t\tSystem.out.println(\"Succès lors de la création de l'utilisateur\");\n\t\t}else\n\t\t\tSystem.out.println(\"Erreur lors de la création de l'utilisateur\");\n\t}", "Account create();", "public CreditCard(int pin, String number, String holder, Date expiryDate, int cvc){\r\n this.pin = pin;\r\n this.number = number;\r\n this.holder = holder;\r\n this.expiryDate = expiryDate;\r\n this.cvc = cvc;\r\n}", "@POST\r\n @Path(\"/create\")\r\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public NewAccount createNewCustomerAccount(@FormParam(\"accountNumber\") int accountNumber,\r\n @FormParam(\"accountType\") String accountType,\r\n @FormParam(\"accountBalance\") double accountBalance\r\n ){\r\n return newaccountservice.createNewAccount(accountNumber, accountType, accountBalance);\r\n }", "@Override\n void create(Cliente cliente);", "public Client create(Client created);", "public Person( String emailAddress, String first, String last, \r\n String password, String currency, String creditCard )\r\n {\r\n setEmail( emailAddress );\r\n setFirstName( first );\r\n setLastName( last );\r\n setPassword( password );\r\n setCurrency( currency );\r\n setCreditCard( creditCard );\r\n }", "@RequestMapping(value = \"/createClient\", method = RequestMethod.GET)\n public @ResponseBody CreatorClient createClient(){\n return creatorService.createClient(null);\n }", "private boolean addClient() throws Exception {\n\n // Handle clicks for Add\n ContentValues content = new ContentValues();\n content.put(TakeAndGoConsts.ClientConst.FIRST_NAME, FirstName.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.LAST_NAME, LastName.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.ID, ID.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.PHONE_NUMBER, PhoneNumber.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.EMAIL, EmailAddress.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.CREDIT_CARD, CreditCard.getText().toString());\n content.put(TakeAndGoConsts.ClientConst.PASSWORD, Password.getText().toString());\n\n\n DBFactory.getIdbManager().addClient(content);\n\n return true;\n }", "String insertClientAccount(ClientAccount account) throws ServiceException;", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "public Client(String name, String emailAddress) {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.emailAddress = emailAddress;\n\t\thotelRoom = 0;\n\t}", "private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}", "public void create(Client client) {\n\n try {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.CREATE));\n super.saveOrUpdate(client);\n updateObservers(StringRessources.MSG_CLIENT_SUCCES);\n updateObservers(client);\n } catch (AccessControlException e) {\n e.printStackTrace();\n updateObservers(StringRessources.MSG_PRIVILEGES);\n }\n } catch (DataAccessLayerException e) {\n updateObservers(StringRessources.MSG_CLIENT_ERREUR);\n } catch (Exception e) {\n updateObservers(StringRessources.MSG_CLIENT_ERREUR);\n }\n }", "public String createClient(String clientFirstName, String clientLastName){\n\n String sql = \"INSERT INTO bankclient (firstname, lastname, registered, age, totalbalance, numberofaccounts) VALUES (:firstname, :lastname, :registered, :age, :totalbalance, :numberofaccounts)\";\n Map<String, Object> paramMap = new HashMap<>();\n paramMap.put(\"firstname\", clientFirstName);\n paramMap.put(\"lastname\", clientLastName);\n paramMap.put(\"registered\", getTime());\n paramMap.put(\"totalbalance\", '0');\n paramMap.put(\"numberofaccounts\", 0);\n //test\n paramMap.put(\"age\", generateAge());\n //===\n jdbcTemplate.update(sql, paramMap);\n\n String response = clientFirstName + \" \" + clientLastName + \" added to the database\";\n return response;\n }", "@Test\n @Order(1)\n void create_client() {\n client = new Client();\n client.setName(\"Test Client\");\n Client c = service.createClient(client);\n Assertions.assertEquals(client.getName(), c.getName());\n Assertions.assertNotEquals(0, c.getId());\n client = c;\n }", "public Account(String firstName, String lastName, String address, String zipCode, Date currentDate) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.address = address;\n this.zipCode = zipCode;\n this.currentDate = currentDate;\n }", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "public Buyer(String username, String password, String firstName, String lastName, String emailAddress, String phoneNumber) {\n super(username, password, firstName, lastName, emailAddress, phoneNumber);\n this.role = 1;\n credit = 10000;\n ProgramManager.getProgramManagerInstance().addAccountToList(username, this);\n }", "@FXML\n\tpublic void createClient(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString names = txtClientNames.getText();\n\t\tString surnames = txtClientSurnames.getText();\n\t\tString id = txtClientId.getText();\n\t\tString adress = txtClientAdress.getText();\n\t\tString phone = txtClientPhone.getText();\n\t\tString observations = txtClientObservations.getText();\n\n\t\tif (!names.equals(empty) && !surnames.equals(empty) && !id.equals(empty) && !adress.equals(empty)\n\t\t\t\t&& !phone.equals(empty) && !observations.equals(empty)) {\n\t\t\tcreateClient(names, surnames, id, adress, phone, observations, 1);\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "public ClientAccount(String name, Name contact, Address address) {\n\t\tthis.name = name;\n\t\tthis.contact = contact;\n\t\tthis.address = address;\n\t}", "public CustomerObj(String user_first_name, String user_last_name, String user_email) {\n \n this.user_first_name = user_first_name;\n this.user_last_name = user_last_name;\n this.user_email = user_email;\n \n }", "@ApiMethod(name = \"createContact\", path = \"contact\", httpMethod = HttpMethod.POST)\n\tpublic Contact createContact(final ContactForm form) {\n\t\tfinal Key<Contact> key = Contact.allocateKey();\n\t\tContact contact = new Contact(key.getId(), form);\n\n\t\tofy().save().entity(contact).now();\n\n\t\treturn contact;\n\t}", "@GET\n\t@Path(\"CreateCustomer\")\n\tpublic Customer createCustomer(@QueryParam(\"companyname\") String companyname,\n\t\t\t@QueryParam(\"companynumber\") String companynumber, @QueryParam(\"contactname\") String contactname,\n\t\t\t@QueryParam(\"email\") String email, @QueryParam(\"phone\") String phone, @QueryParam(\"username\")String username ,@QueryParam(\"password\") String password) {\n\t\treturn ManagerHelper.getCustomerManager().createCustomer(companyname, companynumber, contactname, email, phone, username,password );\n\t}", "public void makeClient() {\n try {\n clienteFacade.create(cliente);\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Cliente creado exitosamente\", null));\n } catch (Exception e) {\n System.err.println(\"Error en la creacion del usuario: \" + e.getMessage());\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_FATAL, e.getMessage(), null));\n }\n }", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n @RequestMapping(value = \"/myClient/{username}/{moduleId}\", method = RequestMethod.POST)\n public @ResponseBody CreatorClient createClient(@RequestBody String body, @PathVariable String username, @PathVariable String moduleId){\n Map<String, String> data = (Map<String, String>) parseJsonToMap(body);\n return creatorService.createClient(username, data.get(\"password\"), moduleId, data);\n }", "private Customer createCustomerInstance(String name, String email, String phoneNumber) {\n Customer customer = new Customer();\n customer.setName(name);\n customer.setEmail(email);\n customer.setPhoneNumber(phoneNumber);\n return customer;\n }", "@RequestMapping(value=\"/client\", method = RequestMethod.POST) \n\tpublic void saveClient(@RequestBody OauthClientDetails client) {\n\t\tlogger.debug(\"Add a new client: {}\", client.getClientId());\n\t\tauthService.saveClient(client);\n\t}", "void createCustomerAccount(String mobileNumber) throws Exception;", "@Test\n\tpublic void insertAndDeleteClientTest() {\n\t\tservice.insertClient(\"devuser3\", \"test\", \"devuser3@hotmail.com\", \"devpass\");\n\n\t\tClientDTO clientDTO = service.getClient(\"devuser3@hotmail.com\");\n\n\t\tassertEquals(\"devuser3\", clientDTO.getFirstname());\n\t\tassertEquals(\"test\", clientDTO.getLastname());\n\t\tassertEquals(\"devuser3@hotmail.com\", clientDTO.getEmail());\n\n\t\tservice.deleteClient(\"devuser3@hotmail.com\");\n\t\tassertFalse(service.emailExists(\"devuser3@hotmail.com\"));\n\t}", "public com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "@Test\n\tpublic void create() {\n\t\t// Given\n\t\tString name = \"Mark\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"0211616447\";\n\n\t\t// When\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertNotNull(customer);\n\t}", "public static Client createNewClient(Client client, TransactionType transactionType) {\r\n\t\tdbConnect();\r\n\t\tPreparedStatement stmt = null;\r\n\t\tfinal String INSERT_NEW_CLIENT;\r\n\t\tif (transactionType == TransactionType.PURCHASE)\r\n\t\t\tINSERT_NEW_CLIENT = \"INSERT INTO purchase_client (purchase_client_id, name, address, telephone)\";\r\n\t\telse\r\n\t\t\tINSERT_NEW_CLIENT = \"INSERT INTO sales_client (sales_client_id, name, address, telephone)\";\r\n\r\n\t\ttry {\r\n\t\t\tstmt = conn.prepareStatement(INSERT_NEW_CLIENT + \"VALUES (\" + client.getClientId() + \",\" + client.getName()\r\n\t\t\t\t\t+ \",\" + client.getAddress() + \",\" + client.getTelephone() + \")\");\r\n\t\t\tstmt.execute();\r\n\t\t\tstmt.close();\r\n\t\t\t// Get latest entry from client table\r\n\t\t\treturn latestEntryFromClient(TransactionType.PURCHASE);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "CarPaymentMethod cardHolder(String firstName, String lastName);", "StudentRecord createStudentRecord(String firstName, String lastName,\n\t\t\tList<CourseType> coursesRegistered, StudentStatus status, String statusDate,\n\t\t\tString clientId) throws Exception;", "private Customer createCustomerInstanceWithId(String name, String email, String phoneNumber) {\n Customer customer = new Customer();\n customer.setId(1000L);\n customer.setName(name);\n customer.setEmail(email);\n customer.setPhoneNumber(phoneNumber);\n return customer;\n }", "public static String createCustomer(String account, String serviceAddress, String email, String phonePlaceHolder){\n return \"insert into user_information(ui_account, ui_email, ui_phone, ui_serviceaddress)\" +\n \" values('\"+account+\"'\"+\",'\"+email+\"'\"+\",'\"+phonePlaceHolder+\"'\"+\",'\"+serviceAddress+\"')\";\n }", "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.TEXT_PLAIN)\n public Response createAccount(\n AccountModel input, @Context HttpServletResponse response) {\n if (input.getEmail() == null || input.getEmail().equals(\"\") || input.getPassword() == null || input.getPassword().isEmpty()\n || input.getUserName() == null || input.getUserName().isEmpty()) {\n return Response.status(Response.Status.BAD_REQUEST).build();\n }\n Customer customer = new Customer();\n customer.setEmail(input.getEmail());\n customer.setPassword(input.getPassword());\n customer.setUserName(input.getUserName());\n String sendToken = TokenUtil.getToken(input.getEmail(), input.getPassword());\n customer.setToken(sendToken);\n Long id = customerRef.save(customer);\n if (id != null || id > 0) {\n response.setHeader(\"AuthHeader\", sendToken);\n return Response.status(Response.Status.CREATED).build();\n }\n return Response.status(Response.Status.NOT_IMPLEMENTED).build();\n\n }", "public void createBillingAddress() throws Exception{\n\t\t\n\t\ttype(firstNameTextBox,\"bob\");\n\t\ttype(lastNameTextBox,\"test\");\n\t\ttype(addressLine1TextBox,\"2716 Ocean Park Blvd Suite 1030\");\n\t\ttype(addressLine2TextBox,\"test house\");\n\t\ttype(cityTextBox,\"Santa Monica\");\n\t\ttype(zipcodeTextBox,\"90405\");\n\t\tselect(stateSelectBox,8);\n\t\ttype(phoneTextField,\"6666654686\");\n\t\ttype(companyTextField,\"test company\");\n\t\n\t}", "public void addOrUpdateClient(Client client) {\r\n // Add table values mapped to their associated column name\r\n ContentValues value = new ContentValues();\r\n value.put(\"email\", client.getEmail());\r\n value.put(\"personalAddress\", client.getPersonalAddress());\r\n value.put(\"creditCardNumber\", client.getCreditCardNumber());\r\n value.put(\"expiry\", new SimpleDateFormat(\"yyyy-MM-dd\").format(client.getExpiry()));\r\n value.put(\"firstName\", client.getFirstName());\r\n value.put(\"lastName\", client.getLastName());\r\n // Add or update database with table values\r\n sqlExecutor.updateOrAddRecords(\"clients\", value);\r\n }", "public ClientEditPage createNewClient() throws Exception {\n if (isNotAt()) {\n goTo();\n }\n newClientButton.click();\n Thread.sleep(Browser.getDelayAfterNewItemClick());\n return Pages.getClientEditPage();\n }", "public Customer(String FirstName, String LastName, String Address, String Nationality, String eMail, int phoneNumber) {\n\t\tthis.FirstName = FirstName ;\n\t\tthis.LastName = LastName ;\n this.Address = Address;\n this.Nationality = Nationality;\n this.eMail = eMail;\n this.phoneNumber = phoneNumber;\n\t}", "@RequestMapping(value = \"/createClient/{moduleId}\", method = RequestMethod.GET)\n public @ResponseBody CreatorClient createClient(@PathVariable String moduleId){\n return creatorService.createClient(moduleId, null);\n }", "@RequestMapping(value=\"/save\", method=RequestMethod.POST)\r\n\tpublic String saveClaim(@Valid Client client, BindingResult result){\r\n\t\t\r\n\t\tif(result.hasErrors()){\r\n\t\t\treturn \"clientForm\";\r\n\t\t}else{\r\n\t\t\ttry{\r\n\t\t\t\tSystem.out.println(\"ClientController-saveClaim-ep date: \" + client.getExpiration_date());\r\n\t\t\t\thimsDaoImpl.saveClient(client);\r\n\t\t\t\treturn \"success\";\r\n\t\t\t}catch(DataIntegrityViolationException ex){\r\n\t\t\t\treturn \"error\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "public static Card createCard(String bank,\n String number,\n String expiryDate) \n throws ParseException, CardNumberException, InvalidBankException {\n \n // Convert date string to Date\n Date date = (Date)formatter.parseObject(expiryDate);\n \n // Get the correct card, according to bank\n Card card = getCard(bank, number, date);\n \n // Perform validations\n validate(card);\n \n return card;\n }", "public Cliente(String nome, String telefone, String cpf) {\r\n\t\tthis.nome = nome;\r\n\t\tthis.telefone = telefone;\r\n\t\tthis.cpf = cpf;\r\n\t}", "public ClientDetailsEntity() {\n\t\t\n\t}", "Client addClient(Client client) throws BaseException;", "@Test\n\tpublic void getClientTest() {\n\t\tClientDTO client = service.getClient(\"neagu_ionutalin@icloud.com\");\n\n\t\tassertEquals(\"Alin\", client.getFirstname());\n\t\tassertEquals(\"Neagu\", client.getLastname());\n\t\tassertEquals(\"neagu_ionutalin@icloud.com\", client.getEmail());\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(value = \"/myClient/{username}\", method = RequestMethod.POST)\n public @ResponseBody CreatorClient createClientUser(@RequestBody String body, @PathVariable String username){\n Map<String, String> data = (Map<String, String>) parseJsonToMap(body);\n return creatorService.createClient(username, data.get(\"password\"), data);\n }", "Account create(Context context);", "public void create_contact(String contactName, SupplierCard supplier) {\n supplier_dao.create_contact(contactName, supplier);\n }", "public Account createAccount(String emailAddress) {\n\t\tAccount acct = fillAccount(emailAddress, emailAddress);\n\t\t\n\t\ttry {\n\t\t\tboolean created = acct.update(null);\n\t\t\tif (created) \n\t\t\t\tSystem.out.println(\"Account created\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Account updated\");\n\t\t} catch (VindiciaReturnException e) {\n\t\t\tSystem.out.println(\"Vindicia response string: \" + e.getMessage() + \" , Call SOAP ID: \" + e.getSoapId());\n\t\t\te.printStackTrace();\n\t\t} catch (VindiciaServiceException e) {\n\t\t\tSystem.out.println(\"Vindicia response string: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn acct;\n\t}", "@Test\n public void createBaasClientUsingPostTest() throws ApiException {\n CreateBaasClientCO baasClientCO = null;\n BaasClientVO response = api.createBaasClientUsingPost(baasClientCO);\n\n // TODO: test validations\n }", "public Customer(String username, String firstname, String lastname, String password) {\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.password = password;\n }", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "public Customer(int id, String surname, String name, String patronymic, String address, int creditCardNumber, int bankAccountNumber) {\n this.id = id;\n this.surname = surname;\n this.name = name;\n this.patronymic = patronymic;\n this.address = address;\n this.creditCardNumber = creditCardNumber;\n this.bankAccountNumber = bankAccountNumber;\n }", "public ClientCredentials() {\n }", "Customers createCustomers();", "public Customer(String name, String email, String password, double amount, LocalDate regDate) {\r\n\t\tthis.custId = idCounter++;\r\n\t\tthis.name = name;\r\n\t\tthis.email = email;\r\n\t\tthis.password = password;\r\n\t\tthis.amount = amount;\r\n\t\tthis.regDate = regDate;\r\n\t}", "public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }", "public ClienteModel(String nome,\n String email,\n String cpf,\n String sexo,\n String nascimento,\n String estadoCivil,\n String celular,\n String telefone,\n String endereco) {\n\n clientesCadastrados++;\n this.id = clientesCadastrados;\n this.nome = nome;\n this.email = email;\n this.cpf = cpf;\n this.nascimento = nascimento;\n this.sexo = sexo;\n this.estadoCivil = estadoCivil;\n this.celular = celular;\n this.telefone = telefone;\n this.endereco = endereco;\n }", "protected void createAccount(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"CREATEACCOUNT\");\n\t\ttry {\n\t\t\tString email = args.getString(0);\n\t\t\tString password = args.getString(1);\n\t\t\tString userName = null;\n\t\t\tif (args.length() == 3) {\n\t\t\t\tuserName = args.optString(2);\n\t\t\t}\n\t\t\tNotificare.shared().createAccount(email, password, userName, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "Document createAccount(String username, String accountDisplayName,\n String accountFullName, double balance, double interestRate);", "@POST\n\t@Path(\"/register\")\n\t@Consumes(\"application/json\")\n\tpublic Response registerClient(Client client) {\n\t\tClientsDAO sdao = new ClientsDAO();\n\t\t// Search client by email\n\t\tClient c = sdao.search(client.getEmail());\n\t\t// Check if the client email exists\n\t\tif (c.getEmail() != null){\n\t\t\t// Client email exists\n\t\t\treturn Response.status(404).build();\n\t\t}\n\t\t// Save client\n\t\tsdao.save(client);\n \n return Response.ok().status(201).entity(client)\n .header(\"Access-Control-Allow-Origin\", \"*\")\n .header(\"Access-Control-Allow-Methods\", \"POST, GET, PUT, UPDATE, OPTIONS\")\n .header(\"Access-Control-Allow-Headers\", \"Content-Type, Accept, X-Requested-With\").build();\n }", "public Customer(@NotBlank(message = \"Name can't be blank\") String name, @NotBlank(message = \"Surname can't be blank\") String surname, @NotBlank(message = \"Phone can't be blank\") String phone, @NotNull(message = \"Date of birth can't be blank\") LocalDate dateOfBirth, int numberOfOffices, @NotNull(message = \"level of privilege can't be blank\") int levelOfPrivilege) {\n super(name, surname, phone, dateOfBirth);\n this.numberOfOffices = numberOfOffices;\n this.levelOfPrivilege = levelOfPrivilege;\n }", "public Customer(int custId, String name, String email, String password, double amount, LocalDate regDate) {\r\n\t\tsuper();\r\n\t\tthis.custId = custId;\r\n\t\tthis.name = name;\r\n\t\tthis.email = email;\r\n\t\tthis.password = password;\r\n\t\tthis.amount = amount;\r\n\t\tthis.regDate = regDate;\r\n\t}", "public Customer(String name, String surname, String address, String email, long tel) {\n this.name = name;\n this.surname = surname;\n this.address = address;\n this.email = email;\n this.tel = tel;\n }", "public Client save(Client client) {\n try (Connection connection = DatabaseConfiguration.getDatabaseConnection()) {\n String query = \"INSERT into clients(clientId, name, surname, age) VALUES(?,?,?,?)\";\n String query_account = \"INSERT INTO accounts(clientId, leftBalance) VALUES (?, ?)\";\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n preparedStatement.setString(1, client.getClientId());\n preparedStatement.setString(2, client.getName());\n preparedStatement.setString(3, client.getSurname());\n preparedStatement.setInt(4, client.getAge());\n preparedStatement.execute();\n PreparedStatement preparedStatement1 = connection.prepareStatement(query_account);\n preparedStatement1.setString(1, client.getClientId());\n preparedStatement1.setDouble(2, client.getPaymentMethod().getLeftBalance());\n preparedStatement1.execute();\n return client;\n\n } catch (SQLException exception) {\n throw new RuntimeException(\"Something went wrong while saving the client: \" + client);\n }\n }", "public Customer(int id, String name, String email, String password, Calendar joinDate)\n {\n this.id=id;\n this.name=name;\n setPassword(password);\n setEmail(email);\n this.joinDate=joinDate;\n }", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "public void creatUser(String name, String phone, String email, String password);", "@Test\n\tpublic void test_create_new_user_success(){\n\t\tUser user = new User(null, \"create_user\", \"create_user@example.com\", \"12345678\");\n\t\tResponseEntity<User> response = template.postForEntity(REST_SERVICE_URI + ACCESS_TOKEN + token, user, User.class);\n\t\tUser newUser = response.getBody();\n\t\tassertThat(newUser.getName(), is(\"create_user\"));\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.CREATED));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}", "@GET\n @Path(\"/add\")\n @Produces(\"application/json\")\n public Response add() {\n Session session = DBConnectionManager.getSession();\n session.beginTransaction();\n\n Client client = new Client();\n client.setFirstname(\"asdasdasdas d asd asd asd\");\n\n //Save the client in database\n session.save(client);\n\n //Commit the transaction\n session.getTransaction().commit();\n DBConnectionManager.closeConnection();\n\n return Response.ok(client, MediaType.APPLICATION_JSON).build();\n }", "public Customer() {\n name = \"N.A.\";\n surname = \"N.A.\";\n address = \"N.A.\";\n email = \"N.A.\";\n }", "public void createClient(String nam, String surnam, String id, String direction, String phone, String obs, int number) {\n\t\ttry {\n\t\t\trestaurant.addClient(nam, surnam, id, direction, phone, obs, number);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public Client create() {\n RequestProvider provider = RequestProviders.lookup();\n return provider.newClient(this);\n }", "void create(Cart cart, User user) throws FlowerValidationException;", "public void createUser(String firstName, String emailAddress) {\n\n this.firstName = firstName;\n this.emailAddress = emailAddress;\n\n }", "public static void createAccount(String name, String address, String contactNum, String userId, String password, float initDeposit) {\n\t\tcustomerList.add(new Customer(name, address, contactNum, new SavingsAccount(userId, password, initDeposit)));\n\t}", "public CreditCard ()\r\n\t{\r\n\t\t\r\n\t}", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public void insertClient(Client client) {\n\t\t\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\n\t\tPreparedStatement insertStatement = null;\n\t\t\n\t\ttry {\n\t\t\tinsertStatement = dbConnection.prepareStatement(insertStatementString);\n\t\t\tinsertStatement.setInt(1, client.getId());\n\t\t\tinsertStatement.setString(2, client.getName());\n\t\t\tinsertStatement.setString(3, client.getAddress());\n\t\t\tinsertStatement.setString(4, client.getEmail());\n\t\t\t\n\t\t\tinsertStatement.execute();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, \"ClientDAO : insert \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionFactory.close(insertStatement);\n\t\t\tConnectionFactory.close(dbConnection);\n\t\t}\n\t}", "AionAddress createAccount(String password);", "@When(\"^I fill in valid Email address and click on create an account$\")\n\tpublic void I_fill_in_valid_Email_address_and_click_on_create_an_account() throws Throwable {\n\n\t\trandomNumber r = new randomNumber();\n\t\tString emailString = \"Example\" + r.gen();\n\t\tString emailAddress = emailString + \"@gmail.com\";\n\t\tdriver.findElement(By.id(\"email_create\")).sendKeys(emailAddress);\n\t\tdriver.findElement(By.id(\"SubmitCreate\")).submit();\n\t}", "@Override\n public Client createClient(Client client)\n throws RemoteException {\n client=clientManager.create(client);\n \n return client;\n }", "public static Customer createNewCustomer(String fullName, Integer branchID )\n {\n return new Customer(fullName, branchID);\n }" ]
[ "0.63198566", "0.59800196", "0.5970111", "0.58964556", "0.58479965", "0.5841408", "0.5760466", "0.572453", "0.56346536", "0.5632899", "0.56229043", "0.5606253", "0.5598119", "0.5597872", "0.5593", "0.55906445", "0.5587522", "0.5581913", "0.5532995", "0.5531272", "0.55259705", "0.55183905", "0.55114585", "0.55114585", "0.55114585", "0.55114585", "0.55052537", "0.5498601", "0.5478561", "0.54773235", "0.5445393", "0.54389364", "0.54313725", "0.54243743", "0.5417248", "0.5389796", "0.5386492", "0.537319", "0.5367691", "0.5363768", "0.53618884", "0.53429294", "0.5335526", "0.532249", "0.53142124", "0.5312878", "0.5310492", "0.52820635", "0.5280919", "0.5273741", "0.5273491", "0.5273137", "0.5266017", "0.5264058", "0.5251167", "0.52484304", "0.5248202", "0.52465624", "0.5244057", "0.52341837", "0.5229095", "0.5224686", "0.52236485", "0.5220363", "0.5212188", "0.52039504", "0.5193591", "0.5181742", "0.5164224", "0.51612186", "0.5158284", "0.51573026", "0.51535624", "0.5144863", "0.5143847", "0.51344275", "0.51311326", "0.51223207", "0.51156", "0.5114757", "0.50997275", "0.5097848", "0.50943387", "0.5090298", "0.50886303", "0.5076244", "0.50697863", "0.506337", "0.5063064", "0.50607365", "0.5060201", "0.50601536", "0.50582653", "0.5053616", "0.5042729", "0.5041834", "0.5030592", "0.5030178", "0.50261813", "0.5024091" ]
0.73961174
0
Returns the address of this Client.
public String getAddress() { return address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getHostAddress() {\n String address = null;\n\n if (this.clientSocket != null) {\n address = this.clientSocket.getInetAddress().getHostAddress();\n }\n\n return address;\n }", "public final String getAddress() {\n return address;\n }", "public String getAddr() {\n return addr;\n }", "public String getAddr() {\n return addr;\n }", "public String getAddr() {\n return addr;\n }", "public String getAddress() {\n\t\tlog.info(\"NOT IMPLEMENTED\");\n\t\treturn \"\";\n\t}", "public String getAddr() {\n\t\treturn addr;\n\t}", "public InetSocketAddress getClientAddress() {\n SocketChannel socket = channel.getSocket();\n Socket client = socket.socket();\n \n return getClientAddress(client);\n }", "@Override\n public String getAddress() {\n\n if(this.address == null){\n\n this.address = TestDatabase.getInstance().getClientField(token, id, \"address\");\n }\n\n return address;\n }", "public String getHostAddress() {\n\t\treturn javaNetAddress.getHostAddress();\n\t}", "public String getAddress() {\n return this._address;\n }", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn address;\n\t}", "public String getAddress() {\n\t\treturn this.address;\n\t}", "public String address() {\n return Codegen.stringProp(\"address\").config(config).require();\n }", "@Override\r\n public String getIPAddress() {\r\n return address;\r\n }", "public java.lang.String getAddress() {\r\n return localAddress;\r\n }", "public String getAddress() {\r\n\t\treturn address;\r\n\t}", "public String getAddress() {\r\n\t\treturn address;\r\n\t}", "public String getViaHost() {\n return this.myAddress;\n }", "public String getViaHost() {\n return this.myAddress;\n }", "public String getAddress() {\r\n\t\treturn this.address;\r\n\t}", "public java.lang.String getAddress () {\n\t\treturn address;\n\t}", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\r\n return address;\r\n }", "public String getHostAddress()\n {\n return (addr != null ? addr.getHostAddress() : \"\");\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n }\n }", "public int getAddr() {\n return addr_;\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getAddr() {\n return addr_;\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getServerAddress() {\r\n\t\treturn this.serverAddress;\r\n\t}", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n }\n }", "public InetAddress getAddress ()\n {\n return address;\n }", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n }\n }", "public Jid getAddress() {\r\n return serviceAddress;\r\n }", "public synchronized String getProxyAddress() {\n \n return this.address;\n }", "public String getInternalAddress();", "public InetAddress getAddress() {\r\n\t\treturn address;\r\n\t}", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n address_ = s;\n }\n return s;\n }\n }", "public String getTcpAddress() {\n\t\tfinal String key = ConfigNames.ADDRESS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn getJson().getString(key);\n\t}", "public InetAddress getAddress()\n {\n return address;\n }", "public String getPeerAddress() {\n return peerAddress.getHostAddress();\n }", "public String getPeerAddress() {\n return peerAddress.getHostAddress();\n }", "public String getAddress()\r\n\t{\r\n\t\treturn address;\r\n\t}", "@AutoEscape\n\tpublic String getAddress();", "@AutoEscape\n\tpublic String getAddress();", "@AutoEscape\n\tpublic String getAddress();", "@AutoEscape\n\tpublic String getAddress();", "public String getServerAddress() {\n\t\treturn mServerAddress;\n\t}", "public java.lang.String getAddress() {\n\t\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\t\taddress_ = s;\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t\t}\n\t\t\t\t}", "public java.lang.String getAddress() {\n\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t} else {\n\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\taddress_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t}\n\t\t\t}", "public String getRemoteSocketAddress() {\n return client.getRemoteSocketAddress().toString();\n }", "public String getAddress() {\n return definition.getString(ADDRESS);\n }", "public String getClientHost() {\n return clientHost;\n }", "public String getAddress(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.ADDRESS);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n address_ = s;\n return s;\n }\n }", "public String getAddress() {\n return (this.addresses == null) ? null\n : (this.addresses.isEmpty() ? null : this.addresses.get(0));\n }", "public String getAddress() {\n return this.address;\n }", "public String getAddress() {\n return this.address;\n }", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "public String getAddress() {\n return m_address;\n }", "public String address() {\n return this.address;\n }", "public String address() {\n return this.address;\n }", "@Override\r\n\tpublic String getAddress() {\n\t\treturn address;\r\n\t}", "public String getRnidsHostAddress() {\n\t\tString address = getProperties().getProperty(\"rnids.host.address\").trim();\n\t\treturn address;\n\t}", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }" ]
[ "0.7856169", "0.7689411", "0.7659172", "0.7659172", "0.7659172", "0.7623304", "0.7612117", "0.7544135", "0.75048894", "0.74984837", "0.7472491", "0.7386438", "0.7386438", "0.7386438", "0.7386438", "0.7386438", "0.7386438", "0.7386438", "0.7373701", "0.7328206", "0.73246706", "0.73236173", "0.7320083", "0.7320083", "0.73186946", "0.73186946", "0.7303134", "0.72874385", "0.72873354", "0.72805095", "0.72765625", "0.7275338", "0.7275338", "0.726378", "0.7259892", "0.7256263", "0.7252033", "0.7252033", "0.7252033", "0.72498506", "0.72498506", "0.72484076", "0.724828", "0.7240853", "0.7216248", "0.7215224", "0.7198892", "0.7198869", "0.7189226", "0.71868634", "0.7183563", "0.7179576", "0.7176925", "0.71766067", "0.71766067", "0.7176261", "0.7173006", "0.7173006", "0.7173006", "0.7173006", "0.71695393", "0.71689665", "0.7164839", "0.7161144", "0.71565026", "0.71543133", "0.71495044", "0.7147727", "0.71265054", "0.7119724", "0.7119724", "0.71078056", "0.71078056", "0.71078056", "0.71078056", "0.71078056", "0.71078056", "0.70937985", "0.7087015", "0.7087015", "0.7086471", "0.70674187", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593", "0.7048593" ]
0.0
-1
Sets the address of this Client.
public void setAddress(String address) { this.address = address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAddress(String address) {\n try {\n if (address == null ||\n address.equals(\"\") ||\n address.equals(\"localhost\")) {\n m_Address = InetAddress.getLocalHost().getHostName();\n }\n } catch (Exception ex) {\n log.error(\"setAddress()\",ex);\n }\n m_Address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "@Override\r\n public void setIPAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(final String address) {\n this._address = address;\n }", "public void setAddress(InetAddress address) {\r\n\t\tthis.address = address;\r\n\t}", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(final String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(final Address address) {\n\n // Check sanity\n Validate.notNull(address, \"address\");\n\n // Assign internal state\n this.address = address;\n }", "public void setAddress(final String address){\n this.address=address;\n }", "public void setAddress(String _address){\n address = _address;\n }", "public void setAddr(String addr) {\n this.addr = addr;\n }", "public void setAddress(String address) {\n if (getAddresses().isEmpty()) {\n getAddresses().add(address);\n } else {\n getAddresses().set(0, address);\n }\n }", "public void setAddress(String address)\n {\n this.address = address;\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "@Override\n\tpublic void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "@Generated(hash = 607080948)\n public void setAddress(Address address) {\n synchronized (this) {\n this.address = address;\n addressId = address == null ? null : address.getId();\n address__resolvedKey = addressId;\n }\n }", "public void setAddress(org.nhind.config.Address[] address) {\n this.address = address;\n }", "public void setExternalAddress(String address);", "public void setAddress(org.xmlsoap.schemas.wsdl.soap.TAddress address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().add_element_user(ADDRESS$0);\n }\n target.set(address);\n }\n }", "public void setAddress(java.lang.String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "Builder setAddress(String address);", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) { throw new NullPointerException(); }\n address_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }", "public void setAddress(int address)\n {\n this.address = address;\n }", "public void setAddress(final URL value) {\n this.address = value;\n }", "public void setInternalAddress(String address);", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n this.address = address;\n }", "@Override\n public void setAdress(Adress adress) {\n this.adress = adress;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n address_ = value;\n onChanged();\n return this;\n }", "public void setAddr(String addr) {\n\t\tthis.addr = addr;\n\t}", "HandlebarsKnotOptions setAddress(String address) {\n this.address = address;\n return this;\n }", "public void setAddress(String address) throws JAXRException {\n this.address = address;\n }", "public Builder setServerAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n serverAddress_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic void setAddress(String address) {\n\t\tif (address == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (address.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.address = address;\r\n\t}", "public void setAddress (java.lang.String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address){\n\t\tthis.address = address;\n\t}", "public void setAddress(String address){\n\t\tthis.address = address;\n\t}", "public Builder setAddress(\n\t\t\t\t\t\tjava.lang.String value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\n\t\t\t\t\taddress_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "public void setAddress(String address) {\n\t\tthis.address = StringUtils.trimString( address );\n\t}", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public void setAddress(String address) { this.address = address; }", "public void setaddress(String address) {\n\t\t_address = address;\n\t}", "public void setAddress(java.lang.String address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ADDRESS$2);\n }\n target.setStringValue(address);\n }\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public void setAddr(String addr) {\n this.addr = addr == null ? null : addr.trim();\n }", "public void setAddr(String addr) {\n this.addr = addr == null ? null : addr.trim();\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public void setHost(String address) {\n final String adr = address;\n new Thread() {\n @Override\n public void run() {\n try {\n if (!host.equals(InetAddress.getByName(adr))) {\n host = InetAddress.getByName(adr);\n init();\n }\n } catch (UnknownHostException e) {\n e.printStackTrace();\n }\n }\n }.start();\n }", "public void setIpAddress(InetAddress addr) \n\t{\n\t\tthis.ipAddress = addr;\n\t}", "public void setAddress(java.lang.String param) {\r\n localAddressTracker = param != null;\r\n\r\n this.localAddress = param;\r\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String adrs) {\n address = adrs;\n }", "void setAddress(String address) throws IllegalArgumentException;", "public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }", "public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }", "public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}" ]
[ "0.76756585", "0.7427052", "0.7427052", "0.7427052", "0.7341427", "0.73031825", "0.72748137", "0.7136688", "0.7136688", "0.7136688", "0.7136688", "0.7132618", "0.7130828", "0.71167433", "0.7088261", "0.7076329", "0.7069453", "0.70344794", "0.701851", "0.701851", "0.701851", "0.7009338", "0.6999242", "0.6985604", "0.69743025", "0.6970851", "0.6968841", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6967249", "0.6956957", "0.68627757", "0.6857394", "0.6851284", "0.68441474", "0.6831574", "0.6831574", "0.6831574", "0.6831574", "0.6831574", "0.6819043", "0.68101925", "0.68036145", "0.6799834", "0.6794191", "0.67900443", "0.6786443", "0.67806786", "0.67704225", "0.67649525", "0.67649525", "0.673958", "0.6735913", "0.6715836", "0.6715836", "0.6714008", "0.6701153", "0.6687082", "0.66586393", "0.6648806", "0.6648806", "0.6648306", "0.6648306", "0.6554738", "0.6544676", "0.65284747", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6521239", "0.6495146", "0.64750785", "0.64565223", "0.64565223", "0.64565223", "0.6427719", "0.6427719" ]
0.70750135
17
Returns the credit card number of this Client.
public Long getCreditNum() { return creditNum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCreditCardNumber() {\n return creditCardNumber;\n }", "public int CCID() {\n\t\treturn this.creditCardIDNum;\n\t}", "public String getCardNumber() {\n return this.account;\n }", "public String getCardNumber() {\n\t\treturn cardNumber;\n\t}", "public String getCardNumber() {\n return cardNumber;\n }", "public String getCardNumber()\n {\n return cardNumber;\n }", "public double getCardNumber() {\n\t\treturn cardNumber;\n\t}", "public int getCardNumber() {\n return cardNumber;\n }", "public String getCardNumber()\r\n {\r\n return cardNumber;\r\n }", "public java.lang.String getCardNo() {\r\n return localCardNo;\r\n }", "public java.lang.String getCardNo() {\r\n return localCardNo;\r\n }", "public String getCreditCard()\n\t{\n\t\treturn m_creditCard;\n\t}", "public String getCardNo() {\n\t\treturn cardNo;\n\t}", "public String getIdCardNo() {\n return idCardNo;\n }", "public String getIdCardNo() {\n\t\treturn idCardNo;\n\t}", "public String getCardCode() {\n\t\t\treturn cardCode;\n\t\t}", "public String getCardNo() {\n return cardNo;\n }", "public CreditCardAccount getCreditCardAccount() {\n return this.creditCardAccount;\n }", "public int getNumber(){\n return cardNumber;\n }", "public java.lang.String getCardID() {\r\n return localCardID;\r\n }", "public String getCertCardNo() {\n\t\treturn certCardNo;\n\t}", "@ApiModelProperty(value = \"Card number (masked last 4 digits)\")\r\n public String getCardNumber() {\r\n return cardNumber;\r\n }", "public java.lang.String getIDCardNo() {\r\n return localIDCardNo;\r\n }", "public java.lang.String getIDCardNo() {\r\n return localIDCardNo;\r\n }", "public int getCardID() {\n return cardID;\n }", "public int getNumber(){return cardNumber;}", "public int getCustNumber()\n\t{\n\t\treturn customerNumber;\n\t}", "public Long getCardId() {\r\n return cardId;\r\n }", "public java.lang.String getCardSerNo() {\r\n return localCardSerNo;\r\n }", "public int getCC() {\n\t\treturn CC;\n\t}", "public Integer getCreditid() {\n return creditid;\n }", "public int getCCN(){\n\t\treturn ccn;\n\t}", "@ApiModelProperty(value = \"Unique identifier for this stored card\")\r\n public Integer getCustomerProfileCreditCardId() {\r\n return customerProfileCreditCardId;\r\n }", "public String getCreditCardName() {\n return getCreditCardName(getCreditCardType());\n }", "public long getcNum() {\n return cNum;\n }", "public int[] getPaymentCardNumber() {\n\t\treturn paymentCardNumber;\n\t}", "CarPaymentMethod creditCardNumber(String cardNumber);", "public int getCredit() {\n return this.credit;\n }", "public int CardsOnDeck()\n\t{\n\t\treturn cardNumber;\n\t}", "public String getUserCardId() {\n return userCardId;\n }", "public Integer getCocSerialNo() {\n\t\treturn cocSerialNo;\n\t}", "public String getCsNumber() {\n return csNumber;\n }", "public Long getNetworkCard() {\n return this.NetworkCard;\n }", "public String carrierAccountNumber() {\n return this.carrierAccountNumber;\n }", "public eBLBaseComponents.apis.ebay.CreditCardDetailsType getCreditCard() {\r\n return creditCard;\r\n }", "public String getCashNumber() {\n return cashNumber;\n }", "public java.lang.String getCustIdNbr() {\n return custIdNbr;\n }", "public int getCDR() {\n\t\t\n\t\treturn cdr;\n\t}", "public String getcardnumfrom() {\n return (String) getAttributeInternal(CARDNUMFROM);\n }", "private String getCardNumber() {\n try {\n String cardNumberWithoutSpaces = cardNumber.getAttribute(\"value\").replaceAll(\" \", \"\");\n int cardLength = cardNumberWithoutSpaces.length();\n return cardNumberWithoutSpaces.substring(cardLength - 4, cardLength);\n }\n catch (Exception ex) {\n // no action\n }\n return null;\n }", "java.lang.String getAccountNumber();", "public int getC_Charge_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Charge_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public String m50420r() {\n try {\n return this.f30729a0.getCardNumber();\n } catch (Exception unused) {\n return this.f30729a0.getText().toString().trim();\n }\n }", "public String getIdCard() {\n return idCard;\n }", "public String getIdCard() {\n\t\treturn idCard;\n\t}", "public String getIdCard() {\r\n return idCard;\r\n }", "public String getcardnumto() {\n return (String) getAttributeInternal(CARDNUMTO);\n }", "public static double getCardCounter() {\n\t\treturn cardCounter;\n\t}", "public String getCardPk() {\r\n return (String) getAttributeInternal(CARDPK);\r\n }", "public java.math.BigDecimal getCardMoney() {\r\n return localCardMoney;\r\n }", "public String getIdentityCard() {\n return identityCard;\n }", "public String getCHEQUE_BANK_ACCOUNT_NBR() {\r\n return CHEQUE_BANK_ACCOUNT_NBR;\r\n }", "public java.lang.String getCustNo() {\n return custNo;\n }", "public int getCSeqNumber() {\n return cSeqHeader.getSequenceNumber();\n }", "public String getAcctNo(){\n\t\treturn acctNo;\n\t}", "public String getIdcard() {\n return idcard;\n }", "public String getCustIdNbr()\n\t{\n\t\treturn mCustIdNbr;\t\n\t}", "public String getSCardNo() {\n return sCardNo;\n }", "CardNumber(int number) {\r\n this.number = number;\r\n }", "public String getIdcard() {\r\n return idcard;\r\n }", "public String getIdcard() {\r\n return idcard;\r\n }", "public String getIdcard() {\r\n return idcard;\r\n }", "public int getMcc() {\n return mcc_;\n }", "public int getMcc() {\n return mcc_;\n }", "public int getMcc() {\n return mcc_;\n }", "public int getMcc() {\n return mcc_;\n }", "public String getCardValue() {\n return Cvalue;\n }", "public java.lang.String getBillingCurrencyNumericCode() {\r\n return billingCurrencyNumericCode;\r\n }", "public long getComNumber() {\r\n return comNumber;\r\n }", "public String getEmbossCardNum() {\r\n return (String) getAttributeInternal(EMBOSSCARDNUM);\r\n }", "public String getUniformCreditCode() {\n return uniformCreditCode;\n }", "public static String getAccountNumber() {\n\t\treturn accountNumber;\n\t}", "public String getAccountNumber() {\n\t\tthis.setAccountNumber(this.account);\n\t\treturn this.account;\n\t}", "@Override\r\n\tpublic int getcc() {\n\t\treturn 120;\r\n\t}", "public int getAccountNumber() {\n\t\treturn accNum;\n\t}", "public String m18472f() {\n return this.cardId;\n }", "public BigDecimal getCHARGE_CODE() {\r\n return CHARGE_CODE;\r\n }", "public java.lang.String getCustomerNbr() {\n return customerNbr;\n }", "public java.lang.String getAccount_number() {\n return account_number;\n }", "public java.math.BigDecimal getCreditBalance() {\n return creditBalance;\n }", "public int getC_Payment_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Payment_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public java.lang.Long getCardTransno () {\r\n\t\treturn cardTransno;\r\n\t}", "public String getCustCode() {\n return custCode;\n }", "public String getCustCode() {\n return custCode;\n }", "public String getCc(String key) throws CreditCardAPIException;", "public String getCvvNumber();", "public Integer getCid() {\n return cid;\n }", "public Integer getCid() {\n return cid;\n }", "public int getC_BankAccount_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_BankAccount_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int getSerialNum()\r\n\t{\r\n\t\treturn(serialNum);\r\n\t}" ]
[ "0.793604", "0.7742864", "0.74885136", "0.74090284", "0.7348306", "0.7324676", "0.7302735", "0.72959316", "0.72438884", "0.70505685", "0.70505685", "0.70420057", "0.7023282", "0.7005746", "0.6988991", "0.6933073", "0.68769735", "0.67415065", "0.6731401", "0.6704198", "0.6686157", "0.6679806", "0.6637002", "0.6637002", "0.6552389", "0.65445054", "0.65444493", "0.6515487", "0.6508362", "0.64618355", "0.63904804", "0.6387075", "0.63802123", "0.6372682", "0.63409805", "0.6337432", "0.6330516", "0.6305341", "0.62888175", "0.6278211", "0.6237331", "0.62336165", "0.6200185", "0.6196696", "0.6195979", "0.6168775", "0.6155883", "0.615509", "0.6149864", "0.6137255", "0.61270595", "0.6113115", "0.6111554", "0.61073107", "0.6096287", "0.6093023", "0.60730624", "0.60692406", "0.60677266", "0.604625", "0.6040716", "0.603536", "0.6031604", "0.6021831", "0.6009652", "0.6007264", "0.5978308", "0.5962608", "0.5954488", "0.5953703", "0.5953703", "0.5953703", "0.5950386", "0.5950386", "0.59446365", "0.59446365", "0.5938243", "0.5929663", "0.59261817", "0.5915171", "0.5905973", "0.5902447", "0.5894176", "0.5871169", "0.587089", "0.5853554", "0.58492845", "0.5847441", "0.5840465", "0.5833483", "0.58267695", "0.5820377", "0.58202595", "0.58202595", "0.5818603", "0.5818077", "0.58010715", "0.58010715", "0.5796112", "0.5792548" ]
0.711825
9
Sets the credit card number of this Client.
public void setCreditNum(Long creditNum) { this.creditNum = creditNum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCreditCardNumber(int creditCardNumber) {\n this.creditCardNumber = creditCardNumber;\n }", "public void setCardNo(int cardNumber);", "public void setCreditCardNumber(String CreditCardNumber) {\n super.setCreditCardNumber(MPaymentValidate.checkNumeric(CreditCardNumber));\n }", "public void setCreditCard(String creditCard)\n\t{\n\t\tm_creditCard = creditCard;\n\t}", "public void setCardNumber(final String cardNumber) {\n this.cardNumber = cardNumber;\n }", "public void setCreditcard(CreditCard creditcard) {\n\t\tthis.creditcard = creditcard;\n\t}", "public void setCardNumber(String cardNumber) {\n\t\tthis.cardNumber = cardNumber;\n\t}", "private void setCardNumber() {\n String temp = \"\";\n temp = \"\" + (curIndex + 1) + \"/\" + deckOfCards.size();\n cardNumberString.setText(temp);\n }", "public void setIdCardNo(String idCardNo) {\n this.idCardNo = idCardNo;\n }", "public int getCreditCardNumber() {\n return creditCardNumber;\n }", "CardNumber(int number) {\r\n this.number = number;\r\n }", "public synchronized void setAccountNumber(int number) {\n this.accountNumber = number;\n }", "public void setIdCardNo(String idCardNo) {\n\t\tthis.idCardNo = idCardNo;\n\t}", "public void setCreditCardAccount(CreditCardAccount newCreditCard) {\n this.creditCardAccount = newCreditCard;\n }", "public void setCreditCard(eBLBaseComponents.apis.ebay.CreditCardDetailsType creditCard) {\r\n this.creditCard = creditCard;\r\n }", "protected void setPaymentCardNumber(int[] paymentCardNumber) {\n\t\tthis.paymentCardNumber = paymentCardNumber;\n\t}", "@ApiModelProperty(value = \"Card number (masked last 4 digits)\")\r\n public String getCardNumber() {\r\n return cardNumber;\r\n }", "public String getCardNumber() {\n\t\treturn cardNumber;\n\t}", "public void setCredit(int credit) {\n this.credit = credit;\n }", "public void setcardnumfrom(String value) {\n setAttributeInternal(CARDNUMFROM, value);\n }", "public String getCardNumber() {\n return cardNumber;\n }", "public String getCardNumber()\n {\n return cardNumber;\n }", "public String getCardNumber() {\n return this.account;\n }", "public Builder setMcc(int value) {\n \n mcc_ = value;\n onChanged();\n return this;\n }", "public Builder setMcc(int value) {\n \n mcc_ = value;\n onChanged();\n return this;\n }", "CarPaymentMethod creditCardNumber(String cardNumber);", "void setAccountNumber(java.lang.String accountNumber);", "public void setcardnumto(String value) {\n setAttributeInternal(CARDNUMTO, value);\n }", "private void setCC(int CC) {\n\t\tCMN.CC = CC;\n\t}", "public String getCardNumber()\r\n {\r\n return cardNumber;\r\n }", "public void setID(int number) {\n this.clientNumber = number;\n }", "public int getCardNumber() {\n return cardNumber;\n }", "public void setCardNo(java.lang.String param) {\r\n localCardNoTracker = param != null;\r\n\r\n this.localCardNo = param;\r\n }", "public void setCardNo(java.lang.String param) {\r\n localCardNoTracker = param != null;\r\n\r\n this.localCardNo = param;\r\n }", "public void setEmbossCardNum(String value) {\r\n setAttributeInternal(EMBOSSCARDNUM, value);\r\n }", "public Builder setAllowedCredit(int value) {\n bitField0_ |= 0x00000001;\n allowedCredit_ = value;\n onChanged();\n return this;\n }", "public MasterCard(String number) {\r\n\t\tsuper(CardType.MASTERCARD, validateNumber(number));\r\n\t}", "public void setPaymentMethodCode_CreditCard() {\n setPaymentMethodCodeAsPaymentMethod(AppCDef.PaymentMethod.CreditCard);\n }", "public CreditCard(String n){\n \n\t\tnumber = n;\n\t\tvalid = true;\n errorCode = 0;\n firstDigit = Integer.parseInt(number.substring(0,1));\n fourthDigit = Integer.parseInt(number.substring(3,4));\n fifthDigit = Integer.parseInt(number.substring(4,5));\n ninthDigit = Integer.parseInt(number.substring(8,9));\n\t}", "public void setCreditCardType (String CreditCardType);", "public void setCardPk(String value) {\r\n setAttributeInternal(CARDPK, value);\r\n }", "public void setAccountNo(int number){\n\t\taccountNo = number;\n\t}", "public double getCardNumber() {\n\t\treturn cardNumber;\n\t}", "public void creditcard() {\n\t\tBy cd=By.xpath(\"//input[@name='creditCard']\");\r\n\t\tWebElement W_cd=wt.WaitForElement(cd, 10);\r\n\t\tW_cd.sendKeys(\"5462897859858\");\r\n\t\t\r\n\t\t}", "public void setIdCard(String idCard) {\n\t\tthis.idCard = idCard;\n\t}", "public int CCID() {\n\t\treturn this.creditCardIDNum;\n\t}", "public Long getCreditNum() {\n return creditNum;\n }", "public void setCardCode(String cardCode) {\n\t\t\tthis.cardCode = cardCode;\n\t\t}", "private void setCard(@NonNull Card card) {\n Debug.trace(\"CardDetails\", card.toString());\n etCardNumber.setText(card.getCardNumber());\n etCardHolderName.setText(card.getCardHolderName());\n// etCardExpiryDate.removeTextListener();\n etCardExpiryDate.setText(DateFormatUtils.stringToStringConversion(card.getExpirationDate(), \"MM/yy\", \"MM/yyyy\"));\n// etCardExpiryDate.addDateSlash(etCardExpiryDate.getEditableText());\n// etCardExpiryDate.addTextListener();\n }", "public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder setControlNumber(java.lang.String value) {\n validate(fields()[4], value);\n this.controlNumber = value;\n fieldSetFlags()[4] = true;\n return this;\n }", "public CreditCard(int pin, String number, String holder, Date expiryDate, int cvc){\r\n this.pin = pin;\r\n this.number = number;\r\n this.holder = holder;\r\n this.expiryDate = expiryDate;\r\n this.cvc = cvc;\r\n}", "public void setAccountNumer(int accountNumber) {\n\t\tif (this.accountNumber == 0) {\n\t\t\tthis.accountNumber = accountNumber;\n\t\t} else {\n\t\t\tSystem.out.println(\"The account number is already assigned to this Customer.\");\n\t\t}\n\t}", "public void setUserCardId(String userCardId) {\n this.userCardId = userCardId;\n }", "public void credit(int userAccountNumber, double amount) {\r\n getAccount(userAccountNumber).credit(amount);\r\n }", "public void setCardNo(String cardNo) {\n this.cardNo = cardNo == null ? null : cardNo.trim();\n }", "public void validateCreditNumber(FacesContext ctx, UIComponent component,\r\n\t\t\tObject value) throws ValidatorException {\n\t\tCreditCardType ccType = (CreditCardType)creditCardTypeInput.getValue();\r\n\t\tBoolean useCC = customer.getUseCreditCard();\r\n if (useCC != null && useCC && ccType != null) {\r\n\t\t\t// Check credit card number\r\n\t\t\tint length;\r\n\t\t\tif (ccType == CreditCardType.CARD_A) {\r\n\t\t\t\tlength = 4;\r\n\t\t\t} else {\r\n\t\t\t\tlength = 5;\r\n\t\t\t}\r\n String ccNumber = (String)value;\r\n\t\t\tif (ccNumber != null && !ccNumber.matches(\"\\\\d{\" + length + \"}\")) {\r\n FacesMessage msg = GuiUtil.getFacesMessage(\r\n ctx, FacesMessage.SEVERITY_ERROR, \"validateCreditCardNumber.NUMBER\", length);\r\n\t\t\t\tthrow new ValidatorException(msg);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void setCard(Card card) {\n this.card = card;\n }", "public int getNumber(){\n return cardNumber;\n }", "public void setCustomerId(Number value) {\n setAttributeInternal(CUSTOMERID, value);\n }", "public void setChallanNo(Number value) {\n setAttributeInternal(CHALLANNO, value);\n }", "public void setCardId(Long cardId) {\r\n this.cardId = cardId;\r\n }", "public int getNumber(){return cardNumber;}", "public void setCLNO(int value) {\n this.clno = value;\n }", "public void setCompnayNum(String comnayNum) {\n this.companyNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "public void setIdcard(String idcard) {\r\n this.idcard = idcard;\r\n }", "public void setCredit(BigDecimal credit) {\n this.credit = credit;\n }", "public String getCardCode() {\n\t\t\treturn cardCode;\n\t\t}", "public void setCreditid(Integer creditid) {\n this.creditid = creditid;\n }", "public void setPaymentInfoInCart(CreditCard cc);", "public void setIdentityCard(String identityCard) {\n this.identityCard = identityCard;\n }", "public void editCc(String cc, String key) throws CreditCardAPIException;", "public void setIDCardNo(java.lang.String param) {\r\n localIDCardNoTracker = param != null;\r\n\r\n this.localIDCardNo = param;\r\n }", "public void setIDCardNo(java.lang.String param) {\r\n localIDCardNoTracker = param != null;\r\n\r\n this.localIDCardNo = param;\r\n }", "@ApiModelProperty(value = \"Unique identifier for this stored card\")\r\n public Integer getCustomerProfileCreditCardId() {\r\n return customerProfileCreditCardId;\r\n }", "public void setCCN(int ccn0){\n\t\tccn = ccn0;\n\t}", "public String getCardNo() {\n\t\treturn cardNo;\n\t}", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }", "public void setIdcard(String idcard) {\n\t\tthis.idcard = idcard;\n\t}", "public void setCsNumber(String csNumber) {\n this.csNumber = csNumber == null ? null : csNumber.trim();\n }", "public void setC_BankAccount_ID (int C_BankAccount_ID);", "Credit(int accountNumber, double creditLine, double outstandingBalance, double interestRate){\n super(accountNumber, outstandingBalance);\n this.creditLine = creditLine;\n this.interestRate = interestRate;\n }", "public void setNumber(int number) {\r\n\t\tthis.number = number;\r\n\t}", "public void setClientNo(DBSequence value) {\n setAttributeInternal(CLIENTNO, value);\n }", "@Override\n public void setSerialNumber(String value) {\n this.serialNumber = value;\n }", "public void setBalance() {\n System.out.print(\"Set the balance of your credit card: \");\n this.balance = Double.parseDouble(scanner.nextLine());\n }", "public void setBudgetCustomerId(Number value) {\n setAttributeInternal(BUDGETCUSTOMERID, value);\n }", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "public void setSerialNumber(java.math.BigInteger serialNumber) {\r\n this.serialNumber = serialNumber;\r\n }", "public void setCardValue(String value) {\n this.Cvalue = value;\n }", "void setNumber(int num) {\r\n\t\tnumber = num;\r\n\t}", "@Override\n protected void setBankNum(int bankNum) {\n }", "public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }", "public void setMerchantNum(String merchantNum) {\n this.merchantNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "public void setNumber(int number)\n {\n this.number = number;\n }", "public void setPhoneNumber(int phoneNumber) {\n\t\tthis.phoneNumber = phoneNumber;\n\t}", "public void setNumber(int number) {\r\n\t\tthis.num = number;\r\n\t}", "public void setNumber(int number) {\n this.number = number;\n }", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}", "public void setNumber(int number) {\n\t\tthis.number = number;\n\t}" ]
[ "0.7709006", "0.70868313", "0.69006693", "0.6802754", "0.6778121", "0.65538144", "0.6467535", "0.6350507", "0.6332479", "0.6327859", "0.6264597", "0.6258197", "0.6244231", "0.62435395", "0.62093633", "0.6208744", "0.6128012", "0.6110656", "0.6103068", "0.6061616", "0.60136884", "0.5920555", "0.58900225", "0.5866481", "0.5866481", "0.5854191", "0.58539903", "0.5831617", "0.5827052", "0.5816734", "0.5800468", "0.57662255", "0.57628304", "0.57628304", "0.5756102", "0.5749159", "0.57279897", "0.56919384", "0.56651366", "0.56637454", "0.5639878", "0.5636473", "0.5630713", "0.56199825", "0.5597261", "0.55690205", "0.55524087", "0.5544706", "0.5531453", "0.55191916", "0.55132943", "0.5508359", "0.55043304", "0.54968214", "0.54747796", "0.5465674", "0.5463943", "0.5457914", "0.5454127", "0.54426", "0.5441251", "0.54372525", "0.54311174", "0.5424417", "0.54095864", "0.5399079", "0.53980523", "0.5387621", "0.5386648", "0.5384367", "0.5366097", "0.53588295", "0.53588295", "0.5349503", "0.53399324", "0.5337658", "0.5333771", "0.5314462", "0.52971023", "0.5295338", "0.5287758", "0.5285806", "0.5282596", "0.52690023", "0.5261611", "0.5255359", "0.5251445", "0.5241906", "0.5239083", "0.5238195", "0.5236697", "0.5236483", "0.5232918", "0.523114", "0.52221805", "0.52181566", "0.52095807", "0.52006316", "0.52006316", "0.52006316" ]
0.64625317
7
Returns the expiry date of this Client's credit card.
public Date getExpiryDate() { return expiryDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.Calendar getExpiryDate() {\r\n return expiryDate;\r\n }", "public String getExpiryDate() {\n return this.expiryDate;\n }", "public Date getExpiryDate()\n {\n return expiryDate;\n }", "public SIPDateOrDeltaSeconds getExpiryDate() {\n return expiryDate ;\n }", "public long getExpiry() {\n return this.expiry;\n }", "public Integer getExpiry() {\n return expiry;\n }", "public int getExpiry()\n {\n return expiry;\n }", "String getExpiry();", "public String getIdCardExpiration() {\n\t\treturn idCardExpiration;\n\t}", "public int getExpiryTime() {\n return expiryTime;\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "public int getExpiry();", "public long getExpirationDate() {\n return expirationDate_;\n }", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "public java.util.Calendar getExpirationDate() {\n return expirationDate;\n }", "public String getExpirationDate() { return date; }", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "long getExpirationDate();", "public String getExpirationDate() {\r\n\t\treturn expirationDate;\r\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "@ApiModelProperty(value = \"The expiration date for the recipient's primary account number in recipientPrimaryAccountNumber\")\n public String getRecipientCardExpiryDate() {\n return recipientCardExpiryDate;\n }", "public Date getExpirationDate() {\n\t\treturn expirationDate;\n\t}", "public Date getExpirationDate() {\n\t\treturn expirationDate;\n\t}", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "public long getExpiry() {\n return this.contextSet.getExpiration();\n }", "public java.util.Date getExpirationDate() {\n return this.expirationDate;\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public long getExpiryMillis()\n {\n return m_dtExpiry;\n }", "public java.util.Calendar getCustIdExpDt() {\n return custIdExpDt;\n }", "public Date getExpireDate() {\n return expireDate;\n }", "public Date getExpireDate() {\n return expireDate;\n }", "public Date getExpireDate() {\n return expireDate;\n }", "public Date getExpireDate() {\n\t\treturn expireDate;\n\t}", "String getSpecifiedExpiry();", "public java.util.Calendar getExpiryTime(){\n return localExpiryTime;\n }", "com.google.type.Date getExpireDate();", "Date getExpiredDate();", "public long getExpiryTime()\n {\n return m_metaInf.getExpiryTime();\n }", "public String getPassportExpiryDate() {\n\t\treturn passportExpiryDate;\n\t}", "public String getExpiredate() {\n\t\treturn expiredate;\n\t}", "Optional<ZonedDateTime> getExpiryDate();", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public int getExpiryTimeSecs() {\n return expiryTimeSecs_;\n }", "public java.util.Date getValidityDateOfLicense() {\n return validityDateOfLicense;\n }", "public Date getExpires() {\r\n return expiresDate;\r\n }", "public String getExpiration() {\n return this.expiration;\n }", "public void setExpiryDate(java.util.Calendar expiryDate) {\r\n this.expiryDate = expiryDate;\r\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "public abstract Date getExpirationDate();", "public void setExpiryDate(Date expiryDate) {\n this.expiryDate = expiryDate;\n }", "@ApiModelProperty(value = \"Card expiration year (four digit)\")\r\n public Integer getCardExpirationYear() {\r\n return cardExpirationYear;\r\n }", "public java.util.Date getExpireTime() {\r\n return expireTime;\r\n }", "public Date getExpireTime() {\n\t\treturn expireTime;\n\t}", "public Date getExpirationTime() {\n return expirationTime;\n }", "public long getExpiration() {\n return expiration;\n }", "public Date\ngetExpire() {\n\treturn expire;\n}", "public Date getDate() {\n if ( expiryDate.isSIPDate() ) {\n Calendar c=( (SIPDate)expiryDate ).getJavaCal();\n return c.getTime();\n }\n else return null; \n }", "public Boolean hasCardExpired(Date currentDate);", "protected final Date getExpirationDate() {\n Session currentSession = sessionTracker.getOpenSession();\n return (currentSession != null) ? currentSession.getExpirationDate() : null;\n }", "public int getExpiryDelay()\n {\n return m_cExpiryDelay;\n }", "public void setExpiry(int expiry)\n {\n this.expiry = expiry;\n }", "String getCoverageExpirationDate(Record inputRecord);", "@Override\n public Date getExpiration()\n {\n return null;\n }", "public Calendar getExpires() {\n Calendar calendar = null;\n if (this.expires != null) {\n calendar = (Calendar)this.expires.clone();\n }\n return calendar;\n }", "long getExpiration();", "public Date getDATE_AUTHORIZED() {\r\n return DATE_AUTHORIZED;\r\n }", "public Date getDATE_AUTHORIZED() {\r\n return DATE_AUTHORIZED;\r\n }", "public java.util.Date getIdentificationExpirationDate() {\n return this.identificationExpirationDate;\n }", "public DTM getProductServiceExpirationDate() { \r\n\t\tDTM retVal = this.getTypedField(11, 0);\r\n\t\treturn retVal;\r\n }", "int getExpiryTimeSecs();", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getRenewalEffectiveDate();", "public String getPoaAgreementExpiry() {\n\t\treturn poaAgreementExpiry;\n\t}", "public final void setexpiry_date(com.mendix.systemwideinterfaces.core.IContext context, String expiry_date)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.expiry_date.toString(), expiry_date);\n\t}", "@FXML\r\n\tString getDate() {\r\n\t\t\tLocalDate creditCardExpiryDate = dpCreditCardExpiryDate.getValue();\r\n\t\t\tDateTimeFormatter formattedExpiryDate = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\r\n\t\t\treturn formattedExpiryDate.format(creditCardExpiryDate);\r\n\t}", "public ExpirationDateType getExpirationDateType() {\n return expirationDateType;\n }", "@Nullable\n public Date getExpiresAt() {\n return expiresAt;\n }", "public Date getDebitEndDate() {\n return debitEndDate;\n }", "public String getExpireTime() {\n return this.ExpireTime;\n }", "private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }", "public Date getIssuanceDate() {\n return (Date) getAttributeInternal(ISSUANCEDATE);\n }", "public long getExpires() {\n return expires;\n }", "public java.math.BigInteger getExpirationYear() {\r\n return expirationYear;\r\n }", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public Date getLastRenewedDate() { return lastRenewedDate; }", "public Date getParkingCardEXPDATE() {\n return (Date) getAttributeInternal(PARKINGCARDEXPDATE);\n }", "public Long getExpireTime() {\n\t\treturn expireTime;\n\t}", "public void setExpirationDate(java.util.Date value);", "public String getExpired() {\n return (String) getAttributeInternal(EXPIRED);\n }", "@Override\n\tpublic java.util.Date getExpiration_Date() {\n\t\treturn _news_Blogs.getExpiration_Date();\n\t}", "public Date getCcrq() {\n return ccrq;\n }", "public java.util.Date getCivDate () {\n\t\treturn civDate;\n\t}", "public Calendar getMessageExpiry() {\n\n // Check if the message expiry has been defined\n if (this.messageHeader.isSetMsgExpiry()) {\n return this.messageHeader.getMsgExpiry();\n }\n\n return null;\n }", "public static LocalDate generateExpiration() {\n LocalDate today = LocalDate.now(); //gives us the information at the moment the program is running\n int expYear = today.getYear() + 5;\n LocalDate exp = LocalDate.of(expYear, today.getMonth(), today.getDayOfMonth());\n return exp;\n }" ]
[ "0.78175867", "0.7631761", "0.7548948", "0.7417515", "0.731952", "0.71914154", "0.71561", "0.70992565", "0.7033506", "0.6996421", "0.69628716", "0.69552094", "0.6929432", "0.6915121", "0.6911992", "0.68974555", "0.6856045", "0.68334895", "0.68305737", "0.68291223", "0.6810878", "0.6807936", "0.6807936", "0.67672414", "0.6763418", "0.6760867", "0.6756976", "0.6756976", "0.67564434", "0.67507684", "0.67432564", "0.66838634", "0.667504", "0.6665669", "0.6646201", "0.6646201", "0.6646201", "0.6628689", "0.66128534", "0.66013134", "0.65771395", "0.65237546", "0.65015215", "0.6487451", "0.6485875", "0.64264125", "0.6425123", "0.6380075", "0.6367449", "0.6353358", "0.6268476", "0.62674135", "0.62288946", "0.62152153", "0.61887085", "0.6184164", "0.6163334", "0.6158565", "0.6148337", "0.6136224", "0.6096841", "0.60463333", "0.60389704", "0.60255665", "0.60020417", "0.5999605", "0.59977496", "0.5971736", "0.5949817", "0.59290624", "0.5924413", "0.5924413", "0.59053576", "0.58980995", "0.58750826", "0.5871015", "0.58637124", "0.5856347", "0.5844065", "0.5838217", "0.5833828", "0.58211815", "0.58184993", "0.58117616", "0.5807938", "0.5805531", "0.5803232", "0.5796404", "0.57892084", "0.578019", "0.57759696", "0.5756971", "0.5736577", "0.5735736", "0.5727916", "0.57176715", "0.5701868", "0.56861573", "0.5680713", "0.5675194" ]
0.76271814
2
Sets the credit card expiry date of this Client.
public void setExpiryDate(Date expiryDate) { this.expiryDate = expiryDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExpiryDate(java.util.Calendar expiryDate) {\r\n this.expiryDate = expiryDate;\r\n }", "public final void setexpiry_date(String expiry_date)\n\t{\n\t\tsetexpiry_date(getContext(), expiry_date);\n\t}", "public final void setexpiry_date(com.mendix.systemwideinterfaces.core.IContext context, String expiry_date)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.expiry_date.toString(), expiry_date);\n\t}", "public void setExpirationDate(java.util.Date value);", "public void setExpiry(int expiry)\n {\n this.expiry = expiry;\n }", "void setExpiredDate(Date expiredDate);", "public void setExpiryDate(SIPDateOrDeltaSeconds e) {\n expiryDate = e ;\n }", "public void setDateExpiry( Timestamp tDateExpiry )\r\n {\r\n _tDateExpiry = tDateExpiry;\r\n }", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "public void setExpirationDate(Date expirationDate) {\r\n this.expirationDate = expirationDate;\r\n }", "public void setExpirationDate(Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setExpirationDate(java.util.Calendar expirationDate) {\n this.expirationDate = expirationDate;\n }", "public void setEXPIRY_DATE(Date EXPIRY_DATE) {\r\n this.EXPIRY_DATE = EXPIRY_DATE;\r\n }", "public java.util.Calendar getExpiryDate() {\r\n return expiryDate;\r\n }", "public Builder setExpirationDate(long value) {\n bitField0_ |= 0x00000200;\n expirationDate_ = value;\n\n return this;\n }", "public void setExpirationDate(Date expirationDate) {\n\t\tthis.expirationDate = expirationDate;\n\t}", "public void setExpirationDate(Date expirationDate) {\n\t\tthis.expirationDate = expirationDate;\n\t}", "public Date getExpiryDate() {\n return expiryDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpireDate(Date expireDate) {\n this.expireDate = expireDate;\n }", "public void setExpirationDate(java.util.Date expirationDate) {\n this.expirationDate = expirationDate;\n }", "public Builder setExpirationDate(long value) {\n\n expirationDate_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }", "public void expiredate() {\n\t\tdr.findElement(By.xpath(\"//input[@id='expiryDate']\")).sendKeys(\"05/2028\");\r\n\t\t\r\n\t\t\r\n\t\t}", "public void setExpiryTime(java.util.Calendar param){\n localExpiryTimeTracker = true;\n \n this.localExpiryTime=param;\n \n\n }", "public Date getExpiryDate()\n {\n return expiryDate;\n }", "public void setRenewalEffectiveDate(java.util.Date value);", "public void setExpiredate(String expierdate) {\n\t\t\tthis.expiredate = expierdate;\n\t}", "@Autowired\n\tpublic void setExpiry(@Value(\"${repair.expiry}\") Duration expiry) {\n\t\tthis.expiry = DurationConverter.oneOrMore(expiry);\n\t}", "public void setExpireDate(Date expireDate) {\n\t\tthis.expireDate = expireDate;\n\t}", "public void setIssuanceDate(Date value) {\n setAttributeInternal(ISSUANCEDATE, value);\n }", "public String getExpiryDate() {\n return this.expiryDate;\n }", "public void setExpirationDate(String expirationDate) {\r\n\t\tthis.expirationDate = expirationDate;\r\n\t}", "private void setCard(@NonNull Card card) {\n Debug.trace(\"CardDetails\", card.toString());\n etCardNumber.setText(card.getCardNumber());\n etCardHolderName.setText(card.getCardHolderName());\n// etCardExpiryDate.removeTextListener();\n etCardExpiryDate.setText(DateFormatUtils.stringToStringConversion(card.getExpirationDate(), \"MM/yy\", \"MM/yyyy\"));\n// etCardExpiryDate.addDateSlash(etCardExpiryDate.getEditableText());\n// etCardExpiryDate.addTextListener();\n }", "public void setIdCardExpiration(String idCardExpiration) {\n\t\tthis.idCardExpiration = idCardExpiration;\n\t}", "public Builder clearExpirationDate() {\n bitField0_ &= ~0x00000020;\n expirationDate_ = 0L;\n onChanged();\n return this;\n }", "public SIPDateOrDeltaSeconds getExpiryDate() {\n return expiryDate ;\n }", "public CloudfrontUrlBuilder expireAt(Date date)\n {\n expireDate.instant = date;\n\n return this;\n }", "@ApiModelProperty(value = \"The expiration date for the recipient's primary account number in recipientPrimaryAccountNumber\")\n public String getRecipientCardExpiryDate() {\n return recipientCardExpiryDate;\n }", "public Builder clearExpirationDate() {\n bitField0_ = (bitField0_ & ~0x00000200);\n expirationDate_ = 0L;\n\n return this;\n }", "public void setExpiryTime(long expiryTime) {\n this.expiryTime = expiryTime;\n }", "public static void setExpires(@NotNull HttpServletResponse response, @Nullable Date date) {\n if (date == null) {\n response.setHeader(HEADER_EXPIRES, \"-1\");\n }\n else {\n response.setHeader(HEADER_EXPIRES, formatDate(date));\n }\n }", "public void setIssuedDate(Date v) \n {\n \n if (!ObjectUtils.equals(this.issuedDate, v))\n {\n this.issuedDate = v;\n setModified(true);\n }\n \n \n }", "@Override\n\tpublic void setExpiration_Date(java.util.Date Expiration_Date) {\n\t\t_news_Blogs.setExpiration_Date(Expiration_Date);\n\t}", "public void setValidityDateOfLicense(java.util.Date validityDateOfLicense) {\n this.validityDateOfLicense = validityDateOfLicense;\n }", "public void setExpires(long expires)\r\n/* 224: */ {\r\n/* 225:338 */ setDate(\"Expires\", expires);\r\n/* 226: */ }", "public void setExpired(String value) {\n setAttributeInternal(EXPIRED, value);\n }", "private void setDefaultExpiryDate() {\n int twoWeeks = 14;\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.add(Calendar.DAY_OF_YEAR, twoWeeks);\n this.expiryDate = calendar.getTime();\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "public Builder setExpiryTimeSecs(int value) {\n bitField0_ |= 0x00000008;\n expiryTimeSecs_ = value;\n onChanged();\n return this;\n }", "public String getExpirationDate() { return date; }", "public void setParkingCardEXPDATE(Date value) {\n setAttributeInternal(PARKINGCARDEXPDATE, value);\n }", "public void setExpirationDate(Timestamp aExpirationDate) {\n expirationDate = aExpirationDate;\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public final void setExpiryTime(long expire) {\n\t\tm_tmo = expire;\n\t}", "public Date getExpireDate() {\n return expireDate;\n }", "public Date getExpireDate() {\n return expireDate;\n }", "public Date getExpireDate() {\n return expireDate;\n }", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "public void setCreditCard(eBLBaseComponents.apis.ebay.CreditCardDetailsType creditCard) {\r\n this.creditCard = creditCard;\r\n }", "@Override\n\tpublic void setTokenExpiryTime(long arg0) {\n\t\t\n\t}", "public void setPassportExpiryDate(String passportExpiryDate) {\n\t\tthis.passportExpiryDate = passportExpiryDate;\n\t}", "public void setExpiryTime(long ldtExpiry)\n {\n m_metaInf.setExpiryTime(ldtExpiry);\n }", "public Date getExpireDate() {\n\t\treturn expireDate;\n\t}", "public long getExpiry() {\n return this.expiry;\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Integer getExpiry() {\n return expiry;\n }", "void setExpired(boolean expired);", "public Date getExpirationDate() {\n\t\treturn expirationDate;\n\t}", "public Date getExpirationDate() {\n\t\treturn expirationDate;\n\t}", "public int getExpiry()\n {\n return expiry;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public void setMessageExpiry(Calendar messageExpiry) {\n\n // Check if the message expiry date and time has been specified\n if (messageExpiry != null) {\n\n // Set the message expiry date and time\n this.messageHeader.setMsgExpiry(messageExpiry);\n\n } else {\n\n // Remove the message expiry specification from the header\n this.messageHeader.unsetMsgExpiry();\n }\n\n // Build the missive document\n this.build();\n }", "public java.util.Calendar getExpirationDate() {\n return expirationDate;\n }", "public String getExpirationDate() {\r\n\t\treturn expirationDate;\r\n\t}", "public void setCustIdExpDt(java.util.Calendar custIdExpDt) {\n this.custIdExpDt = custIdExpDt;\n }", "public Builder clearExpiryTimeSecs() {\n bitField0_ = (bitField0_ & ~0x00000008);\n expiryTimeSecs_ = 0;\n onChanged();\n return this;\n }", "public void setExpiration(long expiration) {\n this.expiration = expiration;\n }", "public java.util.Date getExpirationDate() {\n return this.expirationDate;\n }", "public void setExpirationTime(Date expirationTime) {\n this.expirationTime = expirationTime;\n }", "public void setCtDate(Date ctDate) {\n this.ctDate = ctDate;\n }", "public Date getEXPIRY_DATE() {\r\n return EXPIRY_DATE;\r\n }", "public void setCcrq(Date ccrq) {\n this.ccrq = ccrq;\n }", "public void setExpireTime(java.util.Date expireTime) {\r\n this.expireTime = expireTime;\r\n }", "public void setExpenseSettlementDate (java.util.Date expenseSettlementDate) {\n\t\tthis.expenseSettlementDate = expenseSettlementDate;\n\t}", "public void setExpiryMillis(long lMillis)\n {\n m_dtExpiry = lMillis;\n }", "public static void setExpireDate(ParsePush push, long date ) {\t \n\t\tpush.setExpirationTime(date);\n\t}", "public void setEffectiveDate(java.util.Date value);", "public Builder withExpirationDate(final long expirationDate) {\n this.expirationDate = LocalDateTime.ofInstant(\n Instant.ofEpochSecond(expirationDate), ZoneId.systemDefault()\n );\n return this;\n }", "public void setExpireTime(String ExpireTime) {\n this.ExpireTime = ExpireTime;\n }", "public void setExpirationDateType(ExpirationDateType aExpirationDateType) {\n expirationDateType = aExpirationDateType;\n }", "public void setLicenseDate(java.sql.Timestamp value) {\n\t\tsetValue(org.jooq.example.jaxrs.db.routines.GenerateKey.LICENSE_DATE, value);\n\t}", "public Builder setExpires(long value) {\n copyOnWrite();\n instance.setExpires(value);\n return this;\n }", "public void setDATE_AUTHORIZED(Date DATE_AUTHORIZED) {\r\n this.DATE_AUTHORIZED = DATE_AUTHORIZED;\r\n }", "public void setDATE_AUTHORIZED(Date DATE_AUTHORIZED) {\r\n this.DATE_AUTHORIZED = DATE_AUTHORIZED;\r\n }" ]
[ "0.7377642", "0.70495754", "0.7047678", "0.6808764", "0.676833", "0.6684785", "0.66721946", "0.6507991", "0.6473147", "0.64579225", "0.6395739", "0.6388505", "0.6352643", "0.6283725", "0.62519735", "0.6235477", "0.6235477", "0.6232193", "0.6231172", "0.6231172", "0.6231172", "0.6231172", "0.6220751", "0.62093586", "0.610668", "0.6099081", "0.6095987", "0.60426366", "0.60346353", "0.60228515", "0.5996513", "0.59928703", "0.5986191", "0.59604836", "0.5941578", "0.590034", "0.58821166", "0.585905", "0.58150923", "0.58073115", "0.58021945", "0.5775542", "0.5707879", "0.56958055", "0.56844664", "0.56529546", "0.5628761", "0.5593288", "0.5586033", "0.55526793", "0.5535807", "0.55309147", "0.5521136", "0.5514833", "0.5496987", "0.5496086", "0.54872674", "0.5483599", "0.5483599", "0.5483599", "0.5475226", "0.54750705", "0.5469398", "0.5442086", "0.54413503", "0.5412699", "0.5404817", "0.5404049", "0.53963995", "0.53959906", "0.53959906", "0.5391096", "0.53881365", "0.53752667", "0.53752667", "0.5369322", "0.5356981", "0.5349743", "0.53497124", "0.53218645", "0.5311652", "0.5302747", "0.5299748", "0.5297917", "0.52900445", "0.5270528", "0.5270417", "0.5269625", "0.52546513", "0.5242879", "0.52398014", "0.52324814", "0.5227212", "0.5224464", "0.5221008", "0.5210507", "0.5207634", "0.5207005", "0.5200813", "0.5200813" ]
0.73257184
1
On selecting a spinner item
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { String item = parent.getItemAtPosition(position).toString(); ArrayList<Integer> list = map.get(item); a = list.get(0); b = list.get(1); setupChart(); // Showing selected spinner ite Toast.makeText(parent.getContext(), "Selected: " + item, Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View v, int position, long id)\n {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n spinnerItemSelected = parent.getItemAtPosition(pos).toString();\n }", "void onItemSelected();", "void onItemSelected();", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id)\n {\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n }", "public void onItemSelected(int id);", "@Override\n\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n\t\t}", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n\n\n }", "public void onItemSelected(int position);", "@Override\n\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n\n }", "@Override\n\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos,\n\t\t\tlong id) {\n\t\t\n\t\t\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n isSelected = true;\n\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n }", "public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n userType = (int) arg3;\n /* 将mySpinner 显示*/\n arg0.setVisibility(View.VISIBLE);\n }", "public void onItemSelected(String id);", "public void onItemSelected(String id);", "public void onItemSelected(String id);", "public void onItemSelected(String id);", "public void onItemSelected(String id);", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int position,long id) {\n\n\n\n\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onItemSelected(View view, int position) {\n }", "@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\n\t}", "@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\n\t}", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n String mselection = mSpinner.getSelectedItem().toString();\n Toast.makeText(getApplicationContext(), \"selected \" + mselection, 30).show();\n /**** do your code*****/\n\n if (mselection.equals(\"New Location\")){\n Intent i = new Intent(getApplicationContext(), NewLocation.class);\n startActivity(i);\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n if (position != mClickTypeSelection) {\n setActionSpinner(true, position);\n }\n }", "public void onItemSelected(Long id);", "void onItemSelected(Bundle args);", "@Override\r\n public void onItemChosen(View labelledSpinner, AdapterView<?> adapterView, View itemView, int position, long id) {\r\n String selectedText = adapterView.getItemAtPosition(position).toString();\r\n switch (labelledSpinner.getId()) {\r\n case R.id.spinner_planets:\r\n //Toast.makeText(getActivity(), \"Selected: \" + selectedText, Toast.LENGTH_SHORT).show();\r\n selectTextSpinner = selectedText;\r\n break;\r\n // If you have multiple LabelledSpinners, you can add more cases here\r\n }\r\n }", "public void onItemSelected(AdapterView<?> parent, View v, \n\t int pos, long id) {\n\t }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = (String) parent.getItemAtPosition(position);\n selectedSports = item;\n Log.d(\"testing Spinner\", \"Spinner item selected is: \" + selectedSports + \" \" + item.toString());\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n choice=pos;\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n //beaconselected.setText(item);\n\n // Showing selected spinner item\n if(!item.equals(\"select a beacon\")){\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n x++;\n beaconManager.stopRanging(beaconRegion);\n t=0;\n //Toast.makeText(this, \"Search stopped\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView,\n View view, int i, long l) {\n mSpinnerLabel = adapterView.getItemAtPosition(i).toString();\n showText(view);\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n brand_id = String.valueOf(brand_list.get(i).getBrandId());\n brandName = brand_list.get(i).getBrand_name();\n\n Log.d(\"fsdklj\", brand_id + brandName);\n\n hitSpinnerSeries(brand_id);\n\n }", "public void addListenerOnSpinnerItemSelection() {\n spinner1.setOnItemSelectedListener(new CustomOnItemSelectedListener());\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view,\n int position, long id) {\n //So this code is called when ever the spinner is clicked\n //Brug position til at populate editQty med indhold fra QtySpinner\n editQty.setText(\"\");\n editQty.clearFocus();\n }", "public void onItemSelected(AdapterView<?> parent, View view, \r\n int pos, long id) {\n\t\tString word = (String) parent.getItemAtPosition(pos);\r\n\t\tif (!word.equalsIgnoreCase(\"select a word from this list\")) {\r\n\t\t\tToast.makeText(this, \"You selected \\\"\" + parent.getItemAtPosition(pos) + \"\\\" from the Spinner\", Toast.LENGTH_LONG).show();\r\n\t\t}\r\n }", "@Override\n public void onItemSelected(MaterialSpinner view, int position, long id, Object item) {\n\n if(item.equals(\"Other\")){\n othereditText.setVisibility(View.VISIBLE);\n serviceSelected = othereditText.getText().toString().trim();\n }else{\n serviceSelected = item+\"\";\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int pos, long arg3) {\n societyName = String.valueOf(societyNameSpinner\n .getSelectedItem());\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent2, View view2, int position2, long id2) {\n }", "public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n }", "public void onItemSelected(String studentSelected);", "@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t\tint position = gameSpinner.getSelectedItemPosition();\n\t\t\t\t\t\tif (macGames[+position] != \"-- Choose sport --\") {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\"You have selected \" + macGames[+position],\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();*/\n\t\t\t\t\t\t\tchosenGame = macGames[+position];\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private void spinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.planets_array, R.layout.simple_spinner_item_new);\n// Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n// dropDownViewTheme.\n planetsSpinner.setAdapter(adapter);\n planetsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n Object itemAtPosition = parent.getItemAtPosition(position);\n Log.d(TAG, \"onItemSelected: \" + itemAtPosition);\n\n String[] stringArray = getResources().getStringArray(R.array.planets_array);\n Toast.makeText(DialogListActivity.this, \"选择 \" + stringArray[position], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n Toast.makeText(DialogListActivity.this, \"未选择\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_dokter2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"You selected: \" + nama_dokter2,\n Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n\n // To retrieve the user's selected item in the Spinner, use getItemAtPosition().\n String spinnerLabel = adapterView.getItemAtPosition(i).toString();\n displayToast(spinnerLabel);\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint position, long arg3) {\n\t\t\t\tif (position == 1) {\n\t\t\t\t\t// show it\n\t\t\t\t\tsubjectSpinner.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// hide it\n\t\t\t\t\tsubjectSpinner.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> parent3, View view3, int position3, long id3) {\n }", "public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\t\t\n\t}", "public void onNothingSelected(AdapterView<?> parent) {\n // Toast.makeText(getApplicationContext(), \"nada en el spinner\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n\t\t\t\thasilSpinJurusan = parent.getItemAtPosition(pos).toString();\r\n\t\t\t\tString[] parts = hasilSpinJurusan.split(\"--\");\r\n\t\t\t\tString kode = parts[0];\r\n\t\t\t\tkodeJurusan=kode;\r\n\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n id = i;\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n TextView selectedItemTV = (TextView) parent.getSelectedView();\n if(selectedItemTV != null)\n selectedItemTV.setTextAppearance(R.style.SpinnerSelectedItem);\n }", "public void onItemSelected(AdapterView<?> adapterView, \n\t\t View view, int i, long l) {\n\t\t \tString selected2 = colorGraySpin.getSelectedItem().toString();\n\t\t\t Toast.makeText(PainActivity.this,\"You Selected : \"\n\t\t\t + selected2,Toast.LENGTH_SHORT).show(); \n\t\t if (selected2.equals(\"Colorscale\")) {\n\t\t \t setColorBrush(false);\n\t\t } else{\n\t\t \t setColorBrush(true);\n\t\t }\n\t\t \t\n\t\t }", "@Override\n public void onClick(View v)\n {\n mySpinner.performClick();\n int getPosition = (Integer) v.getTag();\n\n toggleSelection(getPosition);\n\n\n notifyDataSetChanged();\n\n /**\n * if clicked position is one\n * that means you want clear all select item in list\n */\n /* if (getPosition == 1)\n {\n clearList();\n }\n */\n /**\n * if clicked position is two\n * that means you want select all item in list\n */\n /* else if (getPosition == 2)\n {\n fillList();\n }*/\n }", "void onItemSelected(int index, T item) throws RemoteException;", "public void onItemSelected(AdapterView<?> parent, View view, int position, long id) \r\n\t{\n\t\tString food = parent.getItemAtPosition(position).toString();\r\n\t\t\r\n // Showing selected spinner item\r\n Toast.makeText(parent.getContext(), \"You selected: \" + food,\r\n Toast.LENGTH_LONG).show();\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id){\n\t\t\t\tLog.v(LOG_TAG, \"Maze generation algorithm selection: \" + spinner.getSelectedItem().toString());\n\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n\n try{\n String s = \"\";\n Log.e(\"mytag\",\"(String) parent.getItemAtPosition(position):\"+(String) parent.getItemAtPosition(position).toString().trim());\n if (parent.getItemAtPosition(position).toString().trim().equals(\"בחר\")){\n s = \"-1\";\n }else{\n s = String.valueOf(ctype_map.get(parent.getItemAtPosition(position).toString().trim()).getCtypeID());\n }\n setCcustomerSpinner(s);\n }catch(Exception e){\n helper.LogPrintExStackTrace(e);\n }\n Log.e(\"mytag\", (String) parent.getItemAtPosition(position));\n //statusID = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusID();\n //statusName = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusName();\n //Toast.makeText(getApplication(), \"status: \" + s, Toast.LENGTH_LONG).show();\n //Log.v(\"item\", (String) parent.getItemAtPosition(position));\n }", "@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\t\tsearchText = spinner1.getSelectedItem().toString();\n\t\tSystem.out.println(\"Selected option = \"+searchText);\n\t\t\n\t}", "public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_pasien2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"You selected: \" + nama_pasien2,\n Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n tuning = position;\n setUpDisplay();\n\n // Showing selected spinner item\n if (tuner1 == 3) {\n Toast.makeText(TunerActivity.this, \"\" + item, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n switch (parent.getId()) {\n case R.id.fromspinner:\n fromitem = parent.getItemAtPosition(position)\n .toString().replaceAll(\" \", \"_\").toLowerCase();\n break;\n case R.id.tospinner:\n toitem = parent.getItemAtPosition(position)\n .toString().replaceAll(\" \", \"_\").toLowerCase();\n break;\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n //NOTE: Position 0 is reserved for the manually added Prompt\n if (position > 0) {\n //Retrieving the Category Name of the selection\n mCategoryLastSelected = parent.getItemAtPosition(position).toString();\n //Calling the Presenter method to take appropriate action\n //(For showing/hiding the EditText field of Category OTHER)\n mPresenter.onCategorySelected(mCategoryLastSelected);\n } else {\n //On other cases, reset the Category Name saved\n mCategoryLastSelected = \"\";\n }\n }", "@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n\t\t\t\t\t\tString sel = spinner.getSelectedItem().toString();\n\t\t\t\t\t\tLog.e(\"PowerSocketSensitive\", sel + \"\");\n\t\t\t\t\t}", "@Override\n\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\t\t\tListView listView = (ListView) parent;\n\t\t\tString item = (String) listView.getSelectedItem();\n//\t\t\tToast.makeText(SearchGroupActivity.this, \"onItemSelected = \" + item, Toast.LENGTH_LONG).show();\n\t\t}", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tif (spinner3.getSelectedItem().equals(\"Sedentary\")) {\n\t\t\t\t\tactive = 1.2;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Lightly Active\")) {\n\t\t\t\t\tactive = 1.375;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\n\t\t\t\t\t\t\"Moderately Active\")) {\n\t\t\t\t\tactive = 1.55;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Highly Active\")) {\n\t\t\t\t\tactive = 1.725;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Extra Active\")) {\n\t\t\t\t\tactive = 1.9;\n\t\t\t\t}\n\t\t\t}", "private void spinnerAction() {\n Spinner spinnerphonetype = (Spinner) findViewById(R.id.activity_one_phonetype_spinner);//phonetype spinner declaration\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.phone_spinner, android.R.layout.simple_spinner_item); //create the spinner array\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //set the drop down function\n spinnerphonetype.setAdapter(adapter); //set the spinner array\n }", "@Override\n public void onItemSelected(AdapterView<?> parent4, View view4, int position4, long id4) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View spinnerView, int position,\n long spinnerId) {\n\n try {\n\n if (parent.getId() == R.id.aptNameSpinner) {\n\n if (SAConstants.OTHER.equals(apartmentNameSpinner.getItemAtPosition(position).toString())) {\n DialogFragment apartmentName = new NewApartmentDialog();\n apartmentName.show(getSupportFragmentManager(), \"\");\n }\n } else if (parent.getId() == R.id.aptTypeSpinnerSearch || parent.getId() == R.id.universityNamesSpinner) {\n addApartmentNames();\n }\n\n\n } catch (Exception e) {\n ErrorReporting.logReport(e);\n }\n\n }", "private void spinner() {\n spn_semester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_database = position;\n if(spn_semester.getSelectedItemPosition() == 0){\n listadaptor1();\n }\n else if(spn_semester.getSelectedItemPosition() == 1){\n listadaptor2();\n }\n else{\n listadaptor3();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing\n }\n });\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n if (position != mHoldTypeSelection) {\n setActionSpinner(false, position);\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n /*Intent people_intent= new Intent();\n people_intent.putExtra(\"people\",item);\n setResult(RESULT_OK,people_intent);\n finish();*/\n }", "public void onItemSelected(AdapterView<?> adapterView, \n\t\t View view, int i, long l) {\n\t\t \tString selected = spinner.getSelectedItem().toString();\n\t\t\t Toast.makeText(PainActivity.this,\"You Selected : \"\n\t\t\t + selected +\" brush \",Toast.LENGTH_SHORT).show(); \n\t\t \n\t\t \tif (selected.equals(\"Small\")) {\n\t\t \t\tdrawPaint.setStrokeWidth(20);\n\t\t \t} else if (selected.equals(\"Medium\")){\n\t\t \t\tdrawPaint.setStrokeWidth(40);\n\t\t \t} else {\n\t\t \t\tdrawPaint.setStrokeWidth(60);\n\t\t \t}\n\t\t }", "@Override\n public void onItemSelected(AdapterView<?> parent5, View view5, int position5, long id5) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapter, View v,\n int position, long id) {\n mappos = position;\n findmapinfo(position , adapter.getItemAtPosition(position).toString());\n \n // Showing selected spinner item\n \n }", "private void itemtypeSpinner() {\n ArrayAdapter<CharSequence> staticAdapter = ArrayAdapter\n .createFromResource(getContext(), R.array.select_array,\n android.R.layout.simple_spinner_item);\n\n // Specify the layout to use when the list of choices appears\n staticAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Apply the adapter to the spinner\n mItemTypeSpinnerA2.setAdapter(staticAdapter);\n\n mItemTypeSpinnerA2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n String itemtypeText = (String) parent.getItemAtPosition(position);\n if (itemtypeText.equals(\"Mobile Phones\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.VISIBLE);\n mInputLayoutItemImeiA2.setClickable(true);\n\n\n } else if (itemtypeText.equals(\"Laptops\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n } else {\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n }\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mItemTypeSpinnerA2.getItemAtPosition(0);\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n\n }\n });\n\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int index, long id) {\n // Take action depending on what was clicked\n switch (adapterView.getId()) {\n case R.id.year_spinner:\n try {\n year = Integer.parseInt((String) yearSpinner.getSelectedItem());\n populateMakeSpinner(year);\n newCar.setYear(year);\n Log.d(\"year_value\", Integer.toString(year));\n } catch (Exception e) { e.printStackTrace(); }\n break;\n case R.id.make_spinner:\n try {\n make = (String) makeSpinner.getSelectedItem();\n populateModelSpinner(make, year);\n newCar.setMake(make);\n Log.d(\"make_value\", make);\n } catch (Exception e) { e.printStackTrace(); }\n break;\n case R.id.model_spinner:\n try {\n model = (String) modelSpinner.getSelectedItem();\n populateTrimSpinner(model, make, year);\n newCar.setModel(model);\n Log.d(\"model_value\", model);\n } catch (Exception e) { e.printStackTrace(); }\n break;\n case R.id.trim_spinner:\n try {\n trim = (String) trimSpinner.getSelectedItem();\n int modelID = trimMap.get(trim);\n newCar.setTrim(trim);\n updateCarInfo(modelID);\n } catch (Exception e) { e.printStackTrace(); }\n break;\n }\n }", "@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\r\n\t\t// Action to be taken after selecting a spinner item\r\n\t\treturn false;\r\n\t}", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tindex1=arg2;\n\t\t\t\ttype0 = spn1.get(arg2).getType_id();\n\t\t\t\ttype_name = spn1.get(arg2).getType_name();\n\t\t\t\tHttpRequest(1, APIURL.CHECK.ADDARTICLE1, spn1.get(arg2)\n\t\t\t\t\t\t.getType_id(), \"\");\n\t\t\t\tspn3.clear();\n\t\t\t\tspinnerAdapter3.setList(spn3);\n\t\t\t\tspinnerAdapter3.notifyDataSetChanged();\n\t\t\t\tspn4.clear();\n\t\t\t\tspinnerAdapter4.setList(spn4);\n\t\t\t\tspinnerAdapter4.notifyDataSetChanged();\n\t\t\t\tspn5.clear();\n\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n actionType = String.valueOf(actionTypeSpiner\n .getSelectedItem());\n if (actionType == \"Upload\"\n || actionType.equals(\"Upload\")) {\n viewLay.setVisibility(View.GONE);\n action = true;\n fileNameTxt.setVisibility(View.GONE);\n doOpen();\n } else if (actionType == \"View\"\n || actionType.equals(\"View\")) {\n action = false;\n fileNameTxt.setVisibility(View.GONE);\n submitTxt.setEnabled(true);\n }\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n if(parent.getId()==R.id.Branch_Spinner)\n mNotification.setBranch((String)parent.getItemAtPosition(pos));\n\n if(parent.getId()==R.id.Year_Spinner)\n mNotification.setYear((String)parent.getItemAtPosition(pos));\n\n if(parent.getId()==R.id.Section_Spinner)\n mNotification.setSection((String)parent.getItemAtPosition(pos));\n\n\n\n\n\n\n }", "public void onItemSelected(AdapterView<?> parent, View view, int pos, long id){\n this.mAssessmentType = parent.getItemAtPosition(pos).toString();\n }", "@Override\r\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n switch (position) {\r\n case 0:\r\n mode = 1;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n case 1:\r\n mode = 2;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n case 2:\r\n mode = 3;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n }\r\n }" ]
[ "0.8101937", "0.8101937", "0.80715865", "0.8067969", "0.8067969", "0.8045854", "0.8045854", "0.8045854", "0.8044525", "0.8044457", "0.803459", "0.803459", "0.80322504", "0.8012349", "0.80110997", "0.801041", "0.799324", "0.7973094", "0.79713035", "0.79694265", "0.7965614", "0.7954492", "0.7920556", "0.7918062", "0.7908752", "0.7905685", "0.78892624", "0.7877675", "0.7877675", "0.7877675", "0.7877675", "0.7877675", "0.7875738", "0.787132", "0.78684884", "0.7849793", "0.7814666", "0.78009266", "0.78009266", "0.7794192", "0.7784938", "0.7766549", "0.7748782", "0.7724414", "0.7706388", "0.7689084", "0.7667053", "0.7660131", "0.7615996", "0.75019306", "0.7496903", "0.74761087", "0.74678165", "0.74664557", "0.7455748", "0.7432057", "0.7430355", "0.7426232", "0.7418576", "0.74153507", "0.74152684", "0.7413444", "0.7410379", "0.7403035", "0.7401089", "0.7370901", "0.7351161", "0.735023", "0.7346181", "0.73417604", "0.73407406", "0.73398614", "0.73214847", "0.73075163", "0.73056406", "0.72797984", "0.72780734", "0.7276099", "0.7272889", "0.7260912", "0.72575253", "0.7252238", "0.7231424", "0.7226689", "0.7216527", "0.72152925", "0.72088766", "0.72077835", "0.72029835", "0.71897525", "0.71662694", "0.7163383", "0.7161234", "0.7153875", "0.71420026", "0.714025", "0.71369666", "0.71308124", "0.7127484", "0.7124449" ]
0.71882266
90
TODO Autogenerated method stub
public void onNothingSelected(AdapterView<?> arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "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.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1